# how to do space allocation using Skeleton algorithm ? [closed]

Hi, I have a polygon and i need to allocate space for given rectangular dimension in an effective way and this needs to be done sequentially every time we have a request. So every time I have a request, I need to process my polygon to see if I have the space to allocate for the requested rectangular area. I intended to do this in C# and after talking to some technical heads they suggested me to use skeleton algorithm which is most commonly used for image processing. For this I need to convert my polygon into bitmap which i had done and now need to process through skeleton algorithm. I need guidance here as I'm still struggling to use this algorithm. I understand skeleton algorithm on high level that its used for thinning process but i'm entirely not sure if i can achieve my requirements with this algorithm. For instance, if I request rectangular area of width 100 and length 60, how does this algorithm helps me to find the unused portion sequentially in the given polygon(now a bitmap)? Any help is highly appreciated.

sorry to say so, but there's no support for c# from opencv, so don't expect too much here.

how would your problem be related to the opencv library, even ?

In the ximgproc module of opencv_contrib there is a thinning function which performs the skeletonization that you are looking for: https://github.com/opencv/opencv_contrib

This assumes that you can use C++.

@sjhalayka: Does the link you referenced involve space allocation ? I don't see it.

No sorry, I'm not sure what you mean by space allocation.