[GEM-dev] new pix_colordetect

Ricardo Fabbri rfabbri at gmail.com
Fri Nov 11 16:16:15 CET 2011


Hello, IOhannes,

glad to hear it can be useful. It could also be called pix_colorclassify or
pix_colorclass, since it outputs 6 color classes  'red', green', ...,
'white' (and a seventh 'not sure' class label). However, to me the output
is in symbolic form. The 'red' symbol is encoded  as [1 0 0]  and so on.
These data representtions re actually hard symbols for each color class. I
wrote another object which ca get the output encoded in this way and
generate 6 iages, one for each color class, e.g. a binary image indicating
the presence of 'red' label pixels (which is not channel R since yellow
also has R channel), another for 'yellow', etc.

Yes, the confidence could be in the alpha channel, although that could
confuse visualizatin prior to decoding. The current output has no guesses;
the beige color shows any pixels the lgorithm is unsure of. NOte that when
it s eemingly makes mistakes, you can see in the original video that the
color is actually right, its just that illumination direction and color
balance actually distorts the color, and interreflections also chnage
pixelvalues to  something other than expected. The pS3eye, for  instance,
seems to have aslightly bluish white balance offset. I saw that usully the
detection makes sense. However,  red could be  tuned to be slightly
stricter, and similarly for  some other colors.

In the future that would be a flag to also output color guesses where
unsure.  I could include that now. Moreover, yes, I want to output annimage
or alpha mask encoding 3 levels of certainty: 0 uncertain, 1 good guess,
and 2 certain.

What i was thinking bout the multiple image outlets was to decode the
current 7-class output into 7 binary image outputs.  however I wrote
another object to do the decoding very naturally, avoiding wasting memory
when e.g.  just a couple of color classes are needed. that object called
pix_equal, outputs a binary image with 255 where a pixel is within a given
closed rgba interval on all rgba channels. Then the binary image can be fed
to pix_multiblob for obtaining color blob parameters to control sound, etc.
All that is already done with a demo. I just need to make pix_equal work
for other image types than rgba prior to submitting it for your review.

best,

On Friday, November 11, 2011, IOhannes zmölnig <zmoelnig at iem.at> wrote:
> On 11/09/2011 11:47 PM, Ricardo Fabbri wrote:
>
>> Perhaps you can pull the "color" branch from my published Git repo at:
>>
>> git://github.com/rfabbri/Gem.git
>
> looks good, but:
>
> before including it, do you think there might be a better name than
> [pix_colordetect]?
> whenever i hear "detect" is assume a domain transformation from data
> into symbolic representation.
> e.g. [pix_movement] is not called [pix_motiondetect] because it stays in
> the data domain, just like your object.
> unfortunately [pix_colorreduce] is already taken (but then your object
> is more strict in what it can actually do)
>
>
> ah, and would it make sense to encode the quality of the guess in the
> alpha-channel? (or did you plan to output a quality mask as a 2nd image?)
>
> fgmasr
> IOhannes
>
>

-- 

Ricardo Fabbri
--
Linux registered user #175401
www.lems.brown.edu/~rfabbri
labmacambira.sf.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/gem-dev/attachments/20111111/9b25956e/attachment.htm>


More information about the GEM-dev mailing list