Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Camera preview image is always the same
Forum Updated to NodeBB v4.3 + New Features

Camera preview image is always the same

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.0k 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.
  • S Offline
    S Offline
    strekazoid
    wrote on last edited by
    #1

    I'm using Camera element for capturing images on Symbian phone:

    @ Camera {
    id: camera
    x: 0
    y: 100
    width: 360
    height: 360
    z: 1
    focus: visible //to receive focus and capture key events
    captureResolution : "480x480"
    whiteBalanceMode: Camera.WhiteBalanceAuto

        onImageCaptured : {
            previewImage.source = preview
            previewImage.visible = true
    
        }@
    

    On image captured preview image is displayed. The problem is that when you capture second image, preview from the previous take is displayed. Preview image is basically always the same, though the saved image is changing. I wonder how this can be fixed?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mankonit
      wrote on last edited by
      #2

      Old post,but same problem here with Qt 5.3.2 on android.
      I cant believe this huge problem exists (or is real) for a so long time !
      Does anyone have an idea ?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mankonit
        wrote on last edited by
        #3

        Problem is reproduced with following qml code, executed on android 4.2.1.
        To be added in .pro:
        @QT += core qml quick multimedia@

        Main.qml :
        @import QtQuick 2.3
        import QtQuick.Window 2.2
        import QtMultimedia 5.0

        Window {
        id: mainWindow
        visible: true
        Rectangle{
        id: mainRectangle
        anchors.fill: parent
        MouseArea {
        anchors.fill: parent
        onClicked: {
        if (mainRectangle.state === '') {
        camera.imageCapture.capture();
        }
        else {
        mainRectangle.state = '';
        }
        }
        }
        Camera {
        id: camera
        exposure.exposureMode: Camera.ExposureAuto
        focus.focusMode: Camera.FocusContinuous
        imageCapture {
        onImageCaptured: {
        photoPreview.source = preview;
        mainRectangle.state = 'static';
        }
        }
        }
        VideoOutput {
        id:videoOutput
        anchors.fill: parent
        source: camera
        orientation: 270
        visible : mainRectangle.state === ''
        }
        Image {
        id: photoPreview
        fillMode: Image.PreserveAspectFit
        anchors.fill: parent
        visible: mainRectangle.state === 'static'
        cache: false
        }
        states: [
        State {
        name: "static"
        }
        ]
        }
        }
        @

        First tap will display correct preview, but next ones will always display the same.
        Help would really be appreciated !

        Regards
        MK

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mankonit
          wrote on last edited by
          #4

          any help on this issue ?
          I've submitted a bug, but no news as well on that site :
          https://bugreports.qt-project.org/browse/QTBUG-41442

          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