Restrict AForge Picture Box View C#

            if (pictureBox.Image != null)
            {
                BarcodeReader barcodeReader = new BarcodeReader
                {
                    Options = new ZXing.Common.DecodingOptions
                    {
                        TryHarder = true,
                        PossibleFormats = new List<BarcodeFormat> { BarcodeFormat.CODE_128 } // Only scan CODE_128 barcodes
                    }
                };
                Result result = barcodeReader.Decode((Bitmap)pictureBox.Image);

So i’m using an Aforge picture box which is being streamed frames from a camera used to scan barcodes however I want to create a sort of quiet space around the picturebox Rather than scan the whole thing at once so im only scanning barcodes that are directly in the middle of the Picture box.

QuietSpace Vs Non Quiet Space

Ive tried creating two picture boxes and only scanning from the one in the middle however it seems AForge just resizes the image and can still see the whole camera at full resolution.

Leave a Comment