-
Notifications
You must be signed in to change notification settings - Fork 127
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
Large RMS error stereo #329
Comments
The thing that stands out the most to me is that, as you noted, the target is in the lower right hand corner. This is likely messing up the orientation of the axes which follow a right-hand-rule convention. One simple way you could test if this is the case is by flipping the total pattern width/height and inner pattern width/heigh so that it's 5x7 instead of 7x5. The focus should not be adjusted during the calibration, that would throw things off too. Otherwise, the target looks great (dot size, etc.) |
Hi, I flipped the width/height of the target pattern options, but it was not able to identify the points, so I returned it so the width is always the larger of the two numbers. I retook the photos with better light, with a fixed focus on the speckle pattern (meaning the target is slightly out of focus), and added more photos (a total of 48). DICe only rejected one of the photos. However, my RMS error is still high at 1.06. I also tried mirroring all the images, but the RMS error did not change. Do you have any other suggestions for things I could try? |
It looks like the thresholding isn't doing a great job of isolating the dots. Are you using the most recent version of DICe: https://github.com/dicengine/dice/releases/tag/v3.0-beta.8? We made some changes to how the calibration segments the images that might do a better job. |
Thanks for looking into this. I couldn't tell what version of DICe I was using, so I uninstalled it and reinstalled the v3 beta 8 version from the link you provided. Something strange is that in the properties view, it says the program is V1.4.15, which seems strange (macOS Sonoma 14.4.1). I reran the program. All dots seem clear in almost all images, so I am assuming that means the auto thresholding is working. I got the same large RMS error of 1.06. Here is a link to the images I am using, which I converted from Canon Raw (CR3) to TIFF. Do you have any other ideas of things I could try? |
I still think having the coordinate system oriented in left-hand-rule instead of right-hand-rule might be messing things up. For example, in the way you have the axes, the cross product of the x and y axes is into the screen vs the way DICe is expecting the z-axis to be pointing out of the screen. Have you tried swapping the dimensions of the target in the newest version. Regarding the version that shows in the Sonoma application info, I'm not sure how that is even set so you can likely ignore it. |
Thanks for following up with this. When I switch the dimensions of the target by swapping the width and height, DICe is only able to identify 47 of the 63 dots (which seems to be a 7x7 grid minus the two special dots). See screenshot. I also tried mirroring all the images before giving them to DICe, so the images follow the correct sign convention. Similar to before, the program is able to identify all dots in all images, but the RMS error is still large at 1.06. See screenshot. I also ran DICe on a PC and got the same results as on the mac I have been using. |
Something else must be going wrong. Swapping the dimensions seems to be mostly working, but the errors for each of the image pairs is really high. Are you sure you don't have the left and right images swapped? Or can you post the cal.log file for the calibration? |
Thank you for continuing to work with me on this. Indeed, in the screen shot above, when I mirrored the images I also should have switched the right camera to be the left camera. However, doing this did not seem to improve the results. Below I am showing a screenshot where I am using the mirrored images and switching the right camera to be the left. I also removed about a quarter of the photos that produced the largest errors which brought the RMS down to about 3. Below is a link to the files in the working directory if that is of any use and I posted the Console output below. https://drive.google.com/drive/folders/1TQhRZl_5QmuFo3_2v_fZMR0MAf-uwkc9?usp=share_link I also took a new set of photos but I am getting similar results. |
Below is the Calibration window output: Console output: [--BUFFER_OUT--]: IMAGE_WIDTH 6000 ** Digital Image Correlation Engine (DICe) DICe_Cal begin input file: C:\Users\worsfold\dice_working_dir\cal_input.xml ** Digital Image Correlation Engine (DICe) DICe_Cal begin input file: C:\Users\worsfold\dice_working_dir\cal_input.xml ** Digital Image Correlation Engine (DICe) DICe_Cal begin input file: C:\Users\worsfold\dice_working_dir\cal_input.xml ** Digital Image Correlation Engine (DICe) DICe_Cal begin input file: C:\Users\worsfold\dice_working_dir\cal_input.xml RMS error: 3.13605 ---------- Camera System ---------- --- Matrix --- value type: double 0: 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 ---------- Camera ---------- --- Matrix --- value type: double 0: 1.00000e+00 0.00000e+00 0.00000e+00 ext translations: 0 0 0 cam to world: --- Matrix --- value type: double 0: 1.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 world to cam: --- Matrix --- value type: double 0: 1.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 ---------- Camera ---------- --- Matrix --- value type: double 0: 9.84817e-01 2.80122e-03 1.73574e-01 ext translations: -284.65 -73.275 79.249 cam to world: --- Matrix --- value type: double 0: 9.84817e-01 -4.69693e-03 -1.73533e-01 2.93736e+02 world to cam: --- Matrix --- value type: double 0: 9.84817e-01 2.80122e-03 1.73574e-01 -2.84649e+02 DICe_Cal complete *** Warning, RMS error is large: 3.136. Should be under 0.5. |
Something strange is going on here. If you can post the cal images on your google drive site, I can run them in debug mode and see what's going on. |
Thanks for continuing to look into this. Here is a link to the newest set of photos in TIFF format. https://drive.google.com/drive/folders/1iFacW6EBRzghQXbSprpQeTwVJb1Stnss?usp=sharing |
I took a look at your cal images and ran them through the debug version of DICe's calibration tool. It seems the problem is coming from the axes being left hand rule instead of right hand rule. I thought you could just swap the dimensions, but the pattern recognition parts of the cal routine would need some code updates for that to work. Are you able to retake some cal images with the long side of the cal board vertical? Or update the cal pattern to have a right hand rule orientation? |
I will attempt to retake the images with the board vertical. In the mean time, I mirrored all the TIFF images which should correct the to use the right-hand-rule and ran them through DICe. I seem to get the same type of errors. See the mirrored images below. https://drive.google.com/drive/folders/1KxUUoQcwgrEctEBrqr0eFXeYgpMcKQRO?usp=sharing |
I am using a custom calibration target (about 17 in x 22 in) and used 26 images to perform the stereo calibration. The calibration was successful, and all dots seem to be identified in all photos. However, the errors seem very large (RMS error = 1.15307 and AVG Epipoplar error = 1.59651). What could be the cause? Below is a link to a copy of the files in the working directory:
https://drive.google.com/drive/folders/1KU9w98_IBP_F_cH0NHzss3MNk8JCblAC?usp=share_link
-Should the focus be allowed to change from one picture to the next, or should it be locked during all calibration photos?
-was the target not moved enough from one picture to the next?
-does it matter that the origin of the target is in the bottom right corner of the photo instead of the bottom left corner? I could simply mirror the images
-Are there too many or too few dots on the calibration target?
Thanks
The text was updated successfully, but these errors were encountered: