How can I overlap two images/pictures in Matlab?

178 views (last 30 days)
Zubair Nizamani
Zubair Nizamani on 14 Jul 2016
Commented: mohammed alany on 31 Mar 2019
I am trying to overlap two pictures one of them is in .jpg file and other is contour plot from MATlab. I want to overlap on one an other to compare the contour lines. Does any body know what code can be or any manual way?

Answers (2)

David Young
David Young on 14 Jul 2016
You can use hold to superimpose contour lines on an image. Here's an example:
% Get an image from a jpg file
img = imread('street1.jpg');
% display it
% superimpose a contour map (in this case of the image brightness)
hold on;
contour(rgb2gray(img), 5);
hold off;
Image Analyst
Image Analyst on 9 Apr 2017
What do you want to do with the rows that have missing measurements? Ignore them? Interpolate them?

Sign in to comment.

Image Analyst
Image Analyst on 14 Jul 2016
There is a function for that. It's called imfuse().

Community Treasure Hunt

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

Start Hunting!

Translated by