node-opencv: Template matching exception
Using matchTemplate(…) results in an exception, albeit template image is smaller than original image, images were grayscaled and colour depth of both images being equivalent:
OpenCV Error: Assertion failed (corrsize.height <= img.rows + templ.rows - 1 && corrsize.width <= img.cols + templ.cols - 1) in crossCorr, file /home/build/src/CV/opencv/OpenCV/modules/imgproc/src/templmatch.cpp, line 658
terminate called after throwing an instance of 'cv::Exception'
what(): /home/build/src/CV/opencv/OpenCV/modules/imgproc/src/templmatch.cpp:658: error: (-215) corrsize.height <= img.rows + templ.rows - 1 && corrsize.width <= img.cols + templ.cols - 1 in function crossCorr
Aborted
Relevant code with example images used can be found here for reproducing this issue: https://github.com/strarsis/node-opencv-templatematching-test
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15
Hopefully this unblocks you: strarsis/node-opencv-templatematching-test#1