QCameraImageProcessingclass provides an interface for image processing related camera settings. 更多 …
def
brightness
()
def
colorFilter
()
def
contrast
()
def
denoisingLevel
()
def
isAvailable
()
def
isColorFilterSupported
(filter)
def
isWhiteBalanceModeSupported
(mode)
def
manualWhiteBalance
()
def
saturation
()
def
setBrightness
(value)
def
setColorFilter
(filter)
def
setContrast
(value)
def
setDenoisingLevel
(value)
def
setManualWhiteBalance
(colorTemperature)
def
setSaturation
(value)
def
setSharpeningLevel
(value)
def
setWhiteBalanceMode
(mode)
def
sharpeningLevel
()
def
whiteBalanceMode
()
After capturing the data for a camera frame, the camera hardware and software performs various image processing tasks to produce a final image. This includes compensating for ambient light color, reducing noise, as well as making some other adjustments to the image.
You can retrieve this class from an instance of a
QCamera对象。For example, you can set the white balance (or color temperature) used for processing images:
camera = new QCamera; QCameraImageProcessing *imageProcessing = camera->imageProcessing(); if (imageProcessing->isAvailable()) { imageProcessing->setWhiteBalanceMode(QCameraImageProcessing::WhiteBalanceFluorescent); }Or adjust the amount of denoising performed:
imageProcessing->setDenoisingLevel(-0.3); //reduce the amount of denoising appliedIn some cases changing these settings may result in a longer delay before an image is ready.
For more information on image processing of camera frames, see Camera Image Processing .
PySide2.QtMultimedia.QCameraImageProcessing.
WhiteBalanceMode
¶
|
常量 |
描述 |
|---|---|
|
QCameraImageProcessing.WhiteBalanceAuto |
Auto white balance mode. |
|
QCameraImageProcessing.WhiteBalanceManual |
Manual white balance. In this mode the white balance should be set with
|
|
QCameraImageProcessing.WhiteBalanceSunlight |
Sunlight white balance mode. |
|
QCameraImageProcessing.WhiteBalanceCloudy |
Cloudy white balance mode. |
|
QCameraImageProcessing.WhiteBalanceShade |
Shade white balance mode. |
|
QCameraImageProcessing.WhiteBalanceTungsten |
Tungsten (incandescent) white balance mode. |
|
QCameraImageProcessing.WhiteBalanceFluorescent |
Fluorescent white balance mode. |
|
QCameraImageProcessing.WhiteBalanceFlash |
Flash white balance mode. |
|
QCameraImageProcessing.WhiteBalanceSunset |
Sunset white balance mode. |
|
QCameraImageProcessing.WhiteBalanceVendor |
Base value for vendor defined white balance modes. |
PySide2.QtMultimedia.QCameraImageProcessing.
ColorFilter
¶
|
常量 |
描述 |
|---|---|
|
QCameraImageProcessing.ColorFilterNone |
No filter is applied to images. |
|
QCameraImageProcessing.ColorFilterGrayscale |
A grayscale filter. |
|
QCameraImageProcessing.ColorFilterNegative |
A negative filter. |
|
QCameraImageProcessing.ColorFilterSolarize |
A solarize filter. |
|
QCameraImageProcessing.ColorFilterSepia |
A sepia filter. |
|
QCameraImageProcessing.ColorFilterPosterize |
A posterize filter. |
|
QCameraImageProcessing.ColorFilterWhiteboard |
A whiteboard filter. |
|
QCameraImageProcessing.ColorFilterBlackboard |
A blackboard filter. |
|
QCameraImageProcessing.ColorFilterAqua |
An aqua filter. |
|
QCameraImageProcessing.ColorFilterVendor |
The base value for vendor defined filters. |
PySide2.QtMultimedia.QCameraImageProcessing.
brightness
(
)
¶
qreal
Returns the brightness adjustment setting.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
colorFilter
(
)
¶
Returns the color filter which will be applied to image data captured by the camera.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
contrast
(
)
¶
qreal
Returns the contrast adjustment setting.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
denoisingLevel
(
)
¶
qreal
Returns the denoising adjustment level.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
isAvailable
(
)
¶
bool
Returns true if image processing related settings are supported by this camera.
PySide2.QtMultimedia.QCameraImageProcessing.
isColorFilterSupported
(
filter
)
¶
filter
–
ColorFilter
bool
Returns true if a color
filter
is supported.
PySide2.QtMultimedia.QCameraImageProcessing.
isWhiteBalanceModeSupported
(
mode
)
¶
mode
–
WhiteBalanceMode
bool
Returns true if the white balance
mode
is supported.
PySide2.QtMultimedia.QCameraImageProcessing.
manualWhiteBalance
(
)
¶
qreal
Returns the current color temperature if the current white balance mode is
WhiteBalanceManual
. For other modes the return value is undefined.
PySide2.QtMultimedia.QCameraImageProcessing.
saturation
(
)
¶
qreal
Returns the saturation adjustment value.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
setBrightness
(
value
)
¶
value
–
qreal
Set the brightness adjustment to
value
.
Valid brightness adjustment values range between -1.0 and 1.0, with a default of 0.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
setColorFilter
(
filter
)
¶
filter
–
ColorFilter
Sets the color
filter
which will be applied to image data captured by the camera.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
setContrast
(
value
)
¶
value
–
qreal
Set the contrast adjustment to
value
.
Valid contrast adjustment values range between -1.0 and 1.0, with a default of 0.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
setDenoisingLevel
(
value
)
¶
value
–
qreal
Sets the denoising adjustment
level
.
Valid denoising values range between -1.0 and 1.0, with a default of 0.
If the parameter value is set to 0, the amount of denoising applied is selected by camera and depends on camera capabilities and settings. Changing value in -1.0..1.0 range adjusts the amount of denoising applied within the supported range.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
setManualWhiteBalance
(
colorTemperature
)
¶
colorTemperature
–
qreal
Sets manual white balance to
colorTemperature
. This is used when
whiteBalanceMode()
is set to
WhiteBalanceManual
. The units are Kelvin.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
setSaturation
(
value
)
¶
value
–
qreal
Sets the saturation adjustment value to
value
.
Valid saturation values range between -1.0 and 1.0, with a default of 0.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
setSharpeningLevel
(
value
)
¶
value
–
qreal
Sets the sharpening adjustment
level
.
Valid sharpening values range between -1.0 and 1.0, with a default of 0.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
setWhiteBalanceMode
(
mode
)
¶
mode
–
WhiteBalanceMode
Sets the white balance to
mode
.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
sharpeningLevel
(
)
¶
qreal
Returns the sharpening adjustment level.
另请参阅
PySide2.QtMultimedia.QCameraImageProcessing.
whiteBalanceMode
(
)
¶
Returns the white balance mode being used.