| 33 | return c[0] + 256*c[1] + 256*256*c[2]; |
| 34 | } |
| 35 | void putColor( unsigned char * c, int cc ){ |
| 36 | c[0] = cc&0xff; c[1] = (cc>>8)&0xff; c[2] = (cc>>16)&0xff; |
| 37 | } |
| 38 | // Produce a color image from a bunch of labels |
| 39 | unsigned char * colorize( const VectorXs & labeling, int W, int H ){ |
| 40 | unsigned char * r = new unsigned char[ W*H*3 ]; |