How to find pixel location using ROIPOLY???
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everyone,
I think I am on the right track using roipoly because I want to use it to locate a ROI within a picture. My ROI happens to be a piece of paper. When I have used the roipoly function I am given a binary image with the piece of paper area showing up as white with the rest of the background black. How do I find out the dimensions or pixel locations of the corners of this area? Maybe counting the number of '1' pixels? I need to know the size of this area because then I will crop the original RGB image to this specific area and then I can run some image processing code just on that ROI in the original image? Hope that makes sense!
Many thanks,
Ellis
0 件のコメント
回答 (1 件)
Adam
2016 年 5 月 17 日
The
[BW, xi, yi] = roipoly(...)
syntax for calling roipoly gives you the vertices of the polygon/roi in xi and yi. Are these not what you want?
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!