/// <summary>
///
/// </summary>
/// <param name="image">The image</param>
/// <param name="winStride">Window stride. Must be a multiple of block stride. Use Size.Empty for default</param>
/// <param name="padding">Padding. Use Size.Empty for default</param>
/// <param name="locations">Locations for the computation. Can be null if not needed</param>
/// <returns>The descriptor vector</returns>
public float[] Compute(Image <Bgr, Byte> image, Size winStride, Size padding, Point[] locations)
{
using (VectorOfFloat desc = new VectorOfFloat())
{
if (locations == null)
{
CvInvoke.CvHOGDescriptorCompute(_ptr, image, desc, winStride, padding, IntPtr.Zero);
}
else
{
using (MemStorage stor = new MemStorage())
{
Seq <Point> locationSeq = new Seq <Point>(stor);
CvInvoke.CvHOGDescriptorCompute(_ptr, image, desc, winStride, padding, locationSeq);
}
}
return(desc.ToArray());
}
}