CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: How divide cell?

  1. #1
    Join Date
    Jun 2014
    Posts
    21

    How divide cell?

    I have Name:  toDivide.jpg
Views: 135
Size:  32.4 KB I must divide cells into Name:  Divided.jpg
Views: 149
Size:  34.6 KB
    Each cell has kernel - light blue rectangle. How is name properly algorithm?

  2. #2
    Join Date
    Jul 2013
    Posts
    576

    Re: How divide cell?

    Quote Originally Posted by Borneq View Post
    Each cell has kernel - light blue rectangle. How is name properly algorithm?
    The criteria for division is not clear.

    In the right picture an area with a green perimeter has been subdivided with red borders but according to which rules? It cannot be that the division separates all light-blue rectangles (cell kernels) because one red bordered division has two light-blue triangles within it and another cuts right thru a light-blue rectangle.

    So is the right picture an example of a correct division or is it an example of a failed attempt to subdivide? In any case what are the precise rules for division?
    Last edited by razzle; June 29th, 2014 at 12:58 AM.

  3. #3
    Join Date
    Jun 2014
    Posts
    21

    Re: How divide cell?

    Quote Originally Posted by razzle View Post
    It cannot be that the division separates all light-blue rectangles (cell kernels) because one red bordered division has two light-blue triangles within it and another cuts right thru a light-blue rectangle.
    This image on the right is not exact how to should be. It is possible to divide cell to regions with one kernel in region or regions can overlapped.

  4. #4
    Join Date
    Jul 2013
    Posts
    576

    Re: How divide cell?

    Quote Originally Posted by Borneq View Post
    This image on the right is not exact how to should be. It is possible to divide cell to regions with one kernel in region or regions can overlapped.
    Note that it's generally assumed that examples describe what you want to achieve and not what you don't want. If you post failed attempts you must say so otherwise people get confusted as to what it is you want to achieve.

    Anyway I would use the fact that I'm able to recognize cell kernels (light-blue squares) and visible edges between cells (red lines). At least it seems like you can do that. I would start with a small perimeter around each kernel. All perimeters would then be expanded outwards simultaneously. The perimeters would allign to cell edges they encounter during expansion and no perimeter may cross another perimeter. The perimeters also would try to stay as round (cell-like) as possible. When the expansion slows down each perimeter represents a cell border. Hidden cell edges will be outlined by perimeters pushing against each other.

    Think of it as a competition between perimeters. They love edges and hug to them when they find them but they are also very greedy and want to expand in all directions while staying reasonably round. You may call it the shove & shuffle algorithm . Note that it doesn't operate on the image. It needs only the light-blue squares, the red lines and the outer green border, that is features you've already extracted. It's a post image-processing step that should be very fast.
    Last edited by razzle; July 1st, 2014 at 10:33 AM.

  5. #5
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: How divide cell?

    if you just want to divide the area into regions using some logic.
    For non-overlapping you probably want to take a look at voronio diagrams. If areas can overlap, then you probably need to use a 3D approach to voronoi. This isn't going to be ideal, but it can be done relatively fast.


    Fluid dynamics and particular the way foam bubbles work might be an approach as well, I'm not entirely sure how cells behave, but I guess it's actually similar since essentially both a cell and a bubble are both 'fluids' separated by a tension membrane. THe problem here is that it involves quite a bit more complex and long duration math.

  6. #6
    Join Date
    Jun 2014
    Posts
    21

    Re: How divide cell?

    Voronoi is OK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)