[TASK] Complete implementation of piecebased contrast adaption.
This commit is contained in:
parent
c0ed071190
commit
d2efee34ed
|
@ -390,12 +390,12 @@ void ImageViewer::pieceLinearHistogrammAdaption() {
|
||||||
used_space += source_histogramm[source_cursor];
|
used_space += source_histogramm[source_cursor];
|
||||||
source_cursor++;
|
source_cursor++;
|
||||||
}
|
}
|
||||||
|
// If there is no more space, just put it to the last value used. :/
|
||||||
|
// Otherwise, we don't know what to do with some pixels.
|
||||||
|
if(source_histogramm[source_cursor] > (free_total_space - used_space)) {
|
||||||
|
histogramm_map[source_cursor] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0; i<256; i++) {
|
|
||||||
logFile << i << ": " << histogramm_map[i] << std::endl;
|
|
||||||
}
|
}
|
||||||
renewLogging();
|
|
||||||
|
|
||||||
// Apply the map for each pixel.
|
// Apply the map for each pixel.
|
||||||
int h, s, l;
|
int h, s, l;
|
||||||
|
|
Loading…
Reference in New Issue