|
This topic comprises 2 pages: 1 2
|
Author
|
Topic: Film vs. Digital (trading noise for aliasing?)
|
Evans A Criswell
Phenomenal Film Handler
Posts: 1579
From: Huntsville, AL, USA
Registered: Mar 2000
|
posted 12-23-2000 12:08 AM
Please note: The original images from my original post have been generated using different mathematical parameters. The original images were too big and were resized, causing many more artifacts than the ones I intended. The mathamatical parameters in the post have been updated to reflect the new images.I have become quite interested in attempting to mathematically compare film images and digital images. Last week, I wrote a program to attempt to sample ("take pictures") of a mathematical surface using different sampling methods. Aliasing is caused by undersampling, that is, taking samples at too low a rate to capture the highest-frequency components of what is being sampled. Periodic sampling causes aliasing that is sometimes so severe that the aliasing itself can appear to be a legitimate part of the image being seen. I chose a mathematical surface that would bring out the worst in a periodic sampling technique. The function is z=Abs(Sin(x^2+y^2)) If you don't like math, don't worry: This is simply a surface with concentric circular ridges emanating from the origin, and these rings get closer and closer together the farther they are from the origin. This means that the frequency of the "signal" being sampled increases with the square of the distance from the origin, although the amplitude of the rings stays the same. By the way, pixel spacing is 0.1, x and y are in radians, and the upper-left corner is the origin, if you wish to reproduce my results. The images are 8-bit grayscale, with color i being i red, i green, i blue. View in 24-bit color mode to assure no further artifacts are generated due to color quantization. 64x480 was used to keep images small enough to not bog down folks with modems. Images are in non-loss GIF format. Saving as JPG would have introduced other artifacts. First, I tried to sample using a method that would produce an image resembling film wtih randomly distributed grains: The image size is 64 by 480 and one sample is taken at a random position within each pixel area, which is similar to film but not the same because 64x480 grains on film would not necessarily be distributed one per rectangular pixel area. The picture shows the concentric circles to the point that the "film" resolution cannot capture them, after which film grain noise is present. When sampling using a periodic scheme, the results are drastically different. Let's assume we have a digital device that takes one sample in the middle of each pixel area, that is, 64x480 samples, evenly spaced. Here is the startling result: There appears to be a several sets of concentric circles across the image and several other ring effects are present in other parts of the image. This is a prime example of aliasing artifacts that appear to be a totally legitimate part of the image. After all, the concentric circles across the image look like the valid ones on the left! You're probably wondering if the aliasing can be eliminated by taking more samples per pixel. It turns out that if either random or evenly-spaced samples are taken, when the number of samples is increased, the result becomes the same as if the actual average value of the function over each pixel value were calculated (by taking the integral of the function I gave earlier over each pixel area and dividing by the area covered by the pixel. The integral (a double integral), when evaluated, gives the best possible average value for each pixel being plotted, and using lots of samples give results indistinguishable from the image produced by using the calculus method. I wish math symbols and subscripts and superscripts were available so I could jut write out the integral. So, here is the image produced by evaluating the integral for each pixel (taking the average value of the function over each pixel): Note that aliasing is still present to a lesser degree, but is still noticeable. This means that simply using a rectangular lattice is going to cause some aliasing regardless of what sampling or averaging techniques are used. (Note that even in my first image, the aliasing is slightly visible simply because I forced one random sample to be within each pixel, a restriction that real film would not have). I am beginning to doubt that is possible to generate an image that would show what a film picture of this surface would look like, since a rectangular array of pixels must be used to get it on the computer screen. When periodic sampling is used, the noise present in the film example does go away, but is replaced by the aliasing. Maybe that is a "truth in sampling" law, that noise and aliasing can be traded for each other, but neither can be gotten rid of if the signal is to be sampled with a number of samples too few to capture all the high frequency information in the signal. Evans http://home.hiwaay.net/~criswell/theatre/
| IP: Logged
|
|
|
|
|
|
|
Pat Moore
Master Film Handler
Posts: 363
Registered: Mar 2000
|
posted 12-24-2000 10:07 AM
Hi Evans; Quite the math model you've got there. Aliasing has to be one of the major challenges to digital as it truly tries to imitate film in appearance and quality. With the resolution requirements that are discussed, along with color bit depth, lossless compression and so on, these file sizes by the time a feature length movie is recorded as a "digital master" are rather astounding. There's some pretty high computer horsepower needed as well.Right or wrong, the critical question might be another version of "What is good enough" and who determines that level of performance. We talk about digital cable and satellite transmission and so on, and because it's labeled "digital" everyone says WOW -- it must be perfect! Anyone that watches such digital transmissions knows it's not, and yet it's becoming an accepted standard. Can that happen in theatrical presentations as well? A recurring theme: "Film done right" is awful hard to beat. Too often, film done poorly is allowed to be acceptable, and that's what has to be countered in the digital world as well.
| IP: Logged
|
|
|
Evans A Criswell
Phenomenal Film Handler
Posts: 1579
From: Huntsville, AL, USA
Registered: Mar 2000
|
posted 12-24-2000 10:35 PM
This is hilarious. It appears that my images were copied to the film-tech server and in the process, they were resized. The original images were 64 by 720 with 256 levels of gray, in GIF format (non-loss). This clearly illustrates one of the challenges of digital filming and projection if any type of resizing or scaling of already-prepared images is done. Guess what the resizing process did? It introduced alaising on top of the aliasing already inherent in the images, corrupting the images. It goes to show how an innocent resizing operation can distort and destroy something in the image that I was trying to illustrate. Every pixel in the images had a specific grey-level value based on the output of a mathematical calculation, and that is no longer the case. Brad, I'm glad this happened because it certainly shows that you cannot trust blindly-applied image manipulations without knowing the nature of what you're dealing with. A strange property of these particular images I was providing is that blurring them (and downsampling them) actually introduces more artifacts in them and so does sharpening! This is a very educational example and is a good warning to anyone who is thinking of shooting a movie totally in the digital domain, especially if such operations are to be performed on the images along the way. It reminds me of a story I heard years ago: A woman asked her neighbor to keep a bowl of liquid for her in her refrigerator. The neighbor agreed. He didn't know what the liquid was, except for knowing that it was for some sort of food and needed to be refrigerated. The neighbor tried to fit the bowl of liquid in the refrigerator to no avail, due to it being so crowded with other things. Aha, the neighbor thought, "I'll just pour the liquid into several Mason jars and put them all in the refrigerator." It worked great and all the jars fit. Later, the woman returned and asked, "I've come back to get that bowl of Jello." I'm in the process of making a WWW page about aliasing and will have these images, as well as some more, in unadultered form soon, and will provide a link as soon as I get it set up. (I don't have much better to do this Christmas!) Merry Christmas to all of you!
| IP: Logged
|
|
|
|
|
|
Evans A Criswell
Phenomenal Film Handler
Posts: 1579
From: Huntsville, AL, USA
Registered: Mar 2000
|
posted 12-25-2000 09:23 PM
OK, Brad, thanks for letting me know what the resizing rules are. I'll try a width of, say, 480 when I redo the program that generated them. I chose 720 since the repetition of the aliasing on the scale I was using was at around 628, and I went a little beyond. 628 is where distance pi occurred! (3.14 * 20). pi is the magic number for repetition using the formula I came up with, due to the Sin function. The Sin function was used for one reason: to give me a number between -1 and 1 based on the value being apssed to it. The distance being passed to it is the square of the distance formula. The Abs was used to guarantee me a number between 0 and 1. I may try using z=(Sin(x^2+y^2)+1)/2 next time so I'll have a sine wave with increasing frequency, but with constant amplitude ranging from 0 to 1. Not having the Abs function involved will make the function easier to work with analytically (say, in Mathematica 4.0). I'll probably just increase the pixel step size and decrease the width and re-run.The reason this type of function is so interesting is it contains every combination of frequencies in both the x and y direction within the range plotted. For example, my original 64x720 images witha pixel step of 0.05 had every frequency ranging from 0 to 10.24 Hz in the y direction and 0 to 1296 Hz in the x direction. The frequency at the lower right corner was 1306.24 Hz. It's an image processing nightmare (when it comes to manipulating the image without corrupting it). I first encountered this beast back in 1989 and I've recently began exploring some of its properties again. I feel I've barely scratched the surface. Evans
| IP: Logged
|
|
Evans A Criswell
Phenomenal Film Handler
Posts: 1579
From: Huntsville, AL, USA
Registered: Mar 2000
|
posted 12-27-2000 11:36 AM
My original post at the top has been updated.I have regenerated the images and they now have asize of 64x480, which I hope is small enough to not be resized. I played with the pixel spacing and it turns out that scaling the pixel spacing by the amount of image resizing done (to attempt to cover the same real world coordinates) does not produce a similar image. The new images use a pixel spacing of 0.1, which produces even more drastic alaising in the middle image that is not present in the "film" simulated image. The image now covers 0 to 48 in the x axis and 0 to 6.4 in the y axis, meaning that tthe frequency range in the x axis is now 0 to 2304 Hz and in the y axis is 0 to 40.96 Hz. At the lower right corner, the frequency is 2344.96 Hz. I definitely need to explore this phenomenon more. Evans
| IP: Logged
|
|
|
All times are Central (GMT -6:00)
|
This topic comprises 2 pages: 1 2
|
Powered by Infopop Corporation
UBB.classicTM
6.3.1.2
The Film-Tech Forums are designed for various members related to the cinema industry to express their opinions, viewpoints and testimonials on various products, services and events based upon speculation, personal knowledge and factual information through use, therefore all views represented here allow no liability upon the publishers of this web site and the owners of said views assume no liability for any ill will resulting from these postings. The posts made here are for educational as well as entertainment purposes and as such anyone viewing this portion of the website must accept these views as statements of the author of that opinion
and agrees to release the authors from any and all liability.
|