virus4love / rowboat

Automatically exported from code.google.com/p/rowboat
1 stars 0 forks source link

Incorrect format being given by the camera #185

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Start the usb camera.
2.Stream camera preview data from my device to another device(Nexus 7 tablet 
with Android 4.4.4) over wifi.
3.Decode the image stream and display it on the receivers screen.

What is the expected output? What do you see instead?
The same images as the ones shown by the camera on the main device.
Images that look very similar but do not exactly match the ones shown on the 
other device,  i.e. image is blurry or colors don't match.

What version of the product are you using? On what operating system?
Running Android 4.2.2(Jelly Bean) with kernel version 3.2.0.

Please provide any additional information below.
I have attempted to decode the images from YUY2 to an RGB format. When I 
display the new images, they do not match the ones I am sending over exactly 
but they do look very close. I have tried using some other decoding algorithms 
such as YUV422 to RGB and YUV420 to RGB but I have not been successful with 
them. I am guessing this might have to do with the way the image is handled 
down in the OS layer because in the source it shows many conversions like 
YUV420 to RGB and YUYV to YUV being used. This may also be caused by the fact 
that android does not provide any other image decoders except those for YUY2 
and NV21 so I must write or find my own conversion for these image formats. If 
anyone manages to figure out what is causing this issue, please let me know how 
you solved it and what is causing the problem.

Original issue reported on code.google.com by Refik.Ka...@gmail.com on 8 Jan 2015 at 6:27

GoogleCodeExporter commented 8 years ago
I also wanted to mention that when I do a call to the 
getSupportedPreviewFormats method it returns NV16 so that is what I am 
expecting to get back from the camera.

Original comment by Refik.Ka...@gmail.com on 8 Jan 2015 at 6:33