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

Added feature for loading and saving camera_info from/to camera flash memory. #9

Open
wants to merge 2 commits into
base: indigo
Choose a base branch
from

Conversation

qbranchmaster
Copy link

I often change my camera's lens, so there is a need to calibrate camera frequently.
For camera calibration I use camera_calibration ROS package, but it is not handy to create ini or yml calibration file and then load them.
I added feature for saving camera_info data in camera non-volatile memory. With this feature I run only camera_calibration package and it stores camera_info in camera memory.

@miquelmassot
Copy link
Contributor

Hi @qbranchmaster! Thanks for the contribution.
I've seen a similar code in prosilica_nodelet.cpp, however they were saving the calibration in the user memory of the camera. You are using the LUT memory, which can be used as color correction, for storing the calibration. I don't think that's a good idea.

I haven't find any feature on the camera to store calibration or to perform it. Could you explain your motivation on saving this data onboard the camera? I'm not really sure to totally understand you. If you change your lenses, you have to calibrate each time. Why do you load the calibration in the camera?

@qbranchmaster
Copy link
Author

I know that using LUT memory for storing camera_info isn't a good idea. If somebody doesn't want to store camera_info in camera memory (because using it for other purposes), can still load camera_info from file.

When I asked Vimba user support about saving user data to camera memory, they told me that I have to use LUT memory. I admit, that I was surprised, but I wasn't able to find another solution in Vimba SDK to store data in camera memory.

Some time ago I was using prosilica_nodlet and this feature was very useful and handy for me. Using camera_calibration ROS package there was a possibility to perform fast camera calibration. New calibration data was saved automatically by service to camera memory and then automatically loaded. I didn't have to transfer ini or yml files between other computers.

I know that this feature which I implemented is rather specific. It is very useful for me. Maybe only for me. But I also think that it is alway good to have two possible solutions.


std::string cam_name = cam_.getCameraName();

if(camera_calibration_parsers::parseCalibrationIni(calibration_data, cam_name, ci)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ini format only supports "Plumb Bob" distortion model. To support other polynomial modes, yaml format must be used. Could you change this function for "readCalibrationYml" ?

@JWhitleyWork
Copy link

This fork is no longer actively maintained. Please see our new fork at https://github.com/astuff/avt_vimba_camera, which has been updated and recently released.

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

Successfully merging this pull request may close these issues.

3 participants