Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Image Processing with Python

You're reading from   Hands-On Image Processing with Python Expert techniques for advanced image analysis and effective interpretation of image data

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781789343731
Length 492 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Sandipan Dey Sandipan Dey
Author Profile Icon Sandipan Dey
Sandipan Dey
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Title Page
Copyright and Credits
Dedication
About Packt
Contributors
Preface
1. Getting Started with Image Processing 2. Sampling, Fourier Transform, and Convolution FREE CHAPTER 3. Convolution and Frequency Domain Filtering 4. Image Enhancement 5. Image Enhancement Using Derivatives 6. Morphological Image Processing 7. Extracting Image Features and Descriptors 8. Image Segmentation 9. Classical Machine Learning Methods in Image Processing 10. Deep Learning in Image Processing - Image Classification 11. Deep Learning in Image Processing - Object Detection, and more 12. Additional Problems in Image Processing 1. Other Books You May Enjoy Index

Image formation – sampling and quantization


In this section, we'll describe two important concepts for image formation, namely, sampling and quantization, and see how we can resize an image with sampling and colors quantized with PIL and scikit-image libraries. We'll use a hands-on approach here and we'll define the concepts while seeing them in action. Ready?

Let's start by importing all of the required packages:

% matplotlib inline # for inline image display inside notebook
from PIL import Image
from skimage.io import imread, imshow, show
import scipy.fftpack as fp
from scipy import ndimage, misc, signal
from scipy.stats import signaltonoise
from skimage import data, img_as_float
from skimage.color import rgb2gray
from skimage.transform import rescale
import matplotlib.pylab as pylab
import numpy as np
import numpy.fft
import timeit

Sampling

Sampling refers to the selection/rejection of image pixels, which means that it is a spatial operation. We can use sampling to increase or reduce the...

You have been reading a chapter from
Hands-On Image Processing with Python
Published in: Nov 2018
Publisher: Packt
ISBN-13: 9781789343731
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime