10xEngineers

Homepage

From Pixels to Perfection: A glimpse at Infinite-ISP Tuning Tool

What is Infinite-ISP?

Introducing Infinite-ISP, a groundbreaking open-source Image Signal Processor (ISP) that offers an unparalleled end-to-end camera pipeline solution. Unlike any other ISP available in the open-source community, Infinite-ISP provides a comprehensive package that includes five distinct components:

Algorithm Development Model: Our Python-based model forms the heart of the ISP, showcasing image processing algorithms meticulously designed to deliver fine image quality.

Reference Model: The Fixed-Point model and finely-tuned algorithms are optimized for hardware implementation, ensuring seamless integration with the camera system.

Firmware Model: We offer a dedicated firmware model that enhances the camera’s functionality and performance, guaranteeing a smooth user experience.

FPGA Bitstream: For those seeking hardware acceleration, Infinite-ISP provides a pre-compiled FPGA bit-stream, simplifying the deployment of ISP capabilities on FPGA platforms.

Tuning Tool: Our tuning tool empowers users to fine-tune algorithms, tailoring image processing to specific requirements and achieving the highest image quality possible.

Infinite-ISP sets a new standard in open-source ISP solutions by offering a complete, versatile, and user-friendly package, making it the ultimate choice for camera enthusiasts, developers, and researchers alike.

Figure 1: Infinite-ISP As a whole package

What does a Tuning Tool do?

A tuning tool, in the context of ISPs, is a software based application used to adjust and optimize various parameters and settings to achieve desired image quality. ISPs require tuning because every camera sensor and lens have unique characteristics. Without proper tuning, images may have color inaccuracies, distortions, or noise. Tuning ensures that the ISP compensates for these hardware variances and delivers high-quality images. This is important for ensuring that images or videos display colors as close to reality as possible.

Without Tuning
With Tuning

Figure 2: Tuning Tool Overview

Infinite-ISP Tuning Tool

Infinite-ISP Tuning Tool is a console-based ISP (image signal processor) tuning application that is specifically designed to tune various modules in the Infinite-ISP_ReferenceModel and Infinite-ISP_Firmware. Apart from working along with the Infinite-ISP pipeline, this tuning tool can be used as a separate stand-alone application to perform image quality analysis. This cross-platform application provides a diverse range of algorithms aimed at calibrating a Bayer RAW image coming directly from an image sensor.

Figure 3: Infinite-ISP Overview

Infinite-ISP Tuning Tool as a Calibration Tool

Calibration is the secret sauce behind the best image quality. It’s the process of fine-tuning and adjusting critical parameters of the algorithms present in ISP to ensure that what your camera captures aligns with your artistic vision. The Infinite-ISP Tuning Tool thus provides a great help in calibrating three important modules like black level, white balance and color correction matrix calibration.

1. Black Level Calibration

The first step to achieve desired image quality is setting the right foundation for which black level calibration ensures that the darkest areas in your images are pitch-black, enhancing contrast and detail. With the Infinite-ISP Tuning Tool, you have the power to calculate or apply black levels. For calculating black levels, a pure black image (captured under no light) is needed that is mostly taken by cameras with cover/lid on.

Figure 4: Black Level Calibration
Figure 5: BLC Effect

2. White Balance

White balance refers to the adjustment of colors in an image to make sure that white objects appear truly white, rather than having a color cast due to the lighting conditions. Different light sources, such as daylight, tungsten bulbs, or fluorescent lights, have different color temperatures, which can affect the overall color appearance of an image. This can create unwanted tints in the images so white balance adjustments compensate for these color temperature variations by shifting the colors in the image to achieve a neutral white point.

Figure 6: White Balance Effect

Color Checker images serve as invaluable references for tuning tools. These images contain a predefined set of known colors and shades, allowing the tuning tool to understand how the camera’s sensor interprets these colors under different lighting conditions. For calibrating accurate gains, gray patches from the color checker are used.

Figure 7: Color Checker & Gray Patches

3. Color Correction Matrix

The Color Correction Matrix (CCM) is the secret ingredient that allows tuning tools to perform precise color adjustments. The Color Correction Matrix typically takes the form of a 3×3 matrix. In essence, it’s a mathematical wizardry that defines the transformation from the colors your camera captures to the colors you want to see in your final image or video.

For calibrating CCM, all 24 patches from the ColorChecker are used. There are two standard metrics used for this, 𝛥Eab and 𝛥Cab are metrics used to measure color differences between two colors. They are commonly used in color science and colorimetry to quantify how much two colors differ in terms of perceptual color space. The color correction matrix is designed to minimize the 𝛥𝐸𝑎𝑏 or 𝛥𝐶𝑎𝑏 values between the original and corrected colors. It is common for color correction matrices to follow the constraint of the sum of each row equaling one. This constraint ensures that the color correction matrix maintains color balance and doesn’t introduce any unintended color shifts during the correction process. Think of it as a chef carefully balancing ingredients in a recipe.

