title: OpenCV RGB values in hex?
body: <p>So I've successfully access pixel data in a frame using the c++  frame access wrapper on the opencv webpage</p>
  
  <pre><code>template&lt;class Frame&gt; 
  class Frame_Data {
          IplImage *imgp;
          public:
          Frame_Data (IplImage *img=0) {imgp = img;}
          ~Frame_Data () {imgp = 0;}
          void operator=(IplImage *img) {imgp=img;}
          inline Frame* operator[] (int rowIndex) {
                  return ((Frame*)(imgp-&gt;imageData + rowIndex*imgp-&gt;widthStep));
          }
  };
  
  typedef struct {
          unsigned char b,g,r;
  } RgbPixel;
  typedef struct {
          float b,g,r;
  } RgbPixelFloat;
  
  typedef Frame_Data&lt;RgbPixel&gt; RgbImage;
  </code></pre>
  
  <p>Im then using 2 for loops to go through the frame pixel array such as:</p>
  
  <pre><code>for (int i = ymin; i &lt; ymax; i++) 
  {
      for (int j = xmin; j &lt; xmax; j++) 
      {
          int r = image[i][j].r;
          int g = image[i][j].g;
          int b = image[i][j].b;
  </code></pre>
  
  <p>So lets say I want to throw in an IF statement to check pixel data colors. I've seen some websites list them as stuff like </p>
  
  <pre><code>image[i][j].r=0xFF;
  
  or if g &lt; 0x20
  </code></pre>
  
  <p>Im not used to the hex looking values, i tried to look them up but can't find any refernece, im used to cvscalars, so what do these mean? Like what does 0x20 stand for?  or what about 0xFF?</p>
  
  <p>thanks</p>