Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Hands-On Computer Vision with Julia
Hands-On Computer Vision with Julia

Hands-On Computer Vision with Julia: Build complex applications with advanced Julia packages for image processing, neural networks, and Artificial Intelligence

Arrow left icon
Profile Icon Dmitrijs Cudihins
Arrow right icon
$43.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (1 Ratings)
Paperback Jun 2018 202 pages 1st Edition
eBook
$35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Dmitrijs Cudihins
Arrow right icon
$43.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (1 Ratings)
Paperback Jun 2018 202 pages 1st Edition
eBook
$35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Hands-On Computer Vision with Julia

Getting Started with JuliaImages

This chapter is all about introducing the JuliaImages collection. JuliaImages is a collection of different packages that are used for image processing. We will look into the Images.jl and ImagesMetadata.jl packages, load and preview images from various sources, read metadata, resize and scale images, create thumbnails, and save them back to disk in a different format.

In this chapter, we will cover the following topics:

  • Setting up Julia
  • Reading images from various sources
  • Saving images in different formats
  • Cropping, scaling, and resizing images
  • Rotating images
  • Using test images

Technical requirements

Users are required to have Julia v. 1.0 or above installed. Julia can be downloaded from the official page at https://julialang.org/downloads/.

You can confirm your version number by typing VERSION into the Julia console or REPL, as shown in the following code snippet:

julia> VERSION
v"0.7.0-DEV.4465"
The Julia community does not keep sources other than the Julia website or GitHub up-to-date. Therefore, it is strongly advised to refer to the official website for the latest available version. For example, Ubuntu users get an older version when installing Julia using apt-get.

You should also clone or download a GitHub repository containing source code and sample images:

https://github.com/PacktPublishing/Hands-On-Computer-Vision-with-Julia

This can be done by going to the GitHub page and pressing either the Clone or Download button in the top right corner.

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.

Reading images

There are multiple different sources for your images. Let's look into three of the most popular methods:

  • Reading images from disk
  • Reading images from URL
  • Reading multiple images in a folder

Start by loading the Images package and verifying your current working directory using pwd:

julia> using Images
julia> pwd()
"/Users/dc/reps/packt-julia"

If pwd does not correspond to your project folder, you have two options:

  • Start Julia from a folder that does correspond
  • Use the cd function to change it

The cd function accepts a single argument—the local path. An example of using the cd function would be as follows:

cd("~/repositories/julia-hands-on") # Unix-like systems
cd("C:\\repositories\\julia-hands-on") # Windows users

When you are all set, you can proceed to load your first image.

Reading a single image from disk

Reading an image from disk is simple and is done by calling the load function. The load function accepts a single argument—the image path—and returns an image object. The following code assigns an image to a custom variable.

We will be using the sample-images folder from the GitHub repository. You are required to have a functioning project folder when running the following code:

  using Images

sample_image_path = "sample-images/cats-3061372_640.jpg";
sample_image = nothing

if isfile(sample_image_path)
sample_image = load(sample_image_path);
else
info("ERROR: Image not found!")
end

A typical problem users face is using the wrong path. The preceding code example implements a check to see whether the file exists and prints an error if it does not.

Reading a single image from a URL

The process of reading an image from a URL is first getting it downloaded to disk using the download function and then processing it, as in the preceding section:

image_url = "https://cdn.pixabay.com/photo/2018/01/04/18/58/cats-3061372_640.jpg?attachment"
downloaded_image_path = download(image_url)
downloaded_image = load(downloaded_image_path)

Depending on your project, it might make sense to download the file to a custom folder. You can define a download location by sending it as a second parameter to the download function:

image_url = "https://cdn.pixabay.com/photo/2018/01/04/18/58/cats-3061372_640.jpg?attachment"
downloaded_image_path = download(image_url, 'custom_image_name.jpg')
downloaded_image = load(downloaded_image_path)
Copyright notice: Pixabay provides images under CC0 Creative Commons. They are free for commercial use and no attributions are required.

Reading images in a folder

Loading files from a directory is a common use case. This is done by identifying a list of files in a directory, filtering the necessary files, and then executing a set of operations for each and every one of them.

We will be using the sample-images folder from the GitHub repository. You are required to have a functioning project folder when running the following example:

using Images

directory_path
= "sample-images";
directory_files = readdir(directory_path);
directory_images = filter(x -> ismatch(r"\.(jpg|png|gif){1}$"i, x), directory_files);

for
image_name in directory_images
image_path = joinpath(directory_path, image_name);
image = load(image_path);
# other operations
end

This example introduces a number of new functions and techniques, which are explained as follows:

  • We use readdir from the Julia Base to read all the files names in a directory
  • We use filter from the Julia Base, as well as custom regular expressions to find files ending with .jpg, .png, or .gif, both in lower and upper-case
  • We use the for loop to iterate over filtered names
  • We use joinpath from the Julia Base to combine the directory name and filename so that we have a full path to the image
  • We use the load function (which you have already learned about) to load the image

Please be aware that readdir returns filenames. This is the reason for us using joinpath, which joins components into a full path.

Saving images

You have already learned how to load and download images, so now it's time to learn how to save your image. We will use the save function from the Images package to save the image to disk.

The save function accepts two arguments:

  • The destination file location and name
  • The image object

Let's have a look at the code to save images:

  # load an image
img = load("sample-images/cats-3061372_640.jpg")

# save file in JPG format
save("my_new_file.jpg", img)

# save file in PNG format
save("my_new_file.png", img)

The image format is chosen based on the filename extension. Please note that saving the image in different formats can affect the output quality and file size. Users should find a balance between size and quality.

The save function does not allow you to set image quality, which is usually available in graphics editors, such as GIMP.

Using test images

The TestImages.jl package and dataset provides easy access to a small number of free images out of the box. It is the way to go when trying out different computer vision techniques and algorithms.

The benefits of using the TestImages dataset are the following:

  • Images are of different file types, such as JPG, PNG, and TIF
  • Images are of different sizes, such as 512x512 and 256x256
  • Images are of different color schemes, such as RGB and grayscale

It is very easy to start with the TestImages package. You just need to load the TestImages package and use the testimage function to load the image by name:

  using TestImages
img = testimage("mandril_color");
save("mandril_color.png", img);

Our code example would result in loading a mandrill image from the TestImages dataset. You can save this in your current working directory.

Previewing images

You have already learned to load, download, and save images. The only way to check the image itself would be to go to the project folder and open it from there.

The ImageView package solves this problem by previewing the image directly from Julia:

  using Images, ImageView
img = load("sample-images/cats-3061372_640.jpg");
imshow(img);

This will preview the image in a new window.

Cropping, scaling, and resizing

Now that you know how to load and preview your image, it is time to start working on content. Three of the most frequent activities you will do when working with images are as follows:

  • Crop: Select a specific area of an image
  • Resize: Change the size of an image without keeping the proportions
  • Scale: Enlarge or shrink an image while keeping the proportions

Cropping an image

Let's go back to the image with the two cats we previewed recently. Here, we will create a new picture, which will only contain the cat on the right:

Our first step will be to identify an area of interest. We will do this by loading the image to Julia and checking its width and height:

  using Images, ImageView
source_image = load("sample-images/cats-3061372_640.jpg");
size(source_image)

The size function will output (360, 640), which stands for 360px in height (y-axis) and 640px in width (x-axis). Both coordinates start from the top-left corner.

I have run a number of experiments and identified an area we are interested in—the height from 100 to 290 and the width from 280 to 540. You can try playing around with the following code to see how changing the region will affect the output:

  cropped_image = img[100:290, 280:540];
imshow(cropped_image)

This will result in the following image being created and stored in the cropped_image variable. This will also allocate memory so that you can store the newly created image:

