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. Confuse with camera Orientation
Qt 6.11 is out! See what's new in the release blog

Confuse with camera Orientation

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 1.2k Views
  • 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.
  • thamT Offline
    thamT Offline
    tham
    wrote on last edited by tham
    #1

    The orientation of Camera is weird

    1 : on desktop, orientation 0, the image is top down like following

    alt text

    But on mobile(android), topDown orientation become 270

    2 : When I save the image access by QAbstractVideoFilter, the image become upside down,but it is topDown on the screen(orientation is 0)

    Image become topDown

    alt text

    How should I understand orientation value?Thanks

    Codes :

    ApplicationWindow {
        id: win
        visible: true
        //width: 640
        //height: 480
        title: qsTr("Hello World")       
    
        Camera{
            id: camera
        }
    
        SSDFilter {
            id: ssd_filter
    
            onMessageChanged: {
                console.log("msg is:" + msg)
                msg_text.text = "msg is:" + msg
            }
    
            orientation: video.orientation
        }
    
        Column{
            VideoOutput {
                id: video
                source: camera
                width: win.width
                height: win.height - 20
                autoOrientation: true
                filters: [ ssd_filter ]
    
                onOrientationChanged: {
                    msg_text.text = "phone orientation:" + video.orientation
                }
            }
    
            Text{
                id: msg_text            
            }
        }
    }
    
    1 Reply Last reply
    0
    • thamT Offline
      thamT Offline
      tham
      wrote on last edited by
      #2

      I found the answer of the orientation, all I need to do is check the direction of scanline

      surfaceFormat.scanLineDirection()
      

      In object recognition task, topToBottom or bottomToTop is crucial

      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