I have manually segmented an image into two halves using:
roi = drawassisted('Closed',false);
Im = createMask(roi);
The generated mask (Im) is attached as an image
I want to make all pixels below that line = 1
The problem I am having is that the boundary sometimes loops back on itself, so x values are not unique, meaning I can't write a simple if statement using the pixel co-ordinates.
I'm sure the solution is quite easy, but I am really struggling to find it.
Any help much appreciated,
Thank you
Best Answer