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("Outpu t",0);
in.attach_camer a();// Connect the picture to the camera
in.request_fram e(); // Request frame
**************S tart timer********** *************** *
for (i = 1; i <= 10; i++ )
{
cout << "Frame " << cnt++ << endl;
}
**************E nd timer********** *************** *