public FinderPatternFinder(BitMatrix image, ResultPointCallback resultPointCallback) { this.image = image; this.possibleCenters = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(10)); this.crossCheckStateCount = new int[5]; this.resultPointCallback = resultPointCallback; }
/// <summary> <p>Detects a QR Code in an image, simply.</p> /// /// </summary> /// <param name="hints">optional hints to detector /// </param> /// <returns> {@link DetectorResult} encapsulating results of detecting a QR Code /// </returns> /// <throws> ReaderException if no QR Code can be found </throws> public virtual DetectorResult detect(System.Collections.Hashtable hints) { resultPointCallback = hints == null?null:(ResultPointCallback) hints[DecodeHintType.NEED_RESULT_POINT_CALLBACK]; FinderPatternFinder finder = new FinderPatternFinder(image, resultPointCallback); FinderPatternInfo info = finder.find(hints); return processFinderPatternInfo(info); }
/// <summary> <p>Creates a finder that will look in a portion of the whole image.</p> /// /// </summary> /// <param name="image">image to search /// </param> /// <param name="startX">left column from which to start searching /// </param> /// <param name="startY">top row from which to start searching /// </param> /// <param name="width">width of region to search /// </param> /// <param name="height">height of region to search /// </param> /// <param name="moduleSize">estimated module size so far /// </param> internal AlignmentPatternFinder(BitMatrix image, int startX, int startY, int width, int height, float moduleSize, ResultPointCallback resultPointCallback) { this.image = image; this.possibleCenters = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(5)); this.startX = startX; this.startY = startY; this.width = width; this.height = height; this.moduleSize = moduleSize; this.crossCheckStateCount = new int[3]; this.resultPointCallback = resultPointCallback; }