How to split a complex shape into smaller simpler shapes based on a given angle using image processing?

2 views (last 30 days)
Good day, I would like to ask if there's any way to divide a complex (irregular) shape into smaller simpler shapes based on a given angle using image processing. For instance, consider the example below:
shape A is shown to be cut into smaller shapes by 0/180 deg (horizontally) while shape B cut by 90/270 deg (vertically).
Thank you very much and hoping for feedback.

Accepted Answer

Image Analyst
Image Analyst on 21 Feb 2017
Since there is no unique way to chop up your blob, you'd have to write your own code according to your rules. The only thing built in to the Image Processing Toolbox is qtdecomp(), quadtree decomposition, which divides the picture up into squares of various sizes.
  4 Comments
Image Analyst
Image Analyst on 22 Feb 2017
I learned how they did it like 20 years ago when was using a program called Visilog and computers were so slow you could see it as it scanned down, assigning bright colors to each label, then it would scan again from bottom up doing the same thing, sometimes changing labels. It kept scanning up and down repeatedly until no more pixels got changed. Of course now it's so fast and normally now they won't show you the labels line-by-line as it scanned like this old Visilog program did.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!