fill a polygon with circles without intersection

I want to create a random a polygon thin I want to fill the polygon with circles with 3 different radiuses I want to fill it first using the largest radius then with the smaller radiuses but the circles should not intersect with the polygon or with other circles please help me

 採用された回答

Image Analyst
Image Analyst 2013 年 12 月 4 日

1 投票

What form do you want the image in? A list of centers and radii? Or an image. If you want an image (2D array) you can do it with a loop and a series of steps where you call bwdist() (to find out where the largest circle can go), then poly2mask() to drop the next circle there. When bwdist indicates that there can be no more circles of that size, then you drop down to the next largest circle. Keep looping until you can't fit anymore of the smallest circle. Not hard at all if you want an image and have the Image Processing Toolbox. If that's how you want to do it, and can't figure out how to put my algorithm into code, let me know.

1 件のコメント

Hamza
Hamza 2013 年 12 月 4 日
thanks for reply Image Analyst I want it as a list of centers and radiuses then draw it in 2D I want a polygon filed with circles but it should not intersect yes please help me with code

サインインしてコメントする。

その他の回答 (1 件)

Hamza
Hamza 2013 年 12 月 5 日

0 投票

Anyone can help me with the code please ?

4 件のコメント

Anne
Anne 2014 年 2 月 20 日
Hello Hamza! Did you ever receive the code? I am also interested... I want to analyze airborne pictures for tree crown delineation. When tree crowns are touching I have to fill the polygons with circles to approximate single trees... I think our problems a similar.
Image Analyst
Image Analyst 2014 年 2 月 20 日
MATLAB has no built in code for that. You'll have to program up your own algorithm. See section 22.5.7 here: http://iris.usc.edu/Vision-Notes/bibliography/contentscartog.html#Cartography,%20Aerial%20Images,%20Remote%20Sensing,%20Buildings,%20Roads,%20Terrain,%20ATR
22.5.7 Trees, Individual Trees, Tree Crowns
22.5.7.1 Trees, Forest, Stem Volume, Biomass Measurements
22.5.7.2 Forest Extraction, Forest Analysis
22.5.7.2.1 Forest Analysis, Depth, LiDAR, Laser Scanner, IFSAR
22.5.7.3 Forest Fire Evaluation, Wildfire Analysis, Fire Detection, Fire Damage Assessment
22.5.7.4 Forest Change Evaluation, Change Detection, Temporal Analysis
fouzia razzaque
fouzia razzaque 2014 年 5 月 29 日
when I try to open the link provided by image analyst it shows, 'page cannot be displayed' :( need help

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeImage Processing and Computer Vision についてさらに検索

質問済み:

2013 年 12 月 4 日

コメント済み:

2014 年 5 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by