forked from xiaozhi/xiaozhi-esp32
camera 优化:在原有的RGB565处理下,容易超时改为JPEG格式 (#1029)
* camera 优化 feat(camera): 修改摄像头配置为JPEG格式并优化图像处理逻辑 将摄像头输出格式从RGB565改为JPEG以提高传输效率,同时调整JPEG质量为10 重构预览图像处理逻辑,支持直接处理JPEG格式并自动转换为RGB565 优化Explain方法中的JPEG队列处理,减少内存分配和拷贝操作 * 修复代码缩进 调整代码缩进格式以提升可读性 * fix(esp32_camera): 修复RGB565格式预览图像的字节序问题 添加字节交换处理,将大端序转换为小端序,确保预览图像显示正确 * 使用旧的处理方式 * refactor(esp32_camera): 移除preview_buffer_直接使用preview_image_.data
This commit is contained in:
@@ -158,9 +158,9 @@ private:
|
||||
config.pin_pwdn = CAMERA_PIN_PWDN;
|
||||
config.pin_reset = CAMERA_PIN_RESET;
|
||||
config.xclk_freq_hz = XCLK_FREQ_HZ;
|
||||
config.pixel_format = PIXFORMAT_RGB565;
|
||||
config.pixel_format = PIXFORMAT_JPEG;
|
||||
config.frame_size = FRAMESIZE_QVGA;
|
||||
config.jpeg_quality = 12;
|
||||
config.jpeg_quality = 10;
|
||||
config.fb_count = 1;
|
||||
config.fb_location = CAMERA_FB_IN_PSRAM;
|
||||
config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#define CAMERA_PIN_SIOD GPIO_NUM_4
|
||||
#define CAMERA_PIN_PWDN GPIO_NUM_NC
|
||||
#define CAMERA_PIN_RESET GPIO_NUM_NC
|
||||
#define XCLK_FREQ_HZ 20000000
|
||||
#define XCLK_FREQ_HZ 50000000
|
||||
|
||||
|
||||
#define DISPLAY_BACKLIGHT_PIN GPIO_NUM_38
|
||||
|
||||
Reference in New Issue
Block a user