コード例 #1
0
 protected internal Binarizer(LuminanceSource source)
 {
     if (source == null)
     {
         throw new System.ArgumentException("Source must be non-null.");
     }
     this.source = source;
 }
コード例 #2
0
		protected internal Binarizer(LuminanceSource source)
		{
			if (source == null)
			{
				throw new System.ArgumentException("Source must be non-null.");
			}
			this.source = source;
		}
コード例 #3
0
 /// <summary>
 /// Creates a new object with the same type as this Binarizer implementation, but with pristine
 /// state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache
 /// of 1 bit data. See Effective Java for why we can't use Java's clone() method.
 /// </summary>
 /// <param name="source"> The LuminanceSource this Binarizer will operate on. </param>
 /// <returns> A new concrete Binarizer implementation object. </returns>
 public abstract Binarizer createBinarizer(LuminanceSource source);
コード例 #4
0
 protected internal Binarizer(LuminanceSource source)
 {
     this.source = source;
 }
コード例 #5
0
        /// <summary> Returns a new object with rotated image data. Only callable if isRotateSupported() is true.
        ///
        /// </summary>
        /// <returns> A rotated version of this object.
        /// </returns>
        public BinaryBitmap rotateCounterClockwise()
        {
            LuminanceSource newSource = binarizer.LuminanceSource.rotateCounterClockwise();

            return(new BinaryBitmap(binarizer.createBinarizer(newSource)));
        }
コード例 #6
0
        /// <summary> Returns a new object with cropped image data. Implementations may keep a reference to the
        /// original data rather than a copy. Only callable if isCropSupported() is true.
        ///
        /// </summary>
        /// <param name="left">The left coordinate, 0 <= left < getWidth().
        /// </param>
        /// <param name="top">The top coordinate, 0 <= top <= getHeight().
        /// </param>
        /// <param name="width">The width of the rectangle to crop.
        /// </param>
        /// <param name="height">The height of the rectangle to crop.
        /// </param>
        /// <returns> A cropped version of this object.
        /// </returns>
        public BinaryBitmap crop(int left, int top, int width, int height)
        {
            LuminanceSource newSource = binarizer.LuminanceSource.crop(left, top, width, height);

            return(new BinaryBitmap(binarizer.createBinarizer(newSource)));
        }
コード例 #7
0
 /// <summary> Creates a new object with the same type as this Binarizer implementation, but with pristine
 /// state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache
 /// of 1 bit data. See Effective Java for why we can't use Java's clone() method.
 ///
 /// </summary>
 /// <param name="source">The LuminanceSource this Binarizer will operate on.
 /// </param>
 /// <returns> A new concrete Binarizer implementation object.
 /// </returns>
 public abstract Binarizer CreateBinarizer(LuminanceSource source);
コード例 #8
0
        //UPGRADE_NOTE: Final was removed from the declaration of 'source '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"

        protected internal Binarizer(LuminanceSource source) => LuminanceSource = source ?? throw new ArgumentException("Source must be non-null.");
コード例 #9
0
ファイル: Automatic.cs プロジェクト: abhinavc/winbot
        public static ZXingConfig[] getInstances(LuminanceSource source)
        {
            ZXingConfig[] configs = new ZXingConfig[2];

            configs[0] = new ZXingConfig();
            configs[0].binarizer = new HybridBinarizer(source);
            configs[0].reader = new QRCodeReader();

            configs[1] = new ZXingConfig();
            configs[1].binarizer = new GlobalHistogramBinarizer(source);
            configs[1].reader = new QRCodeReader();

            return configs;
        }
コード例 #10
0
 protected internal Binarizer(LuminanceSource source)
 {
     this.source = source;
 }