Pergunta

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?

Foi útil?

Solução

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

Outras dicas

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))
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top