Detecting Texts and Persons from Images

Related tags

Image Detections
Overview

Detections

Detecting Texts and Persons from Images

Detections package will help you to get the texts from image and also recognize a person Image whihc should be only one person in the photo

Text Detection

to use text recognition you need to create a view controller and change the class to DetectionViewController , also you can pass the delegate to use the function when the texts recognized from the image

class DetectionVC: DetectionViewController , detectionProtocol {

    override func viewDidLoad() {
            super.viewDidLoad()
            self.detectionDelegate = self
    }

}

you can increase the detection level or language correction by using the coide below (these parameters will get boolean but as in the package there is a boolean extension you can use .yes or .no)

    self.fastRecognition = .yes
    self.autoCorrection = .yes

by adding the detectionDelegate you will have two functions which one of them is optional

    // required function 
    func scanResults(_ result: ScanResults) {
       
    }

    // optional function 
    func scanFailed() {
    
    }

this function will getting called when the image processed and the result contains detectedTexts, scannedImage and error which all of these are optional and can be nil based on the results

Face Detection

The face Detection will detect that there is only one person in the photo so if there is more than one person or nobody in the photo or for any reasons there was an unknown erroe it will show error

to use this oart for face recognition you need to create a view controller and change the class to FaceDetectionViewController , also you can pass the delegate to use the function when the texts recognized from the image

class FaceDetectionVC: FaceDetectionViewController , faceDetectionProtocol {

    override func viewDidLoad() {
            super.viewDidLoad()
            self.faceDetectionDelegate = self
    }

}

by adding the faceDetectionDelegate you will have two functions which one of them is optional

    // required function 
    func faceDetected(_ error : faceErrors?,_ image : UIImage?) {
       
    }

    // optional function 
    func scanFailed() {
    
    }

this function will getting called when the image processed and the result contains faceErrors and image which both of these are optional and can be nil based on the results

if there was no error the error will be nil otherwise the error can be noFace,moreThanOneFace or noCGImage also if you want to show message to the alert for any of these you can use a function which name is errorMessage() which can be use for the error message or you can do it by your self and using your own error message

func faceDetected(_ error : faceErrors?,_ image : UIImage?) {
    guard let error = error else {return}
    print(message: error.errorMessage())
}
You might also like...
Style Art library process images using COREML with a set of pre trained machine learning models and convert them to Art style.
Style Art library process images using COREML with a set of pre trained machine learning models and convert them to Art style.

StyleArt Style Art is a library that process images using COREML with a set of pre trained machine learning models and convert them to Art style. Prev

App that generates random images and attempts to classify them with MobileNetV2
App that generates random images and attempts to classify them with MobileNetV2

Image-Classifier-App App that generates random images and attempts to classify t

IconsMaker - Create your app icon with SwiftUI and generate PNG images in all needed sizes
IconsMaker - Create your app icon with SwiftUI and generate PNG images in all needed sizes

IconsMaker - Create your app icon with SwiftUI and generate PNG images in all needed sizes

ImageView - Component for loading and displaying different images aka SVG/PNG/JPG/JPEG

ImageView Component that loads and displays images(.svg/.png/.jpg/.jpeg) form as

WhiteAndFluffyTest - Scroll images and add them to your favourites via image page
WhiteAndFluffyTest - Scroll images and add them to your favourites via image page

Image service application Scroll images and add them to your favourites via imag

A Swift/SwiftUI utility for caching and displaying images in SwiftUI Views

A Swift/SwiftUI utility for caching and displaying images asynchronously. Built with Swift 5.5 and works with async/await.

Agrume - 🍋 An iOS image viewer written in Swift with support for multiple images.
Agrume - 🍋 An iOS image viewer written in Swift with support for multiple images.

Agrume An iOS image viewer written in Swift with support for multiple images. Requirements Swift 5.0 iOS 9.0+ Xcode 10.2+ Installation Use Swift Packa

A lightweight generic cache for iOS written in Swift with extra love for images.
A lightweight generic cache for iOS written in Swift with extra love for images.

Haneke is a lightweight generic cache for iOS and tvOS written in Swift 4. It's designed to be super-simple to use. Here's how you would initalize a J

SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.
SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

Owner
Saeed Rahmatolahi
I am Developing iOS with Swift more than 5 years .
Saeed Rahmatolahi
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api.

ImageDetect ImageDetect is a library developed on Swift. With ImageDetect you can easily detect and crop faces, texts or barcodes in your image with i

Arthur Sahakyan 299 Dec 17, 2022
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.

I've built out the Swift version of this library! Screenshots Description ABMediaView can display images, videos, as well as now GIFs and Audio! It su

Andrew Boryk 80 Dec 20, 2022
APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS.

APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS. It's built on top of a modified version of libpng wit

Wei Wang 2.1k Dec 30, 2022
Image viewer (or Lightbox) with support for local and remote videos and images

Table of Contents Features Focus Browse Rotation Zoom tvOS Setup Installation License Author Features Focus Select an image to enter into lightbox mod

Nes 534 Jan 3, 2023
Jogendra 113 Nov 28, 2022
Kingfisher is a powerful, pure-Swift library for downloading and caching images from the web

Kingfisher is a powerful, pure-Swift library for downloading and caching images from the web. It provides you a chance to use a pure-Swift way to work

Wei Wang 20.9k Dec 30, 2022
A high-performance image library for downloading, caching, and processing images in Swift.

Features Asynchronous image downloader with priority queuing Advanced memory and database caching using YapDatabase (SQLite) Guarantee of only one ima

Yap Studios 72 Sep 19, 2022
Easily display images, animations, badges and alerts to your macOS application's dock icon

DSFDockTile Easily display images, animations, badges and alerts to your macOS application's dock icon. Why? I was inspired by Neil Sardesai after he

Darren Ford 45 Dec 2, 2022
A Swift library for parsing and drawing SVG images to CoreGraphics contexts.

SwiftDraw A Swift library for parsing and drawing SVG images to CoreGraphics contexts. SwiftDraw can also convert an SVG into Swift source code. Usage

Simon Whitty 119 Jan 3, 2023
Advanced framework for loading, caching, processing, displaying and preheating images.

Advanced framework for loading, caching, processing, displaying and preheating images. This framework is no longer maintained. Programming in Swift? C

Alexander Grebenyuk 1.2k Dec 23, 2022