示例#1
0
 /// <summary>
 /// Finds the object center, size, and orientation.
 /// </summary>
 /// <param name="probImage">Back projection of object histogram (see <see cref="Histogram.CalcArrBackProject"/>).</param>
 /// <param name="window">Initial search window.</param>
 /// <param name="criteria">Criteria applied to determine when the window search should be finished.</param>
 /// <param name="comp">
 /// Resultant structure that contains the converged search window coordinates (<see cref="ConnectedComp.Rect"/> field)
 /// and the sum of all of the pixels inside the window (<see cref="ConnectedComp.Area"/> field).
 /// </param>
 /// <param name="box">Circumscribed box for the object.</param>
 /// <returns><b>true</b> if the search was successful; <b>false</b> otherwise.</returns>
 public static bool CamShift(
     Arr probImage,
     Rect window,
     TermCriteria criteria,
     out ConnectedComp comp,
     out RotatedRect box)
 {
     return(NativeMethods.cvCamShift(probImage, window, criteria, out comp, out box) > 0);
 }
示例#2
0
 /// <summary>
 /// Finds the object center on back projection.
 /// </summary>
 /// <param name="probImage">Back projection of object histogram (see <see cref="Histogram.CalcArrBackProject"/>).</param>
 /// <param name="window">Initial search window.</param>
 /// <param name="criteria">Criteria applied to determine when the window search should be finished.</param>
 /// <param name="comp">
 /// Resultant structure that contains the converged search window coordinates (<see cref="ConnectedComp.Rect"/> field)
 /// and the sum of all of the pixels inside the window (<see cref="ConnectedComp.Area"/> field).
 /// </param>
 /// <returns><b>true</b> if the search was successful; <b>false</b> otherwise.</returns>
 public static bool MeanShift(Arr probImage, Rect window, TermCriteria criteria, out ConnectedComp comp)
 {
     return(NativeMethods.cvMeanShift(probImage, window, criteria, out comp) > 0);
 }