フィルターのクリア

Segment extraction from an image in any direction

1 回表示 (過去 30 日間)
Alejandro
Alejandro 2014 年 7 月 4 日
コメント済み: Alejandro 2014 年 7 月 5 日
Hi, i'm trying to extract a segment from an image in any direction. Suppose i have an 800X600 image (RGB) and i want to read a segment from point A(500,200) to point B(300,600). Is there any way i can get a column vector which contains the pixels values in that "diagonal"? i think it has to be some sort of interpolation between the nearest pixels. I don´t want to rotate the image, i need the values as they are. Regards.

採用された回答

Image Analyst
Image Analyst 2014 年 7 月 4 日
Yes. You can use improfile()
x = [200, 600];
y = [500, 300];
values = improfile(grayImage, x, y);
  33 件のコメント
Image Analyst
Image Analyst 2014 年 7 月 5 日
That's using the same spacing as the original sampling. You can go higher for more "resolution" though it's just giving you more samples, not necessarily giving more information, or you can use a smaller number if you want a sampling less frequent than you have in the image. It's your choice. Do whatever you want considering the time to process and what you want to do with the final image you're building up.
Alejandro
Alejandro 2014 年 7 月 5 日
I understand perfectly. Thank you!!!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by