Rockchip IQ Tools Guide ISP2x
:::info 文档信息
文档标识:RK-SM-YF-602 · 发布版本:V1.2.2 · 发布日期:2021-02-24 · 页数:58 · 语言:英文
原始文档:Rockchip_IQ_Tools_Guide_ISP2x_EN_v1.2.2.pdf
:::
章节大纲
- Rockchip IQ Tools Guide ISP2x(P1)
- 1 Overview(P3)
- 1.1 About RKISP2.x Tuner(P4)
- 1.2 Suitable platform&Version number matching rule(P4)
- 1.3 Tuning Environment(P4)
- 1.4 Tool installation and configuration(P5)
- 2 Function introduction(P6)
- 2.1 Overview(P6)
- 2.2 Capture Tool(P7)
- 2.3 Calibration Tool(P8)
- 3 Quick Start(P9)
- 3.1 Setup Tuning project(P9)
- 3.2 Create Tuning project for new CIS(P10)
- 3.3 Device Connection(P11)
- 3.4 Use Capture Tool to capture Raw image(P14)
- 3.5 How to use simulator(P14)
- 4 Calibration process instruction(P15)
- 4.1 Capture raw image(P16)
- 4.2 BLC Calibration(P16)
- 4.2.1 Basic principle of BLC calibration(P16)
- 4.2.2 BLC calibration image requirements(P17)
- 4.2.3 BLC calibration image capturing method(P17)
- 4.2.4 BLC calibration method(P17)
- 4.3 LSC Calibration(P18)
- 4.3.1 Basic principle of LSC calibration(P18)
- 4.3.2 LSC calibration image requirements(P19)
- 4.3.3 LSC calibration image capturing method(P19)
- 4.3.4 LSC calibration method(P20)
- 4.4. AWB Calibration(P21)
- 4.4.1 AWB calibration content(P21)
- 4.4.2 Step and requirement to capture Raw image for AWB calibration(P21)
- 4.4.3 Interface instruction of AWB calibration tool(P22)
- 4.4.4 AWB calibration step(P26)
- 4.4.5 AWB calibration result example(P30)
- 4.5 CCM Calibration(P34)
- 4.5.1 CCM calibration image requirements(P34)
- 4.5.2 CCM calibration method(P34)
- 4.6 NR Calibration(P36)
- 4.6.1 Raw image capture method(P36)
- 4.6.2 NR Calibration Step(P40)
- 4.7 FEC/LDCH(P41)
- 4.7.1 FEC/LDCH calibration chart shooting specifications(P41)
- 4.7.2 FEC/LDCH Calibration steps(P42)
- 4.7.3 FEC/LDCH calibration results(P43)
- 5 Online tuning interface and function introduction(P44)
- 5.1 Tuning interface(P44)
- 5.2 Device connection(P45)
- 5.3 Load XML file(P46)
- 5.4 Real time parameter read/write function(P47)
- 5.5 Register and algorithm paramter adjustment(P47)
- 5.6 Save parameter to XML file(P48)
- 5.6.1 Scene mode and ISO level selection(P49)
- 5.7 Tuning assistant(P49)
- 5.7.1 Tuning assistant: AE control(P49)
- 5.7.2 Tuning assistant: Scene/work mode control(P50)
- 5.7.3 Tuning assistant: AWB control(P50)
- 5.8 AEC tuning interface(P50)
- 5.8.1. Configuration method of AEC manual exposure(P51)
- 5.9 Bayer NR tuning interface(P51)
- 5.9.1 Bayer NR enable(P51)
- 5.10 MFNR(P51)
- 5.10.1 MFNR NR enable(P52)
- 5.11 UVNR(P52)
- 5.11.1 UVNR NR enable(P52)
- 5.12 YNR(P52)
- 5.12.1 YNR enable(P53)
- 5.13 Sharpen(P53)
- 5.13.1 Sharpen enable(P54)
- 5.14 Edge Filter(P54)
- 5.14.1 Edge Filter enable(P54)
- 5.15 Gamma(P54)
- 5.15.1 Gamma visual tuning(P54)
- 5.15.2 Gamma enable(P55)
- 5.15.3 Basic tuning method of Gamma curve(P55)
- 5.16 Dehaze(P55)
- 5.16.1 Dehaze enable(P56)
- 5.17 HDR(P56)
- 5.17.1 HDR-TMO enable(P57)
- 5.18 DPCC(P57)
- 5.18.1 DPCC enable(P57)
- 6 Offline tuning interface and function introduction(P58)
- 6.1 Demosaic(P58)
- 1 Overview(P3)
在线预览
若预览无法显示,请直接下载 PDF 后用本地阅读器打开。
1 Overview
1.1 About RKISP2.x Tuner
RKISP2.x Tuner (hereafter referred to as Tuner) provides a set of tools convenient for users tuning ISP parameters, which allows users to do Calibration, Tuning etc. for all ISP modules. Users can use Capture Tool provided by Tuner to capture Raw picture, finish the basic module calibration in Calibration Tool, and connect the device in Tuner to do online ISP parameter tuning.
1.2 Suitable platform&Version number matching rule
| Chipset | ISP version |
|---|---|
| RV1109 | RKISP2.x |
| RV1126 | RKISP2.x |
The matching rule of AIQ version to Tuner and ISP Driver version is as follows:
vA.B.C
Among which, B is represented in hexadecimal, while bit[0:3] represents the matching version of AIQ to Tuner, bit[4:7] represents the matching version of AIQ to ISPDriver, for example:
ISP Driver: v1.0x3.0 matches with AIQ: v1.0x30.0, but not match with AIQ: v1.0x40.0
Tuner: v1.0x3.0 matches with AIQ: v1.0x33.0, but not match with AIQ: v1.0x30.0
Note: When C version number of AIQ verison is not 0, there may be version mismatching. Recommend to use AIQ version with C version number as 0 for Tuner matching.
1.3 Tuning Environment
*Computer environment requirement:*
The computer running Tuner must install Windows 7 x64 version or higher version with 64bit Windows operation system.
It should install MCR_R2016a(9.0.1) with 64bit version before running Tuner, and the download address is as follows:
https://ww2.mathworks.cn/products/compiler/matlab-runtime
The Chinese character is not allowed to be used in the path of Tuner and Tuning project during usage.
*Device environment requirement:*
- Make sure ADB service is enabled by default when the device is powered on, and Tuner will start Tuning service of the device through ADB. 2. Make sure camera app is disabled by default when the device is powered on, otherwise it will conflict with Tuning service process. 3. If it is hard to enable ADB service, you can also directly package rkaiq_tool_server into the image, and configure it as enabled by default, meanwhile package and put librkmedia.so into the same path as libaiq.so. 4. As the device will use network communication to interact with the computer, users can use one of the following two methods to connect the device: 1. For the device with ethernet card, the device should enable UDHCPC service by default to automatically obtain IP address, in this way users only need to connect PC and the device to the same router, and then use RK IPCamera Tool-V1.5 to obtain initial IP address of the device. 2. For the device without ethernet card, RNDIS service should be enabled in the image, to simulate USB as ethernet card and then likewise use UDHCPC to obtain the initial IP address. 3. Besides, if there is no router, you can also use network cable to connect directly. In this way users can use two methods to configure static IP address. The easier way is to pull out the serial port of the device and directly configure the static IP address through the serial port. The second way is to modify the image to set default static IP address. Both methods require to manually change the IP address of PC to the same network segment as the IP address configured for the device.
1.4 Tool installation and configuration
There is no need to install RKISP2.x Tuner itself. Directly unzip the tool package to any directory and then you can use it, but it is noticed that the path should not include any Chinese character.
As mentioned in section 1.3, MCR_R2016a should be installed before running Tuner. The installation steps are as follows:
- Open MCR_R2016a_x64.exe, waiting for unzipping finished.
Figure 1-4-1
- Click Next, select Agree, Next, then click Install.
Figure 1-4-2 3. Wait for install completed.
Figure 1-4-3
- Install completed.
Figure 1-4-4
2 Function introduction
2.1 Overview
In actual Tuning project, users should follow the process below to do Tuning: Figure 2-1-1
After creating a new project in the first step, the tool will generate a XML file under the path of the project. This file records all adjustable parameters opened by ISP, no matter it is the calibration parameter output in the subsequent calibration process or the users tuning result in the tuning process, will be recoreded in the XML file. At last, users just need to use this file to replace the corresponding XML in the image or the device.
Capturing Raw picture is used to calibrate basic module, and it can also collect the scenarios with abnormal effect which can be analysed using the simulator.
The basic module calibration should follow certain process as shown in the picture below:
Figure 2-1-2
The calibration of some module is dependent on the calibration result of its previous module, so users should follow the process sequence to do the calibration. After some module calibration is completed, need to confirm whether the parameter is correct or not, in case the wrong result affects the subsequent module.
2.2 Capture Tool
Figure 2-2-1
RKISP Tuner Capture Tool main interface is as shown in Picture 2-2-1. There are mainly the following 4 parts:
- Connect configuration of the device: used to configure IP address and port number of the device, switch the device to Tuning mode, and also provides the functions such as Connect, Ping and Preview On/Off. 2. Module/Sensor parameter setting and module/light source name selection: after reading XML, it will display Sensor name, resolution and gain/exposure parameter range. 3. Exposure control: support manual exposure and automatic exposure, and manual exposure allows to configure step size for traversal capture of multiple exposure combinations, while automatic exposure allows users to select the exposure parameters by setting the target maximum brightness. 4. Raw picture preview and statistics functions: here the captured Raw picture will be displayed as grayscale image in the window and its corresponding histogram, brightness information and simple white balance gain will be displayed as well.
2.3 Calibration Tool
Figure 2-3-1
RKISP Tuner Calibration Tool main interface is shown as Picture 2-3-1, which mainly includes the calibration function of the following modules:
BLC: Black level calibration
LSC: Lens shading calibration
CCM: Color calibration matrix
AWB: Automatic white balance
GIC: Green imbalance calibration
Bayer NR: Raw noise reduction
YNR: Y channel noise reduction
MFNR: Multi-frame noise reduction
FEC: Fisheye calibration
Recommend users to load the raw picture to the corresponding module to calculate the calibration parameter according the calibration process.
3 Quick Start
3.1 Setup Tuning project
-
After opening RKISP2.x Tuner, it will display the main interface of Tuner as shown in Picture 3-1-1: Figure 3-1-1
-
Click new project button at the top-left to create new Tuning project.
Figure 3-1-2
- Fill in the project name, and select the path to save the project, pay attention to that the name and the path should avoid Chinese characters. 4. Select the sensor used in current project or product, Tuner will automatically load the corresponding configuration (resolution, exposure table etc.), and also fill in lens type and module type to separate from different projects or product names.
Figure 1-1-3
- If currently used sensor is not in the sensor table, click New CIS Information button, and then configure the corresponding parameters according to sensor datasheet in the pop-up interface. 6. Click OK to save.
3.2 Create Tuning project for new CIS
When the sensor type of current project is not existing in CIS table, users can fill in the corresponding parameters in the interface to add the sensor to the CIS table.
- Click New CIS Information button.
Figure 3-2-1
- Pop-up the interface to create new CIS.
Figure 3-2-2
- The parameters' definitions are as follows. User should refer to sensor datasheet to fill in (recommend for driver tuning engineer):
| Parameter Name | Parameter Description |
|---|---|
| CISTimeRegUnEqualEn | Switch to control whether sensor exposure row of each frame can be equal or not. En=0:sensor exposure time row of each frame can be equal. En=1: not allowed to be equal. |
| CISMinFps | The minimum frame rate, use in automatic frame rate mode |
| TimeRegMin | The minimum value of sensor exposure row |
| DCGRatio | Conversion gain ratio |
| BayerPattern | Bayer pattern of raw data |
| FullResolution | Full resolution |
| TimeFactor | Conversion formula of exposure time to sensor exposure row number |
| GainRange | Conversion formula of gain value to sensor register value |
| CISTimeRegSumFac | Limiting sum of sensor exposure row |
| CISTimeRegOdevity | Sensor exposure row odevity |
| CISAgainRange | Sensor analog gain or LCG range, the minimum value is not less than 1. When sensor supports dual conversion gain, this item represents LCG range. When the digital gain is used to compensate the accuracy, this item can represent total gain range of sensor. |
| CISExtraAgainRange | Sensor analog gain or HCG range, the minimum value is not less than 1. When sensor supports dual conversion gain, this item represents HCG range. In general, range is CISAgainRange * dcg ratio. When sensor doesn't support dual conversion gain, _ both the maximum value and the minimum value of this item can be 1. |
| CISDgainRange | Sensor digital gain range, the minimum value is not less than 1. When the digital gain is used to compensate the accuracy, both the maximum value and the minimum value of this item can be 1. |
| CISIspDgainRange | ISP digital gain range, the minimum value is not less than 1. |
- Click Save button to save after filling, return to the project creating interface, and then you are able to directly select this sensor.
3.3 Device Connection
- Connect the device to local network, and use the device searching tool to search the device IP. Need to modify the device IP address through the serial port or modify IP of local PC to
make sure PC and the device are in the same network segment if they are directly connected
with the network cable. 2. For the device without network port or Wi-Fi, need to configure RNDIS environment for the device referring to the following steps.
The default IP of RNDIS device is 172.16.110.6 Modify usb_config.sh under the directory /oem/, make sure adb service is usable: Modify ADB_EN=off in usb_config.sh to ADB_EN=on Use usb adb or network adb, and need to configure RNDIS network card address of PC if using network adb. IP configuration on PC side:
Figure 3-3-1
Note that the network segment of this IP should be configured the same as the device configuration. After configuration, try to ping 172.16.110.6 through cmd terminal of PC to confirm whether the network is normal or not.
Modify adb_shell_script.txt script, modify run rkaiq_tool_server command as follows: nohup /tmp/rkaiq_tool_server --rtsp_en=0 -m 0 -i /oem/etc/iqfiles/ & sleep 1 Add --rtsp_en=0 (disable RTSP service)
- Click Connect Network at the top-left, open the connection configuration interface as shown below: Figure 3-3-2 Figure 3-3-3 Fill in the device IP address, the default port number is 5543, click Connect To Device, and the tool will push rkaiq_tool_server into the device and execute the corresponding script command, which is determined by the configuration in rkaiq_tool_server/adb_shell_script.txt. Figure 3-3-4 As shown in above picture, the configuration in adb_shell_script.txt includes 5 parts: 1. get AIQ version: used to inquire AIQ version of the device, and check whether it matches with the tool version. If the path of librkaiq.so has been changed, please make sure to also change this path. 2. tool_server execute path: the execution path of rkaiq_tool_server, which is under /tmp by default. 3. windows command: extendable customized commands of windows command shell. Users can add or delete the commands by themselves. For example, in Picture 5-2-3, this is a command to push the dependent library to the device through the adb command. 4. adb shell command: extendable customized commands of adb shell. The tool will execute this command on the device through adb shell. For example, in Picture 5-2-3, this is a command to kill processes and configuring permissions. 5. run rkaiq_tool_server: rkaiq_tool_server execution command, which should be put in the last segment. The parameter description is as follows: -m:normal/HDR mode selection, 0/1/2 separately correspond to normal/HDR2 frame/HDR3 frame, default value is normal. -i:the path of IQXML. If the path of IQXML changed, this path should be changed at the same time. -w and -h: rtsp preview resolution, this resolution can zoom in/out based on ISP output size to meet the requirement. -r: RTSP service control, 0/1 means disable/enable, the device which only supports UVC should be configured as 0. -d: sensor selection, when you are tuning multiple sensors in the device, you can use a number such as 0/1/2 to select to use which sensor, the number order should be the same as v4l2 topology list order. Above 3 and 4 part support to configure more commands, and each command execution interval is 1 second, executing in the order from up to down. Users should pay attention to the following configurations according to the actual situation of the device: 1. Confirm the path of librkaiq.so, which should be the same as the path to inquire AIQ version and the path to push librkmedia.so. 2. Whether need to kill user application. if yes, need to extend kill command to the part of
adb shell command.
- The parameter along with the execution command, whether it is normal or HDR (even if it is HDR, still recommend to use normal to capture raw during calibration) and so on.
After execution completed, it will display the result returned by the execution command as shown below: Figure 3-3-5 Wait for 5-10s to finish the initialization, click Test button, to test whether the application works normally. Figure 3-3-6 After confirming it works normally, use the playback tool from third party to open rtsp://192.168.1.100 (the specific IP is subject to the actual tuning device) to check the preview image. Click Save and Exit to save and exit. 4. Click Capture Tool in the main interface of Tuner to open the capture tool. Figure 3-3-7 5. Fill the device IP address in IP Address box as shown below. Figure 3-3-8 6. Now you can click Connect button or Ping button. If the service is enabled correctly, it will display "Connect success".
3.4 Use Capture Tool to capture Raw image
- Click File—Load XML File at the menu bar to load XML file.
Figure 3-4-1
- After loading completed, the tool will initialize the capture configuration interface according to the configuration in XML.
Figure 3-4-2
- Select correct resolution, light source and module name for further usage. 4. configure the parameters such as gain, exposure time and frame number. 5. Click Start Manual Capture button. 6. The captured raw image will be displayed in the right box Raw Preview & Statistics interface. 7. The corresponding histogram information, the maximum/minimum/average brightness, overall white balance gain and other information of the raw image will be displayed in the lower part of the interface. 8. Raw image is saved under ./raw_capture/module name/ by default.
Pitcure 3-4-3 Capture Gain=2x ExpTime=0.03s Single Frame Raw Image
3.5 How to use simulator
-
In the main interface of Tuner, click ISP Calibration Tool to open the calibration tool. Figure 3-5-1
-
Click IQ File->Load IQ File at the top-left of the menu bar to load XML file, and the simulator will use the parameter of this XML to do the simulation.
Figure 3-5-2
- Click Edit Options button, to configure the parameters of Raw image such as resolution, BPP and so on. 4. Select Simulator label page, click Load Raw File to load Raw image, and then click Start Simulation to start ISP process.
Figure 3-5-3
- Users can select the modules listed in the left box to do simulation, and determine whether to output the results of the corresponding process.
The simulaton would take around several seconds to dozens of seconds (depends on CPU and resolution), and users can check the output result in the result folder under the root directory of the tool after the simulation is completed.
4 Calibration process instruction
The module clibration mainly includes three part: Capture the calibration image: use appropriate exposure to capture raw image of the calibration board or the scenario according to the requirements of the modules.
Calculate calibration parameter: load raw image, calculate calibration parameter, and for some module you can fine tune some parameters per requirement.
Confirm effect and save the parameter: judge whether the calibration parameter is correct or not according to the criteria of the modules.
4.1 Capture raw image
- After IP address is obtained, fill in IP Address as shown in Picture 4-1-1, using the default port number 5543.
Figure 4-1-1
- Click Switch To Tuning Mode button to start Tuning service of the device.
Figure 4-1-2
- Now click Connect button or Ping button. If the service is enabled correctly, it will display Connect success and Device is ready.
Figure 4-1-3
4.2 BLC Calibration
4.2.1 Basic principle of BLC calibration
Due to the black level in the sensor circuit, when there is no light input to the sensor, the pixel unit still has a certain output voltage, which causes the digital signal output by the A/D to be non- zero. Black level is mainly affected by gain and temperature, so it needs to be calibrated separately under different ISO.
4.2.2 BLC calibration image requirements
- Cover the lens to make sure there is not any light entering. 2. Capture needs to traverse Gain=1x、2x、4x、8x、16x...Max (if the maximum Gain of the driver supports up to 40x, then Max=32). 3. Exposure time doesn't affect BLC calibration, can be unified as 10ms.
4.2.3 BLC calibration image capturing method
- Open RKISP Tuner Capture Tool, referring to the method described in section 1, connect the device, and select the light source name as unknow (no light), the module name as BLC. 2. Put the device or module in the environment without light, and use the black cloth or lens lid to cover the lens tightly. 3. configure Gain=1.0 ExpTime=0.010 Frame Number=1 in the Manual Exposure page. 4. Click Start Manual Capture to capture Raw image. 5. The captured raw image will be displayed in the right box, confirm the raw image is basically normal and then continue to capture. 6. Adjust Gain value, Gain=2, repeat step c, d, e, until the traversal is completed.
Figure 4-2-3-1
4.2.4 BLC calibration method
Figure 4-2-4-1 BLC calibration result
Calibration method:
- Open Calibration Tool, click Edit Options button at the top-left, to open the configuration interface, input size, bitwidth and bayer order of raw image. 2. Select BLC label page, click Load Raw Files button at the bottom, to select the folder to save Raw image. 3. Loaded Raw image will be displayed in the right box. 4. Click Calibrate button, to start calibration. 5. The curve of the dark current value of each channel obtained by calibration changing with ISO will be displayed in the coordinate axis above. 6. Click Save to save the parameters.
Notice:
- If the device itself has power light, status indicator light etc., need to avoid light leaking. 2. Wrong BLC value will affect the calibration result of all subsequent modules, so please ensure the BLC result is correct first before doing the calibration for subsequent modules.
4.3 LSC Calibration
4.3.1 Basic principle of LSC calibration
Lens Shading is commonly known as dark angle or vignetting effect, which can be further divided as Luma Shading (brightness uniformity) and Color Shading (color uniformity).
Luma Shading is caused by the optical characteristic of the lens. The whole lens can be seen as a convex lens. As the light gathering ability of the center of the convex lens is much greater than its edge, the light intensity in the center of the Sensor is greater than that in the surrounding area. This phenomenon is also known as edge illumination attenuation. For a camera without distortion, the illumination attenuation around the image follows the rule of
The cause of Color Shading is relatively complicated. Different types of IR-Cut (infrared cutting filter) have different penetration rates and when the incident angle θ changes, the penetration rate of different band will also change, so it makes the color in the center different from that in the surrounding area. On the other hand, the mismatch between CRA (incident angle of concentrated ray) of Micro Lens and CRA of lens will also cause Color Shading.
4.3.2 LSC calibration image requirements
- Cover the lens with ground glass or diffuser (or use DNP light box, integrating ball and other devices). 2. Capture in the light box with standard light source, need to capture 7 light sources: HZ, A, CWF, TL84, D50, D65, D75. 3. Avoid Flicker generated by AC light source. Recommend to use integer multiple of 10ms to configure the exposure time. 4. The maximum brightness of Raw image is around 200 (8bit), and the minimum brightness should be obviously bigger than the black level calibrated in the previous section. 5. Recommend to use the diffuser as shown in the picture below.
Figure 4-3-2-1 Opal Diffuser
4.3.3 LSC calibration image capturing method
- Open RKISP Tuner Capture Tool, referring to the steps described in section 2, connect the device and select the module name as LSC. 2. Put the module in the light box, switch to HZ light source, and closely place the diffuser to the lens. 3. Select light source name as HZ, tick Search Exposure By Max Luma(8bit) in Auto Exposure page, tick Anti-Flicker(50hz), and configure the target maximum brightness on the right as 200±10%, Frame Number = 1. 4. Click Start Auto Capture, capture Raw image, the tool will automatically select appropriate exposure during the process until it meets the preset maximum brightness. 5. Switch the light source to A light source, modify the name of the light source as A, repeat step 4 until the captures of all the light sources are completed. Figure 4-3-3-1
4.3.4 LSC calibration method
- Open Calibration Tool, click Edit Options button at the top-left of the interface, open the configuration interface, input the size, bitwidth and bayer order of Raw image. 2. Select LSC label page, click Load Raw Files button at the bottom, to load all raw images. 3. The loaded Raw image will be displayed in the window above, and switching the drop-down box can check the image of different light source. 4. Click Calibrate button to start calibration. 5. After the calibration is completed, you can check the Raw image of all the light sources after appling the calibration parameters in result page. 6. Click Save to save the parameters.
Figure 4-3-3-2
Figure 4-3-3-3
Notices: 1. It is possible that appropriate exposure parameter is not available during capture because the environment is too bright or too dark. You can try the following methods to resolve according to actual situation: Adjust the brightness of the light source Use the illumination attenuation plate Adjust the lens orientation Modify the range of Gain Range or Exp Range in the interface Adjust the maximum brightness or thrshold value of auto exposure Use manual exposure (the lowest criteria for selection is the minimum brightness is significantly bigger than the black level calibrated in the previous section)
4.4. AWB Calibration
4.4.1 AWB calibration content
It mainly calibrates the area for white pixels in XY, UV, YUV color space , auto white balance parameters for scene about large areas of single color pixels and none white pixels , and white balance gain under standard light source based on Raw images.
4.4.2 Step and requirement to capture Raw image for AWB calibration
Need to prepare the environment to capture Raw image as follows:
- device: x-rite 24 color card, light box (including light sources of D75, D65, D50, TL84, CWF, A, HZ) 2. Adjust exposure parameter, to make the maximum value of the brightest white block between[150-240], the brighter the better within the range (if the raw image is shared with CCM later, it should be relatively dark) 3. It's better to cover the color card about 1/9 of the image.
The method to capture Raw image:
-
Open RKISP Tuner Capture Tool, referring to the steps described in section 2, connect the device and select the module name as CCM_AWB. 2. Put the device and the color card in the light box, and adjust their locations, to make the color card in the center of the image. 3. Open the light box, switch the light source to HZ. 4. Select the light source name as HZ, tick Search Exposure By Max Luma(8bit) in Auto Exposure page, tick Anti-Flicker(50hz), and configure the target maximum brightness on the right as 200±10%, Frame Number = 1. (if using 1x Gain, integration time of 10ms cannot capture a raw image with Luma smaller than the configuration Max Luma , you can remove the tick of Anti-Flicker(50hz)√)Figure 4-4-2-1
-
Click Start Auto Capture to capture Raw image ,then the tool will automatically try several exposure parameters to capture during the process until there is the raw image with the Luma meeting the requirement for configuration Max Luma. 6. Switch the light source to A light, modify the light source name as A, repeat step 4 until the captures of all the light sources are completed.
Capture x-rite 24 color card with the light source A, CWF, D50, D65, D75, HZ, TL84 one by one, and the images after demosaicing are as follows:
Figure 4-4-2-2
4.4.3 Interface instruction of AWB calibration tool
- It mainly need to adjust the white pixels boundary of UV, XY domain and TH value of YUV domain during calibration. Figure 4-4-3-1
Figure 4-4-3-2
- Operation instruction to adjust white pixels area of UV and XY domain. a) Use the mouse to drag four corner of quadrangle to adjust the location and the size of white pixels area in the coordinate axis. b) Using the mouse to drag the empty area in the coordinate axis can drag the whole white pixels area. c) Use the scroll to zoom in/out. 3. The checkbox LightX in Display Control board can select whether to display the information for each light source. 4. Exclude WPC Range board can be used to add excluded white pixels area and the white pixels area of extra light source. 5. AWB Simulation is used for white pixels detection of raw image, and white pixels gain statistics simulation. Figure 4-4-3-3
a) LoadImage
After the Raw image is loaded, it will print out white pixels information as
shown below. The white pixels of different light sources will be displayed in
different colors. The RGain accumulation, BGain accumulation, and number
accumulation of the white pixels will be displayed in the three text boxes,in
order of medium rectangle, big rectangle and small rectangle.
Figure 4-4-3-4
b) Single click any part of the image, it will also display in UV domain and XY
domain, marked as black square dot, which is convenient for checking whether it
is in the white pixels area ,at the same time R, G, B, U, V, X, Y, RGain, BGain,
Dis, Th of this pixel will be displayed in the interface Stats of Point Track
board.
Figure 4-4-3-5
4.4.4 AWB calibration step
- Open Calibration Tool, click Edit Options button at the top-left of the interface, open the configuration interface, and input the wight ,height , bits and bayer of Raw image. 2. It should finish BLC and LSC calibration before AWB calibration. 3. Single click Load Raw Files to load raw image caputured under A, CWF, D50, D65, D75, HZ, TL84 (recommend to calibrate raw image of these 7 light sources) 4. Single click Find Chart to recognize the color card.
Figure 4-4-4-1
a) Single click the center of color bolock in order of the first block, the
sixth block, the nineteenth block, the twentieth block .
b) Single click FindChart will recognize the color block of the color card of
all the light sources in batch as shown below (display the white pixels detection
result of the last light source).
Figure 4-4-4-2
c) Select other light source from the drop-down menu, confirm the recognition
accuracy of each color block. When only the last block of TL84 is found to be
slightly on the right, it need to re-test by selecting Find chart one by one in
Mode, repeat step 12 until all the color blocks of the color card of TL84 are
recognized correctly as shown below.
Figure 4-4-4-3
d) Single click Save to finish recognition.
- Single click Calibrate to start calibration. This module would take relatively long time, around 30s, to get the following initial white pixels condition and other parameters. The round dots with different colors in the coordinate axis of UV domain and XY domain represent the locations of the color blocks of the color card captured under each light source . Quadrilaterals represent the white pixels condition of different light sources. Figure 4-4-4-4
Figure 4-4-4-5
- Single click AWB Simulaton, load raw image of A, CWF, D50, D65, D75, HZ, TL84 one by one to check the accuracy of white pixels detection. 7. Modify the box of UV domian or XY domain or TH of YUV to make the white pixels detection of the color card under each light source more accurate. 8. Single click Save 9. Repeat step 5~step 7, until all the white pixels detection of the color chart under different light sources are reasonable.
Notices:
-
Adjust the boundary to make the white pixels (marked as 19, 20, 21, 22 block) inside the quadrilateral and non-white pixels outside the quadrilateral as possible (generally impossible). 2. All the areas enclosed by the medium rectangle box or big rectangle box of the light sources must be connected closely(three kinds of lines for rectangle represent the boxes with three area ). Wrong example (the areas of big boxes are connected closely, but there is gap between medium boxes as shown by red arrow below): Correct example:
-
It's better to with closer boundaries at Y coordinate direction of XY domain for A and HZ light
source, while with farther boundaries at Y coordinate direction of XY domain for D50 D65.
- All the areas enclose at UV domain by the light sources must be connected closely. 5. The boundaries of quadrangles for different light sources can be overlaid, but can not overlay both XY and UV space at the same time. 6. Divide UV space with quadrangles based on XY space division, to exclude more non-white pixels. For example, the circled seventh block of D75 light source is inside hz range, so it will be recognized as white pixels.
After adjustment the quadrangles for HZ and A, the seventh block of D75 light source is not inside the same light source at XY and UV space, then it will not be recognized as white pixels. 7. When there are color pixels in the white pixels area of XY and UV and difficult to be removed by front step, it can be removed by decreasing TH or adding the area of non-white pixels around those color pixels. 8. When the white pixels is in the white pixels area of XY and UV, but it is still not marked as white pixels, maybe it is excluded because the brightness is out of the range, or it is in excluded white pixels area , or it is not in the white pixels area of YUV domain because it is less than TH.
4.4.5 AWB calibration result example
Final white pixels condition:
Figure 4-4-5-1
The white pixels detection result of each light source is as follows: Figure 4-4-5-1 A
Figure 4-4-5-2 CWF Figure 4-4-5-3 D50
Figure 4-4-5-4 D65 Figure 4-4-5-5 D75
Figure 4-4-5-6 HZ Figure 4-4-5-7 TL84
4.5 CCM Calibration
4.5.1 CCM calibration image requirements
Refers to Chapter 4.4 AWB Calibration.
Generally, CCM and AWB use same calibraion image, unless the calibration result is affected by gamma curve and becomes incorrect, please refer to 10 point in Chapter 4.5.2.
4.5.2 CCM calibration method
-
Open calibration tool, switch to CCM page, click "Load Raw Files" button, load all raw images and it will be shown in the list at the bottom; Figure 4-5-2-1
-
Click "Find Chart" button to open this window:
Figure 4-5-2-2
- Drag the center dots of the upper left, upper right, lower left, and lower right red boxes to adjust the sampling area,please make sure that the sampling area is in the center of each color block. 5. Click "Find Chart" button to calculate the color block values, and the sampling area will be marked in green; 6. Please make sure the green area is included in color block;
Figure 4-5-2-3
- Click "Save" button to save the color values and exit. 7. Set the saturation value to 100%
Figure 4-5-2-4
- Click "Calibration" button to start calibraion calculation, please wait about 20 secs;9. After calibration, the calculation result is shown in "result" page. 10. Click "Save" button to save the calibration result. 11. Change the saturation value to 74%, repeat step 8 to 10.
Figure 4-5-2-5
- If the result shown that ΔE is beyond the expected value, it may caused by the brightness of raw image. You can right click the picture in "Result" page, click "Save Current" to save the result picture and check each color block has been over exposure or saturated or not. Because of the CCM calibration will use the gamma curve, it may affect the image brightness and make it over exposure or saturated. 1. If the picture is overexposed or saturated, please capture this raw image again in same light with lower exposure time or gain and repeat calibration process;2. If the brightness of the color blocks is correct, the possible causes of the problem are: wrong BLC parameters, wrong LSC parameters, lens leakage (infrared light) and etc. 11. The details of CCM tuning please refer to Rockchip_Color_Optimization_Guide.
4.6 NR Calibration
Requirement to capture Raw image for NR module:
Capture in the light box using the standard light source. Recommend to use DC light source which brightness is adjustable.
Must use gray gradient card as shown in Picture 4-6-1.
Exposure should traverse Gain=1x,2x,4x,8x,16x...Max (if the drive supports max Gain up to 40x, then Max=32).
Need to capture four Raw images with each Gain, which are high light-overlaid frame, high light- single frame, low light-overlaid frame, and low light-single frame.
High light and low light can be distinguished by adjusting exposure time or ambient brightness, while overlaid frame and single frame are done by the tool.
Capture requirement with low light: The brightness of the brightest pixel should be in the range of 120~140.
Capture requirement for high light: in Picture 4-6-1 at least one block inside the 3x3 blocks with the brightest block in the center is overexposured. It is not allowed to have overexposured block outside the 3x3 blocks.
The brightest pixel value can be judged through histogram or Max Luma calculated below. Max Luma=255 means the picture has at least one pixel which reaches the saturation value.
HDR Sensor using DCG mode requires to separately capture two groups of Raw image for LCG and HCG.
Figure 4-6-1
4.6.1 Raw image capture method
- Open RKISP Tuner Capture Tool, referring to the steps described in section 2, to connect the device. 2. Put the device or module in the light box, and paste the gradient card on the back board of the light box. 3. Adjust the location of the device, move the gradient card to the center of the image and
make it as close as possible to capture larger image.
- Open the light box, switch the light source to TL84 or CWF. 5. Modify the light source name as TL84 or CWF on the interface, the module name as NR_Normal. 6. Assuming sensor in the example supports Gain=1-24, need to capture 1x 2x 4x 8x 16x. 7. Capture with low light: Adjust the brightness of the light box to around 800lux. Modify the value of Gain Range to 1.0 - 1.0 on the interface, no need to change Exp Range. Tick Multi-Frame and Low-Light. Select Auto Exposure page, tick Search Exposure By Max Luma, and set the value as 165±10% Disable Anti-Flicker(50hz). Set Frame Number=32.
Figure 4-6-1-2
- Click Start Auto Capture button to start capture, the tool will automatically select appropriate exposure value, to make Raw image fit with the set value. 9. After capturing, you will get one Raw image with Multiple suffix and the other with Single suffix. Figure 4-6-1-3
- Capture with high light:
Adjust the brightness of the light box to around 800lux.
Modify the value of Gain Range to 1.0 - 1.0 on the interface, no need to change
Exp Range.
Tick Multi-Frame and High-Light.
Select Auto Exposure page, tick Search Exposure By Max Luma, and set the value as
255±1%
Disable Anti-Flicker(50hz).
Set Frame Number=32.
Figure 4-6-4
Click Start Auto Capture button to start capture, the tool will automatically
select the appropriate exposure value, to make Raw image to fit with the set
value.
After capturing, you will get one Raw image with Multiple suffix and one Raw
image with Single suffix.
Because high light doesn't allow to have too many overexposure blocks, users need
to check whether the overexposure blocks are only existing inside the 3x3 blocks
with the brightest block as the center.
If need to decrease the brightness, you can switch to Manual Exposure page, fine
tune according to the result of auto exposure, and capture again.
Figure 4-6-1-5
- Modify Gain Range value as 2x, repeat step g, h, until to finish capturing for all Gain. 12. As Gain will increase gradually, maybe it is not able to select appropriate exposure value with auto exposure, as shown in Picture 4-6-6, the print information shows the tool uses the combination of Gain=4x ExpTime=0.03s (this combination is the max value within current set range), the max brightness of captured Raw image is 166.375, which cannot reach the target value 255, now you should increase the brightness of the light box and then retry.
Figure 4-6-1-6
4.6.2 NR Calibration Step
GIC & BayerNR and YNR & MFNR modules share the same group of Raw image:
- Open Calibration Tool, click Edit Options button at the left-top corner on the interface, open the configuration interface, input the size, bitwidth and bayer order of Raw image. 2. Select GIC & Bayer NR page, click upper Load Raw Files button, load all Raw image, and the loaded Raw image will be displayed in the list below. 3. Click Calibration button, to calculate the calibration parameter. 4. Click Save button to save the parameter. 5. Select YNR&MFNR label page, click upper Load Raw Files button, load all Raw image, and the loaded Raw image will be displayed in the list below. 6. Click Calculate YUV button, Raw image will be processed as YUV image through simulator. 7. Click Calibration button, to calculate the calibration parameter. 8. After calibration is finished, the obtained noise curve will be displayed in the right window. 9. Click Save button to save the parameters.
Figure 4-6-2-1
Notices:
If Auto Exposure is always not able to select the appropriate exposure parameter, recommend to use Manual Exposure to adjust exposure, and judge whether the brightness is appropriate through the histogram and statistics value of captured Raw image. If the calibrated curve shape is quite different from that in Picture 4-6-7, it means the brightness of high light or low light is not correct, which can be judged by the abnormal location of the curve. Shape error of left part means the brightness of low light is inappropriate. Shape error of right part means the brightness of high light is inappropriate. Must select correct light source for capturing Raw image, otherwise the result of Calculate YUV may be not correct. If the lowest brightness of the adjustable light source in the light box cannot meet the requirement of capturing, recommend to use the filter such as the light reducer that doesn't affect the color as assistance.
4.7 FEC/LDCH
To use the FEC/LDCH module, a map table that meets the requirements needs to be given. The map table only contains the coordinates in the horizontal x/y direction of the image, and is a mapping table after sampling according to certain rules. To get the map table, you need to know the relevant parameters of the camera lens. The lens parameters need to take a set of checkerboard images, and then use the calibration tool to calibrate.
4.7.1 FEC/LDCH calibration chart shooting specifications
Shooting a checkerboard, the checkerboard size can be changed, and the calibration map only supports jpg, bmp, and png formats;
Checkerboard shooting can be divided into two modes:
Method 1: An image contains only one checkerboard (high precision, recommended);
Method 2: An image contains N checkerboards (for the convenience of calibration, generally N=4).
- Preparation before shooting
(1) The checkerboard used for calibration should use a standard calibration board. If you print the checkerboard yourself, please pay attention to the actual size of the printed checkerboard. The self-printed checkerboard should maintain a good plane, preferably fixed on a flat board. The number of checkerboards should be different from the number of horizontal and vertical grids as far as possible to facilitate the calibration tool to identify the direction of the calibration board;
(2) Appropriate lighting conditions and shooting environment: The light is moderate, to ensure that the images from all angles are clear during the shooting process, and there is no reflection or blur on the checkerboard. During the entire calibration process, the camera's aperture and focal length should be kept fixed, and the amount of light entering the camera must be consistent with the focal length during calibration.
- Specifications when shooting
(1) Appropriate ratio: Try to keep the area of the captured checkerboard image in the entire camera field of view between 1/4 and 1/8.
(2) Appropriate number: to ensure that the checkerboard of all images can cover the entire camera field of view, the number is usually around 15 sheets. Too few numbers will lead to inaccurate calibration parameters. It is recommended to take 3-4 pictures in the same position to facilitate subsequent screening and replacement of unqualified images, and save the time of repeated shooting.
(3) Appropriate distribution: as shown in Picture 2-1, ensure that the captured calibration board images are evenly distributed in all areas and corners of the camera's field of view, and when close to the edge of the field of view, the checkerboard should be as close as possible, but Be careful not to have a checkerboard beyond the field of view of the image, causing incomplete checkerboards in the image.
(4) Different tilt angles: You can't only shoot images parallel to the lens plane, but make sure to shoot images with different tilt angles.
- Schematic diagram of shooting:
(1) Method 1 (recommended)
Figure 4-7-1-1: An image contains only one checkerboard (2) Method 2
Figure 4-7-1-2: An image contains 4 checkerboards
4.7.2 FEC/LDCH Calibration steps
Figure 4-7-2-1
- Before calibration, check whether there is a result folder in the tool path. If it does not exist, you need to create one manually; 2. configure the resolution in the Raw Options properties. Bit and Bayer Pattern can be ignored. 3. Import the folder where the calibration chart is located. Support jpg, bmp, png image reading. 4. Adjust the calibration configuration parameters. a) Square Size: The actual size of each grid in the checkerboard grid, generally 30mm or 25mm. b) Horizontal/Vertical: The number of internal corner points of the horizontal (Horizontal) and vertical (Vertical) of the checkerboard:
Note: How to distinguish the corner points and inner corner points of the
checkerboard (see Picture 2-5). The picture below shows a checkerboard with
12 horizontal grids and 9 vertical grids, in which the number of horizontal
corner points is 13, the number of horizontal internal corner points is 11,
and so on. So Horizontal = 11 and Vertical = 8.
Figure 4-7-2-2 The corner points and inner corner points of the checkerboard (corner points include the red and green parts, while the inner corner points only include the red part) c) CheckBoard Number: The number of checkboards in each image: The options here are 1 or 4. d) Level: Set the distortion calibration level Level, which is divided into 256 levels. Level = 0 means that the mapping table obtained at this time has no calibration effect (that is, the output image is the same as the input image), and Level = 255 means the mapping table is The maximum degree of calibration that LDCH can achieve. e) Correct Direction: If you are generating a mapping table for the FEC module, you can also set different calibration direction options: ①Check Correct X: only correct the horizontal direction, the effect is similar to LDCH; ②Check only Correct Y: only Correct the vertical direction; ③Check both Correct X and Correct Y: correct both horizontal and vertical directions. 5. Click the "Calibrate" button to calibrate
Note: Check whether the result folder exists in the tool path. If it does not exist, you need to create a new folder named result and place it in the same level directory as the calibration tool exe file.
Figure 4-7-2-3
- Click the "Save" button to save the calibration results.
4.7.3 FEC/LDCH calibration results
- If there is an unsuccessful calibration result, it is generally due to inaccurate or incomplete corner detection due to unclear checkerboard shooting. Therefore, you should first check whether the corner points of the checkerboard of each image are completely and accurately detected, and the number of complete detections cannot be less than 3. 2. If the calibration is successful, the result shown in Picture 4-7-2-4 will appear. You can view the distortion parameters after calibration in the log display box on the left. The meaning of the six parameters are the center coordinates of the camera from top to bottom ( cx, cy), camera distortion parameters (a0, a2, a3, a4). In the result tab on the right, you can view the checkerboard corner detection results of each image. If an individual test result is inaccurate, you can delete the corresponding image and re-calibrate to obtain a more accurate calibration result. The generated FEC and LDCH mapping table is saved in the corresponding folder under the result directory. Figure 4-7-2-4
5 Online tuning interface and function introduction
5.1 Tuning interface
After opening RKISP2x Tuner, the main interface is the online tuning interface. Current version supports online tuning for AEC, BayerNR, MFNR, UVNR, YNR, Sharpen, EdgeFilter, Gamma, Dehaze, HDR, DPCC modules, and offline static parameter tuning for Demosaic module.
Figure 5-1-1 RKISP2x Tuner main interface
5.2 Device connection
Click Connect Network of the toolbar at top left, to open the connection configuration interface as shown below:
图5-2-1
Figure 5-2-2
Fill in the device IP address, the default port number is 5543, click Connect To Device, the tool will push rkaiq_tool_server to the device and execute the corresponding script command, which is determined by the configuration of rkaiq_tool_server/adb_shell_script.txt.
Figure 5-2-3
As shown above, the configuration in adb_shell_script.txt includes five parts:
- get AIQ version:used to inquire AIQ version of the device, check whether it corresponds with the tool version, if the path of librkaiq.so is changed, users should modify the path at the same time. 2. tool_server execute path:the execution path of rkaiq_tool_server, which is under /tmp by default. 3. windows command:the extendable customized command in windows command line, users can add or delete the commands by self, e.g. in Picture 5-2-3 it configures the command to push the dependent lib to the device through adb command. 4. adb shell command: the extendable customized command in adb shell, the tool will execute the command in the device throught adb shell, e.g., in Picture 5-2-3 it configures the command to kill the process and configure access. 5. run rkaiq_tool_server:execution command, this should be kept in the last part, the parameter instructions are as follows: -m:normal/HDR mode selection, 0/1/2 separately corresponds to normal/HDR2 frame/HDR3 frame, default is normal with null. -i:the path to save XML, if the path is changed, you should modify the path here as well. -w and -h: rtsp preview resolution, this resolution will zoom to meet the requirement based on ISP output size. -r: whether to enable RTSP service, 0/1 separately responds to disable/enable, the device that only supports UVC should be configured as 0. -d:sensor selection, when there are multiple sensors for the device, you can use 0/1/2 etc. to select which sensor to be tuned, the number order should be the same as the order in v4l2 topological list.
Suport to configure multiple commands for above 3 and 4 parts, each command execution interval is 1s, and will be executed in order from up to down.
Users should pay attention to the configurations below according to the actual situation of the device:
1. Confirm the path of librkaiq.so, and inquiry path of AIQ version and push path
of librkmedia.so should be the same as it.
2. Whether need to kill user application, if yes, you should extend kill command
to adb shell command part.
3. The parameter with the execution command, whether normal or HDR (even if it is
HDR, still recommend to use normal for capturing raw image during calibration)
and so on.
After execution is completed, it will display the result returned by the execution command as shown below:
Figure 5-2-4
Wait for 5-11s until initialization is completed, click Test button, you can test whether the application is working normally.
Figure 5-2-5
After confirming it works normally, you can use the third party playback tool to open rtsp://192.168.1.100 (the specific IP is subject to actual tuning device) to check the preview image.
Click Save and Exit.
5.3 Load XML file
Click IQFiles -- Load IQ File on the menu bar, to load the XML file of the project.
Figure 5-3-1
After loading, it will initialize the interface parameters of each module as shown below: Figure 5-3-2
5.4 Real time parameter read/write function
Figure 5-4-1
As shown above, there are three buttons at the top of each module page, which are separately
Read:Acquire curretly used parameter of the device in real time.
Write:Set the interface paramter to the device.
Save:Save the parameter to buffer, then the saved parameter using IQ Files -- Save IQ File is new parameter.
5.5 Register and algorithm paramter adjustment
Each module page includes register and algorithm parameters, using different widgets according to different parameter forms and value range, which are mainly divided into the following categories:
Numeric value: integer or floating point value with a range of values.
Directly modify the value in the text box.
Use the up/down arrow on the right of the text box to adjust the value.
Use the slider on the right to adjust the value.
Figure 5-5-1
Some parameters only support to input manually as the range is not confirmed.
Figure 5-5-2
Boole: the parameter with the value as 0 or 1, which is mainly used to switch the functions.
Enable as 1, Disable as 0.
Figure 5-5-3
List: select one from preset options, mainly used to select for function modes, ISO, Day/Night and LCG/HCG.
Figure 5-5-4
Table: NxM matrix paramters, matrix element may be integer or floating point.
Figure 5-5-5
5.6 Save parameter to XML file
After each module tuning is finished, users should click Save to save the parameter to buffer. When all modules tuning are finished, or need to backup parameters during the process, you can click IQ Files - SaveIQFIle on the menu bar to save XML file to another path or replace the original XML file of the project.
Figure 5-6-1 Figure 5-6-2
5.6.1 Scene mode and ISO level selection
Some module (such as NR modules) has the parameters configured for different ISO, different Conversion Gain mode (available when sensor supports DCG) and different scene modes. When tuning, you should make sure current status of preview matches with the mode and level selected by current interface. When tuning Sensor that doesn't support DCG mode, just tune LCG.
Conversion Gain has two modes: LCG and HCG
Figure 5-6-1-1
Scene mode: Normal, HDR and Gray
Figure 5-6-1-2
ISO level is variable, the range is from 50 to 204800, and the maximum value depends on the maximum gain of sensor.
Figure 5-6-1-3
To be convenient for users to fix ISO level, you can refer to the method described in section 5.6.1, configure AEC as manual exposure, adjust the parameters of the corresponding ISO level. For example, configure ISO as 50, then you should configure manual exposure gain as 1x, and then adjust the parameters.
5.7 Tuning assistant
Figure 5-7-1-1 Tuning assistant entrance
5.7.1 Tuning assistant: AE control
Pictue 5-7-1-2 AE control interface
This part function mainly provides for users the convenient AE control and inquiry function, separatively with Normal mode and HDR mode.
For the modules that require tuning by ISO level, such as NR, Sharp etc., Gain can be locked first separatively as shown below:
Figure 5-7-1-2 AE control interface
Meanwhile, click Get Current Gain and ExpTime below can continuously acquire current exposure information, and update in the interface. Click Get Current Gain and ExpTime again to stop acquiring. Before using other continuously acquiring function (AE HDR or AWB), need to stop the continuously acquiring function that is running.
5.7.2 Tuning assistant: Scene/work mode control
Figure 5-7-2-1 Scene/work mode control interface
Figure 5-7-2-2 Scene/work mode control interface
This part function mainly provides for users scene/work mode configuration function. For modules that require to separate scene/work mode, such as NR, Sharp etc., recommend users to lock scene/work mode first, and then do the tuning of the module parameters.
5.7.3 Tuning assistant: AWB control
Figure 5-7-3-1 AWB control interface
This part function mainly provides for users the convenient AWB control and inquiry function, mainly for the modules that are dependent on AWB module to select light source, such as LSC, CCM and so on.
When using, first click Get Current AWB and CCM Info assistant will continuously acquire the white balance gain value output by current module and update in the interface.
Users can judge the light source used by the corresponding module according to current value displayed in the interface, and then adjust the parameter of the light source.
Click Get Current AWB and CCM Info again to stop acquiring.Before using other continuously acquiring function (AE Linear or HDR), need to stop the continuously acquiring function that is running.
5.8 AEC tuning interface
Figure 5-8-1 AEC module tuning interface
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.8.1. Configuration method of AEC manual exposure
- Use tuning assistant to control manual exposure (internal implementation mechanism is the same). 2. Modify OpType as MANUAL. 3. Modify TimeValue and GainValue in AecManualCtrl to the target value. 4. Click Write, and the parameter will be set to the device.
Figure 5-8-1-1 manual exposure Gain=2x ExpTime=0.03s
5.9 Bayer NR tuning interface
Figure 5-9-1 Bayer NR module tuning interface
Note, Bayer Nr Curve displayed here is the calibration value, which is only as reference, and cannot be changed by users. For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.9.1 Bayer NR enable
Set Enable as Enable or Disable in the interface, and then click Write.
Figure 5-9-1-1
5.10 MFNR
Figure 5-10-1 MFNR module tuning interface
Note, MFNR Sigma Curve displayed here and noise profile below are the calibration values, which are only as reference, and cannot be changed by users.
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.10.1 MFNR NR enable
Set Enable as Enable or Disable, and then click Write.
Figure 5-10-1-1 MFNR module tuning interface
5.11 UVNR
Figure 5-11-1 UVNR module tuning interface
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.11.1 UVNR NR enable
Set YNR & UVNR Enable as Enable or Disable, and then click Write.
Figure 5-11-1-1
Because UVNR and YNR share the same one bit as the enable bit, when enabling UVNR, YNR will be enabled as well.
5.12 YNR
Figure 5-12-1 YNR module tuning interface
Note, YNR Sigma Curve displayed here and ynr_xxci parameter below are the calibration values, which are only as reference, and cannot be changed by users.
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.12.1 YNR enable
Set YNR & UVNR Enable as Enable or Disable, and then click Write.
Figure 5-12-1-1
Because UVNR and YNR share the same one bit as the enable bit, when enabling YNR, UVNR will be enabled as well.
5.13 Sharpen
Figure 5-13 Sharp module tuning interface
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.13.1 Sharpen enable
Set Sharpen & Edge Filter Enable as Enable or Disable, and then click Write.
Figure 5-13-1-1
Because Sharpen and Edge Filter share the same one bit as the enable bit, when enabling Sharpen, Edge Filter will be enabled as well.
5.14 Edge Filter
Figure 5-14 Edge Filter module tuning interface
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.14.1 Edge Filter enable
Set Sharpen & Edge Filter Enable as Enable or Disable, and then click Write.
Figure 5-14-1-1
Because Sharpen and Edge Filter share the same one bit as the enable bit, when enabling Sharpen, Edge Filter will be enabled as well.
5.15 Gamma
5.15.1 Gamma visual tuning
Figure 5-15-1-1 Gamma visual tuning interface
5.15.2 Gamma enable
Set Curve - Enable as Enable or Disable, and then click Write.
Figure 5-15-2-1
5.15.3 Basic tuning method of Gamma curve
Move the mouse to the coordinate of the curve, and the pointer will be displayed as cross star, now you can press and hold the left button of the mouse to select an area, after releasing the mouse the coordinate will be enlarged to the selected area as shown below:
Figure 5-15-3-1 Select the area
Figure 5-15-3-2 The enlarged coordinate
Single click the right button of the mouse in the blank space, it will restore the coordinate display scale.
When the pointer is moved to the point of the curve, it will be displayed as up and down arrow, now you can drag the point to move up and down, and the curve will change accordingly.
Figure 5-15-3-3 The curve after dragging the point
5.16 Dehaze
Figure 5-16 Dehaze module tuning interface
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.16.1 Dehaze enable
Set Dehaze Enable as Enable or Disable, and then click Write.
Figure 5-16-1-1
5.17 HDR
Figure 5-17-1 HDR Merge module tuning interface
Figure 5-17-2 HDR TMO module tuning interface
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.17.1 HDR-TMO enable
Set TMO Enable as Enable or Disable, and then click Write.
Figure 5-13-1-1
HDR-TMO supports to configure separate Enable for different scene/work modes. Here you can select to configure the corresponding scene/work mdoe through Working Mode list.
HDR-Merge doesn't work in Normal mode, but is always enabled with HDR mode.
5.18 DPCC
Figure 5-18-1 DPCC-Fast module tuning interface
Figure 5-18-2 DPCC-Expert module tuning interface
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.
5.18.1 DPCC enable
Set DPCC Enable as Enable or Disable, and then click Write.
Figure 5-18-1-1
6 Offline tuning interface and function introduction
The module involved in this chapter only supports offline tuning because tuning frequency is relatively low and most parameters are configured as static, and the modified result will be updated to XML file after clicking Save button.
6.1 Demosaic
Figure 6-1 Demosaic module tuning interface
For the detailed tuning method of parameters, please refer to the document《Rockchip_Tuning_Guide_ISP2x》.