Image Processing and ComputerVision for iOS Applications: An Introduction

Ilana Concilio
Academy@EldoradoCPS
3 min readNov 21, 2019

Nowadays, the field of Computer Vision is on the rise, mainly because of the “discovery” of the potential of Machine Learning. The goal of this post is to discuss the concepts of Image Processing and Computer Vision as well as the frameworks available for working with these technologies on the iOS platform. In the next post I show how to use Core Image ;)

Image processing means that we have an input image and apply a filter, ie a program that algorithmically examines and applies some pixel-by-pixel effect to generate a new output image. An abbreviation of picture element, a pixel is a value which represents the intensities of the colors that make up the image.

Pixel — Picture Element

Computer Vision is an area where we program so that the computer can see the environment around us, making it able to recognize and extract information from objects in real time (Barelli, 2018).

In fact, Computer Vision and Image Processing are complementary and many Computer Vision systems employ Image Processing algorithms (Ehiaghe, 2020). Computer Vision is also directly related to Machine Learning techniques, which emerged from the evolution of the pattern recognition area for object and/or feature classification.

The Figure below shows the flow of a Computer Vision system (Barelli, 2018). The image acquisition phase consists of the use of capture devices that transform the image into a digital file. Every digital image is converted into an array of integers (pixels). In the preprocessing phase, objects or elements of the image are identified so that they can then be segmented and facilitate feature extraction. Pattern recognition allows the classification of objects according to some category or class.

Source: Adapted from (Barelli, 2018).

In terms of iOS application development, Apple offers two frameworks: Core Image and Vision.

Core Image is the framework responsible for image processing and analysis processing near real-time still and video images (Apple, 2016). It can be used on Core Graphics, Core Video, and image input / output technologies using both Central Processing Unit (CPU) and Graphics Processing Unit (GPU) rendering paths.

Vision is the framework that performs high-performance image analysis and computer vision to identify faces, detect text and features, recognize barcodes in still and video images. Integrated with CoreML (Apple’s machine learning framework) allows the use of Machine Learning models for tasks such as classification and detection of objects and scenes.

A widely used library for developing Computer Vision and Image Processing applications is OpenCV (Open Source Computer Vision library), created by Intel in 1999. This framework was developed in C / C ++ and currently has versions in Java and Python. To use it in iOS mobile applications, you can include it in XCode and using Objective-C as the programming language.

Click here and read the next post and learn how to use filters with Core Image :)

References

Albuquerque, M.P.; Caner, E.S.; Mello, A. G.; Albuquerque M.P. (2012). Análise de Imagens e Visão Computacional. Available at http://mesonpi.cat.cbpf.br/e2012/arquivos/g06/CursoE2012-PI.pdf

Apple Inc. (2016). Core Image Programming Guide. Available at https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/CoreImaging/ci_intro/ci_intro.html#//apple_ref/doc/uid/TP30001185

Barelli, Felipe. (2018). Introdução à Visão Computacional . Casa do Código.

Ehiaghe, A. (2020). What Image Processing Techniques Are Actually Used in the ML Industry?. Available at https://neptune.ai/blog/what-image-processing-techniques-are-actually-used-in-the-ml-industry

--

--