OpenCV/IPL image format acces and display
- Author
- Woetzel
#include <iostream>
#include <string>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
using namespace std;
using namespace BIAS;
int main( int argc, char** argv )
{
bool darttestNoGui=false;
bool darttestGui=false;
int delay=2000;
string filename( BIAS_TESTS_DATA "r4.jpg" );
if (argc>=2) {
if ((strcmp(argv[1],"-darttest")==0)
|| (strcmp(argv[1],"-darttestnogui")==0) )
{
darttestNoGui=true;
std::cout<<"started dart test (no gui): "<<argv[0]<<std::endl;
} else if (strcmp(argv[1],"-darttestgui")==0) {
darttestGui=true;
delay=500;
std::cout<<"started dart test (with gui): "<<argv[0]<<std::endl;
}
};
if (!darttestNoGui && !darttestGui && (argc>1)) filename=argv[1];
cout<<"error loading image "<<filename<<endl;
return -1;
};
if (!darttestNoGui) {
img.
Display(
"Display",
true,
true,
true, delay );
}
return 0;
}