Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

MY PROJECT IS EXTRACTING TEXT FROM HISTORICAL IMAGE I TRY BELOW CODE , I CAN EXTRACT ONLY ONE BY ONE CHARACTER BUT I WANT TO BE EXTRACT LINE BY LINE TEXT, PLEASE HELP ME TO SOLVE MY PROBLEM

조회 수: 1 (최근 30일)
clc clear all close all
%% Image segmentation and extraction %% Read Image imagen=imread('C:\Users\shankar\Documents\MATLAB\filtering\text.jpg'); %%imagen 365x550 200750 logical %% Show image figure(1) imshow(imagen); title('INPUT IMAGE WITH NOISE') %% Convert to gray scale if size(imagen,3)==3 % RGB image imagen=rgb2gray(imagen); end %% Convert to binary image threshold = graythresh(imagen); imagen =~im2bw(imagen,threshold); %% Remove all object containing fewer than 30 pixels imagen = bwareaopen(imagen,30); pause(1) %% Show image binary image figure(2) imshow(~imagen); title('INPUT IMAGE WITHOUT NOISE') %% Label connected components [L Ne]=bwlabel(imagen); %%Ne 1x1 8 double %% Measure properties of image regions propied=regionprops(L,'BoundingBox'); %% %% Measure properties of image regions hold on %% Plot Bounding Box for n=1:size(propied,1) %%n is single matrix 1X1 rectangle('Position',propied(n).BoundingBox,'EdgeColor','g','LineWidth',2) %% g =green color end hold off pause (1) %% Objects extraction figure for n=1:Ne [r,c] = find(L==n); %%n is single matrix 1X1 , L = 365x550 , r= 31X1 matrix n1=imagen(min(r):max(r),min(c):max(c)); imshow(~n1); %% n1 12x7 84 logical pause(0.5) %imsave(); end
INPUT IMAGE:
  댓글 수: 3
Jan
Jan 2016년 5월 4일
If you post some code, please explain if it works or what problems occur.
John D'Errico
John D'Errico 2016년 5월 4일
This is how many times you have asked this same question? Why did the last question get a response. Oh, it DID get responses. So why were they not adequate?

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by