Example #1
0
        public void PointComparisonMS(Harris harris)
        {
            int P  = 0;
            int EY = 0;
            int EX = 0;

            foreach (InterestingPoint ip in InterestingPointsMS)
            {
                int y0 = ip.Y - Image.Height / 2;
                int x0 = ip.X - Image.Width / 2;
                int x1 = Convert.ToInt32(Math.Round(x0 * Math.Cos(0.174533) + y0 * Math.Sin(0.174533)));
                int y1 = Convert.ToInt32(Math.Round(y0 * Math.Cos(0.174533) - x0 * Math.Sin(0.174533)));
                EX = Math.Abs(x0 - x1);
                EY = Math.Abs(y0 - y1);


                foreach (InterestingPoint ip1 in harris.InterestingPointsMS)
                {
                    if (Math.Abs(ip.X - ip1.X) <= EX && Math.Abs(ip.Y - ip1.Y) <= EY)
                    {
                        P++;
                        break;
                    }
                }
            }

            this.P = P;
        }
Example #2
0
        private void ThreadProc(object x)
        {
            Img begimg = (Img)x;

            while (NumNotCompletedProcess > 0)
            {
                for (int i = 0; i < Status.Length; i++)
                {
                    if (Status[i] == "Not completed")
                    {
                        Status[i] = "In progress";
                        NumNotCompletedProcess--;

                        int    size        = Math.Min(Math.Min(begimg.Width, begimg.Height), Math.Min(Images[i].Width, Images[i].Height));
                        Harris BeginHarris = new Harris(begimg, 2, 0.1, size);
                        Harris[i] = new Harris(Images[i], 2, 0.1, size);

                        int NumPoints = 100;
                        NumPoints = Math.Min(NumPoints, BeginHarris.NPoints);
                        NumPoints = Math.Min(NumPoints, Harris[i].NPoints);

                        BeginHarris.MS(NumPoints);
                        Harris[i].MS(NumPoints);

                        Harris[i].PointComparisonMS(BeginHarris);

                        Status[i] = "Completed";
                    }
                }
            }
        }
Example #3
0
        public void PointComparisonANMS(Harris harris, int E)
        {
            int P = 0;

            foreach (InterestingPoint ip in InterestingPointsANMS)
            {
                foreach (InterestingPoint ip1 in harris.InterestingPointsANMS)
                {
                    if (Math.Abs(ip.X - ip1.X) <= E && Math.Abs(ip.Y - ip1.Y) <= E)
                    {
                        P++;
                        break;
                    }
                }
            }

            this.P = P;
        }