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. Line Tracer/Digitizer
Qt 6.11 is out! See what's new in the release blog

Line Tracer/Digitizer

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 4 Posters 1.9k Views 2 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to the forums

    Since you have the manual part working click on the image and so on, what
    part do you want help on ?
    The math in the "automatically give a vector of position" or saving to
    csv or where lies the dog ? ( not sure its the right expression :)

    P 1 Reply Last reply
    0
    • mrjjM mrjj

      Hi and welcome to the forums

      Since you have the manual part working click on the image and so on, what
      part do you want help on ?
      The math in the "automatically give a vector of position" or saving to
      csv or where lies the dog ? ( not sure its the right expression :)

      P Offline
      P Offline
      ParanoidAndroid
      wrote on last edited by
      #3

      @mrjj

      I need it to automatically detect the line and plot the points so instead of the user clicking several points on the line they instead click a couple and the program autofills the other points according to the line

      mrjjM 1 Reply Last reply
      0
      • P ParanoidAndroid

        @mrjj

        I need it to automatically detect the line and plot the points so instead of the user clicking several points on the line they instead click a couple and the program autofills the other points according to the line

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #4

        @ParanoidAndroid
        Ok and are those lines straight or more like a spline / curve ?
        if just a line then
        https://www.geeksforgeeks.org/program-find-line-passing-2-points/

        but since you asked for help i assume its something more complicated ?

        P 1 Reply Last reply
        0
        • mrjjM mrjj

          @ParanoidAndroid
          Ok and are those lines straight or more like a spline / curve ?
          if just a line then
          https://www.geeksforgeeks.org/program-find-line-passing-2-points/

          but since you asked for help i assume its something more complicated ?

          P Offline
          P Offline
          ParanoidAndroid
          wrote on last edited by
          #5

          @mrjj They can be any 2D line graph splines, straight, lines curves

          mrjjM 1 Reply Last reply
          0
          • P ParanoidAndroid

            @mrjj They can be any 2D line graph splines, straight, lines curves

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @ParanoidAndroid
            Ok. so we need the data these
            2D line graph splines, straight, lines curves are based on if we are to calculate its
            function based on a few points.

            Can i see one images with the drawn curves you wish to calculate ?

            1 Reply Last reply
            0
            • P Offline
              P Offline
              ParanoidAndroid
              wrote on last edited by
              #7

              Here is an example of the splineGraph3.png

              1 Reply Last reply
              0
              • kshegunovK Offline
                kshegunovK Offline
                kshegunov
                Moderators
                wrote on last edited by
                #8

                You need to read math, I'm afraid. Rational B-splines, normal cubic splines or polyharmonic splines could work in your case, however I leave the wikipedia-ing to you. ;)

                Read and abide by the Qt Code of Conduct

                P 1 Reply Last reply
                3
                • kshegunovK kshegunov

                  You need to read math, I'm afraid. Rational B-splines, normal cubic splines or polyharmonic splines could work in your case, however I leave the wikipedia-ing to you. ;)

                  P Offline
                  P Offline
                  ParanoidAndroid
                  wrote on last edited by
                  #9

                  @kshegunov
                  Is there no way to say track the colour of the spline and give pixel coordinates

                  kshegunovK 1 Reply Last reply
                  0
                  • P ParanoidAndroid

                    @kshegunov
                    Is there no way to say track the colour of the spline and give pixel coordinates

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

                    Sorry, I don't understand the question. Please rephrase.

                    Read and abide by the Qt Code of Conduct

                    P 1 Reply Last reply
                    0
                    • kshegunovK kshegunov

                      Sorry, I don't understand the question. Please rephrase.

                      P Offline
                      P Offline
                      ParanoidAndroid
                      wrote on last edited by
                      #11

                      @kshegunov instead of using mathematics could you say click to select the colour of the line and then have the application give the coordinates of every pixel connected with that colour

                      mrjjM 1 Reply Last reply
                      0
                      • P ParanoidAndroid

                        @kshegunov instead of using mathematics could you say click to select the colour of the line and then have the application give the coordinates of every pixel connected with that colour

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        @ParanoidAndroid
                        Hi
                        If all images are as clean as this, you can easily scan to find the blue color and hence the Y coordinate.
                        https://doc.qt.io/qt-5/qimage.html#pixel-1
                        or the faster way
                        https://doc.qt.io/qt-5/qimage.html#scanLine

                        But it wont be fast as such but unless
                        tiny mini board it should be fine:)

                        P 1 Reply Last reply
                        1
                        • mrjjM mrjj

                          @ParanoidAndroid
                          Hi
                          If all images are as clean as this, you can easily scan to find the blue color and hence the Y coordinate.
                          https://doc.qt.io/qt-5/qimage.html#pixel-1
                          or the faster way
                          https://doc.qt.io/qt-5/qimage.html#scanLine

                          But it wont be fast as such but unless
                          tiny mini board it should be fine:)

                          P Offline
                          P Offline
                          ParanoidAndroid
                          wrote on last edited by
                          #13

                          @mrjj thankyou for your help. Will this give an x coordinate aswell

                          jsulmJ 1 Reply Last reply
                          0
                          • P ParanoidAndroid

                            @mrjj thankyou for your help. Will this give an x coordinate aswell

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            @ParanoidAndroid said in Line Tracer/Digitizer:

                            Will this give an x coordinate aswell

                            Just iterate over all x coordinates and search for y like @mrjj suggested. Or iterate over y and get x...

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            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