Results 1 to 2 of 2

Thread: Ballpen distance traveled

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Ballpen distance traveled

    Hello,

    I'm just developing application for medical tests with graphic tablet. My tablet works just fine (I receive events, and handle it). But I'm struggle with two dilemmas:

    1. Is there any way to measure distance traveled by pen on tablet during drawing? With mouse I can do this quite easily using screen resolution information and some math. But with tablet I don't have information about it's resolution and real number on pixels that a pen traveled (informations from

    hiResGlobalPos are after some transformations).

    2. I need my event receive in equal time interval, say 10 miliseconds, this is because I perform FFT on it. Does anyone has some simple idea for that?

    I will be very thankful if someone help me with this

    best regards
    Paweł

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Ballpen distance traveled

    Without the physical dimensions and x/y range of the tablet I do not see how you can determine the physical distance on the tablet. If you had some rudimentary, on-time calibration process you could determine this information. Something like:
    • Ask the user to supply the dimensions of the stylus area
    • Determine the x and y coordinates when the stylus is on the top left corner of the tablet.
    • Determine the x and y coordinates when the stylus is on the lower right corner of the tablet.
    • Calculate the x and y units per millimetre etc.

    Another approach might be to ask the user (once) to draw a 50 millimetre line along the diagonal using a ruler and stylus, or draw the whole diagonal and supply its length.
    Last edited by ChrisW67; 16th July 2012 at 01:04.

Similar Threads

  1. Distance measuring in plot.
    By thejester in forum Qwt
    Replies: 7
    Last Post: 6th May 2011, 13:36
  2. Distance Transform on a QImage
    By Franckesh in forum Qt Programming
    Replies: 2
    Last Post: 20th January 2010, 08:58
  3. use Latitude and longitude to calculate distance?
    By lengshuang in forum General Programming
    Replies: 6
    Last Post: 11th May 2009, 14:06
  4. pixel distance of gaps in scaleWidget
    By KosyakOFF in forum Qwt
    Replies: 1
    Last Post: 3rd November 2008, 10:02
  5. Double click distance
    By jbd in forum Qt Programming
    Replies: 3
    Last Post: 28th December 2007, 22:13

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.