9#ifndef KIS_AUTO_LEVELS_H
10#define KIS_AUTO_LEVELS_H
17#include <kritaimage_export.h>
65 qreal shadowsClipping,
66 qreal highlightsClipping);
74 qreal shadowsClipping,
75 qreal highlightsClipping);
96qreal KRITAIMAGE_EXPORT
getGamma(qreal blackPoint,
99 qreal outputIntensity);
130 qreal shadowsClipping,
131 qreal highlightsClipping,
132 qreal maximumInputBlackAndWhiteOffset,
134 qreal midtonesAdjustmentAmount,
166 qreal shadowsClipping,
167 qreal highlightsClipping,
168 qreal maximumInputBlackAndWhiteOffset,
170 qreal midtonesAdjustmentAmount,
This namespace contains functions to compute the levels adjustment parameters automatically from a hi...
QPair< KoColor, KoColor > getDarkestAndWhitestColors(const KisPaintDeviceSP device, qreal shadowsClipping, qreal highlightsClipping)
Finds the darkest and whitest colors in the device having into account the clipping.
QVector< KisLevelsCurve > adjustMonochromaticContrast(ChannelHistogram lightnessHistogram, QVector< ChannelHistogram > &channelsHistograms, qreal shadowsClipping, qreal highlightsClipping, qreal maximumInputBlackAndWhiteOffset, MidtonesAdjustmentMethod midtonesAdjustmentMethod, qreal midtonesAdjustmentAmount, const QVector< qreal > &outputBlackPoints, const QVector< qreal > &outputWhitePoints, const QVector< qreal > &outputMidtones)
Creates a KisLevelsCurve for every channel in "channelsHistograms". Computes the input black and whit...
QVector< KisLevelsCurve > adjustPerChannelContrast(QVector< ChannelHistogram > &channelsHistograms, qreal shadowsClipping, qreal highlightsClipping, qreal maximumInputBlackAndWhiteOffset, MidtonesAdjustmentMethod midtonesAdjustmentMethod, qreal midtonesAdjustmentAmount, const QVector< qreal > &outputBlackPoints, const QVector< qreal > &outputWhitePoints, const QVector< qreal > &outputMidtones)
Creates a KisLevelsCurve for every channel in "channelsHistograms". Computes the input black and whit...
MidtonesAdjustmentMethod
The different methods to enhance the mid tones.
@ MidtonesAdjustmentMethod_None
@ MidtonesAdjustmentMethod_UseMedian
@ MidtonesAdjustmentMethod_UseMean
qreal getGamma(qreal blackPoint, qreal whitePoint, qreal inputIntensity, qreal outputIntensity)
Computes a gamma value that "moves" the input midpoint towards the output midpoint.
QPair< qreal, qreal > getInputBlackAndWhitePoints(ChannelHistogram histogram, qreal shadowsClipping, qreal highlightsClipping)
Takes a reference histogram (luma, lightness) and computes the black and white points to maximize the...
ShadowsAndHighlightsAdjustmentMethod
The different methods to enhance the contrast.
@ ShadowsAndHighlightsAdjustmentMethod_PerChannelContrast
@ ShadowsAndHighlightsAdjustmentMethod_MonochromaticContrast
Convenience class that associates a KisHistogram and a channel index. This is useful because setting ...