Beispiel #1
0
        public DetectorResult[] detectMulti(System.Collections.Hashtable hints)
        {
            BitMatrix image = Image;
            MultiFinderPatternFinder finder = new MultiFinderPatternFinder(image);

            FinderPatternInfo[] info = finder.findMulti(hints);

            if (info == null || info.Length == 0)
            {
                throw ReaderException.Instance;
            }

            System.Collections.ArrayList result = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(10));
            for (int i = 0; i < info.Length; i++)
            {
                try
                {
                    result.Add(ProcessFinderPatternInfo(info[i]));
                }
                catch (ReaderException)
                {
                    // ignore
                }
            }
            if ((result.Count == 0))
            {
                return(EMPTY_DETECTOR_RESULTS);
            }
            else
            {
                DetectorResult[] resultArray = new DetectorResult[result.Count];
                for (int i = 0; i < result.Count; i++)
                {
                    resultArray[i] = (DetectorResult)result[i];
                }
                return(resultArray);
            }
        }
		public DetectorResult[] detectMulti(System.Collections.Hashtable hints)
		{
			BitMatrix image = Image;
			MultiFinderPatternFinder finder = new MultiFinderPatternFinder(image);
			FinderPatternInfo[] info = finder.findMulti(hints);
			
			if (info == null || info.Length == 0)
			{
				throw ReaderException.Instance;
			}
			
			System.Collections.ArrayList result = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(10));
			for (int i = 0; i < info.Length; i++)
			{
				try
				{
					result.Add(ProcessFinderPatternInfo(info[i]));
				}
				catch (ReaderException)
				{
					// ignore
				}
			}
			if ((result.Count == 0))
			{
				return EMPTY_DETECTOR_RESULTS;
			}
			else
			{
				DetectorResult[] resultArray = new DetectorResult[result.Count];
				for (int i = 0; i < result.Count; i++)
				{
					resultArray[i] = (DetectorResult) result[i];
				}
				return resultArray;
			}
		}