Monday, July 13, 2009

'A pixel is not a little square' says Alvy Ray Smith

Its ironic that before reading this memo by Alvy Ray Smith I never wondered what really makes up a pixel. I always believed the computer stores color information as little squares but actually its only a mathematical representation of color information. Like Smith points out its mainly misconception due to the way computer application shows pixels when we magnify an image.

According to Smith,
'A pixel is a point sample. It exists only at a point. For a color picture, a pixel might actually contain three samples, one for each primary color contributing to the picture at the sampling point. We can still think of this as a point sample of a color. But we cannot think of a pixel as a square—or anything other than a point.'
He also states that an image is a continuous straight parallel array of point samples and by using an appropriate image reconstruction filter we could create full colorful image what out of it. It is interesting to note that for example, while using any of these filters they would represent array of point in a form of rectangle which can be almost similar to a square. I believe this is the reason why when we zoom on image we see square pixels which represents the main color value of points sample present in that particular area. Smith's explanation on the same as follows
when you zoom in is this: Each point sample is being replicated MxM times, for magnification factor M. When you look at an image consisting of MxM pixels all of the same color, guess what you see: A square of that solid color! It is not an accurate picture of the pixel below. It is a bunch of pixels approximating what you would see if a reconstruction with a box filter were performed. To do a true zoom requires a resampling operation and is much slower than a video card can comfortably support in realtime today.
I think today it is not really important to understand this very basic issue since it is something our today's image manipulation applications manage quite efficiently underneath the user interface. But at the same time understanding this basic issues may help us to understand other important techniques such as 4:2:2 color sampling which I discussed in my last post. The Bayer filter used in 4:2:2 digital image sensors of digital cameras are similar to an image reconstructions filters such as bilinear interpolation, bicubic interpolation and spline interpolation. They all build full color image from incomplete color samples (sample points) and this is process or algorithm is called demosaicing.

The below two images from wikipedia which explains this visually

The four red dots show the data points and the green dot is the point at which we want to interpolate.
Example of bilinear interpolation on the unit square with the z-values 0, 1, 1 and 0.5 as indicated. Interpolated values in between represented by colour.

Who is Alvy Ray Smith?
He was one of the cofounder of Pixar and also Executive Vice President from 1986-1991 and founder of Altamira which was acquired by Microsoft. He was co-awarded the Computer Graphics Achievement Award by SIGGRAPH in 1990 for "seminal contributions to computer paint systems," including the first full-color paint program, the first soft-edged fill program, and the HSV (aka HSB) color space model.

Most interestingly he gave Pixar its name which meant "to make pictures", an invented Spanish verb meaning. Also while at Pixar he played an important role in hiring John Lasseter who is now the CCO at Pixar and Walt Disney Animation Studios.

Finally check out the Pixar founding documents hosted in his website.

Cheers,
Rahul


Sunday, July 5, 2009

Truth about resolution and pixels

Last week our team had a presentation on RED workflow from good people at Icerberg Design here in Singapore. The key issues we discussed at the end were 4:2:2 color sampling and advantage of 10 bit log space of RED workflow. While advantage of 10 bit log space is almost similar to a film workflow but the compromise we would make would be on the quality of the image.

Is RED 4K really 4K? There is a really good interview of John Galt, Panavision Senior Vice President, Advanced Digital Imaging at creativecow.net and here from few good quotes from the interview.

Any of the high-end high definition video cameras, they had 3 sensors: one 1 red, a green and a blue photosite to create 1 RGB pixel.

But what we have seen particularly with these Bayer pattern cameras is that they are basically sub-sampled chroma cameras. In other words they have half the number of color pixels as they do luminance And the luminance is what they call green typically. So what happens is you have two green photo sites for every red and blue.

So how do get RGB out of that? What do you have to do is, you have to interpolate the red and the blues to match the greens. So you are basically creating, interpolating, what wasn't there, you're imagining what it is, what its going to be. Thats essentially what it is. You can do this extremely well, particularly if the green response is very broad.

Well 4K in the world of the professionals who do this, and you say “4K,” it means you have 4096 red, 4096 green and 4096 blue photo sites.

I dug a bit deep into this subject and though I felt it was too technical but I got some good insight on this subject.

To really understand this issue first we must take a look at what really defines quality of the image. A common misconception is that resolutions increases the sharpness of the image but in reality the fine details are mostly irrelevant to human eye,
though human eye is capable of reading extremely fine details. This is also true at greater distance and what really defines the sharpness of the image are the contour defining features at a higher contrast. It is important to note that above statement doesn't mean a low resolution image with high contrast will give better viewing experience since it could lead to aliasing issues.

Since resolution and sharpness are completely separate terms, we establish relationship between them using MTF
(Modulation Transfer Function). So each time when generation loss happens during transfer of medium we define it using MTF.

There is a lot more to read and understand on this subject. A good start on that would be the main source of information of what I have written here, an article called 4K systems by Dr. Hans Keining, R&D Depth ARRI .

To conclude, counting pixels wouldn't be the best way to judge quality of an image and the quality of an image depends upon lot of attributes. The MTF just doesn't start at post production, for example there are modulation happening within the camera during the capturing process. So it is really important to take a closer study at these issues separately.

