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!