subtracting images processing,
显示 更早的评论
im trying to subtract two images with the same format in matlab, but unfortunatly im getting the image to dark i cant see anything so what i can do to change im sending the code below
clc, clear; close all;
%read image
a= imread('pentan1h_6uLmin_0240.tif');
b= imread('pentan1h_6uLmin_0250.tif');
c=imsubtract(a,b);
subplot(2,2,1),imshow(a),title('dry')
subplot(2,2,2),imshow(b),title('pen')
subplot(2,2,3),imshow(c),title('after')
this is the picture im getting

采纳的回答
更多回答(2 个)
Image Analyst
2019-4-20
Try [] to scale your data to your display
imshow(c, []);
wan noor
2019-12-14
0 个投票
Try use iamabsdiff function so that you will always have a non negative result.
1 个评论
Image Analyst
2019-12-14
or imadjust() to scale the intensities to the 1% points of the histogram tails.
类别
在 帮助中心 和 File Exchange 中查找有关 Contrast Adjustment 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!