我正在 Jupyter 笔记本上使用 python 编写代码,以使用 7segment(FND) 识别设备上的数字。
我使用opencv并得到了图像的边缘。
import cv2
import matplotlib.pyplot as plt
def detect_edge(image):
''' function Detecting Edges '''
image_with_edges = cv2.Canny(image , 100, 200)
images = [image , image_with_edges]
location = [121, 122]
for loc, img in zip(location, images):
plt.subplot(loc)
plt.imshow(img, cmap='gray')
plt.savefig('edge.png')
plt.show()
image = cv2.imread('/Users/USER/Desktop/test/test2.png', 0)
detect_edge(image)
Run Code Online (Sandbox Code Playgroud)
这是我从上面的代码中获得的示例输入和输出数据的屏幕截图:

我不知道如何从这里继续。在这种情况下,我想让人们识别数字 51.12。
在运行深度学习之前,我应该先裁剪数字所在的 FND 部分吗?
我应该如何继续?
python opencv artificial-intelligence image-processing deep-learning