I want to segment a bunch of images, and therefore have to train some classifier. For that I have to create groundtruths of my image. So far I did it like this:
- Segment the image in gimp with the magnetic scissor
- Fill the three different segments of the image with plain green/red/blue
- Import the image as an array with numpy
- Since at the edges between two different classes there is a transition between the two colors, I use clustering to summarize the pixel in three classes
Is there a better/more direct way to do this? (Note: I dont want to use a pre segmented dataset, I want to create my own one)