Re: How to use correctly GetRegionData to find the square area of a polygon

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mike D Sutton _at_ Work (_at_)
Date: 09/10/04


Date: Fri, 10 Sep 2004 16:03:27 +0100


> Instead of picking triangle, I pick rectangle via GetRegionData() and then
> sum up and estimate.
>
> Adjusting on smaller scale because I'm forced to take all the pixel on a
> diagonal line (see my post above replying on vipin) I obtain a good
> estimate...

To get a slightly more accurate estimate using this method, multiply the original polygon coordinates by 10 or so (the larger you
make it the more accurate the estimate will be but the greater the GDI and processing overhead) then divide the result accordingly -
This simulates sub-pixel accuracy.
Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: http://www.mvps.org/EDais/



Relevant Pages

  • Re: lb and ub constraints in lsqcurvefit
    ... to be able to use large scale solvers. ... My objective function is a sum of squares ... Those are linear constraints on the parameters; ... with each a mean and a variance, and I want those peaks to ...
    (comp.soft-sys.matlab)
  • Re: rules of fixed-point arithmetic
    ... I have come across an unpublished paper outlining some rules of fixed- ... These rules include things such as: "The scale of the ... sum of two binary numbers scaled Xis X, i.e., the sum of ... An example of the former are the ARMv5e DSP ...
    (comp.arch)
  • Re: cheap strat
    ... The luthier I use lowered the action a touch, recut the nut ... and adjusted the intonation (neck didn't need adjusting) ... I really can't see why it should cost "a sum" ... unless he needs to dress frets etc. ...
    (alt.guitar.beginner)
  • Re: fraction
    ... Microsoft MVP - Excel ... | desired result in sum or multiplication of fraction. ... | say if i add following figures i want to get answer 641 by adjusting ...
    (microsoft.public.excel.misc)
  • Re: geometry question
    ... can be composed as a sum of two squares, ... general parametric solution (up to a scale factor, ...
    (sci.math)