I need to draw 8 lines in a binary image according to the attached image.

조회 수: 2 (최근 30일)
How can I do this?
  댓글 수: 2
Walter Roberson
Walter Roberson 2017년 11월 28일
Why 8? I only see 4 lines needed: one circle, and three blue lines that cross the circle.
Marlon Damaceno
Marlon Damaceno 2017년 11월 29일
For my college project!
I need to detect edge irregularities according to dermatological rule ABCD says: "Result of the division of the lesion into 8 edge segments, with each abrupt edge cut equivalent to 1 point (0 to 8 points)".
The circle and the blue lines were only for example. But my actual samples are irregular shapes, how this image for example:

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2017년 11월 29일
This can be done.....I will suggest you a method with functions available..rest you have to follow.
  1. Load the image using imread
  2. Crop the white margins i.e pick only from balck to black using imcrop
  3. Convert rgb image to gray using rgb2gray. This makes black to 0 and white to 255.
  4. Using find function find the white pixels. This gives all points of the white region
  5. Using boundary function get the boundary. This gives irregular curve coordinates which separates white and black. Now you have to play with this curve.
  6. Using pdist or Eucledian distance formula get the length of successive segments..summing this gives length of whole curve.
  7. Now split this length into eight equal parts..and pick those coordinates..joining these gives the lines you want.
Good luck.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by