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. What is the correct way to affine / transform / rotate a set of coordinates
Forum Updated to NodeBB v4.3 + New Features

What is the correct way to affine / transform / rotate a set of coordinates

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 311 Views 1 Watching
  • 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
    Hoel
    wrote on last edited by Hoel
    #1

    HI,
    My application controls a device which essentially places item accurately on a surface according to a set of X-Y coordinates from a file. The surface position slightly varies relatively to the machine bed, it has 2 or 4 registration mark with known coordinates relative to it own origin.

    A set of multiple X-Y coordinates as well as the registration marks is extracted from the file.

    With the help of a vision system and opencv the physical coordinates of the registration marks are verified against the machine bed and an offset from theoretical / ideal position is saved for each registration mark.

    What I would like to do is to translate / rotate the whole set of X - Y coordinates according to these offsets, so that they account for the position error of the surface on the machine bed, allowing accurate placement.

    I saw QT has some transformation functions for the graphical objects but my coordinates are variables and unrelated to the UI, so i wonder if i could use these transformation function (and how) or if i should use something else?

    Thank you.

    kshegunovK 1 Reply Last reply
    0
    • H Hoel

      HI,
      My application controls a device which essentially places item accurately on a surface according to a set of X-Y coordinates from a file. The surface position slightly varies relatively to the machine bed, it has 2 or 4 registration mark with known coordinates relative to it own origin.

      A set of multiple X-Y coordinates as well as the registration marks is extracted from the file.

      With the help of a vision system and opencv the physical coordinates of the registration marks are verified against the machine bed and an offset from theoretical / ideal position is saved for each registration mark.

      What I would like to do is to translate / rotate the whole set of X - Y coordinates according to these offsets, so that they account for the position error of the surface on the machine bed, allowing accurate placement.

      I saw QT has some transformation functions for the graphical objects but my coordinates are variables and unrelated to the UI, so i wonder if i could use these transformation function (and how) or if i should use something else?

      Thank you.

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by kshegunov
      #2

      @Hoel said in What is the correct way to affine / transform / rotate a set of coordinates:

      I saw QT has some transformation functions for the graphical objects but my coordinates are variables and unrelated to the UI, so i wonder if i could use these transformation function (and how) or if i should use something else?

      You're talking about QTransform, right? You can in principle use it, however beside the convenience Qt may give you, probably it's going to be more straightforward to directly do that manually. An obvious caveat is that otherwise you need to prepare the data into a type Qt understands (think QPointF). If you already have the data in a Qt type, then sure, QTransform is just fine.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      1
      • H Offline
        H Offline
        Hoel
        wrote on last edited by
        #3

        Thanks for the reply
        QPointF is actually good because my coordinates are in float with fixed 4 decimal.
        I will try QTransform then.

        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