public CVHistogram CalcHistogram(int[] binSizes, CVPair[] binRanges, CVImage mask) { CVHistogram h = new CVHistogram(binSizes, binRanges); __IplImagePtr[] images = new __IplImagePtr[this.Channels]; if (this.Channels == 1) { images[0] = this.Internal; } else { CVImage[] planes = this.Split(); for (int i = 0; i < planes.Length; ++i) { images[i] = planes[i].Internal; } } __CvArrPtr maskArr = IntPtr.Zero; if (mask != null) { maskArr = mask.Array; } PInvoke.cvCalcHist(images, h.Internal, 0, maskArr); CVUtils.CheckLastError(); return(h); }
public static void cvCalcArrHist(__CvArrPtr[] image, IntPtr dst, int accumulate) { cvCalcArrHist(image, dst, accumulate, IntPtr.Zero); }
internal static extern void cvWarpPerspective(__CvArrPtr src, __CvArrPtr dst, __CvMatPtr map_matrix, int flags /* CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS) */, __CvScalar fillval /* CV_DEFAULT(__CvScalarAll(0)) */);
internal static extern void cvCalcPyramid(__CvImagePtr src, __CvArrPtr container, IntPtr levels, int level_count, int filter);
internal static extern void cvSobel(__CvArrPtr src, __CvArrPtr dst, int xorder, int yorder, int aperture_size /* CV_DEFAULT(3) */);
internal static extern void cvMoments(__CvArrPtr arr, __CvMomentsPtr moments, int binary /* CV_DEFAULT(0) */);
internal static extern void cvCopyMakeBorder(__CvArrPtr src, __CvArrPtr dst, __CvPoint offset, int bordertype, __CvScalar value);
public static extern int cvCamShift(__CvArrPtr prob, __CvRect window, __CvTermCriteria criteria, ref __CvConnectedComp comp, /*__CvBox2D*/ IntPtr box);
public static int cvCamShift(__CvArrPtr prob, __CvRect window, __CvTermCriteria criteria, ref __CvConnectedComp comp) { return cvCamShift(prob, window, criteria, ref comp, IntPtr.Zero); }
public static void cvCalcHist(__IplImagePtr[] image, IntPtr hist, int accumulate, __CvArrPtr mask) { __CvArrPtr[] arrs = new __CvArrPtr[image.Length]; for (int i = 0; i < image.Length; ++i) arrs[i] = image[i]; cvCalcArrHist(arrs, hist, accumulate, mask); }
public static void cvCalcHist(__IplImagePtr[] image, IntPtr hist) { __CvArrPtr[] arrs = new __CvArrPtr[image.Length]; for (int i = 0; i < image.Length; ++i) arrs[i] = image[i]; cvCalcArrHist(arrs, hist, 0, IntPtr.Zero); }
public static void cvCalcBackProject(__IplImagePtr[] image, __CvArrPtr dst, IntPtr hist) { __CvArrPtr[] arrs = new __CvArrPtr[image.Length]; for (int i = 0; i < image.Length; ++i) arrs[i] = image[i]; cvCalcArrBackProject(arrs, dst, hist); }
/// <summary> /// Calculates back project /// </summary> /// <param name="image"></param> /// <param name="dst"></param> /// <param name="hist"></param> public static void cvCalcBackProject(__CvArrPtr[] image, __CvArrPtr dst, IntPtr hist) { cvCalcArrBackProject(image, dst, hist); }
/// <summary> /// Calculates feature map for corner detection /// The function cvPreCornerDetect calculates the function Dx2Dyy+Dy2Dxx - 2DxDyDxy where D? denotes one of the first image derivatives and D?? denotes a second image derivative. The corners can be found as local maximums of the function: /// <code> /// //assume that the image is floating-point /// IplImage* corners = cvCloneImage(image); /// IplImage* dilated_corners = cvCloneImage(image); /// IplImage* corner_mask = cvCreateImage( cvGetSize(image), 8, 1 ); /// cvPreCornerDetect( image, corners, 3 ); /// cvDilate( corners, dilated_corners, 0, 1 ); /// cvSubS( corners, dilated_corners, corners ); /// cvCmpS( corners, 0, corner_mask, CV_CMP_GE ); /// cvReleaseImage( &corners ); /// cvReleaseImage( &dilated_corners ); /// </code> /// </summary> /// <param name="image">Input image</param> /// <param name="corners">Image to store the corner candidates</param> public static void cvPreCornerDetect(__CvArrPtr image, __CvArrPtr corners) { cvPreCornerDetect(image, corners, 3); }
internal static extern void cvRemap(__CvArrPtr src, __CvArrPtr dst, __CvArrPtr mapx, __CvArrPtr mapy, int flags /* CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS) */, __CvScalar fillval /* CV_DEFAULT(__CvScalarAll(0)) */);
internal static extern void cvDilate(__CvArrPtr src, __CvArrPtr dst, __IplConvKernelPtr element /* CV_DEFAULT(NULL) */, int iterations /* CV_DEFAULT(1) */);
internal static extern void cvCanny(__CvArrPtr image, __CvArrPtr dst, double threshold1, double threshold2, int apertureSize);
internal static extern void cvFilter2D(__CvArrPtr src, __CvArrPtr dst, __CvMatPtr kernel, __CvPoint anchor);
internal static extern void cvCvtColor(__CvArrPtr src, __CvArrPtr dst, int code);
internal static extern void cvWatershed(__CvArrPtr image, __CvArrPtr markers);
internal static extern void cvErode(__CvArrPtr src, __CvArrPtr dst, __IplConvKernelPtr element /* CV_DEFAULT(NULL), int iterations CV_DEFAULT(1) */);
internal static extern void cvInpaint(__CvArrPtr src, __CvArrPtr inpaint_mask, __CvArrPtr dst, double inpaintRange, int flags);
internal static extern void cvIntegral(__CvImagePtr image, __CvArrPtr sum, __CvArrPtr sqsum, __CvArrPtr tilted_sum);
internal static extern void cvLaplace(__CvArrPtr src, __CvArrPtr dst, int aperture_size /* CV_DEFAULT(3) */);
internal static extern void cvLogPolar(__CvArrPtr src, __CvArrPtr dst, __CvPoint2D32f center, double M, int flags /* CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS) */);
internal static extern void cvMorphologyEx(__CvArrPtr src, __CvArrPtr dst, __CvArrPtr temp, __IplConvKernelPtr element, int operation, int iterations /* CV_DEFAULT(1) */);
internal static extern void cvMatchTemplate(__CvArrPtr image, __CvArrPtr templ, __CvArrPtr result, int method);
internal static extern void cvMinMaxLoc(__CvArrPtr arr, ref double min_val, ref double max_val, ref __CvPoint min_loc, ref __CvPoint max_loc, __CvArrPtr mask);
internal static extern void cvSmooth(__CvArrPtr src, __CvArrPtr dst, int smoothtype, int param1, int param2, double param3, double param4);
internal static extern void cvPyrMeanShiftFiltering(__CvArrPtr src, __CvArrPtr dst, double sp, double sr, int max_level /* CV_DEFAULT(1) */, CVTermCriteria termcrit /* CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,5,1)) */);
internal static extern void cvResize(__CvArrPtr src, __CvArrPtr dst, int interpolation /* CV_DEFAULT( CV_INTER_LINEAR ) */);
public static extern void cvPreCornerDetect(__CvArrPtr image, __CvArrPtr corners, int aperture_size);