All Projects → gaebel → scanner-overlay

gaebel / scanner-overlay

Licence: MIT License
📹 AVCaptureVideoPreviewLayer with a masked overlay

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to scanner-overlay

Qrandbarcodescanner
An Android app for scanning QR codes and barcodes
Stars: ✭ 114 (+442.86%)
Mutual labels:  barcode, qr
Qr Code Scanner
📠 A simple, fast and useful progressive web application
Stars: ✭ 982 (+4576.19%)
Mutual labels:  barcode, qr
Qr
IEC18004 (QR) 2D barcode generation library and command line
Stars: ✭ 20 (-4.76%)
Mutual labels:  barcode, qr
koder
QR/bar code scanner for the Browser
Stars: ✭ 73 (+247.62%)
Mutual labels:  barcode, qr
brother-overlay
Portage overlay for Brother printer and scanner software
Stars: ✭ 27 (+28.57%)
Mutual labels:  overlay
golang-pdf417
Port of pdf417-php by ihabunek in Golang
Stars: ✭ 18 (-14.29%)
Mutual labels:  barcode
StarBarcode
一个基于Zxing封装的条形码扫描库。支持多种条形码,可生成、解析带logo的二维码,自动放大镜头,设备移动时自动对焦、连续对焦,扫描UI自定义。
Stars: ✭ 52 (+147.62%)
Mutual labels:  barcode
beat-saber-overlay
(improved) Beat Saber Overlay
Stars: ✭ 30 (+42.86%)
Mutual labels:  overlay
MillionHeros
Android直播答题助手,支持全部答题APP,百万英雄/百万赢家/冲顶大会/芝士超人
Stars: ✭ 23 (+9.52%)
Mutual labels:  overlay
pheniqs
Fast and accurate sequence demultiplexing
Stars: ✭ 14 (-33.33%)
Mutual labels:  barcode
scanbot-sdk-example-ionic
Scanbot scanner SDK example app for Ionic with Cordova.
Stars: ✭ 24 (+14.29%)
Mutual labels:  barcode
LayerX
An intuitive app to display transparent images on screen.
Stars: ✭ 136 (+547.62%)
Mutual labels:  overlay
garden.zbarcam
Migrated to https://github.com/kivy-garden/zbarcam
Stars: ✭ 49 (+133.33%)
Mutual labels:  barcode
8-Ball-Pool-Hack-Guide-Line
Created to help 8 ball pool
Stars: ✭ 18 (-14.29%)
Mutual labels:  overlay
goverlay
DirectX hook and game overlay solution for Electron, Qt and CEF, just like discord/steam game overlay,inject any app to overlay in your game
Stars: ✭ 426 (+1928.57%)
Mutual labels:  overlay
DynamicOverlay
A SwiftUI library that makes easier to develop overlay based interfaces, such as the one presented in the Apple Maps app.
Stars: ✭ 90 (+328.57%)
Mutual labels:  overlay
BalloonPopup
Forget Android Toast! BalloonPopup displays a round or squared popup and attaches it to a View, like a callout. Uses the Builder pattern for maximum ease. The popup can automatically hide and can persist when the value is updated.
Stars: ✭ 32 (+52.38%)
Mutual labels:  overlay
overwolf-modern-react-boilerplate
OMRB is a free and open source opinionated boilerplate based on React that helps developers create fast, modular and modern overwolf app.
Stars: ✭ 21 (+0%)
Mutual labels:  overlay
MovieBarCodeGenerator
User friendly tool to create your own movie barcodes
Stars: ✭ 57 (+171.43%)
Mutual labels:  barcode
qrcode
A flutter plugin for scanning QR codes. Use AVCaptureSession in iOS and zxing in Android.
Stars: ✭ 69 (+228.57%)
Mutual labels:  qr

ScannerOverlay

ScannerOverlay extends AVCaptureVideoPreviewLayer with an overlay. You can define a masked area and setup the corners.

Installation

You can either install it via Swift Package Manager or copy the class from the Sources folder into your project.

Usage

At first setup your AVCaptureSession, then initiate the ScannerOverlay with it, and after that add it as a sublayer to your view.

  let scannerOverlayPreviewLayer              = ScannerOverlayPreviewLayer(session: captureSession)
  scannerOverlayPreviewLayer.frame            = self.view.bounds
  scannerOverlayPreviewLayer.maskSize         = CGSize(width: 200, height: 200)
  scannerOverlayPreviewLayer.videoGravity     = .resizeAspectFill
  self.view.layer.addSublayer(scannerOverlayPreviewLayer)

If you want to limit the video capturing to the masked area you have to set the rectOfInterest of your AVCaptureMetadataOutput.

  metadataOutput.rectOfInterest = scannerOverlayPreviewLayer.rectOfInterest

Keep in mind that the overlay won't show in the simulator - for testing run the code on your device.

For an example implementation refer to the demo project in the Sources folder.

Settings

Parameter Description
maskSize Specifies the size of the masked area
cornerLength Specifies the length of the corners
lineWidth Specifies the line width of the corners
lineColor Specifies the line color of the corners
lineCap Specifies the line cap of the corner endpoints
backgroundColor Specifies the backgroundColor of the outer masked area
cornerRadius Specifies the corner radius of the masked area

License

ScannerOverlay is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].