Пример #1
0
        public void OnPreviewFrame(byte[] data, Camera camera)
        {
            var pars        = camera.GetParameters();
            var imageformat = pars.PreviewFormat;

            if (imageformat == ImageFormatType.Nv21)
            {
                byte[] jpegData = ConvertYuvToJpeg(data, camera);

                Frame frame = new Frame.Builder().SetBitmap(bytesToBitmap(jpegData)).Build();
                //SparseArray barcodes =  barcodeDetector.Detect(frame);
                barcodeDetector.ReceiveFrame(frame);
            }
        }