Example for HistogramImage usage: sort values in bins, etc...
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/ImageUtils/ImageDraw.hh>
#include <Base/Math/Random.hh>
#include <Image/HistogramImage.hh>
#include <iostream>
using namespace BIAS;
using namespace std;
int main(int argc, char *argv[])
{
int res, binc=256;
if (argc <3) {
cerr<< argv[0] <<" <pgm file> <pgm file2>"<<endl;
exit(1);
}
cerr << "error loading file " << argv[1] << " " << res << endl;
exit (-1);
}
cerr << "wrong channel count in image"<< endl;
}
cerr << "error loading file " << argv[2] << " " << res << endl;
exit (-1);
}
vector<double> h3;
for (int i=0; i<1024; i++){
for(int j=0; j<1000; j++)
}
unsigned st[2], end[2];
double dst[2]={0, 1000}, dend[2];
dend[0] = (double)binc; dend[1] = 1000;
unsigned char col[]={255, 0, 255};
dst[0]=0; dend[0]=binc;
for (int i=1000; i<15000; i+=1000){
dst[1]=dend[1]=i;
cerr <<"drawing "<<st[0]<<", "<<st[1]<<" -> "<<end[0]<<", "<<end[1]<<endl;
}
BIASERR("error writing");
}
vector<unsigned> xd, yd;
unsigned char *id1, *id2;
for (unsigned i=0; i<pc; i++) {
xd.push_back((unsigned)id1[i]);
yd.push_back((unsigned)id2[i]);
}
BIASERR("error writing");
}
return 0;
}