-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
findCirclesGrid() Assertion failed in function 'transform' #19574
Copy link
Copy link
Closed
Milestone
Description
System information (version)
- OpenCV => 4.5.1
- Operating System / Platform => Ubuntu 18.04.5 64-bit
- Compiler => Anaconda 4.9.2 / JupyterLab 2.2.6 / Python 3.7.8
Detailed description
Using findCirclesGrid() on OpenCV 4.5.1. After detecting the grid, OpenCV will crash and give this error:
error: OpenCV(4.5.1) ../modules/core/src/matmul.dispatch.cpp:439: error: (-215:Assertion failed) scn == m.cols || scn + 1 == m.cols in function 'transform'
I checked the history of calib3d module, I guess the fault code is in the Dec. 11 commit. So I downgraded OpenCV to 4.5.0. The issue is not presented and my code works like a charm.
Steps to reproduce
In Python, this should be the minimum working example.
# continuously check the camera for grid and save the frame
cap = cv.VideoCapture(0)
img_counter = 0
while img_counter != 50:
retval, frame = cap.read()
gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
ret, centers = cv.findCirclesGrid(gray, (13, 8), None, cv.CALIB_CB_SYMMETRIC_GRID)
if ret:
img_name = "opencv_frame_{}.png".format(img_counter)
cv.imwrite(img_name, frame)
img_counter += 1
cap.release()
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable