4

Problem Statement: I have an image obtained after plotting several points and coloured according to a certain parameter value. Since I need to perform contour detection, I need to actually form a "contour". Thus I need to colour the white pixel (especially in the top right of the image) inside the "contour" to have the same colour as the nearest coloured pixel. Alternatively, suggest a better morphological/blurring/smoothing technique.

enter image description here

My attempt: enter image description here As you can see that the corrected components appear jagged (Used erosion and blur selectively to the right half of the image). Any suggestions are welcome :)

Alpha
  • 399
  • 3
  • 9
  • unfortunately your pictures appear to be resampled, so there is no clear color/background separation. you ought to work from the points themselves, not a picture of these points. scipy has *interpolation* functions that can turn a bunch of "colored" points into a dense approximation – Christoph Rackwitz Jun 29 '21 at 15:56
  • 2
    take a look https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html#scipy.interpolate.griddata – Christoph Rackwitz Jun 29 '21 at 23:41

0 Answers0