Exemplo n.º 1
0
        public static void Threshold(ImageCore grayImage, out RLC_NodeList <byte> list, byte min, byte max)
        {
            int   loopCount = grayImage.Count;
            byte *gp        = (byte *)grayImage.Scan0.ToPointer();

            list = new RLC_NodeList <byte>();
            int idx = -1;

            while (++idx < grayImage.Count)
            {
                if (*gp >= min && *gp <= max)
                {
                    if (list.IsEmpty)
                    {
                        RLC_Node <byte> head = new RLC_Node <byte>();
                        head.data        = new RLC_Data <byte>();
                        head.data.Data   = 0xff;
                        head.data.Length = 1;
                        head.data.Index  = idx;
                        list.Append(head);
                    }
                    else
                    {
                        list.PushBack(0xff, idx);
                    }
                }
                gp++;
            }
        }
Exemplo n.º 2
0
        public static void Erode(RLC_NodeList <byte> region, RLC_Element_Rect element)
        {
            int idx = region.Count;

            while (--idx > -1)
            {
            }
        }