Hi experts
I am running opencv 4.1.0 Windows 10 64 bit with python 3.7.
My code is:
img = cv2.imread('C:/projects/kort/Hjerter/IMG_2383.jpg')
det = cv2.text.TextDetectorCNN_create("c:/projects/Caffe/textbox.prototxt", "c:/projects/Caffe/TextBoxes_icdar13.caffemodel")
rects, probs = det.detect(img)
But I get the following error below. Any hints?
rects, probs = det.detect(img) Traceback (most recent call last): File "", line 1, in cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv_contrib\modules\text\src\text_detectorCNN.cpp:66: error: (-2:Unspecified error) in function 'void cdecl cv::text::TextDetectorCNNImpl::detect(const class cv::InputArray &,class std::vector<class cv::rect,class="" std::allocator<class="" cv::rect="" >="" >="" &,class="" std::vector<float,class="" std::allocator="" >="" &)'="" (expected:="" 'inputimage.channels()="=" inputchannelcount_'),="" where="" 'inputimage_.channels()'="" is="" 1="" must="" be="" equal="" to="" 'inputchannelcount_'="" is="" 3<="" p="">