How can I draw a line on an image and count the pixels along the line?
古いコメントを表示
I have a image of some rectangles and I want to draw a line across some of the rectangles. How can I count the pixels along the line and find out which part has the minimum intercepts?
Thanks, Gene
回答 (2 件)
Image Analyst
2012 年 8 月 29 日
0 投票
Let's say you drew the line with improfile(). Then you'll have the endpoints of the line and you can use the Pythagorean theorem to get the distance.
I don't know what you mean by the part that has the minimum intercepts. Perhaps uploading an image and a better explanation would help.
カテゴリ
ヘルプ センター および File Exchange で Region and Image Properties についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!