Skip to content

Showcases different approaches to scan data matrix code from a metal surface.

Notifications You must be signed in to change notification settings

tarkalabs/Data-Matrix-Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Data-Matrix-Scanner

Showcases different approaches to scan data matrix code from a metal surface. The project hoighlights scanning using three different techniques:

  1. AVCaptureMetadataOutput()
  2. Vision
  3. Vision + Pre Processor which converts the CoreVideoImageBuffer (CVImageBuffer) to GrayScale
private func preprocessImagePipeLine1(_ ciImage: CIImage?) -> CIImage? {
    guard let ciImage else { return nil }

    let filter = CIFilter(name: "CIColorControls")
    filter?.setValue(ciImage, forKey: kCIInputImageKey)
    filter?.setValue(0.0, forKey: kCIInputBrightnessKey)
    filter?.setValue(0.0, forKey: kCIInputSaturationKey)
    filter?.setValue(1.1, forKey: kCIInputContrastKey)

    guard let intermediateImage = filter?.outputImage else { return nil }

    let filter1 = CIFilter(name:"CIExposureAdjust")
    filter1?.setValue(intermediateImage, forKey: kCIInputImageKey)
    filter1?.setValue(0.7, forKey: kCIInputEVKey)

    return filter1?.outputImage
}

Screen Recording

RPReplay_Final1680679094.mp4

Test Data Matrix code on Metal surface

DMC example 1 DMC Example 2

About

Showcases different approaches to scan data matrix code from a metal surface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages