Film-Tech Cinema Systems
Film-Tech Forum ARCHIVE


  
my profile | my password | search | faq & rules | forum home
  next oldest topic   next newest topic
» Film-Tech Forum ARCHIVE   » Operations   » Film Handlers' Forum   » Film vs. Digital (trading noise for aliasing?) (Page 1)

 
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      Profile for Evans A Criswell   Author's Homepage   Email Evans A Criswell   Send New Private Message       Edit/Delete Post 
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

Greg Mueller
Phenomenal Film Handler

Posts: 1687
From: Port Gamble, WA
Registered: Jun 99


 - posted 12-23-2000 10:35 AM      Profile for Greg Mueller   Author's Homepage   Email Greg Mueller   Send New Private Message       Edit/Delete Post 
A while back there was an article on film rez vs digital. There were some numbers given for the film grain (per inch???) in modern film. I've misplaced that article now but every once in a while I find myself wanting to refer to that number. Does anyone know the amount of grain in a 35mm frame. John P ???
A total number of grains per frame would be fine, thanks

------------------
Greg Mueller
Amateur Astronomer, Machinist, Filmnut

 |  IP: Logged

Jeff Stricker
Master Film Handler

Posts: 481
From: Calumet, Mi USA
Registered: Nov 1999


 - posted 12-23-2000 12:34 PM      Profile for Jeff Stricker   Email Jeff Stricker   Send New Private Message       Edit/Delete Post 
Would it be correct to define the analogue FILM effect of spokes on wagon wheels appearing to turn backwards as "aliasing"??

 |  IP: Logged

Michael Cunningham
Expert Film Handler

Posts: 186
From: Anchorage, AK
Registered: Nov 1999


 - posted 12-23-2000 01:38 PM      Profile for Michael Cunningham   Email Michael Cunningham   Send New Private Message       Edit/Delete Post 
Actually, I think the "backwards spinning" wheel thing has to do with the frame rate. You can see the same thing under bright lights with a toy car or something similar. If you spin a wheel really quick, it will first appear to spin forward. Then, as it begins to slow down, the wheel will appear to slow its forward momentum then reverse direction. This is due to the fact that the light is not a steady source, but is flashing 60 times per second as the AC electricity reverses itself. When the wheel passes the 60 revolutions per second mark, the flashing light reveals the spokes of the wheel as being slightly behind their former position fooling our brains into thinking its spinning backwards. I'm assuming the same thing would happen due to the 24 frames a second nature of film. Any thoughts?

-Mike

 |  IP: Logged

Evans A Criswell
Phenomenal Film Handler

Posts: 1579
From: Huntsville, AL, USA
Registered: Mar 2000


 - posted 12-23-2000 03:09 PM      Profile for Evans A Criswell   Author's Homepage   Email Evans A Criswell   Send New Private Message       Edit/Delete Post 
Jeff and Michael,

The "backward spinning" effect with wagon wheels due to the 24 fps rate (or 30 fps for television) is temporal aliasing. The aliasing I'm referring to is spatial aliasing. You are correct that the stroboscopic effect due to frame rates is aliasing. Both HDTV and film (as did regular TV) will have temporal aliasing, but HDTV and digital filming (and digital projection) will also introduce spatial aliasing as well as the temporal aliasing that has always been there.

Evans

 |  IP: Logged

Sean McKinnon
Phenomenal Film Handler

Posts: 1712
From: Peabody Massachusetts
Registered: Sep 2000


 - posted 12-24-2000 01:11 AM      Profile for Sean McKinnon   Author's Homepage   Email Sean McKinnon   Send New Private Message       Edit/Delete Post 
Why are we talking about wagon wheels? Just put a 6 thousand ft reel on a Neumade Rewind Bench and crank it to 100!

------------------
I love to smoke I smoke seventhousand packs a day and I'm never F*&ing quittin!-- Denis Leary

 |  IP: Logged

Pat Moore
Master Film Handler

Posts: 363

Registered: Mar 2000


 - posted 12-24-2000 10:07 AM      Profile for Pat Moore   Email Pat Moore   Send New Private Message       Edit/Delete Post 
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

Rory Burke
Expert Film Handler

