Ejemplo n.º 1
0
        public override void MapToModel(CampaignDTO dto, Campaign model)
        {
            ////BCC/ BEGIN CUSTOM CODE SECTION

            ByteImageMapper   imageMapper  = new ByteImageMapper();
            IList <ByteImage> auxImageList = new List <ByteImage> {
            };

            foreach (ByteImageDTO imageDTO in dto.imagesList)
            {
                ByteImage imageModel = new ByteImage();
                imageMapper.MapToModel(imageDTO, imageModel);
                auxImageList.Add(imageModel);
            }

            ////ECC/ END CUSTOM CODE SECTION
            model.id         = dto.id;
            model.name       = dto.name;
            model.interval   = dto.interval;
            model.initDate   = dto.initDate;
            model.endDate    = dto.endDate;
            model.initTime   = dto.initTime;
            model.endTime    = dto.endTime;
            model.imagesList = auxImageList;
        }
Ejemplo n.º 2
0
        public bool Update(ShortImage depth)
        {
            // compute the raw valid pixels for this frame
            ByteImage maskCur = Mask1(depth);

            // initialize the acc image if we need to
            if (mFrameIter == 0)
            {
                mAcc32.Add(depth);
                mCount16.Add(maskCur);
                mMask.Copy(maskCur);
                mFrameIter++;
                return(mFrameIter >= mNumFrames);
            }

            // compute the pixels that don't differ from previous values
            ByteImage diffMask = DiffMask(depth, mAcc32, mFrameIter, mValidDelta * 1000.0f);

            // update the rolling depthMask
            mMask.And(maskCur);
            mMask.And(diffMask);
            mCount16.Add(maskCur);
            mAcc32.Add(depth);
            mFrameIter++;

            maskCur.Dispose();
            diffMask.Dispose();

            return(mFrameIter >= mNumFrames);
        }
Ejemplo n.º 3
0
        public void Compute(out FloatImage avgDepthIm, out FloatImage varDepthIm, out ByteImage mask)
        {
            avgDepthIm = new FloatImage(sum.Width, sum.Height);
            varDepthIm = new FloatImage(sum.Width, sum.Height);
            mask       = new ByteImage(sum.Width, sum.Height);

            for (int r = 0; r < sum.Height; r++)
            {
                for (int c = 0; c < sum.Width; c++)
                {
                    if (n[c, r] > 10) // need at least a few samples
                    {
                        float mean     = sum[c, r] / n[c, r];
                        float variance = sumSquare[c, r] / n[c, r] - mean * mean;

                        varDepthIm[c, r] = variance;

                        if (variance < 0.1 * 0.1)
                        {
                            mask[c, r]       = 255;
                            avgDepthIm[c, r] = mean;
                        }
                        else
                        {
                            mask[c, r]       = 0;
                            avgDepthIm[c, r] = 0;
                        }
                    }
                    else
                    {
                        mask[c, r] = 0;
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private static ByteImage ToChannelImage(this BitmapSource src, int offset)
        {
            if (src.Format == PixelFormats.BlackWhite ||
                src.Format == PixelFormats.Gray2 ||
                src.Format == PixelFormats.Gray4 ||
                src.Format == PixelFormats.Gray8 ||
                src.Format == PixelFormats.Gray16 ||
                src.Format == PixelFormats.Gray32Float)
            {
                return(src.ToIntensityImage());
            }

            var bmp = src.AsBgr24();

            var data = new byte[bmp.PixelWidth * bmp.PixelHeight * 3];

            bmp.CopyPixels(data, bmp.PixelWidth * 3, 0);

            var r = new ByteImage(bmp.PixelWidth, bmp.PixelHeight);

            for (var dy = 0; dy < r.Height; dy++)
            {
                for (var dx = 0; dx < r.Width; dx++)
                {
                    r[dx, dy] = data[(dx + dy * r.Width) * 3 + offset];
                }
            }

            return(r);
        }
Ejemplo n.º 5
0
        private static ByteImage ToChannelImage(this Bitmap bitmap, int offset)
        {
            Bitmap bitmap24Rgb = null;

            try
            {
                bitmap24Rgb = bitmap.ToRgb24();

                var data = bitmap24Rgb.ToBytes();

                var r = new ByteImage(bitmap24Rgb.Width, bitmap24Rgb.Height);

                var stride = bitmap24Rgb.GetStride();
                for (var dy = 0; dy < r.Height; dy++)
                {
                    for (var dx = 0; dx < r.Width; dx++)
                    {
                        r[dx, dy] = data[dx * 3 + stride * dy + offset];
                    }
                }

                return(r);
            }
            finally
            {
                if (bitmap != bitmap24Rgb)
                {
                    bitmap24Rgb?.Dispose();
                }
            }
        }
Ejemplo n.º 6
0
        public static ByteImage ToLuminanceImage(this Texture2D source)
        {
            Color32[] colors = source.GetPixels32();

            ByteImage r = new ByteImage(source.width, source.height);

            System.Numerics.Vector3 yc = new System.Numerics.Vector3(66, 129, 25);
            int i = 0;

            for (int dy = 0; dy < r.Height; dy++)
            {
                for (int dx = 0; dx < r.Width; dx++)
                {
                    System.Numerics.Vector3 sv = new System.Numerics.Vector3();
                    sv.Z = colors[i].r;
                    sv.Y = colors[i].g;
                    sv.Z = colors[i].b;

                    i++;

                    r[dx, dy] = (byte)(((int)(System.Numerics.Vector3.Dot(yc, sv) + 128) >> 8) + 16);
                }
            }

            return(r);
        }
Ejemplo n.º 7
0
 public ByteImage(ByteImage image) : this(VisionLabPINVOKE.new_ByteImage__SWIG_3(ByteImage.getCPtr(image)), true)
 {
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 8
0
        public async Task <ActionResult> CreateBrand()
        {
            try
            {
                var reader = new StreamReader(Request.Body, Encoding.UTF8);
                var s      = await reader.ReadToEndAsync();

                var b   = JsonConvert.DeserializeObject <Brand>(s);
                var img = new ByteImage
                {
                    Data = b.Data,
                    Name = $"{b.Name}-image{DateTime.UtcNow.Millisecond}"
                };
                await _context.ByteImages.AddAsync(img);

                await _context.SaveChangesAsync();

                var brand = b;
                brand.ImageId = img.id;
                await _context.Brands.AddAsync(brand);

                await _context.SaveChangesAsync();

                reader.Dispose();
                return(CreatedAtAction("CreateBrand", brand));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(StatusCode(500));
            }
        }
Ejemplo n.º 9
0
        public async Task <ActionResult> CreateCategory()
        {
            try
            {
                var reader = new StreamReader(Request.Body, Encoding.UTF8);
                var s      = await reader.ReadToEndAsync();

                var c   = JsonConvert.DeserializeObject <Category>(s);
                var img = new ByteImage
                {
                    Data = c.Data,
                    Name = $"{c.Name}-image"
                };
                await _context.ByteImages.AddAsync(img);

                await _context.SaveChangesAsync();

                var cat = c;
                cat.ImageId = img.id;
                await _context.Categories.AddAsync(cat);

                await _context.SaveChangesAsync();

                reader.Dispose();
                return(CreatedAtAction("CreateCategory", cat));
            } catch (Exception e)
            {
                Console.WriteLine(e);
                return(StatusCode(500));
            }
        }
        /// <summary>
        /// Сохранить изображение
        /// </summary>
        /// <param name="image">Изображение</param>
        /// <param name="path">Путь</param>
        public static void Save(ByteImage image, string path)
        {
            var bitmap     = new Bitmap(image.Width, image.Height, image.PixelFormat);
            var bitmapData = bitmap.LockBits(new Rectangle(0, 0, image.Width, image.Height), ImageLockMode.WriteOnly, image.PixelFormat);
            var data       = image.GetBitmapData(bitmapData.Stride);

            Marshal.Copy(data, 0, bitmapData.Scan0, data.Length);
            bitmap.UnlockBits(bitmapData);
            bitmap.SetResolution(image.DpiX, image.DpiY);
            if (image.ColorPalette != null && image.ColorPalette.Entries.Length != 0)
            {
                bitmap.Palette = image.ColorPalette;
            }
            string dir = Path.GetDirectoryName(path);

            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }
            if (image.ImageFormat != null)
            {
                bitmap.Save(path, image.ImageFormat);
            }
            else
            {
                bitmap.Save(path);
            }
        }
Ejemplo n.º 11
0
        public void Compute(out FloatImage avgDepthIm, out ByteImage mask)
        {
            avgDepthIm = new FloatImage(mAcc32.Width, mAcc32.Height);
            avgDepthIm.Copy(mAcc32);

            for (int r = 0; r < avgDepthIm.Height; r++)
            {
                for (int c = 0; c < avgDepthIm.Width; c++)
                {
                    if (mCount16[c, r] >= 1)
                    {
                        avgDepthIm[c, r] = (float)(avgDepthIm[c, r]) / mCount16[c, r];
                    }
                    else
                    {
                        avgDepthIm[c, r] = 0.0f;
                    }
                    // brett temp debugging
                    //if (avgDepthIm[c, r] == 0 && mMask[c, r] != 0)
                    //    throw new Exception("Should not happen");
                }
            }

            // convert the mask to [0,255]
            mMask.Mult(255);
            mask = mMask;
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Returns a gray scale image that contains the luminance defined in MPEG of the specified image.
        /// </summary>
        /// <param name="source">A <see cref="BitmapSource"/> to compute luminance.</param>
        /// <returns>The new <see cref="ByteImage"/>.</returns>
        public static ByteImage ToLuminanceImage(this BitmapSource source)
        {
            var bmp = source.AsBgr24();

            var data = new byte[bmp.PixelWidth * bmp.PixelHeight * 3];

            bmp.CopyPixels(data, bmp.PixelWidth * 3, 0);

            var r = new ByteImage(bmp.PixelWidth, bmp.PixelHeight);

            var yc = new Vector3(66, 129, 25);
            var i  = 0;

            for (var dy = 0; dy < r.Height; dy++)
            {
                for (var dx = 0; dx < r.Width; dx++)
                {
                    Vector3 sv;
                    sv.Z = data[i++];
                    sv.Y = data[i++];
                    sv.X = data[i++];

                    r[dx, dy] = (byte)(((int)(Vector3.Dot(yc, sv) + 128) >> 8) + 16);
                }
            }

            return(r);
        }
Ejemplo n.º 13
0
 public virtual void Resize(HeightWidth hw, ByteImage properties)
 {
     VisionLabPINVOKE.ByteImage_Resize__SWIG_1(swigCPtr, HeightWidth.getCPtr(hw), ByteImage.getCPtr(properties));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 14
0
 public virtual void SnapShot(ByteImage image)
 {
     VisionLabPINVOKE.__Camera_Byte_SnapShot__SWIG_1(swigCPtr, ByteImage.getCPtr(image));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 15
0
        /// <summary>
        /// Масштабировать изображение
        /// </summary>
        /// <param name="byteImage">Входное изображение</param>
        /// <returns>Увеличенное изображение</returns>
        public override ByteImage ScaleImage(ByteImage byteImage)
        {
            var scale2X = new Scale2x();
            var part1   = scale2X.ScaleImage(byteImage);
            var result  = scale2X.ScaleImage(part1);

            return(result);
        }
Ejemplo n.º 16
0
    public double TrainImage(double learnRate, double momentum, ByteImage image, int classNr)
    {
        double ret = VisionLabPINVOKE.BPN_ImageClassifier_Byte_TrainImage(swigCPtr, learnRate, momentum, ByteImage.getCPtr(image), classNr);

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Ejemplo n.º 17
0
    public override ByteImage PatternImage(string name)
    {
        ByteImage ret = new ByteImage(VisionLabPINVOKE.BlobMatcher_Byte_PatternImage__SWIG_1(swigCPtr, name), false);

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Ejemplo n.º 18
0
    public override int FindPatterns(ByteImage image, float maxError, float minConfindence, float beginAngle, float endAngle, vector_PatternMatchResult labelTab, vector_vector_int patTab)
    {
        int ret = VisionLabPINVOKE.BlobMatcher_Byte_FindPatterns(swigCPtr, ByteImage.getCPtr(image), maxError, minConfindence, beginAngle, endAngle, vector_PatternMatchResult.getCPtr(labelTab), vector_vector_int.getCPtr(patTab));

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Ejemplo n.º 19
0
    public override float AllMatches(ByteImage blob, float beginAngle, float endAngle, vector_PatternMatchResult tab)
    {
        float ret = VisionLabPINVOKE.BlobMatcher_Byte_AllMatches(swigCPtr, ByteImage.getCPtr(blob), beginAngle, endAngle, vector_PatternMatchResult.getCPtr(tab));

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Ejemplo n.º 20
0
    public override int BestMatch(ByteImage blob, float beginAngle, float endAngle, ref float confidence, ref float error, ref float scale, ref float angle)
    {
        int ret = VisionLabPINVOKE.BlobMatcher_Byte_BestMatch(swigCPtr, ByteImage.getCPtr(blob), beginAngle, endAngle, ref confidence, ref error, ref scale, ref angle);

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Ejemplo n.º 21
0
    public override int AddPattern(ByteImage image, string name)
    {
        int ret = VisionLabPINVOKE.BlobMatcher_Byte_AddPattern(swigCPtr, ByteImage.getCPtr(image), name);

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

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

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Ejemplo n.º 24
0
    public double ClassifyOutputTab(ByteImage image, vector_ClassOutput outputTab)
    {
        double ret = VisionLabPINVOKE.BPN_ImageClassifier_Byte_ClassifyOutputTab(swigCPtr, ByteImage.getCPtr(image), vector_ClassOutput.getCPtr(outputTab));

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

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Ejemplo n.º 26
0
    public double EvaluateImage(ByteImage image, int classExp, ref int classRes, ref double confidency, vector_double output)
    {
        double ret = VisionLabPINVOKE.BPN_ImageClassifier_Byte_EvaluateImage(swigCPtr, ByteImage.getCPtr(image), classExp, ref classRes, ref confidency, vector_double.getCPtr(output));

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
    public virtual ByteImage PatternImage(int id)
    {
        ByteImage ret = new ByteImage(VisionLabPINVOKE.PatternMatcher_Byte_PatternImage__SWIG_0(swigCPtr, id), false);

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Ejemplo n.º 28
0
    public int Classify(ByteImage image, ref double confidency)
    {
        int ret = VisionLabPINVOKE.BPN_ImageClassifier_Byte_Classify(swigCPtr, ByteImage.getCPtr(image), ref confidency);

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Ejemplo n.º 29
0
        /// <summary>
        /// Compute the image digest for an image given the input image
        /// </summary>
        /// <param name="image">CImg object representing an input image</param>
        /// <param name="sigma">double value for the deviation for a gaussian filter function</param>
        /// <param name="gamma">double value for gamma correction on the input image</param>
        /// <param name="numberOfAngles">int value for the number of angles to consider.</param>
        /// <returns></returns>
        internal static Digest ComputeDigest(ByteImage image, double sigma, double gamma, int numberOfAngles = 180)
        {
            var blurred = image.Blur(sigma);

            blurred.DiviveInplace(blurred.Max());
            blurred.ApplyGamma(gamma);

            var projs    = FindRadonProjections(blurred, numberOfAngles);
            var features = ComputeFeatureVector(projs);

            return(ComputeDct(features));
        }
Ejemplo n.º 30
0
        /// <summary>
        /// Compute the image digest for an image given the input image
        /// </summary>
        /// <param name="image">CImg object representing an input image</param>
        /// <param name="sigma">double value for the deviation for a gaussian filter function</param>
        /// <param name="gamma">double value for gamma correction on the input image</param>
        /// <param name="numberOfAngles">int value for the number of angles to consider.</param>
        /// <returns></returns>
        protected static Digest ComputeDigest(ByteImage image, double sigma, double gamma, int numberOfAngles = DEFAULT_NUMBER_OF_ANGLES)
        {
            var blurred = image.Blur(sigma);

            blurred.DivideInplace(blurred.Max());
            blurred.ApplyGamma(gamma);

            var projs    = FindRadonProjections(blurred, numberOfAngles);
            var features = ComputeFeatureVector(projs);

            return(ComputeDct(features));
        }
Ejemplo n.º 31
0
 public static int SumIntPixels(ByteImage image) {
   int ret = VisionLabPINVOKE.SumIntPixels__SWIG_1(ByteImage.getCPtr(image));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 32
0
 public static void Remainder(ByteImage dest, ByteImage src) {
   VisionLabPINVOKE.Remainder__SWIG_1(ByteImage.getCPtr(dest), ByteImage.getCPtr(src));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 33
0
 public static void SetMultiToValueLUT(ByteImage image, SWIGTYPE_p_std__setT_unsigned_char_t selectSet, byte value) {
   VisionLabPINVOKE.SetMultiToValueLUT__SWIG_1(ByteImage.getCPtr(image), SWIGTYPE_p_std__setT_unsigned_char_t.getCPtr(selectSet), value);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 34
0
 public static void LUT(ByteImage image, byte minPixel, SWIGTYPE_p_unsigned_char tab) {
   VisionLabPINVOKE.LUT__SWIG_2(ByteImage.getCPtr(image), minPixel, SWIGTYPE_p_unsigned_char.getCPtr(tab));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 35
0
 public static void LUT(ByteImage image, byte minPixel, vector_uchar tab) {
   VisionLabPINVOKE.LUT__SWIG_3(ByteImage.getCPtr(image), minPixel, vector_uchar.getCPtr(tab));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 36
0
 public static int ThresholdIsoData(ByteImage image, ByteImage roi, ObjectBrightness arg2) {
   int ret = VisionLabPINVOKE.ThresholdIsoData__SWIG_3(ByteImage.getCPtr(image), ByteImage.getCPtr(roi), (int)arg2);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 37
0
 public static void InvertLUT(ByteImage image) {
   VisionLabPINVOKE.InvertLUT__SWIG_1(ByteImage.getCPtr(image));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 38
0
 public static void ContrastStretchLUT(ByteImage image, byte low, byte high) {
   VisionLabPINVOKE.ContrastStretchLUT__SWIG_1(ByteImage.getCPtr(image), low, high);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 39
0
 public static void GammaLUT(ByteImage image, double gamma) {
   VisionLabPINVOKE.GammaLUT__SWIG_1(ByteImage.getCPtr(image), gamma);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 40
0
 public static vector_HoughCircle FindBestCircles(ByteImage src, double minR, double maxR, double deltaR) {
   vector_HoughCircle ret = new vector_HoughCircle(VisionLabPINVOKE.FindBestCircles__SWIG_7(ByteImage.getCPtr(src), minR, maxR, deltaR), true);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 41
0
 public static void FastHoughCircleT(ByteImage src, CircleBrightness brightness, byte edgeMin, double minR, double maxR, double deltaR, vector_ByteImage destTab) {
   VisionLabPINVOKE.FastHoughCircleT__SWIG_1(ByteImage.getCPtr(src), (int)brightness, edgeMin, minR, maxR, deltaR, vector_ByteImage.getCPtr(destTab));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 42
0
 public static void DeInterlace(ByteImage image) {
   VisionLabPINVOKE.DeInterlace__SWIG_1(ByteImage.getCPtr(image));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 43
0
 public static void CircleShape(ByteImage image, XYCoord centre, int r, byte value, ZeroOrOriginal zorg) {
   VisionLabPINVOKE.CircleShape__SWIG_2(ByteImage.getCPtr(image), XYCoord.getCPtr(centre), r, value, (int)zorg);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 44
0
 public static void AddBorder(ByteImage src, ByteImage dest, int top, int left, int right, int bottom, byte value) {
   VisionLabPINVOKE.AddBorder__SWIG_1(ByteImage.getCPtr(src), ByteImage.getCPtr(dest), top, left, right, bottom, value);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 45
0
 public static void SwapAxis(ByteImage src, ByteImage dest, ViewPoint viewPoint, int scale) {
   VisionLabPINVOKE.SwapAxis__SWIG_1(ByteImage.getCPtr(src), ByteImage.getCPtr(dest), (int)viewPoint, scale);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 46
0
 public static void HistogramEqualize(ByteImage image) {
   VisionLabPINVOKE.HistogramEqualize__SWIG_1(ByteImage.getCPtr(image));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 47
0
 public static void ThresholdFast(ByteImage image, byte thres, ObjectBrightness arg2) {
   VisionLabPINVOKE.ThresholdFast__SWIG_8(ByteImage.getCPtr(image), thres, (int)arg2);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 48
0
 public static void ThresholdFast(ByteImage image, byte low, byte high) {
   VisionLabPINVOKE.ThresholdFast__SWIG_11(ByteImage.getCPtr(image), low, high);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 49
0
 public static void ThresholdHysteresis(ByteImage image, byte low, byte high, Connected connected) {
   VisionLabPINVOKE.ThresholdHysteresis__SWIG_1(ByteImage.getCPtr(image), low, high, (int)connected);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 50
0
 public static void FastHoughLineT(ByteImage src, HLParams p, byte edgeMin, ByteImage dest) {
   VisionLabPINVOKE.FastHoughLineT__SWIG_1(ByteImage.getCPtr(src), HLParams.getCPtr(p), edgeMin, ByteImage.getCPtr(dest));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 51
0
 public static void ThresholdMulti(ByteImage image, SWIGTYPE_p_std__setT_unsigned_char_t selectSet) {
   VisionLabPINVOKE.ThresholdMulti__SWIG_1(ByteImage.getCPtr(image), SWIGTYPE_p_std__setT_unsigned_char_t.getCPtr(selectSet));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 52
0
 public static HoughLine FindFastBestLine(ByteImage src, HLParams p, byte edgeMin) {
   HoughLine ret = new HoughLine(VisionLabPINVOKE.FindFastBestLine__SWIG_1(ByteImage.getCPtr(src), HLParams.getCPtr(p), edgeMin), true);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 53
0
 public static void BlockPattern(ByteImage image, XYCoord leftTop, int height, int width, byte value, int repeatx, int repeaty) {
   VisionLabPINVOKE.BlockPattern__SWIG_3(ByteImage.getCPtr(image), XYCoord.getCPtr(leftTop), height, width, value, repeatx, repeaty);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 54
0
 public static vector_HoughLine FindFastBestLines(ByteImage src, HLParams p, byte edgeMin, int nrLines, double minR, double minPhi, int minHits) {
   vector_HoughLine ret = new vector_HoughLine(VisionLabPINVOKE.FindFastBestLines__SWIG_1(ByteImage.getCPtr(src), HLParams.getCPtr(p), edgeMin, nrLines, minR, minPhi, minHits), true);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 55
0
 public static int CountPixel(ByteImage image, byte value) {
   int ret = VisionLabPINVOKE.CountPixel__SWIG_1(ByteImage.getCPtr(image), value);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 56
0
 public static void Extract1Channel(HSV161616Image image, HSVColor plane, ByteImage chan) {
   VisionLabPINVOKE.Extract1Channel__SWIG_48(HSV161616Image.getCPtr(image), (int)plane, ByteImage.getCPtr(chan));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 57
0
 public static void DiskShape(ByteImage image, XYCoord centre, double r, byte value) {
   VisionLabPINVOKE.DiskShape__SWIG_3(ByteImage.getCPtr(image), XYCoord.getCPtr(centre), r, value);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 58
0
 public static Histogram CalcHistogram(ByteImage image, ByteImage roi) {
   Histogram ret = new Histogram(VisionLabPINVOKE.CalcHistogram__SWIG_7(ByteImage.getCPtr(image), ByteImage.getCPtr(roi)), true);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 59
0
 public static vector_HoughCircle FindFastBestCircles(ByteImage src, CircleBrightness brightness, byte edgeMin, double minR, double maxR, double deltaR) {
   vector_HoughCircle ret = new vector_HoughCircle(VisionLabPINVOKE.FindFastBestCircles__SWIG_7(ByteImage.getCPtr(src), (int)brightness, edgeMin, minR, maxR, deltaR), true);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 60
0
 public static void CalcHistogram0(ByteImage image, int hisSize, SWIGTYPE_p_int his) {
   VisionLabPINVOKE.CalcHistogram0__SWIG_1(ByteImage.getCPtr(image), hisSize, SWIGTYPE_p_int.getCPtr(his));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }