Вопрос

This question maybe pretty basic, so please bear with me. I have 4 pixel coordinats and an image. I want to segment the image part within this 4 points alone and make a new image. Can you please tell me the easiest way to do this?

Это было полезно?

Решение

Look at roipoly using r and c inputs in addition to input image I.

Другие советы

Assuming you have a coordinate list xcoord matching with ycoord and want to have the smallest square that contains your pixels:

myImage = rand(100)
xcoord = [12 16 22 82];
ycoord = [24 70 12 34];

mySegment = myImage(xcoord(min):xcoord(max),ycoord(min):ycoord(max))
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top