Passing data of captured image in esp32-cam to function in .cpp file
Posted: Wed Oct 27, 2021 11:45 am
Hi everyone, I have this rr.cpp file
and this rr.h file
and this is my .ino file ,
now how can I passing fb = esp_camera_fb_get();
to the function in .cpp to write the output of fb = esp_camera_fb_get();
in file and then do some processing on txt file, can do that and how ?
Code: Select all
#include <iostream>
using namespace std;
#include <fstream>
#include <string>
#include <Arduino.h>
//------------------------------------------
void dosome()
{
ifstream fin("read.txt");
ofstream fcom("write.txt");
//Complete the rest of the code
}
Code: Select all
#define rr_h
#include "Arduino.h"
class rr
{
public:
rr();
void dosome();
};
Code: Select all
// other config
camera_fb_t * fb = NULL;
fb = esp_camera_fb_get();
to the function in .cpp to write the output of fb = esp_camera_fb_get();
in file and then do some processing on txt file, can do that and how ?