|
Re: improvements to demo camera code anyone
Forgive me if I'm being dense but...
Wouldn't the problem of converting a 24-bit RGB value into an 8 bit hue be a good candidate for a lookup table? You would have a 256x256x256 byte array. This is 16MB and should fall well-within the memory limitations of the cRIO. I'd gladly trade that memory for speed. The only sticking points would be (1) how much of the cRIO's memory is really available and (2) whether or not the C compiler would allow such a large array. If (2) is not satisfied, you could get around it with the clever use of pointers and multiple smaller arrays. If (1) is not satisfied, then we are stuck with what we have.
|