Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
My project is extracting text from image i try below code i can't get clear output, please help me to solve my problem
조회 수: 1 (최근 30일)
이전 댓글 표시
clc; clear all; close all; fontSize = 20; a=imread('C:\Users\shankar\Documents\MATLAB\code\T2.jpg'); figure(1),imshow(a),title('original image', 'FontSize', fontSize), b=rgb2gray(a); figure(2),imshow(b),title('GRAY image', 'FontSize', fontSize),
H=fspecial('laplacian'); b2=imfilter(b,H); figure(3),imshow(b2),title('FILTER image', 'FontSize', fontSize), whos b whos b2 %% thresholding %B1=255*(b2>=200); %figure(4),imshow(B1),title('FILTER image', 'FontSize', fontSize), %% MEDIAN B=medfilt2(b2); figure(4),imshow(B); title('edge detect image');
figure(5) imshow(~B);title('Edge detected Image'); [pan leb]=size(b);
BW2 = bwareaopen(B, 50,6); figure(6);imagesc(BW2);
[m n]=size(b2); squaredErrorImage = (double(b) - double(B)) .^ 2; mse = sum(sum(squaredErrorImage)) /((m * n)); RMSE = sqrt(mse); PSNR = 10 * log10( 256^2 / mse); mad = mean2(abs(double(b)-double(B))); message = sprintf('The mean square error is %.2f.\nThe PSNR = %.2f.\n THE RMSE=%.2f.\n THE mad=%.2f',mse, PSNR,RMSE,mad); msgbox(message);
input:
output:
댓글 수: 1
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!