0% found this document useful (0 votes)
97 views30 pages

Digital Image Processing Computer Vision: Marya Butt, PHD

This document provides an overview of digital image processing and computer vision. It discusses: 1. The types of data used in image processing, including structured vs unstructured data. 2. The two main tasks of digital image processing - improving images for human interpretation and processing images automatically for machine perception. 3. Common image processing techniques like enhancement, filtering, compression, and morphological operations. 4. Applications of image processing techniques and how techniques like histogram equalization improve contrast without boosting noise. 5. The relationship between image processing and computer vision, and how techniques like segmentation and neural networks are applied in both domains.

Uploaded by

projectjr2 Profs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views30 pages

Digital Image Processing Computer Vision: Marya Butt, PHD

This document provides an overview of digital image processing and computer vision. It discusses: 1. The types of data used in image processing, including structured vs unstructured data. 2. The two main tasks of digital image processing - improving images for human interpretation and processing images automatically for machine perception. 3. Common image processing techniques like enhancement, filtering, compression, and morphological operations. 4. Applications of image processing techniques and how techniques like histogram equalization improve contrast without boosting noise. 5. The relationship between image processing and computer vision, and how techniques like segmentation and neural networks are applied in both domains.

Uploaded by

projectjr2 Profs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

DIGITAL IMAGE

PROCESSING
COMPUTER VISION

Marya Butt, PhD.


Researcher Data Driven Smart Society (DDSS)
BIG DATA, Computer Vision, Machine Learning
Faculty of Engineering Design and Computing
Mob: +31(0) 0611878759
E: [email protected]
Working days: mo, tu, we and thu.
Big Data & Types
Structured Data (10%) Unstructured Data (90%)
• Data stored in rows and columns • Image
• Video
• Numerical • Document
A picture is worth a thousand words!

Why do we need Digital Images?


Why do we process Images?

Digital image processing focuses on two major tasks


1. Improvement of pictorial information for human
interpretation
2. Processing of image data for storage, transmission and
representation for autonomous machine perception

• Image data needs to be analyzed automatically


Reduce the burden of human operators by teaching a computer to see

• Enhance and restore images


Digital Image?
Two-dimensional array of numbers
f(x,y)

Grayscale images, 8-bit data value (with a range


of 0 to 255) or a 16-bit data value (with a range of
0 to 65535).
Color images, 8-bit, 16-bit, 24- bit, and 30-bit
colors
Guess!
Image Processing
RGB Vs BGR
Image Processing Phases
Image Enhancement
Histogram Equalization
Histogram equalization is a basic image processing technique that can improve an
image’s overall contrast.

Applying histogram equalization starts by computing the histogram of pixel


intensities in an input grayscale/single-channel image:
Image Enhancement
Histogram Equalization

Process of streching the pixel values across the entire range from 0-255
Image Enhancement
Histogram Equalization

Process of streching the pixel values across the entire range from 0-255
“Is it possible to improve image contrast without also
boosting noise at the same time?”

The answer is “Yes,” you just need to apply adaptive


histogram equalization.
Image Enhancement
• CLAHE
(Contrast Limited Adaptive Histogram Equalization)
With adaptive histogram equalization, we divide an input
image into an M x N grid. We then apply equalization to each
cell in the grid, resulting in a higher quality output image.

Performing adaptive histogram equalization requires:

1. Convert the input image to grayscale/extract a single


channel from it
2. Instantiate the CLAHE algorithm using cv2.createCLAHE
3. Call the .apply method on the CLAHE object to apply
histogram equalization.
Image Enhancement
• CLAHE (Contrast Limited Adaptive Histogram Equalization)

Figure 6. (A) Green Channel, (B) after histogram equalization, (C) after
CLAHE. 
Image
Enhancement
• CLAHE

Applications
Multiresolution Processing

process of representing images in various degrees of


resolution

The big question with resolution is always how much is


enough?
This all depends on what is in the image and what you would
like to do with it

Key questions include


Image Resolution

The picture on the right is fine for counting the number of cars,
but not for reading the number plate
Image Binarization

Source:Apeer.com
Image Processing
Filter Vs Kernel
Matrices applied to an image to apply image effects which can be
done through the mathematical operation known as convolution.
Compression
reducing the size of the image with minimum deterioration in its
quality (image shrinkage)

For Expansion:
img_scaled = cv2.resize(img,None,fx=1.2, fy=1.2, interpolation = cv2.INTER_LINEAR)
cv2.imshow('Scaling - Linear Interpolation', img_scaled)
For compression:
img_scaled = cv2.resize(img,(450, 400), interpolation = cv2.INTER_AREA)
cv2.imshow('Scaling - Skewed Size', img_scaled)

OpenCV provides a function called resize to achieve image scaling. If you don't specify a size (by
using None), then it expects the X and Y scaling factors. In our example, the image will be
enlarged by a factor of 1.2.
Morphological Processing
(Erosion & Dilation)
Morphological image processing is a collection of non-linear
operations related to the shape or morphology of features in an
image
Morphological techniques probe an image with a small shape or template called
a structuring element. The structuring element is positioned at all possible locations
in the image and it is compared with the corresponding neighbourhood of pixels.
Some operations test whether the element "fits" within the neighbourhood, while
others test whether it "hits" or intersects the neighbourhood
Morphological Processing
(Erosion & Dilation)
Morphological Processing
(Erosion & Dilation)
How to erode and dilate in python?
# Create structure element Kernel
kernel = np.ones((5, 5), np.uint8)

# Instantiate erode and dilate function


img_erosion = cv2.erode(img, kernel, iterations=1)
img_dilation = cv2.dilate(img, kernel, iterations=1)

# display results
cv2.imshow('Input', img)
cv2.imshow('Erosion', img_erosion)
cv2.imshow('Dilation', img_dilation)
  
cv2.waitKey(0)
Image Segmentation
(Locate objects & Boundaries)
DIP to CV (Computer Vision)
Continuum from IP to CV
Neuron & Artificial Neuron
Feed Forward NN
• Data or the input travels in one direction
• Single layer feed forward network
• Output=1 if > threshold(usually 0)
• Neuron deactivated value=-1
Recurrent Neural Network(RNN)

1. Saving the output of a layer


2. Feeding this back to the input
3. Predicting the outcome of the layer
Convolutional Neural Networks
• Deep Learning algorithm
• takes in an input image
• assigns importance to various aspects/objects in the image
• becomes able to differentiate one from the other
• Pre-processing is much lower as compared to other classification
algorithms.
• In primitive methods filters are hand-engineered, with enough training,
ConvNets have the ability to learn these filters/characteristics
Think???

Time series data of tomatoes yield in kgs,


predict yield for next month?

Which NN to be used?

You might also like