Example for condensation algorithm using the color histogram class ,ColorHistogram
#include "StateEstimator/CondensHisto.hh"
#include "Base/ImageUtils/ImageDraw.hh"
#include "Base/Image/ImageBase.hh"
#include "Base/Image/ImageIO.hh"
#include "Base/Image/ImageConvert.hh"
#include "Image/ColorHistogram.hh"
#include "Filter/Rescale.hh"
#include <Base/Common/FileHandling.hh>
#include "math.h"
using namespace BIAS;
using namespace std;
int main(int argc, char** argv)
{
stringstream fileName;
int res = -1;
int binsize=0;
int ux = 341;
int uy = 301;
int lx = 383;
int ly = 353;
if (argc<3)
{
cerr<<"Give a bin width and an image as arguments!"<<endl;
cerr<<"Usage:"<< argv[0] <<" binsize imagefile"<<endl;
return -1;
}
{
cerr<<"Error reading image!"<<endl;
return -1;
}
cerr<<"Image is in HSL colorspace"<<endl;
fileName<<"MeanImage.mip";
binsize = atoi(argv[1]);
int n =2;
while(n<argc){
{
cerr<<"Error reading image!"<<endl;
return -1;
}
cout<<"Image: "<<n<<" imported."<<endl;
cerr<<"Image is in HSL colorspace"<<endl;
stringstream samplesName;
stringstream meanName;
cout<<"after Process()"<<endl;
n++;
}
}