Closed kspook closed 5 years ago
cv2.imshow('image',raw_image) cv2.error: OpenCV(3.4.3) /mnt/opencv/modules/highgui/src/window.cpp:356: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'
i found python can't read Test_.jpg how can i fix?
i change \ to / in the path ^^
python main.py Traceback (most recent call last): File "main.py", line 5, in
perform_ocr(".\imagesamples\Test.jpg")
File "/data/home/kspook/Printed-Text-recognition-and-conversion/ocr.py", line 26, in perform_ocr
all_words, words_on_line, max_height_on_line = get_words(raw_image)
File "/data/home/kspook/Printed-Text-recognition-and-conversion/segmentation_words.py", line 24, in get_words
img_for_det = image_for_detection(raw_image)
File "/data/home/kspook/Printed-Text-recognition-and-conversion/before_segmentation.py", line 14, in image_for_detection
bw_image = cv2.dilate(bw_image,kernel)
cv2.error: OpenCV(3.4.3) /mnt/opencv/modules/core/src/matrix.cpp:756: error: (-215:Assertion failed) dims <= 2 && step[0] > 0 in function 'locateROI'