Unsolved How to use colorFilter, negative, Whiteboard, . . . qml camera on Android? is that a Qt Bug?
-
I try to add some feature to Qt 5.9 example, declarative-camera . . .
https://doc.qt.io/qt-5/qtmultimedia-multimedia-declarative-camera-example.htmlso i added below code to this file :
https://doc.qt.io/qt-5/qtmultimedia-multimedia-declarative-camera-photocapturecontrols-qml.html//this button works well. CameraButton { text: "Tungsten" onClicked: captureControls.camera.imageProcessing.setWhiteBalanceMode(CameraImageProcessing.WhiteBalanceTungsten) } //this button is not work! CameraButton { text: "Negative" onClicked: captureControls.camera.imageProcessing.setColorFilter(CameraImageProcessing.ColorFilterNegative) } //this button is not work! CameraButton { text: "contrast" onClicked: captureControls.camera.imageProcessing.setContrast(1.0) }
why the buttons is not work? is that a Qt Bug?
i think setColorFilter and setContrast functions is not working on android camera.
i tested the result on Android 5.0 -
@aqamorisny This is not told explicitly in the documentation but I think it's evident that it's hardware/firmware dependent. But I find it odd that it's really not documented and there's no way to find out what is supported.
Have you tried to read and print the settings inside onClicked? Retrieve the enum, console.log it, try setting it, retrieve and log it. Has it changed? If not, it's possible that it's not supported by the device. If it's changed, it's still possible it's not supported but Qt doesn't know it.
-
Hi,
AFAIK, you can check that with the C++ QCameraImageProcessing class but it doesn't seem to be the case with QML.
-
@SGaist , tanx, how to check the errors on real device?
run debug mode apk create any log file? -
The quick way would be to instantiate a QCamera in your main.cpp, get the QCameraImageProcessing object associated with it and then send these informations to the QML side.
-
@SGaist That could be a quick way if the effects work... I recall trying some of those (with Qt 5.8) last winter and they didn't work with QCamera.
-
These are plugin dependent and also likely hardware dependent. Not all platforms provide the same level of controls.
-
@SGaist @mvuori @Eeli-K
I posted the issue as a Bug in bug reports:https://bugreports.qt.io/browse/QTBUG-62788
many tanx