HKUST-Aerial-Robotics / VINS-Mobile

Monocular Visual-Inertial State Estimator on Mobile Phones
GNU General Public License v3.0
1.27k stars 524 forks source link

when and where is the function processImage of ViewController.mm called? #133

Open PapaMadeleine2022 opened 5 years ago

PapaMadeleine2022 commented 5 years ago

Hello, I am a novice and do not know when and where the function processImage of ViewController.mm is called. Can you give some advises ? Thanks.

PapaMadeleine2022 commented 4 years ago

need help..

m3nsr3a commented 4 years ago

@IvyGongoogle It's a callback from OpenCV camera module. Basically, as soon, as you declare a camera delegate

self.videoCamera.delegate = self;

and start capturing

[videoCamera start];

instead of default AV output style, you are going to receive images in OpenCV format(i.e. cv::Mat with 4 Chanels(BGRA)).

However one detail here, is that in current work it appears a patched version of OpenCV seems to be used.

float lowPart = image.at<float>(0,0);
float highPart = image.at<float>(0,1);

Original function, doesn't store timestamps on the borders of images(and all code further seems to take that in account).