The entropy of the image was added to the statistics.

This commit is contained in:
Joao Santos committed 2020-12-10 17:16:38 +00:00
1 parent c1cef58de1
commit f6cc0ffd29
5 files changed
+42

No files matched your search

+4
View File
@@ -940,6 +940,10 @@ void HistogramWidget::paintEvent( QPaintEvent* )
double median = frame->getMedian( m_channelType, 0, frame->getNumHistogramSegment() - 1 );
tipText += value.setNum( median, 'f', 1 ) + cellEnd;
tipText += cellBeg + tr( "Entropy:" ) + cellMid;
double entropy = frame->getEntropy( m_channelType, 0, frame->getNumHistogramSegment() - 1 );
tipText += value.setNum( entropy, 'f', 2 ) + cellEnd;
tipText += cellBeg + tr( "Percent:" ) + cellMid;
double percentile = ( pixels > 0 ? ( 100.0 * counts / pixels ) : 0.0 );
tipText += value.setNum( percentile, 'f', 1 ) + cellEnd;