I'm trying to figure out a good way of encoding object segmentation data into a single RGBA image. I'd like to not only distinguish between classes, but also individuals within classes, and be able to have multiple classes and objects per pixel.

For example, I could have a pixel represent both "road sign" and "speed sign" classes, as well as indicating that the particular collection of pixels belongs to one individual.

Is the pairing function my best bet? How would I calculate the maximum number of classes and objects I could encode in a 32bit value? I guess I'm looking for a reversible 32 bit hash function.

enter image description here

  • $\begingroup$ There's lots written in the computer vision research literature on image segmentation. Have you studied any of the classic techniques and papers on the subject? Often it doesn't involve classification, so the issues you are worried about don't come up. en.wikipedia.org/wiki/Image_segmentation $\endgroup$ – D.W. Jun 9 '17 at 16:24
  • $\begingroup$ I'm just trying to encode hand made annotations for now. $\endgroup$ – waspinator Jun 9 '17 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.