views:

145

answers:

2

I've been writing a Java program that aides in cutting and working with sprites, such as CSS sprites. The main idea is that the image is segmented into subregions, so the software understands the "spritesheet" is composed of multiple sprites.

The algorithm I developed works by scanning horizontal (x) and vertical (y) axes for breaks, based on transparency/color mask. This doesn't detect each subpart, but applying it recursively may. The 1D axes are transformed into rectangles of where parts are in the image.

http://en.wikipedia.org/wiki/Image%5Fsegmentation

The Wikipedia article (above) has information on many different techniques. One important thing is that I'm not doing recognition, such as detecting foreground objects. Technically using the color mask is separation of a background and foreground though.

+1  A: 

You're right. You are technically doing foreground extraction, despite having very little background to extract from. I would suggest taking a look at Connected Component Regions this, IMO will assist you in extracting nonuniform regions that are well connected.

I looked at the Wikipedia page, most of those techniques are based on attempting to segment the image on either:

  1. "Interesting regions" i.e. mahalobis distance, or color distance (these are not the same distance measures)
  2. By models
  3. Pattern recognition
monksy
+1  A: 

It is image segmentation, but not a general purpose one. Using a mask limits its purpose depending on the kind of mask you're applying, but if you're interested only in a specific type of image structure, it's quite ok, I'd call it domain-specific image segmentation.

luvieere