Posts: 181
From: Burbank, CA, USA
Registered: Jun 2000


 - posted 12-24-2000 03:47 PM      Profile for Rory Burke   Email Rory Burke   Send New Private Message       Edit/Delete Post 
I agree with Pat Moore completely...Just look at the evoultion of music CD's....Marketing used the buzz word of "digital" and now CDs are common place. I hate 16 bit pcm music and most CD music still is recorded in this substandard compression. But it is comon place and as PatM said or mentioned I guess it is good enough. Will we see this type of attitude with digital cinema? who knows but in a sense we already already exhibit our current movies with this absurd mentality. Just look and see how many scratched prints we have nationwide. How many sound systems are acutally properly maintained and are functioning perfectly? In the film-world we currently live in that "half-A%*" mentality is very commonplace among technicians, projectionists, and the theater chains themselves....and probaly will more than likely be as prevalent once Digital Cinema fruits.

Rory

 |  IP: Logged

Evans A Criswell
Phenomenal Film Handler

Posts: 1579
From: Huntsville, AL, USA
Registered: Mar 2000


 - posted 12-24-2000 10:35 PM      Profile for Evans A Criswell   Author's Homepage   Email Evans A Criswell   Send New Private Message       Edit/Delete Post 
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

Pat Moore
Master Film Handler

Posts: 363

Registered: Mar 2000


 - posted 12-24-2000 10:42 PM      Profile for Pat Moore   Email Pat Moore   Send New Private Message       Edit/Delete Post 
Thanks, Evans -- you too. No aliasing of Christmas gifts, okay?

Happy Holidays!

 |  IP: Logged

Evans A Criswell
Phenomenal Film Handler

Posts: 1579
From: Huntsville, AL, USA
Registered: Mar 2000


 - posted 12-24-2000 11:33 PM      Profile for Evans A Criswell   Author's Homepage   Email Evans A Criswell   Send New Private Message       Edit/Delete Post 
Pat,

No aliasing of Christmas gifts? Good idea. I don't want my father's new drill toy to spin backwards, or the pitch of the grooves in the drill bits to change frequency on us!

As an added precaution, we'll avoid looking at any gifts through the screens on our windows or under fluorescent lights this Christmas Day. As another rule, nothing spinning faster than 15 rounds per second can be videotaped with a camcorder.

Have a safe, alias-free Christmas, everyone!

Evans

 |  IP: Logged

Brad Miller
Administrator

Posts: 17775
From: Plano, TX (36.2 miles NW of Rockwall)
Registered: May 99


 - posted 12-25-2000 02:19 AM      Profile for Brad Miller   Author's Homepage   Email Brad Miller       Edit/Delete Post 
Sorry Evans, but if a picture can not fit for proper display on a monitor with a resolution of 800x600, the pictures WILL be resized. (Bear in mind this means actually less since the forum bar on the left takes up about 150 pixels.) I didn't even think about that when I did it. Anyway, the reasoning is because it makes things incredibly difficult for people running on this standard computer resolution to read the forum pages.

 |  IP: Logged

Martin Frandsen
Master Film Handler

Posts: 270
From: Denmark, Europe
Registered: Jun 99


 - posted 12-25-2000 02:37 AM      Profile for Martin Frandsen   Email Martin Frandsen   Send New Private Message       Edit/Delete Post 
Greg, i liked that thread to. Very interesting indeed, i found it 2-3 pages back, anyway; one 35mm frame is equal to 12 million pixels. Thats according to John P.

Looks like film is still the winner, at least for the next 10 years!

 |  IP: Logged

Evans A Criswell
Phenomenal Film Handler

Posts: 1579
From: Huntsville, AL, USA
Registered: Mar 2000


 - posted 12-25-2000 09:23 PM      Profile for Evans A Criswell   Author's Homepage   Email Evans A Criswell   Send New Private Message       Edit/Delete Post 
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      Profile for Evans A Criswell   Author's Homepage   Email Evans A Criswell   Send New Private Message       Edit/Delete Post 
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 
 
   Close Topic    Move Topic    Delete Topic    next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:



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.

© 1999-2020 Film-Tech Cinema Systems, LLC. All rights reserved.