locked
GDI+ best fit shape inside a boundary RRS feed

  • Question

  • Good morning everyone.  My apologies if this is not the best forum for this questions.  I searched for a more appropriate one but was not able to find it.  If anyone knows of a more specialized forum that would be a better place to post GDI+ related questions please let me know.

     

    Here is the task:  I have a fractal, which is just a naturally occurring shape.  The shape most closely resembles an ellipse.  My job is to find an actual ellipse which fits within the bounds of this fractal.  The bounds are defined as an array of Points and represent the different pixels in the bitmap that actually form the boundary.

     

    Does anyone know if there is a way to find the best fit ellipse that resides within a particular boundary using GDI?  The ellipse should be rotated accordingly to fit within the boundary.  So if the boundary most closely resembled an ellipse that was rotated 45 degrees clockwise, the GDI+ best fit algorithm would actually return and ellipse that was also rotated 45 degrees.

     

    I'm not actually looking for anyone to provide a best fit ellipse algorithm.  I just want to know if GDI+ has this type of built in functionality.

     

    Thanks everyone for the assistance.

     

    Tuesday, March 11, 2008 3:32 PM

Answers

  • GDI+ has no such ability.  There are various graphics libraries that would provide things like edge-detection; but I can't think of anything in particular that provide shape detection beyond edge detection.

     

    Tuesday, March 11, 2008 3:43 PM

All replies

  • GDI+ has no such ability.  There are various graphics libraries that would provide things like edge-detection; but I can't think of anything in particular that provide shape detection beyond edge detection.

     

    Tuesday, March 11, 2008 3:43 PM
  • That's what I was worried about... I know technology like this is used for things like face recognition and some other tasks that are associated with fairly specialized fields.  As such, there probably will not be too many implementations available online.  And I'm SURE the math used for this is wicked complicated.

     

    Guess there are going to be some late nights...

     

    Thanks for the help though.

     

    Tuesday, March 11, 2008 3:46 PM