MATLAB: Transform boundary image to 2d plan coordinates

image analysisimage processingImage Processing Toolboxmask

Hi, I need to transform some images (that represent different objects boundary line) to a curve on matlab. The images are like this
what I need to do is to "place" this curve and the area inside it in a 2d space in order to make an if cicle: if I am inside this area I have some requirements, if I am outside I have different requirements (an example would be a gps use: if I am inside an area defined by this curve and so inside some longitude and latitude limits I have three restaurants, if I am outside I have no restaurant). Can somebody help?

Best Answer

What is an "if cicle"? If you have the x,y coordinates of the boundary/perimeter/curve, then you can use inpolygon() to determine if a point is inside or not. I don't know what else to say since I don't know what it means "to place this curve and the area inside it in a 2D space" nor do I know what an "if cicle" is. Isn't the curve ALREADY in a 2D space? It's in a plane isn't it?