Table of Contents

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

image InputArray

Image to extract descriptors from.

roi Rect

Region of interest within the image. Must cover the entire image (see remarks).

descriptors OutputArray

Resulted 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

image InputArray

Image to extract descriptors from.

descriptors OutputArray

Resulted descriptors array for all image pixels.