1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 19:44:14 +08:00

erGrouping python bindings and sample script textdetection.py which mimics the same detection pipeline as in textdetection.cpp

This commit is contained in:
lluisgomez
2016-03-15 22:32:31 +01:00
parent 7aedcae1ec
commit 4092d2efe3
4 changed files with 91 additions and 9 deletions

View File

@@ -7,13 +7,13 @@ import cv2
import numpy as np
from matplotlib import pyplot as plt
print '\ndetect_er_chars.py'
print ' A simple demo script using the Extremal Region Filter algorithm described in:'
print ' Neumann L., Matas J.: Real-Time Scene Text Localization and Recognition, CVPR 2012\n'
print('\ndetect_er_chars.py')
print(' A simple demo script using the Extremal Region Filter algorithm described in:')
print(' Neumann L., Matas J.: Real-Time Scene Text Localization and Recognition, CVPR 2012\n')
if (len(sys.argv) < 2):
print ' (ERROR) You must call this script with an argument (path_to_image_to_be_processed)\n'
print(' (ERROR) You must call this script with an argument (path_to_image_to_be_processed)\n')
quit()
pathname = os.path.dirname(sys.argv[0])
@@ -36,4 +36,4 @@ for rect in rects:
img = img[:,:,::-1] #flip the colors dimension from BGR to RGB
plt.imshow(img)
plt.xticks([]), plt.yticks([]) # to hide tick values on X and Y axis
plt.show()
plt.show()