Method Compute
- Namespace
- OpenCvSharp.XFeatures2D
- Assembly
- OpenCvSharp.dll
Compute(InputArray, Rect, OutputArray)
Computes the descriptor for every pixel within the given region of interest.
public void Compute(InputArray image, Rect roi, OutputArray descriptors)
Parameters
imageInputArrayImage to extract descriptors from.
roiRectRegion of interest within the image. Must cover the entire image (see remarks).
descriptorsOutputArrayResulted descriptors array for the roi image pixels.
Remarks
OpenCV's native implementation indexes the output buffer using absolute image
coordinates even though the buffer is only sized roi.Width * roi.Height rows,
so it overflows unless roi covers the entire image
(roi.X == 0 && roi.Y == 0 && roi.Width == image.Cols && roi.Height == image.Rows).
This is validated up front and throws ArgumentException instead of letting a
partial ROI corrupt memory.
Compute(InputArray, OutputArray)
Computes the descriptor for every pixel in the image.
public void Compute(InputArray image, OutputArray descriptors)
Parameters
imageInputArrayImage to extract descriptors from.
descriptorsOutputArrayResulted descriptors array for all image pixels.