-
-
Notifications
You must be signed in to change notification settings - Fork 56.4k
Fractal Aruco implementation #27934
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
base: 4.x
Are you sure you want to change the base?
Fractal Aruco implementation #27934
Conversation
|
Hi! How can I commit to the new PR? It seems I don't have the permission to push updates to this PR branch. |
|
@Liiizhen I sent invitation to you. |
|
Thanks! As you mentioned in pr 27601, we can generate a PNG file of a specific size by adjusting the parameter. Do you think it's necessary to output svg? |
|
SVG is vector format and we can ensure all sizes there. PNG may be scaled somehow during printing. |
| return (1.f-decpartY)*(1.-decpartX)*float(im_grey.at<uchar>(tl.y,tl.x))+ | ||
| decpartX*(1-decpartY)*float(im_grey.at<uchar>(tl.y,tl.x+1))+ | ||
| (1-decpartX)*decpartY*float(im_grey.at<uchar>(tl.y+1,tl.x))+ | ||
| decpartX*decpartY*float(im_grey.at<uchar>(tl.y+1,tl.x+1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug build indicates out-of-bound access issue in cv::Mat here:
Thread 1 "opencv_test_obj" hit Catchpoint 1 (exception thrown), 0x00007ffff3cbb35a in __cxxabiv1::__cxa_throw (obj=0x5555561d1ed0, tinfo=0x7ffff50d9400 <typeinfo for cv::Exception>, dest=0x7ffff448d30e <cv::Exception::~Exception()>)
at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:81
warning: 81 ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc: No such file or directory
(gdb) bt
#0 0x00007ffff3cbb35a in __cxxabiv1::__cxa_throw (obj=0x5555561d1ed0, tinfo=0x7ffff50d9400 <typeinfo for cv::Exception>, dest=0x7ffff448d30e <cv::Exception::~Exception()>) at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:81
#1 0x00007ffff448fcbb in cv::error (exc=...) at /mnt/Projects/Projects/opencv/modules/core/src/system.cpp:1275
#2 0x00007ffff448fdac in cv::error (_code=-215, _err="(unsigned)i0 < (unsigned)size.p[0]", _func=0x7ffff7d8da0a "at", _file=0x7ffff7d8d6a0 "/mnt/Projects/Projects/opencv/modules/core/include/opencv2/core/mat.inl.hpp", _line=909)
at /mnt/Projects/Projects/opencv/modules/core/src/system.cpp:1287
#3 0x00007ffff7c829e1 in cv::Mat::at<unsigned char> (this=0x7fffffffcd60, i0=3840, i1=1594) at /mnt/Projects/Projects/opencv/modules/core/include/opencv2/core/mat.inl.hpp:909
#4 0x00007ffff7c986ac in cv::aruco::FractalDetector::FractalDetectorImpl::getSubpixelValue (im_grey=..., p=...) at /mnt/Projects/Projects/opencv/modules/objdetect/src/aruco/fractal_detector.cpp:788
#5 0x00007ffff7c95e68 in cv::aruco::FractalDetector::detect (this=0x7fffffffd040, img=..., markers=std::vector of length 0, capacity 0, p3d=..., p2d=...) at /mnt/Projects/Projects/opencv/modules/objdetect/src/aruco/fractal_detector.cpp:564
#6 0x0000555555640401 in opencv_test::(anonymous namespace)::CV_FractalAruco_can_detect_Test::Body (this=0x5555561b1510) at /mnt/Projects/Projects/opencv/modules/objdetect/test/test_fractal_aruco.cpp:33
#7 0x000055555563fe14 in opencv_test::(anonymous namespace)::CV_FractalAruco_can_detect_Test::TestBody (this=0x5555561b1510) at /mnt/Projects/Projects/opencv/modules/objdetect/test/test_fractal_aruco.cpp:22
#8 0x00005555556c1378 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (object=0x5555561b1510, method=&virtual testing::Test::TestBody(), location=0x5555556f1353 "the test body")
at /mnt/Projects/Projects/opencv/modules/ts/src/ts_gtest.cpp:3919
#9 0x00005555556bae52 in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=0x5555561b1510, method=&virtual testing::Test::TestBody(), location=0x5555556f1353 "the test body")
at /mnt/Projects/Projects/opencv/modules/ts/src/ts_gtest.cpp:3955
#10 0x000055555569edb6 in testing::Test::Run (this=0x5555561b1510) at /mnt/Projects/Projects/opencv/modules/ts/src/ts_gtest.cpp:3993
#11 0x000055555569f8a7 in testing::TestInfo::Run (this=0x55555579aa80) at /mnt/Projects/Projects/opencv/modules/ts/src/ts_gtest.cpp:4169
#12 0x00005555556a0058 in testing::TestCase::Run (this=0x55555579ac20) at /mnt/Projects/Projects/opencv/modules/ts/src/ts_gtest.cpp:4287
#13 0x00005555556acae1 in testing::internal::UnitTestImpl::RunAllTests (this=0x5555557a4f30) at /mnt/Projects/Projects/opencv/modules/ts/src/ts_gtest.cpp:6662
#14 0x00005555556c247d in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>
(object=0x5555557a4f30, method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x5555556ac818 <testing::internal::UnitTestImpl::RunAllTests()>, location=0x5555556f1c10 "auxiliary test code (environments or event listeners)")
at /mnt/Projects/Projects/opencv/modules/ts/src/ts_gtest.cpp:3919
#15 0x00005555556bbeef in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>
(object=0x5555557a4f30, method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x5555556ac818 <testing::internal::UnitTestImpl::RunAllTests()>, location=0x5555556f1c10 "auxiliary test code (environments or event listeners)")
at /mnt/Projects/Projects/opencv/modules/ts/src/ts_gtest.cpp:3955
#16 0x00005555556ab068 in testing::UnitTest::Run (this=0x555555760320 <testing::UnitTest::GetInstance()::instance>) at /mnt/Projects/Projects/opencv/modules/ts/src/ts_gtest.cpp:6271
#17 0x00005555556422c9 in RUN_ALL_TESTS () at /mnt/Projects/Projects/opencv/modules/ts/include/opencv2/ts/ts_gtest.h:22240
#18 0x00005555556425a8 in main (argc=1, argv=0x7fffffffd748) at /mnt/Projects/Projects/opencv/modules/objdetect/test/test_main.cpp:18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Liiizhen Could you take a look on it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I will check it out.
|
Why the test shows that these three images can't be found? [ RUN ] CV_FractalAruco.can_detect/0, where GetParam() = "hand.jpg" |
|
You need to pull branch with the same name from my fork of opencv_extra. The tests pass now in debug mode on my pc: |
|
How to fix this:
|
|
Let's handle it later. We need to stabilize API and overall behaviour. |
|
@Liiizhen Next steps here:
|
|
@asmorkalov Roger that. I will do these by this week. |
Replaces #27601
Merge with opencv/opencv_extra#1280
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.