Example for usage of ContourDetectorBSpline Usage: ContourDetectorBSpline example.ppm press f for fitting" <im1> [ <im2> <im3> ... ]
- Author
- MIP
#include "../ContourDetectorBSpline.hh"
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/Image.hh>
#include <string>
unsigned char blue_[3]={0,0,255};
unsigned char red_[3]={255,0,0};
void fit(){
bspline_.
Fit(imgGrey_,0.001,50);
}
void loadInputImage(char *imgloc){
}
int main(int argc, char *argv[])
{
std::cout<<"WARNING: Not working example!!! "<<std::endl;
if(argc==1){
std::cout<< "usage: " << argv[0] << " example.ppm" << std::endl <<
" press f for fitting" << std::endl << std::flush;
exit(EXIT_FAILURE);
}
loadInputImage(argv[1]);
std::cout<<"Loaded input images"<<std::endl;
std::vector<unsigned int> mPnts(5,1);
Q[0]=38;
Q[1]=118;
Q[2]=133;
Q[3]=71;
Q[4]=27;
Q[5]=125;
Q[6]=128;
Q[7]=45;
Q[8]=11;
Q[9]=77;
std::cout<<"Initing curve:"<<std::endl;
std::cout<<"Inited curve:"<<std::endl;
std::cout<<"Drawn curve:"<<std::endl;
return 0;
}