[Elphel-support] JPEG quantisation table
Sebastian Pichelhofer
sebastian.pichelhofer at gmail.com
Wed Feb 9 00:14:55 PST 2011
*Problem Definition*
Chart showing resulting file-size depending on JPEG quality and coring
index:
http://community.elphel.com/files/jpeg-filesize-chart.jpg
Buffer-Monitor is a software that attempts to automatically adjust image
compression ratio (JPEG Quality 0-100%) based on the data-rate of the
current image stream and the amount/ratio of free/used circular-buffer
memory. The goal of the Buffer-Monitor software is to keep JPEG quality at a
highest possible value (best image quality) but preventing the buffer from
overflowing (dropping frames). The chart above shows that the effects of
changing JPEG quality on resulting file-size increase exponentially.
Image size is mainly affected by 2 parameters:
a. JPEG quality (where the area of primary interest is > 85%)
b. actual image content (eg. changing lighting conditions have drastic
effects on file-size)
So this narrows down the control that Buffer-Monitor has over image quality
to basically 15 discrete values. The closer to 100 the value gets the higher
the impact of a 1% increase/decrease is on the resulting file-size.
I think this is not optimal to ensure continuous high image quality but at
the same have time decent room for corrections when reacting to changing
image content.
*Ideas for Solutions/Improvements*
The DCT quantisation table is the only lossy step in JPEG compression and
controls which frequency ranges are stored with which accuracy. (higher
accuracy -> higher filesize). Higher frequencies are in general reduced
stronger.
a.
Altering DCT quantisation tables to shift focus on higher
data-rate/frequency image content.
This would mean that lower JPEG quality ranges would have higher frame
sizes.
Stretching the >85% (X-Axis) area of the above chart over a wider area
(0-100%)
b.
Changing how the JPEG quality value (0-100) affects the DCT quantisation
table to achieve the same effect.
*Questions*
Where are the current quantisation tables stored in the camera and how can
they be read/changed?
How does JPEG quality affect the quantisation table?
Regards Sebastian
Credits also go to Oleg for helping understand the topic!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20110209/f75f2c26/attachment-0002.html>
More information about the Support-list
mailing list