How to measure an angle and keeping the one that verify a certain measure defined priviously ?

I have a network and i want to measure the angle connecting every two vectors defined priviously
by coordinates(feature points detected) and passing from angle to another with keeping angles
that verify a condition of measure
below the network with mentioned coordinates in red :
A far purpose is to keep form that verify X, Y, L, T and -
X : Four angles of 90 degrees
Y : One angles <90 and two others >90
L : One angle about 90 and the other about 270
- : 180
How can i proceed
any ideas please!
thanks

19 Comments

Any ideas please!
I used TSP_NN to find a way to connect Feature points detected priviously
But what i'm looking for is to measure angles between one points and the two next to identify what template it present.
X template : Four angles of 90 degrees
Y template : One angles <90 and two others >90
L template : One angle about 90 and the other about 270
- template : 180
Help is much appreciated
thanx
Can any one please help me doing this
I'm starting with matlab.
Perhaps start by writing out the pseudo code for the function that will solve the above problem. Do you already have the list of feature points and now wish to just find angles between every consecutive triplet?
Yes i have the list of feature points, but don't know how to proceed to measure angles.
What are the properties for a single feature point? Is there a coordinate associated with it?
it's only a 148*2 matrice below an example
ending_pts =
3 791
8 388
10 570
17 285
24 836
32 342
35 656
43 339
44 634
53 656
55 445
57 657
59 179
60 62
62 217
64 618
73 629
74 629
77 617
84 867
126 401
133 920
138 82
141 386
158 528
168 65
184 660
191 650
198 13
208 537
219 730
224 524
227 527
230 957
233 955
236 954
253 89
253 917
258 964
263 836
275 478
285 622
289 240
292 418
295 747
297 748
297 946
299 782
311 395
317 777
318 105
322 166
326 792
355 927
360 103
372 853
384 110
387 534
387 574
391 421
398 579
404 702
419 324
422 323
424 374
425 908
435 101
443 30
464 761
468 899
470 897
471 494
475 754
488 888
496 707
496 799
505 565
506 567
513 551
517 878
523 531
528 460
542 187
555 210
558 449
572 404
576 403
577 597
583 397
588 711
592 245
595 873
596 83
621 4
621 900
627 692
650 559
654 558
656 870
663 83
665 444
665 665
666 412
669 155
669 552
672 361
673 359
673 485
680 660
685 486
694 352
695 711
698 650
709 231
712 624
728 435
731 891
732 309
733 81
737 421
737 425
742 53
743 51
746 839
747 842
752 347
753 84
755 879
771 9
776 328
778 395
829 338
829 340
836 333
853 324
863 370
913 581
917 644
926 455
936 396
943 741
949 609
949 620
954 332
959 169
966 329
967 327
972 725
You posted this same set of data at http://www.mathworks.com/matlabcentral/answers/131183-error-using-reshape-size-arguments-must-be-integer-scalars. Are these all the feature points? Are these (x,y) coordinates? The first column is in ascending order - is this important? What does this data set mean?
yes these are (x,y) coordinates of all the feature points
this data set is a the ending points of a skeleton extracted using Skeleton Endpoints
not important the order
I would have thought that order would be important… You can use atan2 or atan2d to determine the angle between two feature points (coordinates). Just type help atan2d in the command window for details.
i have to determine the angle between three feature points not two and each time i change two feature points until finding the required measure of angle
Please clarify - you have three distinct points and you want to find one angle?
like mentioned in the image below three points are required and each time changing one feature until reaching the required angle measure
Ok…so how from the list above do you decide to group any three feature points? What is the logic for that?
I'm still lookig for a logic i thinked about the nearest neighbor but i don't know how to implemet it
no but may be i can use a cost function to switch from segment to another ??
Have you decided on how to group any three feature points?
Sorry for the late reply i taked a time to decide how to group feature points.
I will consider every group of Feature points as a cell defined priviously by a Voronoi algorithm to extract skeleton below from initial image.
Knowing that this cell have a centroid equidistant from all the boundaries which can lead to estimate the missing segment of that cell.
Any ideas to approximate segments.
thx

Sign in to comment.

Answers (0)

Categories

Asked:

on 26 May 2014

Commented:

on 2 Jun 2014

Community Treasure Hunt

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

Start Hunting!