What is the pixel value of RGB umcompression buffer?
AnsweredHi,
I want to use the plugin to do our AI. I set the capabilities to needUncompressedVideoFrames_rgb and get the data from video frame in pushUncompressedVideoFrame function. But I found the data range is not from 0~255. What is the pixel value of RGB umcompression buffer?
Thanks a lot
-
Hi 高偉恆,
Thanks for the question.
PixelFormat::rgb
means that in the video frame buffer there are exactly 3 bytes for each pixel :one for R
one for G
one for B,In this particular order, and each byte is in range [0..255].
-
Hi Ichiro
But I found that the pixel value is not from 0~255 is from -128~127
Can you help me check this?
I use opencv to save the frame. The result is like below.
-
Hi 高偉恆
I have checked with our developer, we have not had the experience which the RGB bytes is treated as signed values. Most of the VMS treats them as unsigned values (0..255).
So likely this is something within in your code about the data type, or you may manually shift them if required.
Thanks,.
Please sign in to leave a comment.
Comments
3 comments