Results 1 to 2 of 2

Thread: How to measure a distance between 2 points (meter) after loading an image ?

  1. #1
    Join Date
    Apr 2021
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    MacOS X

    Exclamation How to measure a distance between 2 points (meter) after loading an image ?


    I'm working on a school project and I'm stuck !
    I have to load an ECG graph then measure the distances between two peaks. I succeeded on loading the image but I couldn't do the rest. I need to click on 2 peaks of the graph and the application should give me the distance in meter. Then I need to calculate the heart rate. Can anyone help me ? in here or on discord

    Thank u in advance.

  2. #2
    Join Date
    Jan 2008
    Alameda, CA, USA
    Thanked 799 Times in 788 Posts
    Qt products
    Windows Android

    Default Re: How to measure a distance between 2 points (meter) after loading an image ?

    We don't usually do homework for people in this forum. I do not know what software you are using to display the graph, but most of the plotting widgets have the ability to transform the pixel coordinates of a mouse click into data coordinates. So you need to study the documentation for your widget to learn how to do that.

    the distance in meter
    If your plot is an ECG, then the x axis will be in seconds, not meters. So your distance between two peaks will be in seconds, and you can use simple math to turn that into heart rate (BPM).
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. How to do asynchronous points loading.?
    By kuzulis in forum Qwt
    Replies: 8
    Last Post: 28th November 2016, 09:24
  2. Draw interactive points on an image
    By Bruschetta in forum Qt Programming
    Replies: 1
    Last Post: 7th October 2016, 10:31
  3. Replies: 6
    Last Post: 4th November 2011, 06:51
  4. Insert/Delete points over image
    By sergio87 in forum Qt Programming
    Replies: 3
    Last Post: 18th May 2011, 07:37
  5. how can i mark points on top of a Image?
    By montamer in forum Qt Programming
    Replies: 2
    Last Post: 2nd April 2010, 12:53

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.