I'm not able to find any kind of information about the find4QuadCornerSubpix() function. I'm trying to understand the differenti between find4QuadCornerSubpix() and cornerSubPix().
Someone can help me?
thanks
TLDR; use cornerSubPix, find4QuadCornerSubpix is unfinished
I tested both corner refinements with artificial generated images (low noise added, no distortions, most quads around ~ 100pxl edge length) with these abs. differences measured in pixel:
I tested 3x3, 11x11, 50x50, 100x100, 150x150 and inputing images binarized w. adaptive Thr.; all with the same result.
I chose some real-world examples where the intrinsic calibrations have an reprojection rms of about 0.08 for something similar to (2). For (3) they had 0.25 pixel reproj. rms.
So currently (opencv release 4.5.1) to me the find4QuadCornerSubpix looks unfinished and unusable. A rms of 0.5 is the maximum error I would expect without any subpixel refinements. The function also fails if any input coordinate is closer to the image border than region_size/2
Sources: https://github.com/opencv/opencv/blob/fc1a15626226609babd128e043cf7c4e32f567ca/modules/imgproc/src/cornersubpix.cpp https://github.com/opencv/opencv/blob/fc1a15626226609babd128e043cf7c4e32f567ca/modules/calib3d/src/quadsubpix.cpp https://github.com/opencv/opencv/blob/b450dd7a87bc69997a8417d94bdfb87427a9fe62/modules/calib3d/src/calibinit.cpp https://github.com/opencv/opencv/blob/b19f8603843ac63274379c9e36331db6d4917001/samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With