Example for HistogramEqualization usage
- Author
- MIP
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Common/FileHandling.hh>
#include <Image/HistogramEqualization.hh>
#include <Image/HistogramImage.hh>
#include <iostream>
#include <fstream>
using namespace BIAS;
using namespace std;
{
ofstream outfile("cumulathist.dat");
double sum = 0.0;
for(unsigned b=0;b<256; b++)
{
outfile<<sum<<endl;
}
outfile.close();
}
int main(int argc, char *argv[])
{
if(argc<2)
{
cout<<"usage: "<<argv[0]<<" <image file>"<<endl;
return -1;
}
{
cout<<"can't load "<<argv[1]<<endl;
return -2;
}
string full(argv[1]);
string dir,base,suffix;
HistEq.
Filter(GreyImg,OutPutImg);
WriteCumulativeHistogram(OutPutImg);
return 0;
}