Questions tagged [yuv]

YUV is a color space typically used as part of a color image pipeline.

784 questions
17
votes
3 answers

Convert android.media.Image (YUV_420_888) to Bitmap

I'm trying to implement camera preview image data processing using camera2 api as proposed here: Camera preview image data processing with Android L and Camera2 API. I successfully receive callbacks using onImageAvailableListener, but for future…
mol
  • 2,607
  • 4
  • 21
  • 40
15
votes
1 answer

Image formats NV12 storage in memory

I am totally understand about the size of the NV12 format as described in question NV12 format and UV plane Now I am reading from two sources about the storage of UV plane in this format: one is…
Manish Kumar
  • 1,419
  • 3
  • 17
  • 36
15
votes
1 answer

iOS - How to draw a YUV image using openGL

Currently, I am trying to draw an image using openGL (the image updates very often, and thus must be redrawn). Previously, I was converting my image from YUV to RGB, and then using this new image to draw with openGL. All worked fine, but the…
Doc
  • 1,480
  • 2
  • 16
  • 28
14
votes
6 answers

rgb to yuv420 algorithm efficiency

I wrote an algorithm to convert a RGB image to a YUV420. I spend a long time trying to make it faster but I haven't find any other way to boost its efficiency, so now I turn to you so you can tell me if this is as good as I get, or if there's…
Sambatyon
  • 3,316
  • 10
  • 48
  • 65
14
votes
2 answers

YUV 422 , YUV 420 ,YUV 444

I have for example 4*4 image. I want to extract the Y,U and V components separately. How to do it if the image is YUV 422 ,YUV 420 and YUV444. I am interested in knowing the structure of array how Y,U and V are stored in 422,420 and 444, so that it…
Aizen
  • 561
  • 1
  • 9
  • 19
13
votes
6 answers

Green images when doing a JPEG encoding from YUV_420_888 using the new Android camera2 api

I am trying to use the new camera api. The burst capture was going too slow, so I use the YUV_420_888 format in the ImageReader and do a JPEG enconding later, as was suggested in the following post: Android camera2 capture burst is too slow The…
Yamidragut
  • 456
  • 4
  • 7
13
votes
3 answers

Planar YUV420 data layout

In my project I use OpenH264 codec, which is said to output data in the YUV 4:2:0 planar format. After decoding I get one array with width * height * 1.5 elements, which, when displaying, looks like this…
y434y
  • 633
  • 1
  • 8
  • 27
12
votes
2 answers

How to perform RGB->YUV conversion in C/C++?

How to perform RGB->YUV conversion in C/C++? I have some Bitmap.. RGB I need to convert it to YUV Libs? Tuts? Articles?
Rella
  • 65,003
  • 109
  • 363
  • 636
12
votes
3 answers

Display YUV in OpenGL

I am having trouble displaying a raw YUV file that it is in NV12 format. I can display a selected frame, however, it is still mainly in black and white with certain shades of pink and green. Here is how my output looks like Anyways, here is how my…
ReachConnection
  • 1,831
  • 6
  • 22
  • 32
11
votes
2 answers

YUV to RGBA on Apple A4, should I use shaders or NEON?

I'm writing media player framework for Apple TV, using OpenGL ES and ffmpeg. Conversion to RGBA is required for rendering on OpenGL ES, soft convert using swscale is unbearably slow, so using information on the internet I came up with two ideas:…
pawlowski
  • 123
  • 1
  • 5
11
votes
1 answer

How to emulate GL_TEXTURE_EXTERNAL_OES texture?

I have a OpenGL ES 2.0 QNX application that uses camera input, makes some processing and renders something to screen. All my shaders take GL_TEXTURE_EXTERNAL_OES texture from the camera as input and it's format is YUV422. I want to test my…
Aleksey Petrov
  • 370
  • 2
  • 15
11
votes
5 answers

Converting preview frame to bitmap

I know the subject was on the board many times, but i can not get it work anyhow... I want to save view frames from preview to jpeg files. It looks more or less(code is simplified- without additional logic, exception etc) like this... public void…
androdevo
  • 752
  • 1
  • 8
  • 17
11
votes
2 answers

FFMPEG: Dumping YUV data into AVFrame structure

I'm trying to dump a YUV420 data into the AVFrame structure of FFMPEG. From the below link: http://ffmpeg.org/doxygen/trunk/structAVFrame.html, i can derive that i need to put my data into data[AV_NUM_DATA_POINTERS] using linesize…
Zax
  • 2,870
  • 7
  • 52
  • 76
11
votes
4 answers

Creating a Mat object from a YV12 image buffer

I have a buffer which contains an image in YV12 format. Now I want to either convert this buffer to RGB format or create a Mat object from it directly! Can someone help me? I tried this code : cv::Mat input(widthOfImg, heightOfImg, CV_8UC1,…
s4eed
  • 7,173
  • 9
  • 67
  • 104
11
votes
2 answers

CVOpenGLESTextureCacheCreateTextureFromImage return -6683(kCVReturnPixelBufferNotOpenGLCompatible)

I had extract Y U V data from video frame separately and saved them in data[0],data[1],data[2];The frame size is 640*480;Now I creat the pixelBuffer as below: void *pYUV[3] = {data[0], data[1], data[2]}; size_t planeWidth = {640, 320, 320}; size_t…
user1278982
  • 223
  • 5
  • 15
1
2
3
52 53