Hi,
I have been playing around with the cameraweb example. But what i need is not the webservercam application, i only need to get red , blue and green value of each pixel to do some simple real time image processing . Any tip or help in how to get his buffer data?
Thank you in advance.
Franco
ESP32 CAM real time image processing.
Re: ESP32 CAM real time image processing.
* @brief Convert image buffer to RGB888 buffer (used for face detection)
*
* @param src Source buffer in JPEG, RGB565, RGB888, YUYV or GRAYSCALE format
* @param src_len Length in bytes of the source buffer
* @param format Format of the source image
* @param rgb_buf Pointer to the output buffer (width * height * 3)
*
* @return true on success
*/
bool fmt2rgb888(const uint8_t *src_buf, size_t src_len, pixformat_t format, uint8_t * rgb_buf);
I'm trying with this method, what is the RGB values order in rgb_buf?, the first 3 values are the RGB values for pixel 0,0?, and the next 3 values are the RGB values for pixel 0,1 and so on?. Thank you.
*
* @param src Source buffer in JPEG, RGB565, RGB888, YUYV or GRAYSCALE format
* @param src_len Length in bytes of the source buffer
* @param format Format of the source image
* @param rgb_buf Pointer to the output buffer (width * height * 3)
*
* @return true on success
*/
bool fmt2rgb888(const uint8_t *src_buf, size_t src_len, pixformat_t format, uint8_t * rgb_buf);
I'm trying with this method, what is the RGB values order in rgb_buf?, the first 3 values are the RGB values for pixel 0,0?, and the next 3 values are the RGB values for pixel 0,1 and so on?. Thank you.
Re: ESP32 CAM real time image processing.
Yes, it's the format as you have said.FrankIQ wrote: * @brief Convert image buffer to RGB888 buffer (used for face detection)
*
* @param src Source buffer in JPEG, RGB565, RGB888, YUYV or GRAYSCALE format
* @param src_len Length in bytes of the source buffer
* @param format Format of the source image
* @param rgb_buf Pointer to the output buffer (width * height * 3)
*
* @return true on success
*/
bool fmt2rgb888(const uint8_t *src_buf, size_t src_len, pixformat_t format, uint8_t * rgb_buf);
I'm trying with this method, what is the RGB values order in rgb_buf?, the first 3 values are the RGB values for pixel 0,0?, and the next 3 values are the RGB values for pixel 0,1 and so on?. Thank you.
Re: ESP32 CAM real time image processing.
Thank you very usefull =). I love this module cam.ESP_GXC wrote: ↑Thu Jun 20, 2019 2:48 amYes, it's the format as you have said.FrankIQ wrote: * @brief Convert image buffer to RGB888 buffer (used for face detection)
*
* @param src Source buffer in JPEG, RGB565, RGB888, YUYV or GRAYSCALE format
* @param src_len Length in bytes of the source buffer
* @param format Format of the source image
* @param rgb_buf Pointer to the output buffer (width * height * 3)
*
* @return true on success
*/
bool fmt2rgb888(const uint8_t *src_buf, size_t src_len, pixformat_t format, uint8_t * rgb_buf);
I'm trying with this method, what is the RGB values order in rgb_buf?, the first 3 values are the RGB values for pixel 0,0?, and the next 3 values are the RGB values for pixel 0,1 and so on?. Thank you.
Re: ESP32 CAM real time image processing.
hello, could you send me code? i cant work with that buffer functions . many thanks
Re: ESP32 CAM real time image processing.
Hi,
In case of use/interest I have recently been experimenting with getting RGB data from the camera and I have a sketch which does this and I hope clearly demonstrates how.
BTW - It seems the data is stored in reverse order (i.e. first blue then green then red)
Also you may want to disable auto white balance as this confused me for a while as if you put a solid colour in front of the camera it just tries to adjust it to white - lol
see: https://github.com/alanesq/esp32cam-demo
The procedure for reading RGB is "readRGBImage()"
In case of use/interest I have recently been experimenting with getting RGB data from the camera and I have a sketch which does this and I hope clearly demonstrates how.
BTW - It seems the data is stored in reverse order (i.e. first blue then green then red)
Also you may want to disable auto white balance as this confused me for a while as if you put a solid colour in front of the camera it just tries to adjust it to white - lol
see: https://github.com/alanesq/esp32cam-demo
The procedure for reading RGB is "readRGBImage()"
Who is online
Users browsing this forum: No registered users and 125 guests