Book Image

Hands-On Computer Vision with Julia

By : Dmitrijs Cudihins
Book Image

Hands-On Computer Vision with Julia

By: Dmitrijs Cudihins

Overview of this book

Hands-On Computer Vision with Julia is a thorough guide for developers who want to get started with building computer vision applications using Julia. Julia is well suited to image processing because it’s easy to use and lets you write easy-to-compile and efficient machine code. . This book begins by introducing you to Julia's image processing libraries such as Images.jl and ImageCore.jl. You’ll get to grips with analyzing and transforming images using JuliaImages; some of the techniques discussed include enhancing and adjusting images. As you make your way through the chapters, you’ll learn how to classify images, cluster them, and apply neural networks to solve computer vision problems. In the concluding chapters, you will explore OpenCV applications to perform real-time computer vision analysis, for example, face detection and object tracking. You will also understand Julia's interaction with Tesseract to perform optical character recognition and build an application that brings together all the techniques we introduced previously to consolidate the concepts learned. By end of the book, you will have understood how to utilize various Julia packages and a few open source libraries such as Tesseract and OpenCV to solve computer vision problems with ease.
Table of Contents (11 chapters)
9
Assessments

Setting up your Julia

Before we start working with our images, we need to ensure that our Julia environment has all the required prerequisites so that we can complete the chapter. We already confirmed that our Julia setup is correct, so let's proceed with installing the most essential packages from the JuliaImages collection.

Installing packages

The most essential packages from the JuliaImages collection are the following:

  • Images.jl
  • ImageMetadata.jl
  • ImageView.jl
  • TestImages.jl

These packages are all you need to perform simple tasks, and most regular users should be fine with the setup.

Run the following commands in the Julia REPL to get them installed and configured. If you have not used Julia before, it is very likely that these commands will install additional dependencies:

using Pkg
Pkg.add("Images")
Pkg.add("ImageMetadata")
Pkg.add("ImageView")
Pkg.add("TestImages")
Pkg.update()

The moment installation completes, it is advised that you verify whether the packages can be loaded. This is done by merely importing them into the current environment, waiting for new packages to compile, and seeing whether the command succeeds:

julia> using Images, ImageMetadata, TestImages, ImageView

There is a small chance that the preceding command will fail with an exception message stating that one of the packages does not exist:

ERROR: ArgumentError: Module XXX not found in current path.
Run `Pkg.add("XXX")` to install the TestImages package.

Please follow the instructions to install a missing package and repeat the steps from this chapter.

Windows users are required to complete additional steps to make the TestImages package work. Users are required to follow an extensive post-installation guide from the package page, http://juliaimages.github.io/TestImages.jl/, or from Chapter 9, Case Study – Book Cover Classification, Analysis, and Recognition.