yuv

Planar YUV420 data layout

不打扰是莪最后的温柔 提交于 2019-12-03 13:00:20
问题 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 image: http://o3d.googlecode.com/svn/trunk/samples_webgl/assets/shaving_cream.png Why there are four areas below the main one (which contains Y - responsible for grayscale - elements ), instead of two, like on my second picture? Is that mean that the format is different or am I wrong and my

Converting YUV into BGR or RGB in OpenCV

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a TV capture card that has a feed coming in as a YUV format. I've seen other posts here similar to this question and attempted to try every possible method stated, but neither of them provided a clear image. At the moment the best results were with the OpenCV cvCvtColor(scr, dst, CV_YUV2BGR) function call. I am currently unaware of the YUV format and to be honest confuses me a little bit as it looks like it stores 4 channels, but is only 3? I have included an image from the capture card to hope that someone can understand

Speeding up some SSE2 Intrinsics for color conversion

久未见 提交于 2019-12-03 07:56:32
问题 I'm trying to perform image colour conversion from YCbCr to BGRA (Don't ask about the A bit, such a headache). Anyway, this needs to perform as fast as possible, so I've written it using compiler intrinsics to take advantage of SSE2. This is my first venture into SIMD land, I'm basically a beginner and so I'm sure there's plenty I'm doing inefficiently. My arithmetic code for doing the actual colour conversion turns out to be particularly slow, and Intel's VTune is showing it up as a

YUV 422 , YUV 420 ,YUV 444

佐手、 提交于 2019-12-03 06:59:44
问题 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 can be accessed. 回答1: This site gives you a pretty good overview over the different YUV formats. There's also a pixel-structure given. For clarification: These numbers are for determination of color component subsampling. For instance YUV 444 = 4:4

Where can I obtain a raw YUV File? [closed]

放肆的年华 提交于 2019-12-03 05:54:32
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I need a raw YUV file for research purposes. Neither the size nor the content is critical. Any ideas on where such files exist? Richard You can find all kinds of YUV files with different formats: here . You can use ffmpeg to convert any other video type to raw YUV. Your source could be from a DVD home movie, for instance, or perhaps a digital video camera. HI try this link http://trace.eas.asu.edu/yuv/ I also have some

Issue with writing YUV image frame in C/C++

大城市里の小女人 提交于 2019-12-03 04:58:08
I am trying to convert an RGB frame, which is taken from OpenGL glReadPixels(), to a YUV frame, and write the YUV frame to a file (.yuv). Later on I would like to write it to a named_pipe as an input for FFMPEG, but as for now I just want to write it to a file and view the image result using a YUV Image Viewer. So just disregard the "writing to pipe" for now. After running my code, I encountered the following errors: The number of frames shown in the YUV Image Viewer software is always 1/3 of the number of frames I declared in my program. When I declare fps as 10, I could only view 3 frames.

Display YUV in OpenGl

£可爱£侵袭症+ 提交于 2019-12-03 03:55:20
问题 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 program works. (This is done in cocoa/objective-c, but I need your expert advice on program algorithm, not on syntax.) Prior to program execution, the YUV file is stored in a binary file named "test.yuv". The file is in NV12 format, meaning the Y

Planar YUV420 data layout

本秂侑毒 提交于 2019-12-03 03:10:00
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 image: http://o3d.googlecode.com/svn/trunk/samples_webgl/assets/shaving_cream.png Why there are four areas below the main one (which contains Y - responsible for grayscale - elements ), instead of two, like on my second picture? Is that mean that the format is different or am I wrong and my world just collapsed? I thought that the resoult should have looked like this: It is exactly the way you

Android ImageReader get NV21 format?

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I do not have a background in imaging or graphics, so please bear with me :) I am using JavaCV in one of my projects. In the examples , a Frame is constructed which has a buffer of a certain size . When using the public void onPreviewFrame(byte[] data, Camera camera) function in Android, copying this data byte array is no problem if you declare the Frame as new Frame(frameWidth, frameHeight, Frame.DEPTH_UBYTE, 2); where frameWidth and frameHeight are declared as Camera.Size previewSize = cameraParam.getPreviewSize(); int frameWidth =

Convert Android camera2 api YUV_420_888 to RGB

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am writing an app that takes the camera feed, converts it to rgb, in order to do some processing. It works fine on the old camera implementation which uses NV21 Yuv format. The issue I am having is with the new Yuv format, YUV_420_888. The image is no longer converted correctly to RGB in the new Camera2 Api which sends YUV_420_888 yuv format instead of NV21 (YUV_420_SP) format. Can someone please tell me how should I convert YUV_420_888 to RGB? Thanks 回答1: In my approach I use OpenCV Mat and script from https://gist.github.com