Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binning and brightness bug #26

Closed
xepost opened this issue Sep 8, 2017 · 5 comments
Closed

Binning and brightness bug #26

xepost opened this issue Sep 8, 2017 · 5 comments

Comments

@xepost
Copy link

xepost commented Sep 8, 2017

Hi,

I think I find a minor bug. I recently got some pylon cameras, when I was playing with the package I tried to use binning and set the brightness to a set value but it does not seem to work. Ii get the following error message.

[ WARN] [1504852077.113283476]: [] name not valid for camera_info_manger
[ INFO] [1504852077.141460250]: CameraInfoURL needed for rectification! ROS-Param: '/pylon_camera_node/camera_info_url' = '' is invalid!
[ WARN] [1504852077.141528307]: Will only provide distorted /image_raw images!
[ INFO] [1504852077.172282456]: Setting horizontal binning_x to 2
[ WARN] [1504852077.172356193]: The image width of the camera_info-msg will be adapted, so that the binning_x value in
[ INFO] [1504852077.200125703]: Setting vertical binning_y to 2
[ WARN] [1504852077.200154708]: The image height of the camera_info-msg will be adapted, so that the binning_y value i
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 576240) >= this->size() (which is 576000)
[pylon_camera_node-2] process has died [pid 3716, exit code -6, cmd /home/xepost/catkin_ws/devel/lib/pylon_camera/pylolon_camera_node __log:=/home/xepost/.ros/log/d93f9a52-945e-11e7-be19-80fa5b351634/pylon_camera_node-2.log].
log file: /home/xepost/.ros/log/d93f9a52-945e-11e7-be19-80fa5b351634/pylon_camera_node-2*.log
^C[rosout-1] killing on exit
[master] killing on exit
shutting down processing

I change the binning values to binning_x: 1 binning_y: 1 and it starts to work again. Any idea how to fix it?

Thanks!

@marc-up
Copy link
Contributor

marc-up commented Sep 8, 2017

Thanks for reporting! You're right this is a logical bug which we didn't think about up to now. The mean brightness of the image is calculated by only taking into account a subset of pixel. This subset is represented as a vector of indices. When changing the image size, this index vector is not recalculated and the access leads to above vector-range-error. I'll think about a solution and will push a fix next week.

@xepost
Copy link
Author

xepost commented Sep 8, 2017

Hi Marcel,

If I can come up with some other solution before you do I will let you know, but seems unlikely since I am on a tight schedule.

@marc-up
Copy link
Contributor

marc-up commented Sep 8, 2017

I just finished implementing a solution for this issue, but will test it on monday before releasing it.

@ghost ghost closed this as completed in 03b8f70 Sep 11, 2017
@marc-up
Copy link
Contributor

marc-up commented Sep 11, 2017

I published the changes and would be happy if you can give me some feedback ;-)

@xepost
Copy link
Author

xepost commented Sep 12, 2017

Hi Marcel ,

Sorry for the late reply. I have tested with 2 Dart and one Ace model all working fine. My tests were simply compiling and verifying the image acquisition. I will let you know if I can do more tests.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants