how to use contours to compare two images?

2 visualizaciones (últimos 30 días)
hasan alhussaini
hasan alhussaini el 9 de Ag. de 2018
Respondida: Naman Chaturvedi el 13 de Ag. de 2018
Hello, i'm trying compare the following two attachments using contours. if anyone has any information that i can read up about comparing the two. or if there is a plain syntax, i'd appreciate it.
Thanks

Respuestas (1)

Naman Chaturvedi
Naman Chaturvedi el 13 de Ag. de 2018
Hello Hasan,
You can use the function 'imcontour' to observe and compare the contours of the two images. But, before that, you might want to sharpen the image using unsharp masking or laplacian. For which, you may use the function 'imsharpen'. The code may look something like this:
i=imread('Capture1.png');
i=rgb2gray(i);
i_s=imsharpen(i); %unsharp masking
i_s_h=histeq(i_s);
imcontour(i_s_h,3);
You can read more about imcontour and imsharpen.
Hope this helps.

Community Treasure Hunt

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

Start Hunting!

Translated by