Fiducial recognition error

231 views
Skip to first unread message

David Griffiths

unread,
Oct 1, 2021, 2:41:15 AM10/1/21
to OpenPnP

I am trying to recognise the fiducials on my board and OpenPNP says 'Match_Template stage not enabled in pipeline'.  It is. When I look in the pipeline I see this error reported on the Match_Template stage:

CvException [org.opencv.core.CvException: cv::Exception: OpenCV(4.5.1) C:\build\master_winpack-bindings-win64-vc14-static\opencv\modules\imgproc\src\templmatch.cpp:1163: error: (-215:Assertion failed) (depth == CV_8U || depth == CV_32F) && type == _templ.type() && _img.dims() <= 2 in function 'cv::matchTemplate'
]

Any suggestions please?

Running Mark's latest test version (2021-09-25) on Win10.

Cheers,
DG

tonyl...@gmail.com

unread,
Oct 1, 2021, 12:03:53 PM10/1/21
to OpenPnP
I think the image and the template both need to have the same depth (ether both be color or both be gray but not one of each).  You may need to add a ConvertColor stage.

David Griffiths

unread,
Oct 1, 2021, 9:01:41 PM10/1/21
to OpenPnP
Thanks for the suggestion.  I was looking at the wrong pipeline. I was editing the default and not the one for the fiducial package.
Reply all
Reply to author
Forward
0 new messages