How can I plot the intinsity profile for a oicture along a specific direction? Here is the picture.

回答 (1 件)

Rik
Rik 2019 年 5 月 15 日

0 投票

improfile should work

7 件のコメント

Mohammed Qahosh
Mohammed Qahosh 2019 年 5 月 15 日
Thank you for answering my question. But, what if the image contains more variables than the allowed onces.
I got the following : Cnnot display summaies of variables with more than 524288 elements. !!
Rik
Rik 2019 年 5 月 15 日
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
Rik 2019 年 5 月 15 日
Comment mistakenly posted as answer by Mohammed Qahosh:
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
Rik 2019 年 5 月 15 日
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).
Guillaume
Guillaume 2019 年 5 月 15 日
編集済み: Guillaume 2019 年 5 月 15 日
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
Mohammed Qahosh 2019 年 5 月 20 日
Guillaume,
Thank you very much. Actually it was not easy as I expected. Someone halped me :))
Mohammed Qahosh
Mohammed Qahosh 2019 年 5 月 20 日
Dear Rik, thank you very much for yor help. Actually, there was a code defining the image I worked on using the current computer. But it works now.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で Images についてさらに検索

タグ

タグが未入力です。

質問済み:

2019 年 5 月 15 日

コメント済み:

2019 年 5 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by