UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. b15h0y
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 4
    • Groups 0

    b15h0y

    @b15h0y

    0
    Reputation
    3
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    b15h0y Unfollow Follow

    Latest posts made by b15h0y

    • QML camera feed is reversed

      Hello, I just started developing a simple image processing app with qml and python and had question regarding setting up the camera feed.

      My Main.qml file currently has:

      import QtQuick 2.7
      import QtMultimedia 5.4
      import Ubuntu.Components 1.3
      import QtQuick.Layouts 1.3
      import Qt.labs.settings 1.0
      import io.thp.pyotherside 1.3
      
      MainView {
          id: root
          objectName: 'mainView'
          applicationName: 'example-hello.none'
          automaticOrientation: true
          width: units.gu(45)
          height: units.gu(75)
      
          Page {
              id:main
              anchors.fill: parent
              width: 640
              height: 360
      
              header: PageHeader {
              id: header
              title: i18n.tr('Camera')
              }
      
              Camera {
                  id: camera
                  imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
                  exposure {
                      exposureCompensation: -1.0
                      exposureMode: Camera.ExposurePortrait
                  }
                  flash.mode: Camera.FlashRedEyeReduction
                  imageCapture {
                      onImageCaptured: {
                          photoPreview.source = preview  // Show the preview in an Image
                      }
                  }
                  transform: Rotation { origin.x: 25; origin.y: 25; angle: 45}
      
              }
      
              VideoOutput {
                  source: camera
                  anchors.fill: parent
                  focus : visible // to receive focus and capture key events when visible
              }
      
              Image {
                  id: photoPreview
              }
              
          }
      
      //declare a variable to import a Python module
          Python {
              id: python
      
              //connect main.py
              Component.onCompleted: {
                  addImportPath(Qt.resolvedUrl('../src/'));
                  importModule_sync("main")
              }
      
              onError: {
                  console.log('python error: ' + traceback);
              }          
          }
      }
      

      Camera is working but the view is flipped, I tried using a Transform to rotate it but the app crashes, what am I missing here? also is it possible to send the camera feed in real time to a python function in my main.py file that I linked at the end?

      Testing device : Volla Phone
      note: normal camera app is working properly, so the issue is code related

      posted in App Development python development camera
      B
      b15h0y
    • RE: Docker/Clickable issue on UT

      @povoq oh, I am sorry, I was trying to start developing with QML and python and thought clickable should be on the phone.

      posted in App Development
      B
      b15h0y
    • Docker/Clickable issue on UT

      I'm trying to get clickable and docker running on my UT phone (Volla phone), however starting the services with sudo systemctl start docker yields the following error:

      Failed to start docker.service: Unknown unit: docker.service
      See system logs and 'systemctl status docker.service' for details.
      

      Checking systemctl status docker.service gives:

      Failed to get properties: No such interface ''
      

      Info about UT:

      Distributor ID: Ubuntu
      Description:    Ubuntu 16.04.7 LTS
      Release:    16.04
      Codename:   xenial
      

      Any idea about a solution to this, haven't found something useful online

      posted in App Development ubuntutouch development clickable
      B
      b15h0y