How to increase the resolution of a list of images

조회 수: 2 (최근 30일)
BA
BA 2022년 8월 10일
댓글: Walter Roberson 2022년 8월 10일
I did 'image variance' for a list of images but the region of interest shows black line (see picture 1) instead of white as in picture 2. What seems to be the problem? does it need to increase the resolution or high pass filtering?

채택된 답변

Walter Roberson
Walter Roberson 2022년 8월 10일
You have a series of images that all happen to be bright in certain areas. Because they are all bright there, the variance between them is low. When you display the variance, low variance would show up dark.
Variance images highlight areas that differ a lot between images, not areas that are similar.
  댓글 수: 5
BA
BA 2022년 8월 10일
편집: BA 2022년 8월 10일
@Walter Robersondoes spatial filtering/resolution improve the display? also, I need to check other matlab code of how to plot 'variance image' on the images themselves as I did above.
Walter Roberson
Walter Roberson 2022년 8월 10일
img = imread('cameraman.tif');
img1 = img; img1(1:150, 1:20) = img1(1:150, 1:20) + 1;
img2 = img; img2(1:50, 1:50) = double(img2(1:50, 1:50)) * rand(50,50);
img3 = img; img3(100:150,1:50) = img3(100:150,1:50) * 1.5;
combined = cat(3, img, img1, img2, img3);
varimg = var(double(combined), [], 3);
figure();
subplot(2,2,1); imshow(img); title('original');
subplot(2,2,2); imshow(img1); title('variation 1');
subplot(2,2,3); imshow(img2); title('variation 2');
subplot(2,2,4); imshow(img3); title('variation 3');
figure();
imshow(varimg); title('variance image');
variance image:
Black --> places where the images did not change much
White --> places where the image schanged a lot.
Gray --> places where the images changed a little
Your test2.jpg shows white where there was text, because the text changed between images. Something also changed near (0.8, 0.8) . There was also some small change in the bottom center.
If you were to mask out the text areas before taking the variance images, you would have more emphasis on the change in the bottom center.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by