jfjoch_viewer: Auto foreground uses 99% of pixels

This commit is contained in:
2025-12-12 15:39:01 +01:00
parent 01adfa342b
commit a124b14f9a
2 changed files with 3 additions and 3 deletions

View File

@@ -130,7 +130,7 @@ void JFJochReaderImage::ProcessInputImage(const void *data, size_t npixel, int64
}
}
auto_foreground = count_histogram.Percentile(99.9).value_or(10);
auto_foreground = count_histogram.Percentile(auto_foreground_range).value_or(10);
// Export top pixels (already sorted descending) into the existing vector interface
for (int i = 0; i < top_pixels_acc.Size(); i++) {
@@ -232,7 +232,7 @@ void JFJochReaderImage::AddImage(const JFJochReaderImage &other) {
}
}
auto_foreground = count_histogram.Percentile(99.9).value_or(10);
auto_foreground = count_histogram.Percentile(auto_foreground_range).value_or(10);
for (int i = 0; i < top_pixels_acc.Size(); i++) {
const auto &e = top_pixels_acc[i];