Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 58

CS2009 – EXPLORATORY DATA ANALYSIS AND VISUALIZATION

IMAGE DATA EXPLORATION

Muthu Palaniappan M
WHAT IS AN IMAGE ?

 An image is defined as a 2D function F(X,Y) Where x and y are coordinates


 Amplitude of F at any pair of coordinates (X,Y) is called intensity.
 When X, Y, amplitude values of F are finite then we call it as digital image.
TYPES OF IMAGE

There are two type of image –


 Analog image
 Digital image.

 Analog image :
The type of image that we, as a human , look at. These images will have various levels of brightness and colors.
It is generally continuous and not broken into small individual pieces.

 Digital image:
These images are divided into a matrix or pixels. Each pixel is represented by a numerical value. These pixels
value will represent the brightness or color.
TYPES OF IMAGE
EXAMPLE OF DIGITAL IMAGES
DIGITAL IMAGE
WHAT IS IMAGE PROCESSING?

 Algorithms that alter an input image to create a new image. Where input and output will be an image.
 This provides Image enhancement.
APPLICATIONS : NOISE REMOVAL
APPLICATIONS : IMAGE COMPRESSION
APPLICATIONS : IMAGE INPAINTING
APPLICATIONS : MEDICINE
APPLICATIONS : LAW ENFORCEMENT

 Number plate recognition for speed cameras or automated toll systems(Fastag)


 Fingerprint Recognition
KEY STAGES OF IMAGE PROCESSING
KEY STAGES OF IMAGE PROCESSING

 ACQUISITION : a) Scaling b) Colour conversion (RGB to Gray or vice-versa)


 IMAGE ENHANCEMENT : Used to extract some hidden details from an image and is subjective.
 IMAGE RESTORATION : It is based on mathematical or probabilistic model. Example noise removal.
 MORPHOLOGICAL PROCESSING : Extracting description of shape and useful in the representation.
 SEGMENTATION : Partitioning an image into its constituent parts or objects.
 REPRESENTATION AND DESCRIPTION : Transforming raw data into processed data.
 OBJECT DETECTION AND RECOGNITION : The process of assigns a label to an object.
BASIC IMAGE DATA ANALYSIS USING NUMPY
AND OPEN CV
A LITTLE BIT ABOUT PIXEL

 Computer stores image as a mosaic of tiny squares called pixels.


 A simple way to describe each pixel is using a combination of three colors, namely Red, Green, Blue. This
is what we call an RGB image.
 In an RGB image, each pixel is represented by three 8 bit numbers associated to the values for Red, Green,
Blue respectively.
 Three pixels values are full intensity – 255 – White
 Three pixels values are muted – 0 – Black
 We can make 16.8 million total shades with this combination of three colors.
PIXEL
LET’S GET INTO CODING PART
IMPORTING IMAGES AND ITS PROPERTIES
IMPORTING IMAGES AND ITS PROPERTIES
IMPORTING IMAGES AND ITS PROPERTIES

OUTPUT:
OBSERVE THE BASIC PROPERTIES OF IMAGE
BASIC PROPERTIES OF IMAGE
BASIC PROPERTIES OF IMAGE
BASIC PROPERTIES OF IMAGE
BASIC PROPERTIES OF IMAGE
BASIC PROPERTIES OF IMAGE

Shape is an three layered matrix.

 The first value indicates – length


 The second value indicates – width
 The third value indicates – Three layers ( Red Green Blue )
BASIC PROPERTIES OF IMAGE
BASIC PROPERTIES OF IMAGE
BASIC PROPERTIES OF IMAGE
BASIC PROPERTIES OF IMAGE
QUICK VIEW OF EACH CHANNELS IN THE WHOLE IMAGE
QUICK VIEW OF EACH CHANNELS IN THE WHOLE IMAGE
QUICK VIEW OF EACH CHANNELS IN THE WHOLE IMAGE
QUICK VIEW OF EACH CHANNELS IN THE WHOLE IMAGE
QUICK VIEW OF EACH CHANNELS IN THE WHOLE IMAGE
QUICK VIEW OF EACH CHANNELS IN THE WHOLE IMAGE
SPLITTING LAYERS
SPLITTING LAYERS
SPLITTING LAYERS
WE CAN ALSO CHANGE THE RGB VALUES

R CHANNEL ROW : 0-50


B CHANNEL ROW : 51-75
G CHANNEL ROW : 76-100
RGB VALUES
RGB VALUES
RGB VALUES
RGB VALUES
RGB VALUES
RGB VALUES
GREYSCALE
GREYSCALE

 Black and white images are stored in 2D arrays.


 There are two types of black and white images.
- Binary : Pixel is either White or Black : 0 or 255.
- Greyscale : Range of shades of grey : 0 ~ 255.

 Grey scaling is a process of converting from a full colour to shades of grey.


 Formula to convert : Y’ = 0.299R + 0.587G + 0.114B
GREYSCALE
GREYSCALE
INTENSITY TRANSFORMATION
NEGATIVE IMAGE

The Intensity transformation function defined as :


S = T(r)
S = Pixel of Output Image
r = Pixel of Input Image
T = Transformation function
In this Case : T : (L-1)
So each of the value will be subtracted by 255
The result will be lighter pixels will become dark and vice versa.
NEGATIVE IMAGE
NEGATIVE IMAGE
LOG TRANSFORMATION

 The log transformation can be defined by this formula.

 S = C * log(r+1)

 S = Output Pixel

 C = Input Pixel

 If the intensity of pixel is 0 then the log value will become infinity. So 1 is added to make the minimum value at
least 1.

 The results will be the dark pixels in an image will be expanded. The higher pixel values are kind of compressed.
LOG TRANSFORMATION
LOG TRANSFORMATION

You might also like