Coming back to the RED discussion, I believe RED's subsampled 4K image would be slightly advantageous even in HD or SD (based on a broadcast scenario) production since MTF would be comparatively lesser compare to a normal 4:2:2 color sampled HD camera.

Cheers,
Rahul

Saturday, June 27, 2009

A legend departed

I don't have much to say but I am happy that I have a very good memory of watching his hit music videos with everyone at home during my childhood. That was before his career downfall and I am glad that I was able to feel that excitement with everyone in my family. Whether he is a good person or not, that doesn't matter anymore but what matters is we all know that we are not going to see any other person like him for at least 100 years.

A alternative view on Global Warming

The Great Global Warming Swindle


I was doing some research on this topic recently for my work and I bumped on few articles stating global warming as a propaganda by mega corporations and all those control freak secret societies for world domination. Whether this could be truth or not I still believe we must keep a control over our carbon levels and the way we utilize our natural resources.

Here are few excerpts from a article which supports the same argument.


Howard C. Hayden, emeritus professor of physics from the University of Connecticut, told a Pueblo West audience that he was prompted to speak out after a visit to New York where he learned that scaremongering billboards about the long-term effects of global warming were being purchased at a cost of $700,000 a month.

"Someone is willing to spend a huge amount of money to scare us about global warming," Hayden said. "Big money is behind the global-warming propaganda."


Hayden pointed out that global warming is taking place throughout the solar system, underscoring the fact that natural causes and not human beings are driving climate change, which has occurred throughout history.

"Yes, the polar ice caps are shrinking . . . on Mars," he said, "On Mars, the ice caps are melting and small hills are disappearing," adding that warming trends were also being observed on Jupiter, Saturn and Triton.

Citing the fact that human activity is responsible for just 3 per cent of carbon-dioxide emissions on earth, Hayden said that carbon levels in the atmosphere have been rising and falling for 400,000 years.

"We are at the lowest levels in the last 300,000 years," he said. "During the Jurassic period, we had very high levels of carbon dioxide."

"About 97 percent of carbon dioxide in the atmosphere comes from natural sources, not humans," Hayden concluded, adding that global warming is being pushed not by grass roots advocacy groups, but by giant corporations who stand to gain from selling concepts such as carbon tracking and carbon trading.


Source: Professor: Big Money Behind Global Warming Propaganda, Paul Joseph Watson
Prison Planet Tuesday, March 11, 2008, link

Anyway the counterpart of this same theory suggest that all these scientists belong to neo cons and they protecting mega corporations such as exxon. This particular website draws relation between those scientists and exxon company.

But its get more exciting when I think why the same neo cons who are the ones behind one world government propaganda would play at both sides. Daniel Taylor states in his article that neo cons are using global warming propaganda as one of their tool for building a world government and here are few interesting quotes form the article.

"In a report titled "The First Global Revolution" (1991) published by the Club of Rome, a globalist think tank, we find the following statement: "In searching for a new enemy to unite us, we came up with the idea that pollution, the threat of global warming, water shortages, famine and the like would fit the bill.... All these dangers are caused by human intervention... The real enemy, then, is humanity itself."

"Richard Haass, the current president of the Council on Foreign Relations, stated in his article "State sovereignty must be altered in globalized era," that a system of world government must be created and sovereignty eliminated in order to fight global warming, as well as terrorism. "Moreover, states must be prepared to cede some sovereignty to world bodies if the international system is to function," says Haass. "Globalization thus implies that sovereignty is not only becoming weaker in reality, but that it needs to become weaker. States would be wise to weaken sovereignty in order to protect themselves..."

Source: Global warming hysteria serves as excuse for world government,Daniel Taylor,March 14, 2007, link

So who knows they are enjoying while playing at both sides. Just like they like to sell the weapons to both sides during a war.

Wednesday, June 17, 2009

Fusion 6 Advanced Materials



This video shows how to build a car paint shader inside Fusion 6. This particular feature looks very promising and it really shows how much compositing applications are getting closer to the 3D applications these days.

What I really found interesting is interactivity of this feature and its looks a lot like the procedural shaders in Maya Hypershade. Since this is happening inside a compositing application like Fusion I felt its even more interactive than Hypershade in Maya. There is also this tutorial on building Anisotropic Highlights which will help us to understand anistropic attributes in detail.

I believe most of the people have reached a point where they don't know about the basics of shaders since everything is readymade for them even in basic 3D apps so its very insightful to create these shaders or their properties from scratch inside a compositing app.

There are other bunch of new features in Fusion 6 and especially on 3d side of things. Visit eyeon website for more details and also check out few notes on new features like 3D Fog(not just affects the depth but also the color), Transmittance, Composite Materials and many more at http://www.vfxpedia.com/

Monday, June 15, 2009

Changing gear


I got myself this sexy thing yesterday and it's feels great :)

And this is what under her hood:

At her heart she got a AMD Turion X2 RM74 64 bit, 2.2 GHz. Her face is so shiny and beautiful because of her ATI Radeon HD 4570 512 MB dedicated memory. To remember all the random stuffs I throw at her she got a 320 GB HDD. Finally to handle all of me at once she got 4 GB of RAM ;)