I have a segmented image that looks like this:
// I am not allowed to post photos, as I am a new member, so only the link:
// Turns out I can't send two hyperlinks, so I'm going to post a link to the map file.
Edit: I can now send images:
alt text http://img4.imageshack.us/img4/917/test0seg.jpg
I also have a map file that clearly shows segments:
alt text http://img4.imageshack.us/img4/6904/test0map.jpg
Now I need to create a binary image file consisting only of a deer in the center, painted in white, the rest of the image is painted in black.
What methods do you offer for merging segments?
I have something like this:
- Calculate the average color values for each segment.
- Compare them and combine the most similar segments.
If I do this, I get 3 segments: floor (white part), wall (combined black and light gray) and object (gray part).
In this case, what can be done to get the object correctly?
Please note that the object should not be in the center, it may be partially disabled.
(I also thought about calculating the area that each segment occupies, and designating the smallest area as an object, but there may be times when objects cover most of the image, so it may not produce the correct results.)
I would really appreciate any help. Thanks in advance.