简体   繁体   中英

Raspberry Pi camera 101

After reading PiCamera documentation, couple of questions have come to my mind that I might need some help to be able to answer them?

在此处输入图片说明

Does Pi uses lossy compression or lossless compression?

Is data really copy to RAM as many times as shown in the picture?

Is compression happening frame by frame and within the frame?

Are we duplicating RAM or using same buffer in step 3,4,5 and 6?

In scenarios where a circular buffer is created (using PiCameraCircularIO class), how is the picture shown above affected?

Thanks in advance!

The Pi uses lossy compression.

When the image enters the camera its colors are limited to the specified color-space. This may be as little as 50% of what the human eye can see.

Then the camera scales the color information to 25% (or throws away 75%) commonly referred to 4:2:0.

Now the already massively shrunk image stream gets lossy compressed by H.264 or JPEG compressor.

JPEG does within the frame compression (intra frame). H.264 does frame by frame and within the frame (intra frame and inter frame) You can configure H.264 to do only intra frame - then you create all I-frames.

Frames are processed and changed in step 3 (some signal processing) and step 5 (H.264 compression) so it must use different memory in 3 and 5.

Step 4 and 6 shouldn't be copy if done right.

PiCameraCircularIO should be copy - since the GPU memory can be limited and would overflow if your circular buffer gets to big.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM