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

C++ / Python inconsistency : int point coordinates instead of the original float #6

Open
Q4pLJ1yy opened this issue Nov 7, 2024 · 2 comments

Comments

@Q4pLJ1yy
Copy link

Q4pLJ1yy commented Nov 7, 2024

Hi,
It seems DetectMarkers has not the same behavior between the original C++ and this Python wrapper : convertToTuple applies a cast to int that is not present in the C++ library :
std::vector<std::vector<float>> contours_vec; for (cv::Point2f pt : corners[i]) { contours_vec.push_back({static_cast<float>((int)pt.x), static_cast<float>((int)pt.y)}); }
Is this type cast to int necessary between float and Point2f ? The accuracy pointed out in the original paper must be downgraded by this step.

@ManfredStoiber
Copy link
Owner

Hi,
as mentioned in this issue, I honestly can't recall the exact reason why I originally clipped the values to integers. I tested it without clipping and had no problems. If you'd like, I can build and distribute a new version without the casting.

Best regards

@Q4pLJ1yy
Copy link
Author

Q4pLJ1yy commented Nov 8, 2024

Hi,
That would be great, I had some issues compiling locally. I am interested too by the full resolution of the output for a Python testbed, if only to see if I can improve positioning results compared to regular subPixelCorners applied after the fact. Thanks !
Best regards

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

No branches or pull requests

2 participants