Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPointF vector mapping with 3*3 matrix
Forum Updated to NodeBB v4.3 + New Features

QPointF vector mapping with 3*3 matrix

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 209 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.
  • H Offline
    H Offline
    Hoel2
    wrote on last edited by Hoel2
    #1

    Hi,
    I have a vector of QPointF which contains two registration marks (reg1 and reg2) and a set of points. These point must be placed on a plate which is on the machine bed and always has a slight position error. So with the help of machine vision actual position of registration marks is determined (vreg1 and vreg2).

    For example, coordinates are reg1 (2.0,2.0), reg2 (15.0,30.0), and vreg1 (0.6,3.3), vreg2 (8.5,33.1).

    I want to map the entire vector according to vreg1 and vreg2.
    I tried to use the transform functions (translate and rotate) but of course it doesnt work, i can determine the offsets between reg1/vreg1 and reg2/vreg2, and the coresponding angles, but then Transform::translate and transform::rotate are useless because i dont know the physical rotation origin, nor can i determine the original translation (the translation i measure is the result of original translation + rotation), so the result after translate and rotate never match reality.

    It seems that a 3*3 matrix could do that, however i dont understand how i can set it up and use it. From what i understand i should use two matrixes, one with reg1/vreg1 and another with reg2/vreg2 and then apply these matrixes to the vector.

    Below is a diagram to clarify, the top figure correspond to the theorical registration reg1 and reg2 (red dots) and the vector of points to map (green dots). The bottom figure correspond to the measured registrations vreg1 and vreg2 (red dot) and the mapped vector of points (green dots) which i need to figure.

    Dessin sans titre (2).png

    1 Reply Last reply
    -1
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      Do you think posting it again will help? Esp. since the other post is only 14 hours old: https://forum.qt.io/topic/114108/rotation-of-a-qvector-of-qpointf-or-qpolygonf-from-two-points-instead-of-angle

      -> closed

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved