|
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
They are fourier transforms of the original data. A series of trigonometric and exponential terms are used to emulate the intensity profile of the image.
A simple example of how this works is the square wave function. The first diagram here shows how the infinite sum of the trig functions gives the square wave. But if you only use the first few terms, you only get an approximation of it the square becomes all nobbly and blurred. In images, sharp lines are like square waves. They require a lot of high frequency data to render them well. Jpeg compression removes high frequency data and so lines become less sharp, but you also get nobbliness, so instead of sharp lines, you get blurry lines will other nobble lines surrounding it. In this way, jpeg compressed images can yield stuff that wasn't there before, including what to the ignorant eye may look like matte lines or pencils lines etc. But they're not. They're the nobbliness from jpeg compression. |
|
|||
|
JPEG uses the discrete cosine transform, which is very close to the theoretical maximum compression possible. By that I mean that it is not possible to cram much more information into the first few terms. The lossy nature of the compression is due to the fact that only the first few terms are stored. The others, all being nearly equal to 0 are in fact set = 0 and not sent in the jpg. How many terms you send determines how close the picture is to the original. In many cases it doesnt matter since the original image is no exact either. If you take the same picture twice, you will get different pixel values due to subtle differences in lighting, time of day, etc., so it is not necessary to reproduce every pixel exactly. If you do need every pixel exactly, then you have to use some other compression algorithm.
__________________
Time flies like an arrow. Fruit flies like a banana. |
|
||||
|
Quote:
But, with the compression artifacts, Hoagie can do wonders, even putting a square JPEG in a round hole. ![]()
__________________
A person's name, or a mark representing it, as signed personally or by deputy, as in subscribing a letter or other document. |
|
|||
|
Just curious....why the post? Is this from another thread somewhere...
Anyways, are the approximation functions a truncated infinite series, similar to a Taylor series? If the denominators are n!, you probably won't need many terms to get a very good approximation. What's the difference between jpeg, mpeg, bitmaps (and others...) is there a best (clearest) way to store the the info? Pete
__________________
PJE There's so much I don't know about astrophysics. I wish I had read that book by that wheelchair guy. |
|
||||
|
Quote:
JPEG Compression Standard (Acrobat) [Gregory K. Wallace] (76 kB zip) Quote:
|
|
||||
|
Quote:
I recommend everyone, even those who aren't particularly mathematically minded, download and read The DSP Guide. It talks about sampling and information theory, compression, Fourier transforms, Laplace transforms, wavelets, and a lot of other stuff that things like JPEG are based on. Its absolutely fascinating and written in a really friendly, interested tone all the way through. Even comes with sample code to play with ![]() |
|
||||
|
Quote:
__________________
An open mind is like an open window...without a good screen you'll get all sorts of weird bugs! |
|
|||
|
Is the main application of Fourier transform for information theory? I learned about them in differential equation but never really learned what they are useful for...
Pete
__________________
PJE There's so much I don't know about astrophysics. I wish I had read that book by that wheelchair guy. |
|
||||
|
Quote:
I stored my images in RAW format (about 5MB per image) which let me use Adobe Photoshop CS to transform them into JPGs. The initial JPGs were more than 100MB, primarily because I chose the greatest accuracy and color retention. When I printed out the 3x5s, 4x6s, and 8x10s, the parents were very happy, and absolutely amazed at the detail gleaned by a small, (pocket) handheld like my Canon S50. Thus, if anyone's storing "alien" photos on the web, the best way to do so is via "RAW" format and let the photographic experts do the work reconstructing the imbedded details. |
|
||||
|
The DCT by itself isn't the real problem in JPEG; rather, it is the fact that the DCT is performed on 8x8 blocks of pixels. The detail loss may be more or less severe in adjacent blocks, causing a noticable square edge artifact. This is particularly noticable at higher compression levels; if you toss out all but the most significant terms, the details in adjacent squares are not going to line up at all. Run an edge enhancement filter in Photoshop, and you suddenly get lots of cool alien structures...
JPEG can also introduce artifacts in the conversion of the RGB pixel values to Y,Cb,Cr values-- the chrominance is sometimes sampled in 2x2 blocks. Plus, there is quantization error, since the final values are stored as integers. Making things worse, every time you re-compress a JPEG (say, after some photoshop tweaking ) these errors are compounded.
__________________
Do try not to take me too seriously. |
|
||||
|
Quote:
|
|
||||
|
DCT is a problem because it has certain presumptions of symmetry. This has an effect even within 8x8 fields. Yes, you have the clear problems across the field boundaries, but because the DCT basis functions have symmetry requirements, you can't encode part of the field without also affecting another part of the field that bears some symmetrical resemblance to the first. This is part of DCT's strength in compression, but it is also the principal source of error and loss.
|
|
|||
|
Heh. When I read the title of the thread I expected it was going to be about some conspiracy. Something like compression causes the formation of artifacts that damage the eyes and brain or the government forces software developers to include spyware that encodes the information about you in JPEGs you handle, so they can find out who had the specific image, and things like your passwords and so on...
__________________
Game over, you lose, we hope you enjoyed playing the exciting game of Thermodynamics... |
|
||||
|
Quote:
If you string a bunch of "P" frames in a row, you can get errors that accumulate, so you need a new "I" frame once in a while to reset things. Finally, "B" frames (bidirectionally predicted) work something like "P" frames, but use past and *future* frames to do the difference calculation. Since several images are held in the memory of the decoding device (PC, TV, etc) it is actually possible to use future frames that are held in memory to do the calculation. There is no question whether these introduce artifacts into the images. But, they are "artifacts" in the video meaning, not the archaeological one.
__________________
I may have many faults, but being wrong ain't one of them. -- Jimmy Hoffa |
|
||||
|
Since several images are held in the memory of the decoding device (PC, TV, etc) it is actually possible to use future frames that are held in memory to do the calculation.
Well, this is misleading. The frames in an MPEG video elementary stream are sent out of order. The I-frame is sent, then the next P-frame that keys from it. Finally the individual B-frames are sent which correspond to the frames encoded between the I- and P-frame. So the most any decoder has to hold in memory at any one time is the I-frame, the B-frame, and the P-frame currently being decoded. In fact, this is commonly how hardware decoders are implemented. So the stream IPBBBBPBBBBIPBBPBBB will be decoded as IBBBBPBBBBPIBBPBBBP. The encoder has to hold several frames in memory at once, and depending on how adaptive it is, it has to hold actually several seconds' worth of video simultaneously. "Real-time" hardware MPEG encoders and stream injectors typically run about $250,000. |
|
||||
|
Quote:
I openly encourage anyone to point out errors in my posts, but according to my dictonary, the word "mislead" has the connotation that any erroneous information was deliberate. I hope you are not implying that you believe it was.
__________________
I may have many faults, but being wrong ain't one of them. -- Jimmy Hoffa |
|
||||
|
Quote:
In other words, "misleading" was intended to mean "not entirely reliable", not "deceptive".
__________________
Relight the Firefly! "It is quite clear that Occam's razor does not sharpen in your pyramid." (Nicolas) "Still, a man hears what he wants to hear and disregards the rest." (Paul Simon) |
|
||||
|
I hope you are not implying that you believe it was [deliberately erroneous].
Definitely the opposite of my intent. My apologies if you got that impression. No, instead I was expressing my belief that something you said seemed to be phrased unclearly and might innocently lead to a misunderstanding. Unfortunately I don't always phrase things clearly either. Sorry if my use of "misleading" was misleading. When I read your post it seemed to say that MPEG decoders had to store "several images" in order to do the job. In fact the MPEG transmission scenario was specifically designed to require as little simultaneous storage as possible in the decoder -- 3 frames, which I thought was worth mentioning since it's a clever trick. The system was design to be cheap to decode by putting all the work into encoding. The presumption was that there'd be a plethora of decoders and only a few encoders. It was clear to me that you understand MPEG quite well, and so I just wanted to make that slight clarification. |
|
||||
|
Quote:
![]()
__________________
"We do not require reality to conform to the expectations of the ignorant" |
|
||||
|
Quote:
![]()
__________________
There are 10 types of people in the world. Those who understand ternary, those who don't, and those waiting for a bus. If logic doesn't work, then surely it does. |
|
||||
|
Quote:
__________________
"Last Thursday, in a major breakthrough for the science of astrology, everyone born under the sign of scorpio was run over by milk trucks...." |
|
||||
|
Quote:
I'm not an expert on MPEG, but was involved in the design and construction of an early (perhaps first?) real-time encoder back in the early 1990's. It was the size of several refrigerators. I've moved-on to other work and, some of the details have unfortunately faded from my memory. So I appreciate your filling-in the gaps and making corrections to my posts when appropriate.
__________________
I may have many faults, but being wrong ain't one of them. -- Jimmy Hoffa |
|
||||
|
btw, wavelets, or quadrature mirror filters, are also used heavily in compression. IIRC, the FBI fingerprint database was supposed to be compressed using wavelets. the same principle, really, but using time instead of frequency as your basis. edit: technically time and frequency, but the transform is simply an FIR filter, so it behaves like a time decomposition.
taks
__________________
goodbye richard pryor :(... Last edited by Taks; 12-October-2005 at 06:57 AM.. |
|
||||
|
Given the vast amounts of bandwidth available on the Internet today, there's absolutely no excuse whatsoever for posting a low-res JPEG of an important image, and such posting can, and should be taken as a sign of deception, trying to conceal something.
Post the full file!!! On the other hand, post the RAW file. For a 5.0 Megapixel camera, that's approximately a 4.3 MB file. Using Adobe CS, the resultant JPEG created to maximize the color depth and resolution for that file is more than 100 MB. By contrast, the JPEGs stored in the camera instead of the RAW information do heavy compression, create numerous artifacts. That's why they're merely 2.3 MB in size. Digital photography professionals deal in RAW format for a reason, folks. It's not as clear as the smaller JPEGs stored in the camera, but it embodies the FULL information as recorded/captured on the chip, and in a digital studie enviornment, provides the absolute best and most detailed final image with the least distortions and artifacts. Bar none. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|