From: Jeroen on
Hi!

For my project I have to compare 2 images.
I have a reference image and a measured image.
In the measured image I can choose at random a point where I can get an intensity profile of.
Now I want that the measured improfile is at the same position as in the reference.
So that I have 2 intensity profiles of the same column from a different image
How can I do that?

And how can I plot those 2 improfiles in the same graph?
I hope it is clear enough.

Gr jeroen
From: ImageAnalyst on
On Oct 27, 5:01 am, "Jeroen " <bin...(a)gmail.com> wrote:
> Hi!
>
> For my project I have to compare 2 images.
> I have a reference image and a measured image.
> In the measured image I can choose at random a point where I can get an intensity profile of.
> Now I want that the measured improfile is at the same position as in the reference.
> So that I have 2 intensity profiles of the same column from a different image
> How can I do that?
>
> And how can I plot those 2 improfiles in the same graph?
> I hope it is clear enough.
>
> Gr jeroen

------------------------------------------------------------------------------
I'm not sure what the problem is. improfile allows you to specify the
image array, and the start and end points of the line and the number
of sample points, and it returns the profile between those points.
You just call this for each image and plot the profiles (using hold on
in between your calls to plot). Is there something about the
documentation for improfile and plot that is confusing? Something
like this (untested) trivial code should work:

profile1 = improfile(image1, [x1 x2], [y1 y2], 500);
profile2 = improfile(image2, [x1 x2], [y1 y2], 500);
figure;
plot(profile1);
hold on;
plot(profile2);
Did you try something like this?