<< return to Pixycam.com

Question on Colour Signatures and Colour Codes

Couple of quick questions about colour signatures and colour codes:

Colour Signatures:
(i) is it possible to have more than 7 unique colour signatures? Can firmware be easily modified to allow for more that 7 colours?
(ii) are colour signatures stored in non-volatile memory or do they need to be reset every time power is applied to PixyCam?

Colour Codes:
(i) say I set up a 3 colour code as 1=RED, 2=BLUE and 3=GREEN … colour code would be recognised when colours seen where RBG or GBR, is it possible to identify RGB (i.e. in a different sequence to RBG or GBR (RGG backwards)?). Doing this would allow 6 colour codes to be identified from 3 colours.

Thanks.

From the little I’ve done with color codes, I think that if you define 3 colors (R, G, B) you will have the following combinations recognized:

RG,
RB,
GB,
RGB,
GBR,
BRG,
The reverse codes, such as BGR would just be RGB with an angle of 180 deg.

Tom

Thanks Tom, I downloaded the beta software and firmware and I’ve been having a bit of a play with the colour codes and was able work out that different combinations could be detected …

Have you tried a single colour though? If I tuned the PixyCam to see R, G & B it works OK as long as there are 2 colours present and adjacent to each other but it I try and see only one PixyMon doesn’t identify it (although it shades the area the same as the colour code to indicate it has been identified) - hoping that the single colour info is present in the serial data.

Thanks again for responding.

There are different color code modes. According to the wiki, I think you need to use mode 3.

Mode 0 is no color codes
Mode 1 (default) reports both color signatures and color codes. But if an object is a defined color code, it is only reported if made of 2 or more color codes.
Mode 2 is only color codes with the same restriction as mode 1.
Mode 3 is like mode 1 (report both) but without the restriction that colors defined as color codes will only be reported if the object has 2 or more color code colors.

I haven’t tried this.

Tom

Hi Peter,

To answer your question about having more than 7 color signatures - this is possible but not practical. It all has to do with the color look-up table and run-lengths that are used for identifying which signature each pixel belongs to. The simple explanation is we only have 3 bits available to use for identifying each pixel’s signature (or absence of signature). If we were to increase the number of bits for identifying the sig from 3 to 4, then we’d roll over to 33 bits of total data for each pixel and thus require 2 memory addresses per pixel, thus doubling the amount of memory (and memory access time) required per image.

I hope this made some sense. Let us know if you have any other questions.

Scott

Thanks Tom - I’ll give these a try … I missed this part of the documentation :frowning:

Thanks for your response Scott, I was wondering what the limitations were and glad you pointed these out before I started changing the source code.