Intensity profile of an image
Show older comments
How can I plot the intinsity profile for a oicture along a specific direction? Here is the picture.
Answers (1)
Rik
on 15 May 2019
0 votes
7 Comments
Mohammed Qahosh
on 15 May 2019
Rik
on 15 May 2019
What you are looking at is the variable editor. I don't know what you are trying to do, but simply for plotting a profile you don't need it. Have you taken a look at the example in the documentation? You can also enter a pair of points, instead of the list of 4 points they show in their example.
Rik
on 15 May 2019
In fact, I am trying to plot the intinsity profile alone the right spot appearing in the lower part of the picure along its diagonal. i.e. about 45 degrees with the positive x-axis. But, once I try to load the pic. I got the meassage :
Cannot display....
Rik
on 15 May 2019
What code are you using? Are you entering coordinates as input to improfile, as the documentation describes? Why are you opening your image in the variable editor?
You could even use ginput or getpts to get the coordinates as input to improfile (just use a function like imshow to get your image into an axis).
No idea what you're doing. It sounds like you need to learn how to use matlab's interface first.
As rik has said, improfile is the tool to use, e.g.
img = imread('p190322an.jpeg'); %load the image
figure; imshow(img); %display image in a new figure
p = improfile; %call the improfile tool that lets you specify the start and end point of the line along which you want to measure the intensity profile
Mohammed Qahosh
on 20 May 2019
Mohammed Qahosh
on 20 May 2019
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!