Skip to content

API Utilities

ZangoTech edited this page Jun 20, 2026 · 1 revision

Utilities

← Back to API Reference · Home

cropRect

Copy a rectangular region between two buffers; supports inplace stride reduction.

Namespace: acl::memory

template<class T>
int cropRect(
    const T* srcBuffer, T* dstBuffer,
    int copyWidth, int copyHeight,
    int srcStride = 0, int dstStride = 0,
    int srcLeft = 0, int srcTop = 0,
    int dstLeft = 0, int dstTop = 0);
Parameter Type Meaning Default
copyWidth, copyHeight int Size of the region to copy
srcLeft, srcTop int Starting position in the source buffer 0
dstLeft, dstTop int Starting position in the destination buffer 0
srcStride, dstStride int Bytes per row 0 = auto

Supports inplace stride reduction when srcBuffer == dstBuffer (compresses in place when srcStride ≥ dstStride).

Namespace Availability Matrix

Per-category distribution across acl::neon::* and the scalar CPP path (acl::{module}::*). When an operator exists in both, the signatures are identical unless the operator's own section calls out a difference.

Category Both neon:: + CPP CPP only
Analysis integral, histogram, equalizeHist, clahe, minMaxLoc, copyMakeBorder, matchTemplate, blockAverage histMatch, moments, count, mean, connectedComponent_8n_dfs, connectedComponentLabeling, findContours, distanceTransform, extractBlockPixels
Arithmetic addImg, absDiff, addWeighted, alphaImgFusion, mul, threshold, adaptiveThreshold, bitwise (And/Not/Xor), lut, convertScaleAbs, inRange, normalize, phaseMagnitude linearTransform2x2
Color Conversion RGB2Gray / RGBA2Gray, channelSwap (5 Mode tags), bayer2RGB, rgb2YUV_fixed family, yuv2RGB_fixed family, rgb2HSV / bgr2HSV, rgb2Lab / bgr2Lab hsv2BGR, lab2BGR, rgb2YUV_float family, yuv2RGB_float family, bayer2RGBA, gammaTransform
Filter gaussianBlur, boxFilter, filter2D, sepFilter2D, sobel3x3, scharr, laplacian, morphology (erode/dilate), canny, medianFilter3x3, bilateralFilter, nlMeansDenoising, guidedFilter, unsharpMask, stackBlur, gaborFilter edgePreservingFilter, detailEnhance, tonemap (Linear/Reinhard/Drago), mergeMertens
Geometric resize, rotate (NEON 1ch u8 only), pyrDown, pyrUp, buildPyramid
Geometric (NEON only) resizeNV, resizeYV12, resizeYUV444, rotateNV, rotateYV12, rotateYUV444
Feature Detection FAST, Harris (detect), Shi-Tomasi (detect) / shiTomasiDetect, ORB (detect + describe), SIFT, SURF, HOG, houghLines / houghLinesP, houghCircles, opticalFlowLK, descriptorMatch (bfMatch / bfMatchBinary and K-NN variants) harrisResponse, minEigenValResponse
Transform getPerspectiveTransform, findHomography, warpAffine, warpPerspective getRotationMatrix2D, getAffineTransform, remap, yuvRemap
Math
Math (NEON only) dft1d / dft2d / dftReal1d / idftReal1d / mulSpectrums
Drawing drawLine, drawRect, drawCircle, putText
Contour Analysis contourArea, arcLength, boundingRect, convexHull, approxPolyDP, minAreaRect, fitEllipse
Utilities cropRect

On Android arm64-v8a, prefer the NEON variant whenever the operator exists under acl::neon::. Concrete speedups over OpenCV vary by operator and image size — see the Performance Whitepaper.

Clone this wiki locally