i was trying to replicate python CV2 code to extract text from a image file, it runs without errors but i still cannot get any output.
Here is my code
>>> import cv2
>>> import numpy as np
>>> from matplotlib import pyplot as plt
/Users/upendrakumardevisetty/anaconda/lib/python2.7/site-packages/PIL/Image.py:81: RuntimeWarning: The _imaging extension was built for another version of Pillow or PIL
>>> img = cv2.imread('road.png', 0)
>>> plt.imshow(img, cmap='gray', interpolation='bicubic')
<matplotlib.image.AxesImage object at 0x1099c6150>
>>> plt.xticks(), plt.yticks()
((, <a list of 0 Text xticklabel objects>), (, <a list of 0 Text yticklabel objects>))
What am i doing wrong here?
You are exiting your program before you give it a chance to show. You should add one more line to your script after
Then you can force the window to close by typing any key.