【发布时间】:2020-12-01 10:42:29
【问题描述】:
我需要一个 Matlab 函数来准备用于数字和字母识别的图像。
我现在需要的是将原始RGB图像转换为二进制图像,其中每个像素都是白色的,除了对应于字母和数字的像素,以及所有数字和字母必须出现彩色/饱和,即出现满颜色的。
这是我测试过的代码。如您所见,字母或数字的某些像素是白色的。
I = imread('img6.png'); % read the image into the matrix
Ig = rgb2gray(I);
Icon = imadjust(Ig);
subplot(2,2,1)
imshow(Ig)
subplot(2,2,2)
imshow(Icon)
subplot(2,2,3)
imhist(I)
subplot(2,2,4)
imhist(Icon)
1- 我们如何将原始图像转换为高对比度图像?
2- 如何去除字母和数字周围的阴影?
【问题讨论】:
标签: image matlab image-processing image-thresholding