MATLAB: I have 2 contours on the same plot and I want to differentiate them with colours so I can see the difference.

contourdigital image processingimageimage analysisimage processing

Hi,
Please see the attaced Frame 16&17. In this image 2 contours from 2 consecutive frames are plot to analyse the change.
My question is how can I change the boundary colour of contour so I can easily differentiate between 2 or if I plot more contour on it.
I used the command below to plot the contours and would like the add on for coulour into it.
% contour of the image
figure()
imcontour(dif,2);
hold on
imcontour(dif1,2);
hold off

Best Answer

I = imread('rice.png');
figure,subplot(121),
imcontour(I);ax = gca;
colormap(ax,'cool')
subplot(122);
imcontour(I);ax = gca;
colormap(ax,'hot')

EDIT:

Change LineColor
I = imread('rice.png');
figure,
imcontour(I,'LineColor','r')
hold on
I = imread('cameraman.tif');
imcontour(I)
Related Question