how to create a line through a point and make it turn

5 views (last 30 days)
I have found the centroid of a picture with the following code:
Q=gpuArray(imread('ISIC_0000001_segmentation.png'));
S=regionprops(Q,'centroid');
%plot centroid on picture
centroid = cat(1, S.Centroid);
imshow(Q)
hold on
plot(centroid(:,1), centroid(:,2), 'b*')
hold off
Now I want to find the line of symmetry of that picture that goes through this point, but im not sure how to do it. I thought of creating a line that goes through the centroid, and having matlab calculate the % of symmetry with that line, and then change the tangent of that line and calculate the symmetry and so on and finally take the lowest percentage. Any ideas on how to do this would be great!
  1 Comment
KSSV
KSSV on 18 Dec 2018
Through a point..you will get infinite lines......you need two points to define a line. Attach your image and tell us your expectations.

Sign in to comment.

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!