Coder Social home page Coder Social logo

markline's Introduction

Markline

Description

This tool helps to get the distance on the image with the reference pixels.

Requirement

If you have never run the python code before, strongly recommend you to install anaconda. It will make the installation more simple. All the command

python=3.6

matplotlib

numpy

Todo list

  • basic function
  • UI
  • load image from directory

How to run

Run 'anaconda prompt.exe'

Get the root to this repo directory(using a command like 'cd D:\xx\xx\Markline')

Run the code by

python mark_line_demo.py [the path of your image, you can drag the picture to the prompt to add the path]

And you can test by run

python mark_line_demo.py ./data/bone.jpeg

Then you should see like: image

How to draw

Draw the reference line. Click two points to get a line. In the example, the line was drawn on the needle. (the needle length is set to 5cm)

image

Press B on your keyboard. Click two points to draw the line on the object you want to know the length. (We may mention it as Baseline after)

image

Press N . Click one point to draw the first vertical line of Baseline

image

Press M . Click one point to draw the second vertical line of Baseline

image

Press Enter to see the result

image

When drawing the line. Press J to freeze the line. Combined with Zoom-In to get a precision point. (Press J again to activate drawing)

image

(Press Esc and you can restart drawing)

(Press X and the result will be saved on folder './data/result')

License

MIT License

At the end

This tool is created for my best friend - Yipeng Lin. It was used to collect the medical data. More details in https://journals.sagepub.com/doi/full/10.1177/2325967120923950

markline's People

Contributors

zhengxing-shawn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.