CaptureDevice
CaptureDevice copied to clipboard
how come there's no grayscale data type?
I mean, byte array with YYYYY.... that would save both some memory and cpu time
well it actually available for android since it is native output. on ios it is not native output of camera stream so it is not available. see sources carefully ;)
I think the source said it's YCbCr for android, I am asking about all Y-s. Which would be 3x or 4x less memory and probably faster than averaging RGB-s on AS3 side.
besides in C++ you could probably do something like
byte y = (r >> 2) + (g >> 1) + (b >> 2);
and it would be actually faster than multiplication
i don't get what the problem here? YCbCr - just use first WidthxHeight bytes to get grayscale data only for further processing. u still need RGB for rendering to screen. when u converting to grayscale us should care about about actual coefficients since some algorithms like HAAR for example very dependent on grayscale data. real life example: i was using averaged coefficients to grayscale like
y = (77*r + 155*g + 22*b) >> 8;
it results in 30% more search iterations in haar classifiers. when changed it to high precision conversion:
y = r * 4899+ g * 9617+ b * 1868+ 8192) >> 14
i get 30% faster haar with better results!
YCbCr - just use first WidthxHeight bytes to get grayscale data
you mean there are 3 separate blocks, not triplets?
as for "the problem" - you have one if you want to operate on more than single frame.
faster haar with better results
well sure it is expected since you were training cascades using different formula.
YCbCr means that first width*height bytes is luma values only.