How to mark the point, display lines and measure distance in Matlab?

5 views (last 30 days)
Hello there,
I want to mark the point in the image and check the length.
The attached picture is exactly what I want to do.
1. Click the red dot you want with the mouse.
2. Display a straight line(blue line) connecting the red dot.
3. Automatically creates a green point while bisecting a straight line between two red points.
4. Display a total of five green lines at a 30 degree angle to the blue line based on the green point.
Yesterday I tried to write code using ginput, but since it is a matlab beginner, it is difficult to implement what I want.
Please help me if you have any ideas to help me implement the process I want.
Thanks.. T^T

Accepted Answer

KSSV
KSSV on 26 Jul 2019
Read about ginput, getpts, plot, imdistline and imline.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!