Images are vertical-major, which means that this first index corresponds to the vertical axis and the second to the horizontal axis. This might be different from other programming languages.

There is also another way to create a cropped image, which is by creating a view to the original image. Views don't create a new object or allocate memory, they just point to the original image (or array). They are great when you want to analyze or change a specific part of the picture without interfering with the rest of it:

  cropped_image_view = view(img, 100:290, 280:540);
imshow(cropped_image_view)

If you run the preceding code, you will see that it returns an identical result. You can also save the image to disk without any problems.

Resizing an image

Image resizing is the process of changing an image's size without keeping proportions. This is done by calling the imresize function and supplying a new width and height.

Let's take our image with the cats as an example and resize it to 100 x 250 so that we can see what has changed:

We will use our classic code and load the image from disk:

  using Images, ImageView
source_image = load("sample-images/cats-3061372_640.jpg");
resized_image = imresize(source_image, (100, 250));
imshow(resized_image);

You should be able to see an image of a smaller size. It has a width of 250 pixels and a height of 100 pixels:

A typical example would be to resize an image to fit a square. You would need to pass the width and height as equal values:

  using Images, ImageView
source_image = load("sample-images/cats-3061372_640.jpg");
resized_image = imresize(source_image, (200, 200));
imshow(resized_image);

This would result in an image like this:

Scaling an image

But what if you want to create a thumbnail and keep the original proportions? You will need to scale the image.

Image scaling is the process of changing the size of an image and saving the original proportions. If in the previous section, we manually picked the width and height, we will now calculate it.

Scaling by percentage

Let's start by scaling the image using percentages. Let's say we want to scale the image to be 60% of the original size:

  using Images, ImageView
source_image = load("sample-images/cats-3061372_640.jpg");
scale_percentage = 0.6
new_size = trunc.(Int, size(source_image) .* scale_percentage)
resized_image = imresize(source_image, new_size)
imshow(resized_image);

We have done the following:

  • We have loaded the image using the load function from the Images package
  • We have defined the scaling percentage in the scale_percentage variable
  • We have calculated the new_size by first multiplying the current size by our proportion and then converting the float values to int
  • We have resized the image using the new_size values

The resulting image is neat and tidy. All of the proportions have been saved:

Don't forget that you can scale the image upward or downward if you so desire.

Scaling to a specific dimension

It is very common to scale your image to a given width and adapt the height automatically or vice versa.

There are multiple ways to approach this problem, but the most straightforward option would be to reuse and extend the code we wrote when scaling by percentage.

Given the original dimension and desired width, what would be the easiest way to calculate the change in percentage? That's correct—just divide the desired width or height by the original.

Let's assume we want to fix our width to 200 and calculate the value for scale_percentage:

  new_width = 200
scale_percentage = new_width / size(source_image)[2]

Let's put it all together:

  using Images, ImageView
source_image = load("sample-images/cats-3061372_640.jpg");
new_width = 200
scale_percentage =
new_width / size(source_image)[2]
new_size = trunc.(Int, size(source_image) .* scale_percentage)
resized_image = imresize(source_image, new_size)
imshow(resized_image);

We have updated our scale by percentage solution to calculate scale_percentage dynamically based on a change in one of the dimensions.

Remember: size(source_image)[1] corresponds to height, while size(source_image)[2] corresponds to width.

Scaling by two-fold

This is a bonus section for scaling/resizing. The JuliaImages package has a very useful function called somepkg(restrict), which reduces the size of an image by two-fold along the dimensions specified. In other words, it scales the image by 50%.

restrict can be run in three ways:

  • Without an additional argument—the image will become twice as small in width and height
  • Sending 1 as an argument will make the height twice as small
  • Sending 2 as an argument will make the width twice as small

Let's run a demo. Try sending 1 as an additional argument so that we decrease the height by 50%:

Consider the following code:

  using Images
source_image
= load("sample-images/cats-3061372_640.jpg");
resized_image = restrict(source_image, 1); # height
imshow(resized_image);

Rotating images

Rotation is another must-know technique when working with any type of image. We will start by initializing the required libraries and loading the image from disk. We will also be using the CoordinateTransformations package from the JuliaImages collection to define a rotation transformation:

  using Images, CoordinateTransformations
img = load("sample-images/cats-3061372_640.jpg");
tfm = LinearMap(RotMatrix(-pi/4))
img = warp(img, tfm)
imshow(img)

This results in the img variable being updated with a new image, which is shown as follows:

For ease of use, please refer to the following table:

Degree Formula
-30o -pi/6
-90o -pi/2
180 pi

Please be aware that rotating by degrees other than 90°, -90°, and 180° will result in a black background being added around the original image.

Summary

In this chapter, you received your first introduction to the JuliaImages packages. We went through the process of loading images from disk and URL; performing a different set of transformations, such as resizing and scaling; and finally, learned how to save and preview results.

Next, we will focus on enhancing the image by improving the color scheme and removing noise.

Questions

Please answer the following questions to see whether you have successfully learned this chapter:

  1. Which package(s) are required to load an image from a disk?
  2. Which package is required to download a file from the internet?
  3. Which types of files/file extensions are returned by the readdir function?
  4. Which function is used to save an image to disk? What are the prerequisites for saving a file to disk?
  5. What is the most noticeable difference when saving images in JPG or PNG formats?
  6. What is the difference between scale and resize?

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • • Build a full-fledged image processing application using JuliaImages
  • • Perform basic to advanced image and video stream processing with Julia's APIs
  • • Understand and optimize various features of OpenCV with easy examples

Description

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.

Who is this book for?

Hands-On Computer Vision with Julia is for Julia developers who are interested in learning how to perform image processing and want to explore the field of computer vision. Basic knowledge of Julia will help you understand the concepts more effectively.

What you will learn

  • • Analyze image metadata and identify critical data using JuliaImages
  • • Apply filters and improve image quality and color schemes
  • • Extract 2D features for image comparison using JuliaFeatures
  • • Cluster and classify images with KNN/SVM machine learning algorithms
  • • Recognize text in an image using the Tesseract library
  • • Use OpenCV to recognize specific objects or faces in images and videos
  • • Build neural network and classify images with MXNet
Estimated delivery fee Deliver to South Korea

Standard delivery 10 - 13 business days

$12.95

Premium delivery 5 - 8 business days

$45.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 29, 2018
Length: 202 pages
Edition : 1st
Language : English
ISBN-13 : 9781788998796
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to South Korea

Standard delivery 10 - 13 business days

$12.95

Premium delivery 5 - 8 business days

$45.95
(Includes tracking information)

Product Details

Publication date : Jun 29, 2018
Length: 202 pages
Edition : 1st
Language : English
ISBN-13 : 9781788998796
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 136.97
Julia 1.0 Programming
$43.99
Julia Programming Projects
$48.99
Hands-On Computer Vision with Julia
$43.99
Total $ 136.97 Stars icon

Table of Contents

10 Chapters
Getting Started with JuliaImages Chevron down icon Chevron up icon
Image Enhancement Chevron down icon Chevron up icon
Image Adjustment Chevron down icon Chevron up icon
Image Segmentation Chevron down icon Chevron up icon
Image Representation Chevron down icon Chevron up icon
Introduction to Neural Networks Chevron down icon Chevron up icon
Using Pre-Trained Neural Networks Chevron down icon Chevron up icon
OpenCV Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(1 Ratings)
5 star 0%
4 star 100%
3 star 0%
2 star 0%
1 star 0%
granate Nov 17, 2020
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Es una aproximación muy práctica a las técnicas de clasificación de imágenes. Describe tanto las clásicas como las redes neuronales y el entrenamiento de las mismas, con un lenguaje muy asequible.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela