QCameraImageProcessing Class
The QCameraImageProcessing class provides an interface for image processing related camera settings. More...
Header: | #include <QCameraImageProcessing> |
qmake: | QT += multimedia |
Inherits: | QObject. |
Public Types
enum | WhiteBalanceMode { WhiteBalanceAuto, WhiteBalanceManual, WhiteBalanceSunlight, WhiteBalanceCloudy, ..., WhiteBalanceVendor } |
Public Functions
qreal | contrast() const |
qreal | denoisingLevel() const |
bool | isAvailable() const |
bool | isWhiteBalanceModeSupported(WhiteBalanceMode mode) const |
qreal | manualWhiteBalance() const |
qreal | saturation() const |
void | setContrast(qreal value) |
void | setDenoisingLevel(qreal level) |
void | setManualWhiteBalance(qreal colorTemperature) |
void | setSaturation(qreal value) |
void | setSharpeningLevel(qreal level) |
void | setWhiteBalanceMode(WhiteBalanceMode mode) |
qreal | sharpeningLevel() const |
WhiteBalanceMode | whiteBalanceMode() const |
- 31 public functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 11 static public members inherited from QObject
- 9 protected functions inherited from QObject
Detailed Description
The QCameraImageProcessing class provides an interface for image processing related camera settings.
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 object.
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 applied
In 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.
See also QCameraImageProcessingControl.
Member Type Documentation
enum QCameraImageProcessing::WhiteBalanceMode
Constant | Value | Description |
---|---|---|
QCameraImageProcessing::WhiteBalanceAuto | 0 | Auto white balance mode. |
QCameraImageProcessing::WhiteBalanceManual | 1 | Manual white balance. In this mode the white balance should be set with setManualWhiteBalance() |
QCameraImageProcessing::WhiteBalanceSunlight | 2 | Sunlight white balance mode. |
QCameraImageProcessing::WhiteBalanceCloudy | 3 | Cloudy white balance mode. |
QCameraImageProcessing::WhiteBalanceShade | 4 | Shade white balance mode. |
QCameraImageProcessing::WhiteBalanceTungsten | 5 | Tungsten (incandescent) white balance mode. |
QCameraImageProcessing::WhiteBalanceFluorescent | 6 | Fluorescent white balance mode. |
QCameraImageProcessing::WhiteBalanceFlash | 7 | Flash white balance mode. |
QCameraImageProcessing::WhiteBalanceSunset | 8 | Sunset white balance mode. |
QCameraImageProcessing::WhiteBalanceVendor | 1000 | Base value for vendor defined white balance modes. |
Member Function Documentation
qreal QCameraImageProcessing::contrast() const
Returns the contrast adjustment setting.
See also setContrast().
qreal QCameraImageProcessing::denoisingLevel() const
Returns the denoising adjustment level.
See also setDenoisingLevel().
bool QCameraImageProcessing::isAvailable() const
Returns true if image processing related settings are supported by this camera.
bool QCameraImageProcessing::isWhiteBalanceModeSupported(WhiteBalanceMode mode) const
Returns true if the white balance mode is supported.
qreal QCameraImageProcessing::manualWhiteBalance() const
Returns the current color temperature if the current white balance mode is WhiteBalanceManual
. For other modes the return value is undefined.
See also setManualWhiteBalance().
qreal QCameraImageProcessing::saturation() const
Returns the saturation adjustment value.
See also setSaturation().
void QCameraImageProcessing::setContrast(qreal value)
Set the contrast adjustment to value.
Valid contrast adjustment values range between -1.0 and 1.0, with a default of 0.
See also contrast().
void QCameraImageProcessing::setDenoisingLevel(qreal level)
Sets the denoising adjustment level.
Valid sharpening 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.
See also denoisingLevel().
void QCameraImageProcessing::setManualWhiteBalance(qreal colorTemperature)
Sets manual white balance to colorTemperature. This is used when whiteBalanceMode() is set to WhiteBalanceManual
. The units are Kelvin.
See also manualWhiteBalance().
void QCameraImageProcessing::setSaturation(qreal value)
Sets the saturation adjustment value to value.
Valid saturation values range between -1.0 and 1.0, with a default of 0.
See also saturation().
void QCameraImageProcessing::setSharpeningLevel(qreal level)
Sets the sharpening adjustment level.
Valid sharpening values range between -1.0 and 1.0, with a default of 0.
See also sharpeningLevel().
void QCameraImageProcessing::setWhiteBalanceMode(WhiteBalanceMode mode)
Sets the white balance to mode.
See also whiteBalanceMode().
qreal QCameraImageProcessing::sharpeningLevel() const
Returns the sharpening adjustment level.
See also setSharpeningLevel().
WhiteBalanceMode QCameraImageProcessing::whiteBalanceMode() const
Returns the white balance mode being used.
See also setWhiteBalanceMode().
© 2015 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.