Re: JPEG2000
- From: "cr88192" <cr88192@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 31 Mar 2006 20:17:15 +1000
"Jasen Betts" <jasen@xxxxxxxxxxx> wrote in message
news:1f66.442b94a9.59fe0@xxxxxxxxxxxxxxxxxx
On 2006-03-29, alfred.kidd@xxxxxxxxx <alfred.kidd@xxxxxxxxx> wrote:yeah, difficulty would be fitting the headers and huffman table in that
Hi everyone,
The problem I have, I tried to compress a *.bmp image to under 500
bytes with no success.
We are in need of a compression meganism that is capable of compressing
a small *.bmp image to a file under 500 bytes.
I don't think jpeg works well on images that size
space, much less any payload...
quick check of my jpeg decoder shows it taking 600 bytes already before the
image data is even reached.
since it is 500 bytes, one can go a little higher:When decompressed the *.bmp image must be more or less the size of a
drivers licence photo.
Any help whould be most appreciated.
use larger pixels/fewer bits per pixel.
if you made the image one bit per pixel and 20x20 pixels no compression
would be needed.
32x32 at 1bpp is 128 bytes, up to 4bpp can be fit in 512 bytes.
36x36 at 3bpp takes 486 bytes (this might be enough to distinguish that it
is a head...).
quick check (convinient self image), yeah, one could determine that it is a
head, no real hope of determining whos though...
maybe huffman and some manner of filtering "could" get it a little higher,
but not by any standard means (no space to store the tables, no space to
store predictor info, ...).
64x72, facial recognition is likely possible.
at 4bpp this would take 2.3kB, a little over the limit.
squeezing it a little more could be possible (again, fixed predictor and
huffman). however, even a flat black square will still likely cost 600 bytes
in this case (arith coding could initially do better, but to make work at
all the probabilities would likely need to be set initially). that or the
huffman coder has rle (likely repeating some run of 0's).
example codes:
0 0
1 100
F 101
2 11000
E 11001
3 11010
D 11011
4 111000
C 111001
5 111010
B 111011
6 111100
A 111101
7 111110
8 1111110
9 11111110
RLE 11111111 LLLL
or, rle could have a shorter code, depending on the frequency of runs,
assuming ~2 runs/scan (flat color either side of the head), 108 bytes would
go just to RLE runs.
the number of remaining bytes would have a lot to do with the image content.
dunno if any of this helps much...
so, take it or leave it...
Bye.
Jasen
.
- References:
- JPEG2000
- From: alfred . kidd
- Re: JPEG2000
- From: Jasen Betts
- JPEG2000
- Prev by Date: Re: question about entropy and compression method
- Next by Date: Re: ADV202 JPEG2000 codec
- Previous by thread: Re: JPEG2000
- Next by thread: "Cx Data Compression Tools" Source Code Wanted
- Index(es):
Relevant Pages
|
|