Example #1
0
        //
        // C++:  void detect(Mat img, vector_Point& foundLocations, vector_double& weights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), vector_Point searchLocations = std::vector<Point>())
        //

        //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride, padding, searchLocations)
        public void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations)
        {
            ThrowIfDisposed();
            if (img != null)
            {
                img.ThrowIfDisposed();
            }
            if (foundLocations != null)
            {
                foundLocations.ThrowIfDisposed();
            }
            if (weights != null)
            {
                weights.ThrowIfDisposed();
            }
            if (searchLocations != null)
            {
                searchLocations.ThrowIfDisposed();
            }
#if UNITY_PRO_LICENSE || ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            Mat foundLocations_mat  = foundLocations;
            Mat weights_mat         = weights;
            Mat searchLocations_mat = searchLocations;
            objdetect_HOGDescriptor_detect_10(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, searchLocations_mat.nativeObj);

            return;
#else
            return;
#endif
        }
Example #2
0
        //javadoc: HOGDescriptor::detect(img, foundLocations, weights)
        public void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights)
        {
            ThrowIfDisposed();
            if (img != null)
            {
                img.ThrowIfDisposed();
            }
            if (foundLocations != null)
            {
                foundLocations.ThrowIfDisposed();
            }
            if (weights != null)
            {
                weights.ThrowIfDisposed();
            }
#if UNITY_PRO_LICENSE || ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            Mat foundLocations_mat = foundLocations;
            Mat weights_mat        = weights;
            objdetect_HOGDescriptor_detect_11(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj);

            return;
#else
            return;
#endif
        }
Example #3
0
        //
        // C++:  void compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
        //

        //javadoc: HOGDescriptor::compute(img, descriptors, winStride, padding, locations)
        public void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
        {
            ThrowIfDisposed();
            if (img != null)
            {
                img.ThrowIfDisposed();
            }
            if (descriptors != null)
            {
                descriptors.ThrowIfDisposed();
            }
            if (locations != null)
            {
                locations.ThrowIfDisposed();
            }
#if UNITY_PRO_LICENSE || ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            Mat descriptors_mat = descriptors;
            Mat locations_mat   = locations;
            objdetect_HOGDescriptor_compute_10(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj);

            return;
#else
            return;
#endif
        }