您现在的位置:首页 >> ★免费资源 >> 源码下载 >> 内容

MATLAB代做-python代做-FPGA代做- 形态学数字识别

时间:2019-4-18 1:34:36 点击:

  核心提示:MATLAB代做-python代做-FPGA代做- 形态学数字识别 ...
function intrec(Z)
%INTREC Performs morphological character recognition
%INTREC(X) recognizes the characters (in integer form) present in the
%image X and displays it as output. INTREC uses morphological operations(like
%Dilation and Hit-or-Miss transform) to recognize characters.The charecter
%size of the integers present in the image should be exactly 26, otherwise 
%it may not recognize it.
%
%Example:
%X=imread('testimage1.bmp');
%imshow(X)
%intrec(X)
%The digits found in the image are:
%0
%3
%5  
%--------------------------------------------------------------------------
%Authors: Jahanzeb Rajput and Mohammad Fahad
%Department of Electrical Engineering
%University of Engineering and Technology, Lahore, Pakistan.
%--------------------------------------------------------------------------

A= imread ('zero.bmp');
B= imread ('one.bmp');
C= imread ('two.bmp');
D= imread ('three.bmp');
E= imread ('four.bmp');
F= imread ('five.bmp');
G= imread ('six.bmp');
H= imread ('seven.bmp');
I= imread ('eight.bmp');
J= imread ('nine.bmp');
%SE 2
SE = strel('square',3);

K=imdilate(A,SE);A2=K-A;

L=imdilate(B,SE);B2=L-B;

M=imdilate(C,SE);C2=M-C;

N=imdilate(D,SE);D2=N-D;

O=imdilate(E,SE);E2=O-E;

P=imdilate(F,SE);F2=P-F;

Q=imdilate(G,SE);G2=Q-G;

R=imdilate(H,SE);H2=R-H;

S=imdilate(I,SE);I2=S-I;

T=imdilate(J,SE);J2=T-J;
%-------------------------
%Hit or Miss
%-------------------------
disp('The digits found in the image are:');
if ~isempty(nonzeros(bwhitmiss(Z,A,A2)))
  disp('0');
end
%imshow('num1.bmp') 
%U=bwhitmiss(Z,F,F2);
%figure
%imshow(U)
if ~isempty(nonzeros(bwhitmiss(Z,B,B2)))
    disp('1');
end

if ~isempty(nonzeros(bwhitmiss(Z,C,C2)))
   disp('2');
end

if ~isempty(nonzeros(bwhitmiss(Z,D,D2)))
    disp('3');
end

if ~isempty(nonzeros(bwhitmiss(Z,E,E2)))
   disp('4');
end

if ~isempty(nonzeros(bwhitmiss(Z,F,F2)))
   disp('5');
end

if ~isempty(nonzeros(bwhitmiss(Z,G,G2)))
   disp('6');
end

if ~isempty(nonzeros(bwhitmiss(Z,H,H2)))
   disp('7');
end

if ~isempty(nonzeros(bwhitmiss(Z,I,I2)))
   disp('8');
end

if ~isempty(nonzeros(bwhitmiss(Z,J,J2)))
   disp('9');
end

联系:highspeedlogic

QQ :1224848052

微信:HuangL1121

邮箱:1224848052@qq.com

网站:http://www.mat7lab.com/

网站:http://www.hslogic.com/

微信扫一扫:

作者:形态学数字识别 来源:形态学数字识别
本站最新成功开发工程项目案例
相关文章
  • 没有相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
  • matlab代做|matlab专业代做|python代做|matlab淘宝代做|matlab代写(www.hslogic.com) © 2019 版权所有 All Rights Reserved.
  • Email:highspeed_logic@163.com 站长QQ: 1224848052

    专业代做/代写/承接、MATLAB、SIMULINK、FPGA项目、博士/硕士/本科毕业设计、课题设计、论文,毕业论文,Coursework、Eassy、Assignment