Updates snake in order to minimize its total energy that is a sum of internal energy that depends on contour shape (the smoother contour is, the smaller internal energy is) and external energy that depends on the energy field and reaches minimum at the local energy extremums that correspond to the image edges in case of image gradient.
|C#||Visual Basic||Visual C++|
Assembly: Emgu.CV (Module: Emgu.CV) Version: 220.127.116.11 (18.104.22.168)
- image (IntPtr)
- The source image or external energy field
- points (IntPtr)
- Seq points (snake).
- length (Int32)
- Number of points in the contour
- alpha (array< Single >())
- Weight[s] of continuity energy, single float or array of length floats, one per each contour point
- beta (array< Single >())
- Weight[s] of curvature energy, similar to alpha
- gamma (array< Single >())
- Weight[s] of image energy, similar to alpha
- coeffUsage (Int32)
- Variant of usage of the previous three parameters: CV_VALUE indicates that each of alpha, beta, gamma is a pointer to a single value to be used for all points; CV_ARRAY indicates that each of alpha, beta, gamma is a pointer to an array of coefficients different for all the points of the snake. All the arrays must have the size equal to the contour size.
- win (Size)
- Size of neighborhood of every point used to search the minimum, both win.width and win.height must be odd
- criteria (MCvTermCriteria)
- Termination criteria
- calcGradient (Boolean)
- Gradient flag. If true, the function calculates gradient magnitude for every image pixel and consideres it as the energy field, otherwise the input image itself is considered