Specifying a polygonal area on image and save all the pixels in that polygon in an array
4 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have a set of images, on which I need to specify a small polygonal area and save all pixels in that polygon in another array.
I have tried with looping, it works but it takes a considerable amount of time to process if I have 100+ images. My polygon points also change, because polygon is given based on facial landmark points which are the result of a face-tracking algorithm on camera images.If there is a small head motion, the facial points change and the polygon changes. Time taken to perform this increases with the number of images.
So, Is there a way to extract relevant pixels and save them in a separate array/matrix without looping through rows and columns?
Thanks in advance.
0 件のコメント
回答 (1 件)
KSSV
2016 年 11 月 30 日
You can use interpolation to get the data of the polygon region. Read about interp2
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!