--- title: "Creating a shading-reference (PRNU)" slug: "create-a-shading-reference-prnu" updated: 2025-06-02T07:48:28Z published: 2025-06-02T07:48:28Z canonical: "docs-linescan.alliedvision.com/create-a-shading-reference-prnu" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs-linescan.alliedvision.com/llms.txt > Use this file to discover all available pages before exploring further. # Create a shading-reference (PRNU) Calculation of PRNU The following equation describes the calculation of the PRNU CalibratedImage = (RawImage - DSNU) / PRNU PRNU = (PRNUImage-DSNU)/TargetValue CalibratedImage = Camera output with applied DSNU and PRNU RawImage = Camera output image without any correction TargetValue = Target Value of PRNU, default value is 255 PRNUImage = Acquired image of the white-reference PRNU = Photo response non-uniformity DSNU = Dark signal non-uniformity ## Standard Method: PRNU reference generating (white diffuse surface) Create a shading-reference with PRNU. | 1. Place a moving white target. If using a stationary target, place it slightly out of focus. Acquire an image: 1. In the toolbar click **Acquire a single frame** **or** click **Start grabbing**, wait until an image is displayed, click **Stop grabbing**. | | | --- | --- | | 1. In the *menu bar* navigate to *Tools* → *Calibration*. 2. Click **Generate PRNU Reference**. | ![](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1685541400924.png) | | The *Generate PRNU Reference* wizard opens. 1. Click **Acquire image** to generate the PRNU directly from the camera **or** click **Load from Disk** to load an image from the hard drive. NOTE: Load from Disk Make sure that the image has been taken with active image calibration mode by using the wizard. The raw image and the line plot of the image is displayed. 1. Click **Start 2-Click-Selection**. 2. Click **on the image** to select the ROI. Send the calculated PRNU to the camera: 1. Select **LUT 1** or **LUT 2**. 2. Click **Send data to camera**. Activate brightness and contrast: 1. Select the **Activate Brightness and contrast** checkbox. 2. Set the contrast to 0.9. | ![](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1686034731008.png) | ## Independent Method: PRNU reference generating channel independent > [!NOTE] > Note > > This function it available from the GCT version 3.2. | In this instance, the lighting arrangement is single-colored and is visible in the camera's red color channel. The signals in the green and blue channels are quite minimal. On the left of the image, you can observe the RGB image, while on the right, the profile of the horizontal line plot is displayed. In this scenario, the result of the PRNU calibration should be a RED image exhibiting a uniform profile. | ![Graph displaying horizontal line plot data with grey value and pixel position information.](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/red_img.PNG) | | --- | --- | | The "white balancing" process in the Independent calibration technique varies. The gain level needs to be modified for each specific gain. In this case, the Gain is solely applied to the Red channel. | ![Configuration settings for camera image calibration and gain control with horizontal line plot.](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/gain_config.PNG) | | 1. In the *menu bar* navigate to *Tools* → *Calibration*. 2. Click **Generate PRNU Reference**. | ![](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1685541400924.png) | | The *Generate PRNU Reference* wizard opens. 1. Click **Acquire image** to generate the PRNU directly from the camera **or** click **Load from Disk** to load an image from the hard drive. 1. NOTE: Load from Disk Make sure that the image has been taken with active image calibration mode by using the wizard. The raw image and the line plot of the image is displayed. 1. Click **Start 2-Click-Selection**. 2. Click **on the image** to select the ROI. The view changed to the “Applied PRNU Reference”. This is the Output of the “Standard PRNU” Method. The image is very noisy. 1. Click **on the button with the three dots** **…** | ![Interface for generating PRNU reference with options for image adjustment and data activation.](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1748347089412.png) | | 1. The GUI changed an show more options. 2. Click on **Find channel max**, the PRNU algorithm will find the mean maximum value for each channel. 3. In a second step you can change the **Target Value,** in this example Target value Red to 200. Send the calculated PRNU to the camera: 1. Select **LUT 1** or **LUT 2**. 2. Click **Send data to camera**. Activate brightness and contrast: 1. Select the **Activate Brightness and contrast** checkbox. 2. Set the contrast to 0.9. | ![Interface for generating PRNU reference with target values and line plot displayed.](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1748347123105.png) | | This image illustrates the results of the calibration process. It is a uniform image. | ![Graph displaying pixel intensity values across a horizontal line in an image analysis tool.](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/final_calib.PNG) | ## Extrapolation function If the white reference does not cover the entire FOV, the extrapolation function can be used to generate it. In this case, a straight line is fitted to the gradient. Therefore follow the description below. | On the right side, you can see the *raw image* and the *Applied PRNU reference* without the extrapolation function. In the area with low image content, the *Applied PRNU reference* shows some artifacts. | ![shading_1](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1700487055178.png)![shading_2](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1700487075596.png) | | --- | --- | | 1. Select the ROI, by using the **Start-2-Click-Selection**. 2. Press the button with the **three dots** on the bottom. 3. **Enable** your option, in this example the left extrapolation. 4. Select the **start position** of your extrapolation. The width defines the area where the extrapolation is created. From the start position to column 0, the extrapolation is applied. | ![shading3](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1700487126752.png) | | 1. Check the applied PRNU in the ***Applied PRNU*** *reference* tab. | ![sahding_4](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/sahding_4.PNG) | ## Target Value The Target Value limits the maximum intensity of your CalibratedImage. Note Make sure that the Values of your PRNUImage are smaller than your TargetValue | 1. Press the button with the **three dots** on the bottom. | ![image-1718193423609](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1718193423609.png) | | --- | --- | | 2. Change the **Target Value**. 3. Check the applied PRNU in the ***Applied PRNU*** *reference* tab. | ![image-1718193458389](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image-1718193458389.png) | Photo Response Non Uniformity GenICam Control Tool Chromasens Software to communicate with cameras that fulfill the GenICam standards.