Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0761fa8
添加子模块esp-who,从官网fork release/v1.1.0:
diskman88 Mar 8, 2025
649ce65
esp-who添加GC0328摄像头:
diskman88 Mar 9, 2025
fcb31e6
修改LCD、camera驱动:
diskman88 Mar 9, 2025
b4f84e9
修改LCD驱动,以适配lvgl,未完:
diskman88 Mar 9, 2025
f28dede
修改esp-who LCD 驱动:
diskman88 Mar 10, 2025
e0c9e8e
修改摄像头驱动:
diskman88 Mar 10, 2025
4cf57f8
优化esp-who camera lcd驱动:
diskman88 Mar 11, 2025
66222b0
合并lvgl esp-who lcd驱动:
diskman88 Mar 15, 2025
802b57c
修改摄像头分辨率,以适配屏幕分辨率:
diskman88 Mar 19, 2025
f8aed62
取消probe探测摄像头IIC地址,直接赋值GC0328地址,一方面避免探测时把磁力计地址识别为
diskman88 Mar 20, 2025
5dcf9a8
lcd模块及驱动移回esp-who usercmodule:
diskman88 Mar 20, 2025
a7ca6c1
优化LCD驱动:
diskman88 Mar 20, 2025
69ee17a
还原原来的sensor驱动,sensor配置为QVGA(320x240)时显示不全的问题,只需显示时,
diskman88 Mar 21, 2025
a32c850
限制lcd图片显示宽、高在320x172范围,避免显示异常:
diskman88 Mar 21, 2025
d5cd812
修改esp-who camera及lcd驱动,适配AIcamera modules:
diskman88 Mar 22, 2025
1c2c5aa
调整gc0328 0x17寄存器,修正图像方向:
diskman88 Mar 23, 2025
7eea334
完善AIcamera module,未完:
diskman88 Mar 23, 2025
396cc57
AIcamera模块加入人脸检测功能,未完:
diskman88 Mar 24, 2025
7310a7f
AIcamera module添加人脸识别功能:
diskman88 Mar 24, 2025
80e20b5
修改开机logo:
diskman88 Mar 25, 2025
7c2878e
优化AIcamera module:
diskman88 Mar 25, 2025
aab85d4
升级esp-dl,乐鑫解决人脸识别编译不过问题。:
diskman88 Mar 25, 2025
6ec9d55
Merge branch 'release/v1.1.0' of https://github.com/labplus-cn/esp-wh…
diskman88 Mar 25, 2025
d84e815
完善AIcamera module:
diskman88 Mar 26, 2025
1162af2
解决人脸识别不断发消息bug:
diskman88 Mar 28, 2025
9b345f1
添加讯飞江苏合作两个板:
diskman88 Apr 9, 2025
1de13b4
Merge branch 'tmp' into release/v1.1.0
diskman88 Apr 9, 2025
c586f2d
添加讯飞loggo:
diskman88 Apr 23, 2025
9eb715d
讯飞江苏小学实验箱屏修改了IO:
diskman88 May 21, 2025
a970e06
添加二维码识别:
diskman88 May 22, 2025
dc98b25
add jd9853 lcd driver
diskman88 Jun 3, 2025
4763c3f
control stm8 reset LCD:
diskman88 Jun 10, 2025
e5e4b90
限制只支持labplus_ledong_v2_board和labplus_xunfei_js_primary_board给从MCU发屏re…
diskman88 Jun 12, 2025
9e4f937
Changes to be committed:
diskman88 Aug 19, 2025
210bb59
Changes to be committed:
diskman88 Sep 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/esp32-camera/.component_hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c3eb05fbeeae884a23bed9b17d48d5f0da8872beadae0c0e747d2fbea6094f06
6 changes: 6 additions & 0 deletions components/esp32-camera/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.DS_Store
.vscode
**/build
**/sdkconfig
**/sdkconfig.old
**/dependencies.lock
114 changes: 114 additions & 0 deletions components/esp32-camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# get IDF version for comparison
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")

# set conversion sources
set(srcs
conversions/yuv.c
conversions/to_jpg.cpp
conversions/to_bmp.c
conversions/jpge.cpp
conversions/esp_jpg_decode.c
)

set(priv_include_dirs
conversions/private_include
)

set(include_dirs
driver/include
conversions/include
)

set(COMPONENT_REQUIRES driver)

# set driver sources only for supported platforms
if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3")
list(APPEND srcs
driver/esp_camera.c
driver/cam_hal.c
driver/sensor.c
sensors/ov2640.c
sensors/ov3660.c
sensors/ov5640.c
sensors/ov7725.c
sensors/ov7670.c
sensors/nt99141.c
sensors/gc0308.c
sensors/gc0328.c
sensors/gc2145.c
sensors/gc032a.c
sensors/bf3005.c
sensors/bf20a6.c
sensors/sc101iot.c
sensors/sc030iot.c
sensors/sc031gs.c
sensors/mega_ccm.c
)

list(APPEND priv_include_dirs
driver/private_include
sensors/private_include
target/private_include
)

if(IDF_TARGET STREQUAL "esp32")
list(APPEND srcs
target/xclk.c
target/esp32/ll_cam.c
)
endif()

if(IDF_TARGET STREQUAL "esp32s2")
list(APPEND srcs
target/xclk.c
target/esp32s2/ll_cam.c
target/tjpgd.c
)

list(APPEND priv_include_dirs
target/esp32s2/private_include
)
endif()

if(IDF_TARGET STREQUAL "esp32s3")
list(APPEND srcs
target/esp32s3/ll_cam.c
)
endif()

set(priv_requires freertos nvs_flash)

set(min_version_for_esp_timer "4.2")
if (idf_version VERSION_GREATER_EQUAL min_version_for_esp_timer)
list(APPEND priv_requires esp_timer)
endif()

# include the SCCB I2C driver
# this uses either the legacy I2C API or the newwer version from IDF v5.4
# as this features a method to obtain the I2C driver from a port number
if (idf_version VERSION_GREATER_EQUAL "5.4")
list(APPEND srcs driver/sccb-ng.c)
else()
list(APPEND srcs driver/sccb.c)
endif()

endif()

# CONFIG_ESP_ROM_HAS_JPEG_DECODE is available from IDF v4.4 but
# previous IDF supported chips already support JPEG decoder, hence okay to use this
if(idf_version VERSION_GREATER_EQUAL "4.4" AND NOT CONFIG_ESP_ROM_HAS_JPEG_DECODE)
list(APPEND srcs
target/tjpgd.c
)
list(APPEND priv_include_dirs
target/jpeg_include/
)
endif()

idf_component_register(
SRCS ${srcs}
INCLUDE_DIRS ${include_dirs}
PRIV_INCLUDE_DIRS ${priv_include_dirs}
REQUIRES driver # due to include of driver/gpio.h in esp_camera.h
PRIV_REQUIRES ${priv_requires}
)
261 changes: 261 additions & 0 deletions components/esp32-camera/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
menu "Camera configuration"

config OV7670_SUPPORT
bool "Support OV7670 VGA"
default n
help
Enable this option if you want to use the OV7670.
Disable this option to save memory.

config OV7725_SUPPORT
bool "Support OV7725 VGA"
default n
help
Enable this option if you want to use the OV7725.
Disable this option to save memory.

config NT99141_SUPPORT
bool "Support NT99141 HD"
default n
help
Enable this option if you want to use the NT99141.
Disable this option to save memory.

config OV2640_SUPPORT
bool "Support OV2640 2MP"
default n
help
Enable this option if you want to use the OV2640.
Disable this option to save memory.

config OV3660_SUPPORT
bool "Support OV3660 3MP"
default n
help
Enable this option if you want to use the OV3360.
Disable this option to save memory.

config OV5640_SUPPORT
bool "Support OV5640 5MP"
default n
help
Enable this option if you want to use the OV5640.
Disable this option to save memory.

config GC2145_SUPPORT
bool "Support GC2145 2MP"
default n
help
Enable this option if you want to use the GC2145.
Disable this option to save memory.

config GC032A_SUPPORT
bool "Support GC032A VGA"
default n
help
Enable this option if you want to use the GC032A.
Disable this option to save memory.

config GC0308_SUPPORT
bool "Support GC0308 VGA"
default n
help
Enable this option if you want to use the GC0308.
Disable this option to save memory.

config GC0328_SUPPORT
bool "Support GC0328 VGA"
default y
help
Enable this option if you want to use the GC0328.
Disable this option to save memory.

config BF3005_SUPPORT
bool "Support BF3005(BYD3005) VGA"
default n
help
Enable this option if you want to use the BF3005.
Disable this option to save memory.

config BF20A6_SUPPORT
bool "Support BF20A6(BYD20A6) VGA"
default n
help
Enable this option if you want to use the BF20A6.
Disable this option to save memory.

config SC101IOT_SUPPORT
bool "Support SC101IOT HD"
default n
help
Enable this option if you want to use the SC101IOT.
Disable this option to save memory.

choice SC101_REGS_SELECT
prompt "SC101iot default regs"
default SC101IOT_720P_15FPS_ENABLED
depends on SC101IOT_SUPPORT
help
Currently SC010iot has several register sets available.
Select the one that matches your needs.

config SC101IOT_720P_15FPS_ENABLED
bool "xclk20M_720p_15fps"
help
Select this option means that when xclk is 20M, the frame rate is 15fps at 720p resolution.
config SC101IOT_VGA_25FPS_ENABLED
bool "xclk20M_VGA_25fps"
help
Select this option means that when xclk is 20M, the frame rate is 25fps at VGA resolution.
endchoice

config SC030IOT_SUPPORT
bool "Support SC030IOT VGA"
default n
help
Enable this option if you want to use the SC030IOT.
Disable this option to save memory.

config SC031GS_SUPPORT
bool "Support SC031GS VGA"
default n
help
SC031GS is a global shutter CMOS sensor with high frame rate and single-frame HDR.
Enable this option if you want to use the SC031GS.
Disable this option to save memory.

config MEGA_CCM_SUPPORT
bool "Support MEGA CCM 5MP"
default n
help
Enable this option if you want to use the MEGA CCM.
Disable this option to save memory.

choice SCCB_HARDWARE_I2C_PORT
bool "I2C peripheral to use for SCCB"
default SCCB_HARDWARE_I2C_PORT0

config SCCB_HARDWARE_I2C_PORT0
bool "I2C0"
config SCCB_HARDWARE_I2C_PORT1
bool "I2C1"

endchoice

config SCCB_CLK_FREQ
int "SCCB clk frequency"
default 400000
range 100000 400000
help
Increasing this value can reduce the initialization time of the sensor.
Please refer to the relevant instructions of the sensor to adjust the value.

choice GC_SENSOR_WINDOW_MODE
bool "GalaxyCore Sensor Window Mode"
depends on (GC2145_SUPPORT || GC032A_SUPPORT || GC0308_SUPPORT || GC0328_SUPPORT)
default GC_SENSOR_SUBSAMPLE_MODE
help
This option determines how to reduce the output size when the resolution you set is less than the maximum resolution.
SUBSAMPLE_MODE has a bigger perspective and WINDOWING_MODE has a higher frame rate.

config GC_SENSOR_WINDOWING_MODE
bool "Windowing Mode"
config GC_SENSOR_SUBSAMPLE_MODE
bool "Subsample Mode"
endchoice

config CAMERA_TASK_STACK_SIZE
int "CAM task stack size"
default 2048
help
Camera task stack size

choice CAMERA_TASK_PINNED_TO_CORE
bool "Camera task pinned to core"
default CAMERA_CORE1
help
Pin the camera handle task to a certain core(0/1). It can also be done automatically choosing NO_AFFINITY.

config CAMERA_CORE0
bool "CORE0"
config CAMERA_CORE1
bool "CORE1"
config CAMERA_NO_AFFINITY
bool "NO_AFFINITY"

endchoice

config CAMERA_DMA_BUFFER_SIZE_MAX
int "DMA buffer size"
range 8192 32768
default 32768
help
Maximum value of DMA buffer
Larger values may fail to allocate due to insufficient contiguous memory blocks, and smaller value may cause DMA interrupt to be too frequent.

choice CAMERA_JPEG_MODE_FRAME_SIZE_OPTION
prompt "JPEG mode frame size option"
default CAMERA_JPEG_MODE_FRAME_SIZE_AUTO
help
Select whether to use automatic calculation for JPEG mode frame size or specify a custom value.

config CAMERA_JPEG_MODE_FRAME_SIZE_AUTO
bool "Use automatic calculation (width * height / 5)"
help
Use the default calculation for JPEG mode frame size.
Note: In very low resolutions like QQVGA, the default calculation tends to result in insufficient buffer size.

config CAMERA_JPEG_MODE_FRAME_SIZE_CUSTOM
bool "Specify custom frame size"
help
Specify a custom frame size in bytes for JPEG mode.

endchoice

config CAMERA_JPEG_MODE_FRAME_SIZE
int "Custom JPEG mode frame size (bytes)"
default 8192
depends on CAMERA_JPEG_MODE_FRAME_SIZE_CUSTOM
help
This option sets the custom frame size in JPEG mode.
Specify the desired buffer size in bytes.

config CAMERA_CONVERTER_ENABLED
bool "Enable camera RGB/YUV converter"
depends on IDF_TARGET_ESP32S3
default n
help
Enable this option if you want to use RGB565/YUV422/YUV420/YUV411 format conversion.

choice CAMERA_CONV_PROTOCOL
bool "Camera converter protocol"
depends on CAMERA_CONVERTER_ENABLED
default LCD_CAM_CONV_BT601_ENABLED
help
Supports format conversion under both BT601 and BT709 standards.

config LCD_CAM_CONV_BT601_ENABLED
bool "BT601"
config LCD_CAM_CONV_BT709_ENABLED
bool "BT709"
endchoice

config LCD_CAM_CONV_FULL_RANGE_ENABLED
bool "Camera converter full range mode"
depends on CAMERA_CONVERTER_ENABLED
default y
help
Supports format conversion under both full color range mode and limited color range mode.
If full color range mode is selected, the color range of RGB or YUV is 0~255.
If limited color range mode is selected, the color range of RGB is 16~240, and the color range of YUV is Y[16~240], UV[16~235].
Full color range mode has a wider color range, so details in the image show more clearly.
Please confirm the color range mode of the current camera sensor, incorrect color range mode may cause color difference in the final converted image.
Full range mode is used by default. If this option is not selected, the format conversion function will be done using the limited range mode.

config LCD_CAM_ISR_IRAM_SAFE
bool "Execute camera ISR from IRAM"
depends on (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3)
default n
help
If this option is enabled, camera ISR will execute from IRAM.
endmenu
Loading