Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
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 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Respuestas (0)
La pregunta está cerrada.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!