Hi, I am currently doing a project regarding image processing. I had facing problem writing C++ code to calculate time taken to execute a function.
Can somebody help me on this. thanks.
#include "picture.h"
#include <iostream>
using namespace std;
int main()
{
int i;
int cnt = 0;
colour_picture_of_<unsigned char> in(240,320);
colour_picture_of_<unsigned char> out(240,320);
in.show("Input",0);
out.show("Output",0);
in.attach_camera();// Connect the picture to the camera
in.request_frame(); // Request frame
**************Start timer**************************
for (i = 1; i <= 10; i++ )
{
cout << "Frame " << cnt++ << endl;
}
**************End timer**************************