示例#1
0
        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);
        }
示例#2
0
 public static void cvCalcArrHist(__CvArrPtr[] image, IntPtr dst, int accumulate)
 {
     cvCalcArrHist(image, dst, accumulate, IntPtr.Zero);
 }
示例#3
0
 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)) */);
示例#4
0
 internal static extern void cvCalcPyramid(__CvImagePtr src, __CvArrPtr container, IntPtr levels, int level_count, int filter);
示例#5
0
 internal static extern void cvSobel(__CvArrPtr src, __CvArrPtr dst, int xorder, int yorder, int aperture_size /* CV_DEFAULT(3) */);
示例#6
0
 internal static extern void cvMoments(__CvArrPtr arr, __CvMomentsPtr moments, int binary /* CV_DEFAULT(0) */);
示例#7
0
 internal static extern void cvCopyMakeBorder(__CvArrPtr src, __CvArrPtr dst, __CvPoint offset, int bordertype, __CvScalar value);
示例#8
0
 public static extern int cvCamShift(__CvArrPtr prob, __CvRect window, __CvTermCriteria criteria, ref __CvConnectedComp comp, /*__CvBox2D*/ IntPtr box);
示例#9
0
 public static int cvCamShift(__CvArrPtr prob, __CvRect window, __CvTermCriteria criteria, ref __CvConnectedComp comp)
 {
     return cvCamShift(prob, window, criteria, ref comp, IntPtr.Zero);
 }
示例#10
0
 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);
 }
示例#11
0
 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);
 }
示例#12
0
 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);
 }
示例#13
0
 /// <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);
 }
示例#14
0
 /// <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);
 }
示例#15
0
 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)) */);
示例#16
0
 internal static extern void cvCalcPyramid(__CvImagePtr src, __CvArrPtr container, IntPtr levels, int level_count, int filter);
示例#17
0
 internal static extern void cvDilate(__CvArrPtr src, __CvArrPtr dst, __IplConvKernelPtr element /* CV_DEFAULT(NULL) */, int iterations /* CV_DEFAULT(1) */);
示例#18
0
 internal static extern void cvCanny(__CvArrPtr image, __CvArrPtr dst, double threshold1, double threshold2, int apertureSize);
示例#19
0
 internal static extern void cvCanny(__CvArrPtr image, __CvArrPtr dst, double threshold1, double threshold2, int apertureSize);
示例#20
0
 internal static extern void cvCopyMakeBorder(__CvArrPtr src, __CvArrPtr dst, __CvPoint offset, int bordertype, __CvScalar value);
示例#21
0
 internal static extern void cvFilter2D(__CvArrPtr src, __CvArrPtr dst, __CvMatPtr kernel, __CvPoint anchor);
示例#22
0
 internal static extern void cvCvtColor(__CvArrPtr src, __CvArrPtr dst, int code);
示例#23
0
 internal static extern void cvWatershed(__CvArrPtr image, __CvArrPtr markers);
示例#24
0
 internal static extern void cvErode(__CvArrPtr src, __CvArrPtr dst, __IplConvKernelPtr element /* CV_DEFAULT(NULL), int iterations CV_DEFAULT(1) */);
示例#25
0
 internal static extern void cvCvtColor(__CvArrPtr src, __CvArrPtr dst, int code);
示例#26
0
 internal static extern void cvFilter2D(__CvArrPtr src, __CvArrPtr dst, __CvMatPtr kernel, __CvPoint anchor);
示例#27
0
 internal static extern void cvSobel(__CvArrPtr src, __CvArrPtr dst, int xorder, int yorder, int aperture_size /* CV_DEFAULT(3) */);
示例#28
0
 internal static extern void cvInpaint(__CvArrPtr src, __CvArrPtr inpaint_mask, __CvArrPtr dst, double inpaintRange, int flags);
示例#29
0
 internal static extern void cvWatershed(__CvArrPtr image, __CvArrPtr markers);
示例#30
0
 internal static extern void cvIntegral(__CvImagePtr image, __CvArrPtr sum, __CvArrPtr sqsum, __CvArrPtr tilted_sum);
示例#31
0
 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)) */);
示例#32
0
 internal static extern void cvLaplace(__CvArrPtr src, __CvArrPtr dst, int aperture_size /* CV_DEFAULT(3) */);
示例#33
0
 internal static extern void cvLogPolar(__CvArrPtr src, __CvArrPtr dst, __CvPoint2D32f center, double M, int flags /* CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS) */);
示例#34
0
 internal static extern void cvLogPolar(__CvArrPtr src, __CvArrPtr dst, __CvPoint2D32f center, double M, int flags /* CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS) */);
示例#35
0
 internal static extern void cvMorphologyEx(__CvArrPtr src, __CvArrPtr dst, __CvArrPtr temp, __IplConvKernelPtr element, int operation, int iterations /* CV_DEFAULT(1) */);
示例#36
0
 internal static extern void cvMatchTemplate(__CvArrPtr image, __CvArrPtr templ, __CvArrPtr result, int method);
示例#37
0
 internal static extern void cvMatchTemplate(__CvArrPtr image, __CvArrPtr templ, __CvArrPtr result, int method);
示例#38
0
 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);
示例#39
0
 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);
示例#40
0
 internal static extern void cvMoments(__CvArrPtr arr, __CvMomentsPtr moments, int binary /* CV_DEFAULT(0) */);
示例#41
0
 internal static extern void cvSmooth(__CvArrPtr src, __CvArrPtr dst, int smoothtype, int param1, int param2, double param3, double param4);
示例#42
0
 internal static extern void cvMorphologyEx(__CvArrPtr src, __CvArrPtr dst, __CvArrPtr temp, __IplConvKernelPtr element, int operation, int iterations /* CV_DEFAULT(1) */);
示例#43
0
 internal static extern void cvIntegral(__CvImagePtr image, __CvArrPtr sum, __CvArrPtr sqsum, __CvArrPtr tilted_sum);
示例#44
0
 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)) */);
示例#45
0
 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)) */);
示例#46
0
 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)) */);
示例#47
0
 internal static extern void cvInpaint(__CvArrPtr src, __CvArrPtr inpaint_mask, __CvArrPtr dst, double inpaintRange, int flags);
示例#48
0
 internal static extern void cvResize(__CvArrPtr src, __CvArrPtr dst, int interpolation /* CV_DEFAULT( CV_INTER_LINEAR ) */);
示例#49
0
 internal static extern void cvLaplace(__CvArrPtr src, __CvArrPtr dst, int aperture_size /* CV_DEFAULT(3) */);
示例#50
0
 internal static extern void cvSmooth(__CvArrPtr src, __CvArrPtr dst, int smoothtype, int param1, int param2, double param3, double param4);
示例#51
0
 internal static extern void cvResize(__CvArrPtr src, __CvArrPtr dst, int interpolation /* CV_DEFAULT( CV_INTER_LINEAR ) */);
示例#52
0
 public static extern void cvPreCornerDetect(__CvArrPtr image, __CvArrPtr corners, int aperture_size);