Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Camera: Timelapse, file names, Exif data?

    Reply
    fpe | # 1 | 2012-04-01, 21:27 | Report

    Hi,

    I am trying to create a simple time lapse app for my N9.
    The primary camera should take a photo every 10 seconds and save it to "hard disk".

    The code below is working, the pictures are saved to /home/user/MyDocs/DCIM/img_%04d.jpg
    But: After some time, depending on resolution and interval, the app (sometimes even the phone) freezes and does not respond anymore.
    Watching the memory usage, I figured that the memory (RAM) continuously gets fuller while the app is running. It seems like the pictures are not just saved to file, but also are kept in memory, causing the app to crash.

    Did I miss something?
    Is there a better way to save the Pictures *without* keeping them in memory?
    And how can I manually define file names / save locations?
    How can I add EXIF information like GPS positions?

    Here is my QML code:
    Code:
    import QtQuick 1.1
    import com.nokia.meego 1.0
    import QtMultimediaKit 1.1
    import "file:///usr/lib/qt4/imports/com/meego/UIConstants.js" as UIConstants
    
    PageStackWindow {
       id: appWindow
    
       initialPage: mainPage
    
       Page {
           id: mainPage
           Component.onCompleted: {
               theme.inverted = true
           }
    
           Camera {
              id: primaryCamera
              focus: visible
              anchors.centerIn:  parent
              width: parent.width / 2
              height: parent.height / 2
              captureResolution: "1280x720"
              exposureMode: Camera.ExposureAuto
              flashMode: Camera.FlashOff
              onImageCaptured: debuglabel.text = "Image saved! " + Date().toString()
              onCaptureFailed: debuglabel.text = "ERROR!" + Date().toString()
           }
    
           Label {
               id: debuglabel
               text: "I'm the debug label"
           }
    
           Timer {
               interval: 10000;
               running: true;
               repeat: true
               onTriggered: {
                   debuglabel.text = Date().toString();
                   primaryCamera.captureImage();
               }
           }
       }
    }
    Thanks!
    fpe

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout