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.
Setting up your Julia
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.