示例#1
0
 public HSV888Image(HSV888Image image) : this(VisionLabPINVOKE.new_HSV888Image__SWIG_3(HSV888Image.getCPtr(image)), true)
 {
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#2
0
        /*  Description:
         *      Find the largest license plate in the image
         *          - Segment using ThresholdHSVchannels
         *          - Remove blobs which are not license plates
         *  Input:
         *          //Original image
         *          RGB888Image plateImage
         *  Output:
         *          //Segmented license plate
         *          ref Int32Image binaryPlateImage
         *  Return:
         *          //License plate found?
         *          bool
         */
        public static bool FindPlate(RGB888Image plateImage, ref Int32Image binaryPlateImage)
        {
            //Constants
            const int c_threshold_h_min  = 21;
            const int c_threshold_h_max  = 50;
            const int c_threshold_s_min  = 100;
            const int c_threshold_s_max  = 255;
            const int c_threshold_v_min  = 100;
            const int c_threshold_v_max  = 255;
            const int c_remove_blobs_min = 1;
            const int c_remove_blobs_max = 5000;

            //*******************************//
            //** Exercise:                 **//
            //**   adjust licenseplate     **//
            //**   segmentation            **//
            //*******************************//

            //Find licenseplate
            HSV888Image plateImageHSV = new HSV888Image();

            //Convert to RGB to HSV
            VisionLab.FastRGBToHSV(plateImage, plateImageHSV);

            //Threshold HSV image
            VisionLab.Threshold3Channels(plateImageHSV, binaryPlateImage, c_threshold_h_min, c_threshold_h_max, c_threshold_s_min, c_threshold_s_max, c_threshold_v_min, c_threshold_v_max);

            //Remove blobs with small areas
            VisionLab.RemoveBlobs(binaryPlateImage, Connected.EightConnected, BlobAnalyse.BA_Area, c_remove_blobs_min, c_remove_blobs_max);

            plateImageHSV.Dispose();
            //GC.Collect();
            //Return true, if pixels found
            return(VisionLab.SumIntPixels(binaryPlateImage) > 0);
        }
 public virtual void SnapShot(HSV888Image image)
 {
     VisionLabPINVOKE.Camera_HSV8_SnapShot__SWIG_1(swigCPtr, HSV888Image.getCPtr(image));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
    public double TrainImage(double learnRate, double momentum, HSV888Image image, int classNr)
    {
        double ret = VisionLabPINVOKE.BPN_ImageClassifier_HSV8_TrainImage(swigCPtr, learnRate, momentum, HSV888Image.getCPtr(image), classNr);

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
    public double EvaluateImage(HSV888Image image, int classExp, ref int classRes, ref double confidency, vector_double output)
    {
        double ret = VisionLabPINVOKE.BPN_ImageClassifier_HSV8_EvaluateImage(swigCPtr, HSV888Image.getCPtr(image), classExp, ref classRes, ref confidency, vector_double.getCPtr(output));

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
    public double ClassifyOutputTab(HSV888Image image, vector_ClassOutput outputTab)
    {
        double ret = VisionLabPINVOKE.BPN_ImageClassifier_HSV8_ClassifyOutputTab(swigCPtr, HSV888Image.getCPtr(image), vector_ClassOutput.getCPtr(outputTab));

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
    public int Classify(HSV888Image image, ref double confidency)
    {
        int ret = VisionLabPINVOKE.BPN_ImageClassifier_HSV8_Classify(swigCPtr, HSV888Image.getCPtr(image), ref confidency);

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
    public int AddImage(string className, HSV888Image image)
    {
        int ret = VisionLabPINVOKE.ClassFeatureSet_HSV8_AddImage(swigCPtr, className, HSV888Image.getCPtr(image));

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
    public HSV888Image GetImage(string className, int imageIndex)
    {
        HSV888Image ret = new HSV888Image(VisionLabPINVOKE.ClassFeatureSet_HSV8_GetImage(swigCPtr, className, imageIndex), false);

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
    public bool GetImage(string imageName, HSV888Image image)
    {
        bool ret = VisionLabPINVOKE.VisLibCmdInt_GetImage__SWIG_9(swigCPtr, imageName, HSV888Image.getCPtr(image));

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
        /*
         *  Description:
         *      Find the largest license plate in the image
         *      - Segment using ThresholdHSVchannels
         *      - Remove blobs which are not license plates
         *  Input:
         *      //Original image
         *      RGB888Image plateImage
         *  Output:
         *      //Segmented license plate
         *      ref Int32Image binaryPlateImage
         *  Return:
         *      //License plate found?
         *      bool
         */
        public static bool FindPlate(RGB888Image plateImage, ref Int32Image binaryPlateImage)
        {
            try
            {
                //Constants
                const int c_threshold_h_min = 14;
                const int c_threshold_h_max = 50;
                const int c_threshold_s_min = 100;
                const int c_threshold_s_max = 255;
                const int c_threshold_v_min = 46;
                const int c_threshold_v_max = 255;

                //*******************************//
                //** Exercise:                 **//
                //**   adjust licenseplate     **//
                //**   segmentation            **//
                //*******************************//

                //Find licenseplate
                HSV888Image plateImageHSV = new HSV888Image();
                //Convert to RGB to HSV
                VisionLab.FastRGBToHSV(plateImage, plateImageHSV);

                //Threshold HSV image
                VisionLab.Threshold3Channels(plateImageHSV, binaryPlateImage, c_threshold_h_min, c_threshold_h_max, c_threshold_s_min, c_threshold_s_max, c_threshold_v_min, c_threshold_v_max);


                VisionLab.LabelBlobs(binaryPlateImage, Connected.EightConnected);

                VisionLab.RemoveBlobs(binaryPlateImage, Connected.EightConnected, BlobAnalyse.BA_LengthBreadthRatio, 0.0, 2.50);
                VisionLab.RemoveBlobs(binaryPlateImage, Connected.EightConnected, BlobAnalyse.BA_LengthBreadthRatio, 10.0, 9999.0);

                //Remove blobs with small areas
                VisionLab.RemoveBlobs(binaryPlateImage, Connected.EightConnected, BlobAnalyse.BA_Area, 1, 1000, UseXOrY.UseX);
                //VisionLab.RemoveBlobs(binaryPlateImage, Connected.EightConnected, BlobAnalyse.BA_Area, 80000, 120000);

                //Fill up characters
                VisionLab.FillHoles(binaryPlateImage, Connected.EightConnected);

                plateImageHSV.Dispose();
                //Return true, if pixels found
                return(VisionLab.SumIntPixels(binaryPlateImage) > 0);
            }
            catch (System.Exception ex)
            {
                throw new Exception("FindPlate: " + ex.Message);
            }
        }
 public static void Zoom(HSV888Image src, HSV888Image dest, double factorX, double factorY, PixelInterpolation pi) {
   VisionLabPINVOKE.Zoom__SWIG_38(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest), factorX, factorY, (int)pi);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(HSV888Image obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
 public double ClassifyOutputTab(HSV888Image image, vector_ClassOutput outputTab) {
   double ret = VisionLabPINVOKE.BPN_ImageClassifier_HSV8_ClassifyOutputTab(swigCPtr, HSV888Image.getCPtr(image), vector_ClassOutput.getCPtr(outputTab));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
 public double TrainImage(double learnRate, double momentum, HSV888Image image, int classNr) {
   double ret = VisionLabPINVOKE.BPN_ImageClassifier_HSV8_TrainImage(swigCPtr, learnRate, momentum, HSV888Image.getCPtr(image), classNr);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
 public static int CountPixel(HSV888Image image, HSV888Pixel value) {
   int ret = VisionLabPINVOKE.CountPixel__SWIG_9(HSV888Image.getCPtr(image), HSV888Pixel.getCPtr(value));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
 public static void FastRGBToHSV(RGB888Image src, HSV888Image dest) {
   VisionLabPINVOKE.FastRGBToHSV(RGB888Image.getCPtr(src), HSV888Image.getCPtr(dest));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void AddBorder(HSV888Image src, HSV888Image dest, int top, int left, int right, int bottom, HSV888Pixel value) {
   VisionLabPINVOKE.AddBorder__SWIG_9(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest), top, left, right, bottom, HSV888Pixel.getCPtr(value));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void NormaliseHue(HSV888Image src, byte hue, byte minVal, byte minSat, FloatImage dest) {
   VisionLabPINVOKE.NormaliseHue__SWIG_7(HSV888Image.getCPtr(src), hue, minVal, minSat, FloatImage.getCPtr(dest));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void Threshold3Channels(HSV888Image image, DoubleImage thresImage, int lowChan1, int highChan1, int lowChan2, int highChan2, int lowChan3, int highChan3) {
   VisionLabPINVOKE.Threshold3Channels__SWIG_18(HSV888Image.getCPtr(image), DoubleImage.getCPtr(thresImage), lowChan1, highChan1, lowChan2, highChan2, lowChan3, highChan3);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void Extract3Channels(HSV888Image image, DoubleImage chan1, DoubleImage chan2, DoubleImage chan3) {
   VisionLabPINVOKE.Extract3Channels__SWIG_18(HSV888Image.getCPtr(image), DoubleImage.getCPtr(chan1), DoubleImage.getCPtr(chan2), DoubleImage.getCPtr(chan3));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void ConvertToFalseColor(DoubleImage src, HSV888Image lut, HSV888Image dest) {
   VisionLabPINVOKE.ConvertToFalseColor__SWIG_18(DoubleImage.getCPtr(src), HSV888Image.getCPtr(lut), HSV888Image.getCPtr(dest));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void Zoom(HSV888Image src, HSV888Image dest, HeightWidth hw, PixelInterpolation pi) {
   VisionLabPINVOKE.Zoom__SWIG_39(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest), HeightWidth.getCPtr(hw), (int)pi);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
示例#24
0
 internal static HandleRef getCPtr(HSV888Image obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
 public static void TextOnImage(HSV888Image image, int left, int top, string font, string text) {
   VisionLabPINVOKE.TextOnImage__SWIG_9(HSV888Image.getCPtr(image), left, top, font, text);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void ROIR(HSV888Image src, HSV888Image dest, XYCoord middle, XYCoord endpoint1, XYCoord endpoint2, Orientation orien, PixelInterpolation pi) {
   VisionLabPINVOKE.ROIR__SWIG_39(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest), XYCoord.getCPtr(middle), XYCoord.getCPtr(endpoint1), XYCoord.getCPtr(endpoint2), (int)orien, (int)pi);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void Extract1Channel(HSV888Image image, int chanNr, DoubleImage chan) {
   VisionLabPINVOKE.Extract1Channel__SWIG_24(HSV888Image.getCPtr(image), chanNr, DoubleImage.getCPtr(chan));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void Rotate(HSV888Image src, HSV888Image dest, XYCoord centre, double phi, HSV888Pixel borderValue, PixelInterpolation pi) {
   VisionLabPINVOKE.Rotate__SWIG_19(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest), XYCoord.getCPtr(centre), phi, HSV888Pixel.getCPtr(borderValue), (int)pi);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void Merge3Channels(DoubleImage chan1, DoubleImage chan2, DoubleImage chan3, HSV888Image image) {
   VisionLabPINVOKE.Merge3Channels__SWIG_18(DoubleImage.getCPtr(chan1), DoubleImage.getCPtr(chan2), DoubleImage.getCPtr(chan3), HSV888Image.getCPtr(image));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static XYCoord RotateFull(HSV888Image src, HSV888Image dest, double phi, HSV888Pixel borderValue, PixelInterpolation pi) {
   XYCoord ret = new XYCoord(VisionLabPINVOKE.RotateFull__SWIG_19(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest), phi, HSV888Pixel.getCPtr(borderValue), (int)pi), true);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
 public static void Extract1Channel(HSV888Image image, HSVColor plane, DoubleImage chan) {
   VisionLabPINVOKE.Extract1Channel__SWIG_77(HSV888Image.getCPtr(image), (int)plane, DoubleImage.getCPtr(chan));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void SetBorders(HSV888Image image, HSV888Pixel value) {
   VisionLabPINVOKE.SetBorders__SWIG_19(HSV888Image.getCPtr(image), HSV888Pixel.getCPtr(value));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void ConvertHSV161616To888Image(HSV161616Image src, HSV888Image dest) {
   VisionLabPINVOKE.ConvertHSV161616To888Image(HSV161616Image.getCPtr(src), HSV888Image.getCPtr(dest));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void SwapQuadrants(HSV888Image src, HSV888Image dest) {
   VisionLabPINVOKE.SwapQuadrants__SWIG_9(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void BlockPattern(HSV888Image image, XYCoord leftTop, int height, int width, HSV888Pixel value, int repeatx, int repeaty) {
   VisionLabPINVOKE.BlockPattern__SWIG_19(HSV888Image.getCPtr(image), XYCoord.getCPtr(leftTop), height, width, HSV888Pixel.getCPtr(value), repeatx, repeaty);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void TranslateCyclic(HSV888Image src, HSV888Image dest, XYCoord vector) {
   VisionLabPINVOKE.TranslateCyclic__SWIG_9(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest), XYCoord.getCPtr(vector));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void CircleShape(HSV888Image image, XYCoord centre, int r, HSV888Pixel value) {
   VisionLabPINVOKE.CircleShape__SWIG_19(HSV888Image.getCPtr(image), XYCoord.getCPtr(centre), r, HSV888Pixel.getCPtr(value));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void Warp(HSV888Image src, HSV888Image dest, TransformDirection dir, Coord2D leftTop, Coord2D rightTop, Coord2D leftBottom, Coord2D rightBottom, int height, int width, HSV888Pixel border, PixelInterpolation pi) {
   VisionLabPINVOKE.Warp__SWIG_19(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest), (int)dir, Coord2D.getCPtr(leftTop), Coord2D.getCPtr(rightTop), Coord2D.getCPtr(leftBottom), Coord2D.getCPtr(rightBottom), height, width, HSV888Pixel.getCPtr(border), (int)pi);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static void DeInterlace(HSV888Image image) {
   VisionLabPINVOKE.DeInterlace__SWIG_9(HSV888Image.getCPtr(image));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public static int XYCoordTabFromImage(HSV888Image image, vector_XYCoord tab, HSV888Pixel low, HSV888Pixel high) {
   int ret = VisionLabPINVOKE.XYCoordTabFromImage__SWIG_19(HSV888Image.getCPtr(image), vector_XYCoord.getCPtr(tab), HSV888Pixel.getCPtr(low), HSV888Pixel.getCPtr(high));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
 public int Classify(HSV888Image image, ref double confidency) {
   int ret = VisionLabPINVOKE.BPN_ImageClassifier_HSV8_Classify(swigCPtr, HSV888Image.getCPtr(image), ref confidency);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
 public static void Zoom(HSV888Image src, HSV888Image dest, HeightWidth hw) {
   VisionLabPINVOKE.Zoom__SWIG_37(HSV888Image.getCPtr(src), HSV888Image.getCPtr(dest), HeightWidth.getCPtr(hw));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public double EvaluateImage(HSV888Image image, int classExp, ref int classRes, ref double confidency, vector_double output) {
   double ret = VisionLabPINVOKE.BPN_ImageClassifier_HSV8_EvaluateImage(swigCPtr, HSV888Image.getCPtr(image), classExp, ref classRes, ref confidency, vector_double.getCPtr(output));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
        /*  Description:
         *      Find the largest license plate in the image
         *          - Segment using ThresholdHSVchannels
         *          - Remove blobs which are not license plates
         *  Input:
         *          //Original image
         *          RGB888Image plateImage
         *  Output:
         *          //Segmented license plate
         *          ref Int16Image binaryPlateImage
         *  Return:
         *          //License plate found?
         *          bool
         */
        public static bool FindPlate(RGB888Image plateImage, ref Int16Image binaryPlateImage, TresholdConditions state)
        {
            //Constants
            int c_threshold_h_min  = 0;
            int c_threshold_h_max  = 0;
            int c_threshold_s_min  = 0;
            int c_threshold_s_max  = 0;
            int c_threshold_v_min  = 0;
            int c_threshold_v_max  = 0;
            int c_remove_blobs_min = 0;
            int c_remove_blobs_max = 500;

            switch (state)
            {
            case (TresholdConditions.NORMAAL):
                c_threshold_h_min = 21;
                c_threshold_h_max = 50;
                c_threshold_s_min = 100;
                c_threshold_s_max = 255;
                c_threshold_v_min = 100;
                c_threshold_v_max = 255;
                break;

            case (TresholdConditions.ONDERBELICHT):
                c_threshold_h_min = 11;
                c_threshold_h_max = 119;
                c_threshold_s_min = 23;
                c_threshold_s_max = 255;
                c_threshold_v_min = 56;
                c_threshold_v_max = 176;
                break;

            case (TresholdConditions.OVERBELICHT):
                c_threshold_h_min = 0;
                c_threshold_h_max = 241;
                c_threshold_s_min = 29;
                c_threshold_s_max = 241;
                c_threshold_v_min = 249;
                c_threshold_v_max = 255;
                break;
            }

            //*******************************//
            //** Exercise:                 **//
            //**   adjust licenseplate     **//
            //**   segmentation            **//
            //*******************************//

            //Find licenseplate
            HSV888Image plateImageHSV = new HSV888Image();

            //Convert to RGB to HSV
            VisionLab.FastRGBToHSV(plateImage, plateImageHSV);

            //Threshold HSV image
            VisionLab.Threshold3Channels(plateImageHSV, binaryPlateImage, c_threshold_h_min, c_threshold_h_max, c_threshold_s_min, c_threshold_s_max, c_threshold_v_min, c_threshold_v_max);

            //Convert to a 32 bit format
            Int32Image binaryPlateImage32 = new Int32Image();

            VisionLab.Convert(binaryPlateImage, binaryPlateImage32);

            //Remove blobs with small areas
            VisionLab.RemoveBlobs(binaryPlateImage32, Connected.EightConnected, BlobAnalyse.BA_Area, c_remove_blobs_min, c_remove_blobs_max);

            //Remove border blobs
            VisionLab.RemoveBorderBlobs(binaryPlateImage32, Connected.EightConnected, Border.AllBorders);

            //Length Breath Ratio
            VisionLab.RemoveBlobs(binaryPlateImage32, Connected.EightConnected, BlobAnalyse.BA_LengthBreadthRatio, 0, 2.5);
            VisionLab.RemoveBlobs(binaryPlateImage32, Connected.EightConnected, BlobAnalyse.BA_LengthBreadthRatio, 6.7, 10);

            // Remove blobs that have to less holes
            VisionLab.RemoveBlobs(binaryPlateImage32, Connected.EightConnected, BlobAnalyse.BA_NrOfHoles, 0, 5);
            // And remove blobs that have a to small area for the holes
            VisionLab.RemoveBlobs(binaryPlateImage32, Connected.EightConnected, BlobAnalyse.BA_AreaHoles, 0, 200);

            //Convert back to a 16 bit format
            VisionLab.Convert(binaryPlateImage32, binaryPlateImage);

            //binPlateImage32.Dispose();
            binaryPlateImage32.Dispose();
            plateImageHSV.Dispose();

            GC.Collect();

            //Return true, if pixels found
            return(VisionLab.SumIntPixels(binaryPlateImage) > 0);
            //return VisionLab.LabelBlobs(binaryPlateImage, Connected.EightConnected) == 1;
        }