mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-13 16:57:35 +00:00
Merge branch 'feat/p4_rev3_isp_blc' into 'master'
isp: black level correction driver support on p4 eco5 Closes IDF-13931 See merge request espressif/esp-idf!41714
This commit is contained in:
@@ -10,6 +10,7 @@ This example demonstrates how to use the ISP (image signal processor) to work wi
|
||||
|
||||
- ISP AF (auto-focus) feature
|
||||
- ISP BF (bayer denoise) feature
|
||||
- ISP BLC (black level correction) feature
|
||||
- ISP Sharpen feature
|
||||
- ISP Demosaic feature
|
||||
- ISP GAMMA feature
|
||||
|
||||
@@ -303,6 +303,49 @@ void app_main(void)
|
||||
ESP_ERROR_CHECK(esp_isp_bf_configure(isp_proc, &bf_config));
|
||||
ESP_ERROR_CHECK(esp_isp_bf_enable(isp_proc));
|
||||
|
||||
#if CONFIG_ESP32P4_REV_MIN_FULL >= 300
|
||||
/**
|
||||
* This piece of BLC code is to show how to use the BLC related APIs.
|
||||
* Suggested way to calibrate the BLC is by covering the lens and record the raw data.
|
||||
* Then, use the recorded data to calibrate the BLC.
|
||||
*/
|
||||
esp_isp_blc_config_t blc_config = {
|
||||
.window = {
|
||||
.top_left = {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
},
|
||||
.btm_right = {
|
||||
.x = CONFIG_EXAMPLE_MIPI_CSI_DISP_HRES,
|
||||
.y = CONFIG_EXAMPLE_MIPI_CSI_DISP_VRES,
|
||||
},
|
||||
},
|
||||
.filter_enable = true,
|
||||
.filter_threshold = {
|
||||
.top_left_chan_thresh = 128,
|
||||
.top_right_chan_thresh = 128,
|
||||
.bottom_left_chan_thresh = 128,
|
||||
.bottom_right_chan_thresh = 128,
|
||||
},
|
||||
.stretch = {
|
||||
.top_left_chan_stretch_en = true,
|
||||
.top_right_chan_stretch_en = true,
|
||||
.bottom_left_chan_stretch_en = true,
|
||||
.bottom_right_chan_stretch_en = true,
|
||||
},
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_isp_blc_configure(isp_proc, &blc_config));
|
||||
ESP_ERROR_CHECK(esp_isp_blc_enable(isp_proc));
|
||||
|
||||
esp_isp_blc_offset_t blc_offset = {
|
||||
.top_left_chan_offset = 20,
|
||||
.top_right_chan_offset = 20,
|
||||
.bottom_left_chan_offset = 20,
|
||||
.bottom_right_chan_offset = 20,
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_isp_blc_set_correction_offset(isp_proc, &blc_offset));
|
||||
#endif
|
||||
|
||||
esp_isp_demosaic_config_t demosaic_config = {
|
||||
.grad_ratio = {
|
||||
.integer = 2,
|
||||
|
||||
Reference in New Issue
Block a user