I'm trying to find MSE between two images using immse(A, B), but i have an Error using immse (line 38) A and B must have the same size. please i put the code and i need a help, how to make B the same size of A?

1 vue (au cours des 30 derniers jours)
clc; close all; Imagein_G1 = imread('C:\Users\ahmadjalal2013\Desktop\Thesis_Images\Samples\1.tif'); Imagein_G2 = imread('C:\Users\ahmadjalal2013\Desktop\Thesis_Images\Samples\2.tif'); Imagein_G3 = imread('C:\Users\ahmadjalal2013\Desktop\Thesis_Images\Samples\3.tif'); Imagein_G4 = imread('C:\Users\ahmadjalal2013\Desktop\Thesis_Images\Samples\4.tif');
srcFiles = dir('C:\Users\ahmadjalal2013\Desktop\Thesis_Images\G1\*.tif'); % the folder in which our images exists of Group1 G1_MSE_Percents = zeros; % initialize your matrix/vector G1_CORR_Percents = zeros; % initialize your matrix/vector for i = 1 : length(srcFiles) filename = strcat('C:\Users\ahmadjalal2013\Desktop\Thesis_Images\G1\',srcFiles(i).name); I = imread(filename);
A = rgb2gray(Imagein_G1);
B = I;
x = imbinarize(A);
y = imbinarize(B);
G1_MSE_Percents(i) = immse(Imagein_G1, B); % (( Here is the Error using immse (line 38)
A and B must have the same size. ))
G1_CORR_Percents(i) = corr2(x,y);
end

Réponses (0)

Catégories

En savoir plus sur Read, Write, and Modify Image dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by