-
Notifications
You must be signed in to change notification settings - Fork 3
Applying CLAHE
Raphael Kim edited this page Mar 9, 2017
·
2 revisions
- librawprocessor now supports CLAHE
- Original code by Karel Zuiderveld, [email protected] in "Graphics Gems IV", Academic Press, 1994
- Raphael Kim ( [email protected], [email protected] )
RAWProcessor* rawp1 = new RAWProcessor( "test_3072h.img", 3072 );
if ( rawp1 != NULL )
{
if ( rawp1->Loaded() == true )
{
RAWProcessor::WeightAnalysisReport wreport;
wreport.threshold_wide_max = rawp1->MaximumLevel();
wreport.threshold_wide_min = 0;
unsigned maxv = rawp1->MaximumLevel() + 1;
if ( rawp1->ApplyCLAHE( wreport, 8, maxv , 50.0f ) == true )
{
printf("CLAHE success.\n");
rawp1->SaveToFile( "out_clahe_3072h.img" );
}
else
{
printf("CLAHE failure.\n");
}
}
else
{
printf("Failure: file not loaded.\n");
}
delete rawp1;
}
else
{
printf("Error.\n");
}