欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標(biāo)題:
身份證號(hào)碼識(shí)別MATLAB源程序
[打印本頁(yè)]
作者:
風(fēng)行天下520
時(shí)間:
2018-5-21 17:35
標(biāo)題:
身份證號(hào)碼識(shí)別MATLAB源程序
身份證號(hào)碼識(shí)別MATLAB設(shè)計(jì)源碼分享給大家學(xué)習(xí)
0.png
(43.78 KB, 下載次數(shù): 67)
下載附件
2018-5-22 01:08 上傳
全部資料51hei下載地址:
身份證號(hào)碼識(shí)別.rar
(912.65 KB, 下載次數(shù): 55)
2018-5-21 17:33 上傳
點(diǎn)擊文件名下載附件
身份證號(hào)碼識(shí)別
下載積分: 黑幣 -5
function [ id_codes,id_bw,code_stats,thresh,iteration ] = id_rec_process( img_gray,model,thresh,training_data_size,iteration )
narginchk(1,5)
if nargin==1
model=[];
elseif nargin<=2 || thresh==0
thresh=.68*graythresh(img_gray);
elseif nargin<=3
training_data_size=[47 31];
elseif nargin<=4 || isempty(training_data_size)
iteration=1;
end
% fprintf('Iteration %d, threshold value: %f\n',iteration,thresh)
bw=~im2bw(img_gray,thresh);
bw=imclearborder(bwareaopen(bw,10));
bwc=imdilate(bw,strel('disk',6));
code_stats=regionprops(bwc,'Area');
step_ratio=1.1;
if isempty(code_stats) && thresh*step_ratio<1
[id_codes,id_bw,code_stats,thresh,iteration]=id_rec_process(img_gray,model,thresh*step_ratio,training_data_size,iteration+1);
return
end
id_codes=blanks(18);
if isempty(code_stats)
id_bw=bw;
return
end
[~,midx]=max([code_stats.Area]);
mask=bwlabel(bwc)==midx;
id_bw=imreconstruct(mask,bw);
code_stats=regionprops(id_bw,'Image','Extent');
if length(code_stats)~=18 && thresh*step_ratio<1
[id_codes,id_bw,code_stats,thresh,iteration]=id_rec_process(img_gray,model,thresh*step_ratio,training_data_size,iteration+1);
return
end
if length(code_stats)==18
inputs=zeros(training_data_size(1)*training_data_size(2),18);
for i=1:size(inputs,2)
img=imresize(code_stats(i).Image,training_data_size);
inputs(:,i)=img(:);
end
% predict
if ~isempty(model)
try
output=model(inputs);
[~,midx]=max(output);
count=size(output,2);
for i=1:count
switch midx(i)
case 1
id_codes(i)='X';
otherwise
id_codes(i)=num2str(11-midx(i));
end
end
catch e
disp(e)
for i=1:length(e.stack)
disp(e.stack(i))
end
end
end
end
end
復(fù)制代碼
作者:
豆豆蒼穹
時(shí)間:
2019-12-25 16:03
好好學(xué)習(xí),天天向上
作者:
henryTwan
時(shí)間:
2020-2-19 00:37
謝謝,還沒(méi)有下載希望可以幫到
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1