Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to use colorFilter, negative, Whiteboard, . . . qml camera on Android? is that a Qt Bug?
Forum Updated to NodeBB v4.3 + New Features

How to use colorFilter, negative, Whiteboard, . . . qml camera on Android? is that a Qt Bug?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
8 Posts 4 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • aqamorisnyA Offline
    aqamorisnyA Offline
    aqamorisny
    wrote on last edited by aqamorisny
    #1

    I try to add some feature to Qt 5.9 example, declarative-camera . . .
    https://doc.qt.io/qt-5/qtmultimedia-multimedia-declarative-camera-example.html

    so 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

    E 1 Reply Last reply
    0
    • aqamorisnyA aqamorisny

      I try to add some feature to Qt 5.9 example, declarative-camera . . .
      https://doc.qt.io/qt-5/qtmultimedia-multimedia-declarative-camera-example.html

      so 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

      E Offline
      E Offline
      Eeli K
      wrote on last edited by
      #2

      @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.

      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        AFAIK, you can check that with the C++ QCameraImageProcessing class but it doesn't seem to be the case with QML.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        aqamorisnyA 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          AFAIK, you can check that with the C++ QCameraImageProcessing class but it doesn't seem to be the case with QML.

          aqamorisnyA Offline
          aqamorisnyA Offline
          aqamorisny
          wrote on last edited by
          #4

          @SGaist , tanx, how to check the errors on real device?
          run debug mode apk create any log file?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            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.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            M 1 Reply Last reply
            0
            • SGaistS SGaist

              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.

              M Offline
              M Offline
              mvuori
              wrote on last edited by
              #6

              @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.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                These are plugin dependent and also likely hardware dependent. Not all platforms provide the same level of controls.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • aqamorisnyA Offline
                  aqamorisnyA Offline
                  aqamorisny
                  wrote on last edited by aqamorisny
                  #8

                  @SGaist @mvuori @Eeli-K
                  I posted the issue as a Bug in bug reports:

                  https://bugreports.qt.io/browse/QTBUG-62788

                  many tanx

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved