Camera preview image is always the same



  • 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?



  • 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 ?



  • 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



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.