dividing a circle into six equal parts
Ältere Kommentare anzeigen
hello
can you please help me...i have a mask image for the LV (left ventricle) that is two concentric circles,inside these circles ones and outside them zeros...anyway i just wanna divide this circle into six equal parts (each 60 degrees) given the starting point (which i call "the insertion point").... can you please help me
if you need more info just ask me
thank you in advance
Akzeptierte Antwort
Weitere Antworten (2)
Sean de Wolski
am 12 Mai 2011
1 Stimme
Hmmm. A rambling of one way to do it, given a logical map of a circle:
- Find the centroid.
- Pick three angles at 60 degree spacing, Eg: 0:60:120 degrees
- Translate these to slopes
- Find appropriate intercepts such that a line with each of those slopes runs through the centroid.
- Turn these lines to black in your map.
- Use bwlabel to label the six sextets. Turn the lines back on so that each half of one line (halves defined cut at the centroid) is a number 1-6 adjacent to one of the sextets of the same number.
There are probably better ways but this should work.
1 Kommentar
ajith
am 21 Aug. 2013
sir i found the centroid using regionprops how to pick three angles at 60 degree spacing.
Walter Roberson
am 12 Mai 2011
1 Stimme
What relationship is the point to have to the divisions ? Is there an implication that the tangent to the inner circle and outer circle should pass through the selected point? If so, then if you subtract the origin of the circle from the selected point and cart2pol() the result, the angle will give you the rotation offset for the 60 degree (Pi/3) divisions. Add it to (0:5)*Pi/3 and pol2cart() once with the inner radius and once with the outer radius to get the (x,y) coordinates of the endpoints of the dividing segments.
Kategorien
Mehr zu Image Arithmetic finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!