문제

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