Open jhk0219 opened 11 months ago
Thank you very much for your interest in this toolbox.
I have a few questions regarding your setup:
A few clarifications:
min_perc_pts
to a lower value (e.g., 0.3 --> 30% of the corner visible required to consider the board for calibration)I am looking forward to hearing back from you and seeing how we can help you. Also, please do not hesitate to share some of your pictures with us if possible.
I have a few questions regarding your setup:
- Zoom/Focus: Did you fixed the focus and zoom of Camera 1? A camera with auto-focus and variable focal length cannot be calibrated this way. +Camera 1 has the ability to zoom and focus. Camera 2 does not have either. We turned off auto focus on camera 1 and moved the frames on both cameras to overlap as much as possible. Because Camera2 has a much wider frame, there are parts of the frame where camera 1 cannot see
- Individual calibration: Have you tried calibrating Camera 1 and Camera 2 separately? What happens when you run the code with a single camera? +Yes, we were not able to get good results. We got infinite error values
- Versioning: Are you using the Docker provided with MC-Calib to avoid any versioning issues? +Yes we installed using MC-Calib's instructions
- Syncrho: Are the cameras perfectly synchronized? If you have motion blur, I suspect something is moving (either in the scene or due to camera ego-motion). If the cameras are not synchronized via any hardware, then the board and the cameras should be perfectly static during the image capture. +Hardware synchronization is impossible for out setup. Instead, we did notice very small amounts of movement on the camera, either due to wind or other factors. We tried to create an environment where nothing in the frame moves.
- log: Could you provide us with the entire log? It would help to see exactly where the code is crashing. - Config: Could you also share your configuration file? %YAML:1.0
######################################## Boards Parameters ###################################################
number_board: 1 # number of boards used for calibration (for overlapping camera 1 is enough ...)
number_x_square: 4 #number of squares in the X direction
number_y_square: 6 ##number of squares in the Y direction
resolution_x: 4000 # horizontal resolution in pixel
resolution_y: 6000 # vertical resolution in pixel
length_square: 0.04 # parameters on the marker (can be kept as it is)
length_marker: 0.03 # parameters on the marker (can be kept as it is)
number_board: 1 # number of boards used for calibration (for overlapping camera 1 is enough ...)
square_size: 5.4375 #5.4375
cam_prefix: "Cam_"
root_path: "../data/"
######################################## Camera Parameters ###################################################
distortion_model: 0 #0:Brown (perspective) // 1: Kannala (fisheye)
distortion_per_camera : []
number_camera: 2 # number of cameras in the rig to calibrate
refine_corner: 1 # activate or deactivate the corner refinement
min_perc_pts: 0.7 # min percentage of points visible to assume a good detection
# cams_params_path: "../intrinsic/double-drvid-curated.yml"
# fix_intrinsic: 1
######################################## Optimization Parameters ###################################################
quaternion_averaging: 1 # use Quaternion Averaging or median for average rotation
ransac_threshold: 3 # RANSAC threshold in pixel (keep it high just to remove strong outliers)
number_iterations: 1000 # Max number of iterations for the non linear refinement
######################################## Hand-eye method #############################################
he_approach: 0 #0: bootstrapped he technique, 1: traditional he
######################################## Output Parameters ###################################################
save_path: "workthistime/"
save_detection: 1
save_reprojection: 1
camera_params_file_name: ""
- Shutter: Are your cameras CCD or CMOS? (rolling or global shutter) - Moving elements: Do you move the board or the cart? +We moved the cart after pictures were taken from the stream, as to cover the entire frame of the camera.
Following are the pictures we used for the calibration. The Drv1 and drv2 folders are pictures from our last attempt. In this attempt, we used two cameras that have 2048x732 resolution. Neither of these cameras have focus or zoom capabilities. The error message and configuration parameters above are from this attempt.
https://drive.google.com/drive/folders/1smcpgeDjNZrd_Y_Vu1MqarU9XAFN72-j?usp=sharing
Thank you very much for sharing all this information with us. I have looked at the pictures you shared, and I might have some comments:
number_x_square_per_board
and other, I am not sure if it can cause some issueWhat I recommend doing here is calibrating your system in two stages. First, calibrate the intrinsics of both cameras individually, which will give you more freedom to acquire proper images. Then, you can use these intrinsic parameters and calibrate only the extrinsic parameters using MC-Calib.
I hope it is helping. Best of luck with your calibration, and do not hesitate to seek help here!
Based on the pictures from the drive link I sent you, did you feel like image quality was an issue? We were wondering if the images we took had good enough quality for the toolbox
My sincere apologies for getting back to you so late. I have been quite busy in the past month due to other responsibilities. In my view, the quality seems acceptable. However, have you tried to implement all the feedback I mentioned in my previous message? I believe the naming convention and the number of images are definitely problematic in your case. Please remember that the images should have consistent naming, and even if the checkerboard is not visible, all the images captured by the cameras should be provided. I hope you have managed to address these issues. In my opinion, if you can resolve the problems I mentioned in my previous message, everything should work properly!
System information (version)
Vision system
*.yml
)Describe the issue / bug
Please provide a clear and concise description of what the issue / bug is.
Hello,
We are attempting to calibrate two cameras (eventually, 5) for proof of concept using a printed charuco board on a 24 inch x 36 inch poster board. We printed this using 4000x6000 resolution at a neighborhood printing center. We have one camera with 1920x1080 resolution, and another with 2048x732. To make this easier, I will call the1920x1080 "Camera 1" and the 2048x732 "Camera 2".
Camera 1 has the ability to zoom in/out and focus but Camera 2 does not. We currently have a stream running of Camera 1, from which snap photos every ~8seconds. We found that Camera 2 has issues with quality when taking photos from a stream, so we are pulling them directly from the camera and encoding into a BMP. We take these photos every ~9 seconds.
We've tried a variety of approaches to gathering the data for the calibration, but here are the constants:
We originally took about ~300 photos on each camera ~60 meters away from the cameras. We moved the board around and tried to fill every spot on the frame, while trying to leave at 50% of the board in the frame. Since the pictures are taken every X seconds, there were photos were the board was in transit/turned/not fully secured on the spot we wanted to put it. Upon running MC-Calib, we ran into the error code :
what(): OpenCV(4.2.0) ../modules/core/src/matrix_expressions.cpp:23: error: (-5:Bad argument) Matrix operand is an empty matrix. in function 'checkOperandsExist'
We then thought perhaps the board is too far away and it is harder to see the squares for the camera at that distance. We wanted proof of concept that the program could work with closer pictures. We moved the board to about ~15m from the cameras, which resulted in the board almost covering the entirety of the Y axis on Camera 2. We adjusted Camera 1's zoom to fit, and took about 25 photos on each camera, once again taking pictures every 8-9 seconds from the stream. We took most of the pictures towards the center of the frame. We were able to run the program without an error, but got wildly unexpected values for the respective positions of the cameras. Our rough measurements with a tape measure says the cameras are about 40 inches x 40 inches x 0 inches away from each other. The program seemed to suggest the cameras are 150-200 inches away in each direction.
We proceeded to take pictures at the same distance (15 meters). We grabbed about 800 photos on each camera, moving the board to various positions around the frames. Once again, we ran into the same error code as above.
We then moved the board to about 18-20 meters where we felt Camera#2 had the best focus. We moved the board up and down the frame over the course of a few hours, taking ~1200 photos on each camera. Same error as above.
We feel that we're running out of options. It's difficult for us to get perfect quality photos since the photos are being taken outside, not in a controlled environment.
Our questions are:
If you have any recommendations on how we can improve the way we take data, I would really appreciate it.
Thank you