# why is my difference image black?...

2 vues (au cours des 30 derniers jours)
Matthew Worker le 6 Oct 2021
Modifié(e) : Rena Berman le 13 Déc 2021
the program works but my difference image is just black...did i do something wrong? or is there a way to make it visible?
%% 3. Interpolation
sma=imresize(ori,[32 32]); %b)Resize‘ori’ to 32x32;store into‘sma’
nea=imresize(ori,1,'nearest'); %c)Resize‘sma’ to original using nearest interpolation;store into‘nea’
bil=imresize(ori,1,'bilinear'); %d)Resize‘sma’ to original using bilinear interpolation;store result into‘bil’
bic=imresize(ori,1,'bicubic'); %e)Resize‘sma’to original using bicubic interpolation;store result into‘bic’
figure %f)Display‘ori’,‘nea’,‘bil’,'bic' same figure
subplot(4,1,1);
imshow(ori)
title('ori');
subplot(4,1,2);
imshow(nea)
title('nea');
subplot(4,1,3);
imshow(bil)
title('bil');
subplot(4,1,4);
imshow(bic)
title('bic');
df=imabsdiff(bil,bic);
figure %g)Display the difference image between bil and bic
imshow(df,[])
title('difference image');
##### 4 commentairesAfficher 2 commentaires plus anciensMasquer 2 commentaires plus anciens
Rik le 1 Déc 2021
why is my difference image black?...
the program works but my difference image is just black...did i do something wrong? or is there a way to make it visible?
%% 3. Interpolation
sma=imresize(ori,[32 32]); %b)Resize‘ori’ to 32x32;store into‘sma’
nea=imresize(ori,1,'nearest'); %c)Resize‘sma’ to original using nearest interpolation;store into‘nea’
bil=imresize(ori,1,'bilinear'); %d)Resize‘sma’ to original using bilinear interpolation;store result into‘bil’
bic=imresize(ori,1,'bicubic'); %e)Resize‘sma’to original using bicubic interpolation;store result into‘bic’
figure %f)Display‘ori’,‘nea’,‘bil’,'bic' same figure
subplot(4,1,1);
imshow(ori)
title('ori');
subplot(4,1,2);
imshow(nea)
title('nea');
subplot(4,1,3);
imshow(bil)
title('bil');
subplot(4,1,4);
imshow(bic)
title('bic');
df=imabsdiff(bil,bic);
figure %g)Display the difference image between bil and bic
imshow(df,[])
title('difference image');
Rena Berman le 13 Déc 2021

Connectez-vous pour commenter.

### Réponse acceptée

Matthew Worker le 6 Oct 2021

##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Plus de réponses (1)

Rik le 1 Déc 2021
Modifié(e) : Rena Berman le 13 Déc 2021
Posted after a now-deleted comment:
@Matt J @Marcel Kreuzberg Thank you so much i didnt notice that error. It works well now
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Image Arithmetic dans Help Center et File Exchange

R2021a

### Community Treasure Hunt

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

Start Hunting!

Translated by