From the course: Nuke New Features Consolidated

The Pixel Analyzer

- [Instructor] The new pixel analyzer collects statistics about the color of an image. It can sample single pixels, multiple pixels, a region, and even the entire frame. One important use of this color information is to color match two clips. You find the pixel analyzer over here in this popup right down here. However, things will be a little easier to see if I relay out the screen. So I'm going to split this panel vertically, and I'm going to pop open the pixel analyzer here. By default, the mode is set for pixel selection, which means I hold down the command or control key. I can click and drag and sample all these pixels. If I click and drag again, I get a new region. Now, if I want to sample a single pixel, I'm going to have to push way in here and click and do a short drag. And see, that was too short. So click and drag. There we go. Okay, because if you do a simple command click, it clears your selection. I'll rehome the viewer with the H key. You can also sample an entire region by holding down the shift key, along with the command and control. Click and drag a rectangle. And now all the pixels in this rectangle are going to be sampled in the statistics collected and displayed in the pixel analyzer. If you'd like to clear your selection, you can come down here to the clear selection button. Now, there's a nifty accumulate feature. If we enable it right here, I'll come up here to the viewer and zoom in a bit. Now when I hold down the command or control key to sample multiple pixels, click and drag, click and drag, click and drag, it accumulates all the samples. And, of course, all the statistics are accumulated down here in the pixel analyzer color chips. The first chip here, marked current, happens to be the very last pixel you clicked on. The min is the minimum of all the pixels you've sampled. The max is the maximum. And the average is the average of all the pixels you've sampled. And the median is the middle value, halfway between the min and the max values. Whatever chip you have selected appears down here in the rgba fields. The rgba values are also duplicated here as hsv and lightness. Hsv and lightness here. And the xywh down here is simply the size and position of any sample rectangle you've made. Now, if you don't like looking at your pixel value in Nuke's native floating point, you can come down here to the range and change that to something like 8 bit. The sample popup here allows you to choose amongst multiple viewers. If you had several viewers up here, they'd all show up in this list. But, by default, it's going to show you whatever the current viewer is. And over here in the current layer popup, you can choose amongst any of the layers that happen to be in that image. Now, right now, of course, I have a selection on the screen. But you can actually turn off the selection if you'll disable the show selection button. Okay, I'm going to home the viewer with the H key to show you the full frame mode. We come down to the mode popup and select full frame. And now it's sampling the entire frame and collecting the statistics for the whole picture. So this min chip here, rgb value, is the minimum pixel in the entire frame, and again, the maximum, average, and median. And because there's no single pixel, the current pixel field is empty. Now we can use this full frame sampling to color match two different images. Let me show you this image here. This is a low contrast, underexposed version of my target image. So this is my target, and this is my source. I want to make the source look like the target. Notice as I toggle between the two images, the chips are changing color because the sample is in the current viewer. And so I'm going to get chips for whatever my viewer is looking at. If I select the min chip here and toggle between the two different images, you can see the rgba values are also bouncing around. So what I want to do is color grade that source image to perfectly match my target image. Here is the procedure. I'm going to open up this grade node, hook my viewer to the grade node. And, first of all, I'm going to disable the grade node to the source image. The reason I'm doing this is if I don't disable it, when I enter values in the grade node, it's going to correct the picture and then the pixel analyzer will resample the new image. I don't want it to do that. So with my grade node disabled and the viewer looking at the source image, we simply click and drag the min and drop it off at the black point, grab the max and drop it off at the white point. Then, we switch over to the target image. You'll notice that the chips are changing color. Now, in the target image, I'm going to take its min and drop it into lift, take its max and drop it into gain. And now, if I enable the grade node, first, I'm going to put the viewer over to the bad picture, the source. Now I'm going to enable that grade node, bang. Now as I toggle between the two images, you can see they are not only visually identical, but down here in the chips, as I toggle, you could see they're mathematically identical. There's the min and there's the max. Use the pixel analyzer to sample color information from your images for single pixels, multiple pixels, a region, or the entire frame. This information can be very helpful for color grading your images and, especially, for matching two clips.

Contents