Пример #1
0
        public static void Main()
        {
            {
                TestLogger.Log("Testing cpobj...");
                var s = new Struct();
                TestLogger.Log(s.ToString());
                s.a = 3;
                s.b = true;
                s.c = 'x';
                s.d = 4;
                s.e = 2.5f;
                s.f = 9.4;
                s.g.x = 10;
                s.g.y = 12;
                s.h = "test";
                TestLogger.Log(s.ToString());
                var t = new Struct();
                TestLogger.Log(t.ToString());
                CopyStruct(ref s, ref t);
                TestLogger.Log(t.ToString());
            }

            {
                TestLogger.Log("Testing ldflda...");
                var s = new Struct();
                s.a = 3;
                s.g.x = 10;
                LogInt(ref s.a);
                LogInt(ref s.g.x);
            }

            {
                TestLogger.Log("Testing indexer...");
                Arr arr = new Arr();
                for (var i = 0; i < arr.Count; i++)
                    arr[i] = i * 37 % 11;
                for (var i = 0; i < arr.Count; i++)
                    TestLogger.Log(arr[i]);
            }

            {
                TestLogger.Log("Testing parameters...");
                var p = new Params(1, 2, 3, 4, 5);
                TestLogger.Log(p.ToString());
            }

        }
Пример #2
0
 internal static extern double cvThreshold(
     Arr src,
     Arr dst,
     double threshold,
     double max_value,
     ThresholdTypes threshold_type);
Пример #3
0
 internal static extern void cvCalcArrBackProject(IntPtr[] image, Arr dst, Histogram hist);
Пример #4
0
 internal static extern void cvCopyMakeBorder(Arr src, Arr dst, Point offset, IplBorder bordertype, Scalar value);
Пример #5
0
 internal static extern void cvRunningAvg(Arr image, Arr acc, double alpha, Arr mask);
Пример #6
0
 internal static extern void cvMatchTemplate(Arr image, Arr templ, Arr result, TemplateMatchingMethod method);
Пример #7
0
 internal static extern void cvGetRectSubPix(Arr src, Arr dst, Point2f center);
Пример #8
0
 internal static extern void cvSquareAcc(Arr image, Arr sqsum, Arr mask);
Пример #9
0
        internal static void DrawEdge(int row, int column, Arr gradientMap, Arr directionMap, Arr edgeMap, int rows, int columns)
        {
            var edgel = edgeMap.GetReal(row, column);

            if (edgel != 0)
            {
                return;
            }

            var direction = directionMap.GetReal(row, column);

            if (direction == Gradients.HorizontalValue)
            { // go horizontal
                GoLeft(row, column, gradientMap, directionMap, edgeMap, rows, columns);
                GoRight(row, column, gradientMap, directionMap, edgeMap, rows, columns);
            }
            else
            { // go vertical
                GoUp(row, column, gradientMap, directionMap, edgeMap, rows, columns);
                GoDown(row, column, gradientMap, directionMap, edgeMap, rows, columns);
            }
        }
Пример #10
0
 internal static extern void cvShowImage(string name, Arr image);
Пример #11
0
 internal static extern void cvAddText(Arr img, string text, Point org, Font arg2);
Пример #12
0
 internal static extern void cvConvertImage(Arr src, Arr dst, ConvertImageFlags flags);
Пример #13
0
 internal static extern IntPtr cvEncodeImage(string ext, Arr image, int[] parameters);
Пример #14
0
 internal static extern int cvSaveImage(string filename, Arr image, int[] parameters);
Пример #15
0
 public void TestIndexOfNull()
 {
     Assert.AreEqual(-1, Arr.IndexOf(null, new[] { "d", "e" }));
 }
Пример #16
0
 static void MarkWorkspacesInactive(Arr<Json> workspaces)
 {
     foreach (LayoutInfo layoutInfo in workspaces) {
         layoutInfo.ActiveWorkspace = false;
     }
 }
Пример #17
0
 internal static extern void cvDilate(Arr src, Arr dst, IplConvKernel element, int iterations);
Пример #18
0
 internal static extern void cvWarpPerspective(Arr src, Arr dst, Mat map_matrix, WarpFlags flags, Scalar fillval);
Пример #19
0
 internal static extern int cvSampleLine(Arr image, Point pt1, Point pt2, IntPtr buffer, LineType connectivity);
Пример #20
0
 internal static extern void cvRemap(Arr src, Arr dst, Arr mapx, Arr mapy, WarpFlags flags, Scalar fillval);
Пример #21
0
 internal static extern void cvGetQuadrangleSubPix(Arr src, Arr dst, Mat map_matrix);
Пример #22
0
 internal static extern void cvConvertMaps(Arr mapx, Arr mapy, Arr mapxy, Arr mapalpha);
Пример #23
0
 internal static extern void cvMultiplyAcc(Arr image1, Arr image2, Arr acc, Arr mask);
Пример #24
0
 internal static extern void cvLogPolar(Arr src, Arr dst, Point2f center, double M, WarpFlags flags);
Пример #25
0
 internal static extern Seq cvPointSeqFromMat(int seq_kind, Arr mat, Contour contour_header, IntPtr block);
Пример #26
0
 internal static extern void cvLinearPolar(Arr src, Arr dst, Point2f center, double maxRadius, WarpFlags flags);
Пример #27
0
 internal static extern void cvCalcArrHist(IntPtr[] arr, Histogram hist, int accumulate, Arr mask);
Пример #28
0
 internal static extern void cvUndistort2(Arr src, Arr dst, Mat camera_matrix, Mat distortion_coeffs, Mat new_camera_matrix);
Пример #29
0
 internal static extern void cvEqualizeHist(Arr src, Arr dst);
Пример #30
0
 internal static extern void cvInitUndistortMap(Mat camera_matrix, Mat distortion_coeffs, Arr mapx, Arr mapy);
Пример #31
0
 internal static extern void cvCanny(Arr image, Arr edges, double threshold1, double threshold2, int aperture_size);
Пример #32
0
 internal static extern void cvAcc(Arr image, Arr sum, Arr mask);