Open anonym24 opened 5 years ago
Converting from BGR to RGB eats quite a lot of cpu
it's make no sense, why ScriptIntrinsicYuvToRGB
output BGR?
@gxshao because USB camera sends BGR frames, everything is ok with built-in device cameras (front and back), blue and red channels are in the correct position
When I convert
bytes[] data
fromIFrameCallback
to Bitmap with Android RenderScript https://stackoverflow.com/questions/20358803/how-to-use-scriptintrinsicyuvtorgb-converting-byte-yuv-to-byte-rgba it's in BGR channel but Android uses RGBEverything is ok if I convert byte array from default internal device camera (
onPreviewFrame
). It's in RGBHow to make this library send byte arrays from external usb camera in RGB format?
I use this example https://github.com/saki4510t/UVCCamera/blob/master/usbCameraTest0/src/main/java/com/serenegiant/usbcameratest0/MainActivity.java