我正在进行车牌识别。我把盘子切出来了,但它很模糊。因此,我无法分割数字/字符并识别它。
这是我的照片:
我试图通过使用scikit image函数对其进行去噪。
首先,导入库:
import cv2
from skimage import restoration
from skimage.filters import threshold_otsu, rank
from skimage.morphology import closing, square, disk
然后,我读取图像并将其转换为灰度
image = cv2.imread("plate.jpg")
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
我试图消除噪音:
denoise = restoration.denoise_tv_chambolle(image , weight=0.1)
thresh = threshold_otsu(denoise)
bw = closing(denoise > thresh, square(2))
我得到的是:
如您所见,所有数字都是混合在一起的。因此,我无法将它们分开并逐个识别字符。
我期望的是这样的东西(我画出来):
我正在寻求帮助我如何才能更好地过滤图像?谢谢您。
===================================================================== 更新:
在使用skimage.morphology.erosion
之后,我得到:
目前没有回答
相关问题 更多 >
编程相关推荐