MATLAB Answers


How can I overlap two images/pictures in Matlab?

Asked by Zubair Nizamani on 14 Jul 2016
Latest activity Commented on by 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?


Sign in to comment.

2 Answers

Answer by 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;


hello this is my first question in mathworks . im trying to analyse via fft some data but due to the fact that i have some gaps in my measurements and since i have one measurement every 30 min i'm having hard time to do that correct. thank you in advace ! Ted
What do you want to do with the rows that have missing measurements? Ignore them? Interpolate them?

Sign in to comment.

Answer by Image Analyst
on 14 Jul 2016

There is a function for that. It's called imfuse().

  1 Comment

many thanks for this answer,

Sign in to comment.