-
Notifications
You must be signed in to change notification settings - Fork 35
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
Camera_info is incorrectly published for Format7 image frames #36
Comments
The exception text provided does not tell me what went wrong. What device are you using, and which Format7 mode? Please post the exact CameraInfo published by the driver, and exactly what you republished to work around the problem. In particular, how was This driver attempts to follow the recommendations of REP-0104. Those recommendations are quite complex and we may have misunderstood them. @vrabaud: any interpretive assistance you can give would be most helpful. |
I believe it's all in the comments of ros-perception/image_pipeline#55 : the ROI and the image info do not match up: the ROI is filled as if the dimensions of the image were the original ones (i.e. the ones from camera_info) while the image has the dimensions of the cropped image. |
That issue reported different information for some other camera, as best I can tell. I really need the exact CameraInfo for this device, also the device's make, model and Format7 mode. Almost every camera handles Format7 differently. I can't imagine solving this problem without that kind of information. Specifically, if the Image is being cropped to the specified ROI, that must be happening in the camera, not the driver. BTW, that is normally what people want when using these parameters. |
It looks like @LucidOne may have calibrated against an image stream that was binned or cropped. Camera1394 will accept a calibration that matches either the full frame or the ROI, and it will pass along the calibration's height and width in the CameraInfo messages. If a binned or ROI-based calibration is used, it will break downstream nodes that expect the cinfo.width/height values to describe the full frame. https://github.com/ros-drivers/camera1394/blob/master/src/nodes/format7.cpp#L437 @Lenksiy, what are the dimensions in your calibration file? Do they match the ROI or the full frame? |
My config yaml contains these parameters
and calibration file start with these lines
|
@jack-oquin yes the camera crops it inside. |
I think my problems are with the prosilica driver, but I'm on vacation at the moment so I can't actually check |
@Lenskiy: please paste in one frame of your camera_info topic contents. You can use this command, or something similar depending on your actual topic name:
We really need that information. If possible, please do the same with your modified camera_info topic. I still don't know the exact make and model of camera you are using. Please post. |
I should have done it in a first place. Will do it in a few hours, not at the computer with the cameras now.
|
I suspect @ktossell is pointing us in the right direction. I don't see any use cases in REP-0104, that are exactly like this. In cropped video mode, the height and width are full resolution. They do not match the ROI height and width. That use case recommends setting A good option is to see if your camera works correctly with the entire image calibrated, since that is clearly the recommended REP-0104 approach. |
@Lenskiy: Any new information about this problem? |
I'm having this same problem. I have a Point Grey Firefly MV MTC and calibrated in Format7_Mode1 (cropped to 640x480, then binned to 320x240). Launch file:
I calibrated with this setting which produced the following YAML file:
Launching the driver with that calibration gives the following CameraInfo:
The parameters do not get filled in and the following warning is produced:
Reading REP-0104, it seems like one is only supposed to calibrate with the full size image and any cropping or binning should be noted (i.e. we should not pretend that the above camera is actually 320x240). Is that correct/documented anywhere? |
Update: do_rectify is set to True however, when it should be set to False (see use cases 3 and 5 in REP 0104). If I'm interpreting the REP correctly, the user should be able to set do_rectify manually, which doesn't seem supported right now. |
Thanks for the detailed report, @boblob. The driver currently sets It would be good if we can come up with a patch for use with binning to fix that bug. Your implicit suggestion that we add a Does that make sense to you, @boblob, @Lenskiy and @ktossell? |
That makes sense to me. I agree that REP-0104 is very confusing and after reading through it, it didn't seem like there was an easy way to automate the choice of |
There is a problem in the way camera1394 package publishes camera_info. It adds non zero ROI parameters, however it publishes already cropped image. OpenCV tries to crop ROI from the already cropped image.
Originally the issue was posted here
ros-perception/image_pipeline#55 (comment)
The text was updated successfully, but these errors were encountered: