Skip to content

esp_camera_fb_get获取的不是最新的一帧,而是最新一帧的上一帧图像? #735

Open
@zhoumiaomiao

Description

@zhoumiaomiao

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

条件:使用sc031gs trigger mode,当trigger信号发起之后,调用esp_camera_fb_get()可以获取该trigger时刻的图像

Actual behavior (suspected bug)

条件:使用sc031gs trigger mode,当trigger信号发起之后,按理说调用esp_camera_fb_get()可以获取trigger时刻的图像,但是发现获取到的图像是上一次trigger时刻的图像。
主控模组:esp32s3
第一次发起trigger之后,调用esp_camera_fb_get()没有图像,第二次发起trigger之后,调用esp_camera_fb_get可以获取图像,但是是第一次trigger时刻的图像,第三次发起trigger之后,调用esp_camera_fb_get可以获取图像,但是是第二次trigger时刻的图像..........esp_camera_fb_get获取到的永远是上一次trigger的图像

Error logs or terminal output

Steps to reproduce the behavior

主控模组:esp32s3 使用sc031gs trigger mode
camera配置如下:
static camera_config_t camera_config = {
.pin_pwdn = CAM_PIN_PWDN,
.pin_reset = CAM_PIN_RESET,
.pin_xclk = CAM_PIN_XCLK,
.pin_sscb_sda = CAM_PIN_SIOD,
.pin_sscb_scl = CAM_PIN_SIOC,

.pin_d7 = CAM_PIN_D7,
.pin_d6 = CAM_PIN_D6,
.pin_d5 = CAM_PIN_D5,
.pin_d4 = CAM_PIN_D4,
.pin_d3 = CAM_PIN_D3,
.pin_d2 = CAM_PIN_D2,
.pin_d1 = CAM_PIN_D1,
.pin_d0 = CAM_PIN_D0,
.pin_vsync = CAM_PIN_VSYNC,
.pin_href = CAM_PIN_HREF,
.pin_pclk = CAM_PIN_PCLK,
//XCLK 6MHz for sc031gs
.xclk_freq_hz = 6000000,
.ledc_timer = LEDC_TIMER_0,
.ledc_channel = LEDC_CHANNEL_0,
.pixel_format = PIXFORMAT_GRAYSCALE, //YUV422,GRAYSCALE,RGB565,JPEG
.frame_size = FRAMESIZE_VGA,    //QQVGA-UXGA Do not use sizes above QVGA when not JPEG
// .jpeg_quality = 12, //0-63 lower number means higher quality
.fb_count = 3,       //if more than one, i2s runs in continuous mode. Use only with JPEG
.fb_location = CAMERA_FB_IN_PSRAM,
.grab_mode = CAMERA_GRAB_LATEST,

};
1、第一次发起trigger之后,调用esp_camera_fb_get()没有图像;
2、第二次发起trigger之后,调用esp_camera_fb_get可以获取图像,但是是第一次trigger时刻的图像;
3、第三次发起trigger之后,调用esp_camera_fb_get可以获取图像,但是是第二次trigger时刻的图像..........
esp_camera_fb_get获取到的永远是上一次trigger的图像

Project release version

esp-idf-v5.2.1

System architecture

Intel/AMD 64-bit (modern PC, older Mac)

Operating system

Windows

Operating system version

windows11

Shell

CMD

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions