ESP32-CAM移植和使用经验分享


前言

之前我将爱智官方的代码移植到了 arduino 上,详细可见arduino 天下第一(暴论) – 智能猫眼与 SDDC 连接器移植到 arduino 上
在这过程中我踩了一些坑,在这里和大家分享一下。


arduino 操作接口

arduino 官方提供demo已经封装很好了,只用调用一个函数就能完成拍摄上传等一系列操作,但是如果这个接口不符合我们的需求,就只能自己同时改改了。

通过下面的连接可以看到 ESP32-CAM 底层的东西一些接口

https://github.com/espressif/arduino-esp32/releases/tag/2.0.2

或者你已经安装了 ESP32-CAM 相关库后可以去:

C:\Users\123456\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5\tools\sdk\include\esp32-camera

可以看到一个 esp_camera.h 文件,里面有一些可以用到的接口和结构体。

/**
 * @brief Data structure of camera frame buffer
 */
typedef struct {
   
   
    uint8_t * buf;              /*!< Pointer to the pixel data */       // 这就是摄像头拍下来的数据
    size_t len;                 /*!< Length of the buffer in bytes */
    size_t width;               /*!< Width of the buffer in pixels */
    size_t height;              /*!< Height of the buffer in pixels */
    pixformat_t format;         /*!< Format of the pixel data */
    struct timeval timestamp;   /*!< Timestamp since boot of the fir
评论 4
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值