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. Calculate Projection Matrix in QT 5.12 Based On Screen Resolution
Forum Updated to NodeBB v4.3 + New Features

Calculate Projection Matrix in QT 5.12 Based On Screen Resolution

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 162 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.
  • I Offline
    I Offline
    ilan_sw
    wrote on last edited by ilan_sw
    #1

    Hello, all!
    I am projecting a rectangle onto a trapezoid in QT 5.12, using a transformation matrix which I calculated using python openCV, by projecting rectangle edges to trapezoid edges:

    matrix: Qt.matrix4x4(0.576341147, -0.0977674354, 0, 290.206329,
                                         0, 0.135014208, 0, 0,
                                         0, 0, 1, 0,
                                         0, -0.000142726177, 0, 1)
    

    Now I need to update the trapezoid size relative to screen resolution. How can I do this? I have several possibilities:

    somehow re-calculate the matrix for each resolution (which I don't know how to do in QT)
    multiply the matrix by a screen size factor
    something else QT offers?
    How can this be done in the most reliable, straightforward way in QT? Thanks!

    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