Thursday, 15 July 2010

image - Calculating minimum distances between irregularly shaped polygons -



image - Calculating minimum distances between irregularly shaped polygons -

i have image. , consists of lots of irregular polygons.

first, calculate minimum distance between 2 polygons. way think can achieved first extracting location of boundary pixels of each polygon , storing in arrays b1 , b2. calculating distance of each point in b1 each point in b2 , finding minimum of that. , want repeat each polygon in figure every other.

so, want know is

how can extract boundaries of each polygon? how can computation time kept @ minimum? is there improve approach problem?

also, polygons highly irregular, think smoothing them little might save lot of time. 1 time again don't know how?

i found function fex want provided have boundary point of polygons, found quite complex due general nature. think simpler code can job much faster.

i sure (you have check) exists x , y 2 points distance realices ( mean, dist(polyg1,polyg2)=dist(x,y) , x belongs p1 , y belongs p2), , 1 of them vertex of polygon. computer efficency improve. won't have check b1 against b2 vertex of b1 against b2 , vertex of b2 against b1.

image matlab distance

No comments:

Post a Comment