Figure 8: CCM Effect

Infinite-ISP Tuning Tool as an Analysis Tool

To achieve picture-perfect results, it not only demands accurate calibration but a keen eye for detail and the right set of tools to analyze. Infinite-ISP Tuning Tool, not just a tuner but also provides assistance in analyzing three different aspects of Infinite-ISP. Here, we delve into the tool’s analytical capabilities, focusing on three essential modules: Gamma Curves, Bayer Noise Estimation, and Luma Noise Estimation.

1. Gamma Curve Analysis

Gamma correction is primarily used to adjust the brightness and contrast of an image. Understanding and analyzing gamma curves allow you to fine-tune the overall luminance and contrast of your images. It allows you to visualize user-defined gamma curves loaded from configuration files, comparing them with the standard gamma curve at 𝛾 = 2.2.

Figure 9: Gamma Curves Analysis

2. Noise Analysis (Bayer & Luminance)

Noise estimation provides a quantitative measure of the level of noise present in an image. This information is crucial for assessing the overall quality of the image. By leveraging gray patches within each channel, the algorithm performs noise estimation. Since the gray patches ideally contain uniform color values, any deviations from uniformity can be attributed to noise.

The Bayer Noise Estimation module is designed to assist users in estimating noise levels in a Bayer pattern by analyzing raw images and locating a ColorChecker. The Bayer image, composed of the red (R), green (G), and blue (B) channels, is then split into these individual channels. The heart of this analysis lies in inspecting the statistical characteristics of pixel values within the gray patches. By delving into the variances or standard deviations of these pixel values, the tool can estimate the noise affecting the Bayer image.

The Luminance Noise Estimation module is designed to assist users in estimating luminance noise levels in an RGB image by locating a ColorChecker. The analysis involves evaluating the statistical characteristics of the pixel values within the gray patches. By examining the variances or standard deviations of these pixel values, the algorithm gains insights into the degree of noise affecting the luminance channel.

Figure 10: Bayer Noise Estimation
Figure 11: Luminance Noise Estimation

Infinite-ISP Tuning Tool as a Configuration Files Generating Tool

In the world of ISPs, precision and customization are paramount. That’s where the Infinite-ISP Tuning Tool shines. Beyond its core functions of calibration and analysis, this tool boasts an invaluable feature – the ability to generate configuration files.

Let’s explore how these files, namely configs.yml and isp_init.h, revolutionize your workflow.

  1. The Infinite-ISP Tuning Tool offers users the remarkable capability to create a configuration file named configs.yml. This file bears a resemblance to the Infinite-ISP_ReferenceModel pipeline configuration, serving as a digital blueprint of your image processing pipeline. Imagine completing the calibration and analysis process with the Tuning Tool, fine-tuning every detail to perfection and instead of letting all your findings go away, you can save it to the configs.yml file. This file is your key to unlocking further customization and refinement of your image processing pipeline.
  2. But that’s not all; the Tuning Tool goes a step further by enabling the generation of another gem – the isp_init.h file. This file isn’t just any configuration file; it’s designed with FPGA models in mind. It provides a rock-solid foundation for FPGA implementation, ensuring that your image processing algorithms translate seamlessly into hardware.
  3. Before you start file generation, the Tuning Tool offers a unique opportunity – updating sensor information. This functionality allows you to fine-tune your parameters, such as bit depth, Bayer pattern, height, and width, to perfectly align with your needs.

How does it work?

The isp_init.h file leverages the data from the configs.yml file, ensuring compatibility and efficient utilization of FPGA resources. It’s like building a house on a sturdy foundation – your image processing tasks are executed with stability and precision. The Tuning Tool takes your modified sensor info and user-defined configurations into account, resulting in a customized configuration file that caters specifically to your requirements.

Conclusion

In summary, the Infinite-ISP Tuning Tool is your go-to software for getting perfect tuned images. Whether you’re fine-tuning, analyzing, or customizing, this tool has your back. It helps you adjust black levels, get white balance just right, and perfect color corrections. Dive into gamma curves, check for bayer noise, and luminance noise levels for great visuals. Plus, it lets you create configuration files for both Python and FPGA setups. This tool isn’t just a tool; it’s your trusty sidekick on your image journey. Stay tuned for more tips on mastering it in our upcoming blog posts. Your quest for image excellence continues.

Get Your Free Consultation Now! Discover how our expertise can elevate your project