Specifying a polygonal area on image and save all the pixels in that polygon in an array
1 次查看(过去 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!