Total Pageviews

Thursday, August 27, 2026

k means clustering using iris dataset step by step python code

 K-Means clustering is an unsupervised machine learning algorithm used to group similar data points together without predefined labels. When applied to the famous Iris dataset, it groups 150 flower samples based on their structural features: sepal length, sepal width, petal length, and petal width.


Because the Iris dataset contains three known biological species (Iris setosa, Iris versicolor, and Iris virginica), we naturally choose a target cluster size of K = 3.


1. Load and prepare data

The dataset contains 150 rows of data. Each row consists of 4 numerical features. For this process, we isolate these four feature dimensions and drop the actual species names (labels), forcing the algorithm to find patterns blindly.

2. Choose cluster count K
We choose K = 3. In scenarios where you do not know the real group count beforehand, you can run the Elbow Method to plot the Within-Cluster Sum of Squares (WCSS) against various K values, picking the point where the rate of decrease dramatically slows down.



3. Initialize random centroids
The algorithm randomly selects 3 data points from the dataset (or random coordinates within the data boundaries) to serve as initial center points, known as centroids.


4. Assign points to centroids
For every single data point in the dataset, calculate its Euclidean distance to all three centroids,Assign each data point to its closest centroid to form three temporary clusters.


5. Update centroid positions
Recalculate the position of each centroid by taking the mathematical mean of all coordinates assigned to that specific cluster

6. Repeat until convergence
Go back to Step 4 and reassign all points based on the newly calculated centroid coordinates. Repeat the assignment and update steps iteratively. The loop finishes when:
  • Centroids stop moving to new positions.
  • No data point changes its cluster assignment.
  • The maximum number of preset iterations is reached.


7. Evaluate and interpret
Once converged, your 150 flowers are split into three distinct mathematically optimized buckets. You can evaluate the quality of your clustering by tracking metrics like the Silhouette Score or by cross-referencing your final clusters with the original species labels to check the model's structural accuracy


from sklearn.cluster import KMeans
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

Iris = pd.read_csv(r'C:\Users\admin\Downloads\Iris.csv')
x1 = np.array(Iris['SepalLengthCm'])
x2 = np.array(Iris['PetalWidthCm'])
plt.plot()
plt.title('Dataset')
plt.scatter(x1, x2)
plt.show()



Iris
output:
IdSepalLengthCmSepalWidthCmPetalLengthCmPetalWidthCmSpecies
015.13.51.40.2Iris-setosa
124.93.01.40.2Iris-setosa
234.73.21.30.2Iris-setosa
344.63.11.50.2Iris-setosa
455.03.61.40.2Iris-setosa
.....................
1451466.73.05.22.3Iris-virginica
1461476.32.55.01.9Iris-virginica
1471486.53.05.22.0Iris-virginica
1481496.23.45.42.3Iris-virginica
1491505.93.05.11.8Iris-virginica

150 rows × 6 columns

Iris.head()
output:
IdSepalLengthCmSepalWidthCmPetalLengthCmPetalWidthCmSpecies
015.13.51.40.2Iris-setosa
124.93.01.40.2Iris-setosa
234.73.21.30.2Iris-setosa
344.63.11.50.2Iris-setosa
455.03.61.40.2Iris-setosa

Iris.tail()
output:
len(Iris)
output:
150
Iris.shape
(150, 6)
Iris.columns
output:
Index(['Id', 'SepalLengthCm', 'SepalWidthCm', 'PetalLengthCm', 'PetalWidthCm',
       'Species'],
      dtype='object')

for i,col in enumerate(Iris.columns):
    print(f'Column number {1+i} is {col}')

output:
Column number 1 is Id
Column number 2 is SepalLengthCm
Column number 3 is SepalWidthCm
Column number 4 is PetalLengthCm
Column number 5 is PetalWidthCm
Column number 6 is Species


Iris.dtypes
output:
Id                 int64
SepalLengthCm    float64
SepalWidthCm     float64
PetalLengthCm    float64
PetalWidthCm     float64
Species           object
dtype: object

Iris.info()

output:
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 150 entries, 0 to 149
Data columns (total 6 columns):
 #   Column         Non-Null Count  Dtype  
---  ------         --------------  -----  
 0   Id             150 non-null    int64  
 1   SepalLengthCm  150 non-null    float64
 2   SepalWidthCm   150 non-null    float64
 3   PetalLengthCm  150 non-null    float64
 4   PetalWidthCm   150 non-null    float64
 5   Species        150 non-null    object 
dtypes: float64(4), int64(1), object(1)
memory usage: 7.2+ KB

Iris.isna().sum()

output:
Id               0
SepalLengthCm    0
SepalWidthCm     0
PetalLengthCm    0
PetalWidthCm     0
Species          0
dtype: int64

Iris.isnull().sum()
output:

Id               0
SepalLengthCm    0
SepalWidthCm     0
PetalLengthCm    0
PetalWidthCm     0
Species          0
dtype: int64
Iris['Species'].value_counts()
output:
Species
Iris-setosa        50
Iris-versicolor    50
Iris-virginica     50
Name: count, dtype: int64

target_data = Iris.iloc[:,5]
target_data
output:
0         Iris-setosa
1         Iris-setosa
2         Iris-setosa
3         Iris-setosa
4         Iris-setosa
            ...      
145    Iris-virginica
146    Iris-virginica
147    Iris-virginica
148    Iris-virginica
149    Iris-virginica
Name: Species, Length: 150, dtype: object

clustering_data = Iris.iloc[:,[1,2,3,4]]
clustering_data
output:
SepalLengthCmSepalWidthCmPetalLengthCmPetalWidthCm
05.13.51.40.2
14.93.01.40.2
24.73.21.30.2
34.63.11.50.2
45.03.61.40.2
...............
1456.73.05.22.3
1466.32.55.01.9
1476.53.05.22.0
1486.23.45.42.3
1495.93.05.11.8

150 rows × 4 columns




fig, ax = plt.subplots(figsize=(15,7))
sns.set(font_scale=1.5)
ax = sns.scatterplot(x=Iris['SepalLengthCm'],y=Iris['SepalWidthCm'], s=70, color='#f73434', edgecolor='#f73434', linewidth=0.3)
ax.set_ylabel('Sepal Width (in cm)')
ax.set_xlabel('Sepal Length (in cm)')
plt.title('Sepal Length vs Width', fontsize = 20)
plt.show()
output:




from sklearn.cluster import KMeans
wcss=[]
for i in range(1,11):
    km = KMeans(i)
    km.fit(clustering_data)
    wcss.append(km.inertia_)
np.array(wcss)
output:
array([680.8244    , 152.36870648,  78.94506583,  57.34540932,
        46.80170193,  44.81835983,  37.52130193,  32.69137106,
        28.29091775,  26.66453557])


fig, ax = plt.subplots(figsize=(15,7))
ax = plt.plot(range(1,11),wcss, linewidth=2, color="red", marker ="8")
plt.axvline(x=3, ls='--')
plt.ylabel('WCSS')
plt.xlabel('No. of Clusters (k)')
plt.title('The Elbow Method', fontsize = 20)
plt.show()
output:


from sklearn.cluster import KMeans

kms = KMeans(n_clusters=3, init='k-means++')
kms.fit(clustering_data)
output:



clusters = clustering_data.copy()
clusters['Cluster_Prediction'] = kms.fit_predict(clustering_data)
clusters
output:
SepalLengthCmSepalWidthCmPetalLengthCmPetalWidthCmCluster_Prediction
05.13.51.40.21
14.93.01.40.21
24.73.21.30.21
34.63.11.50.21
45.03.61.40.21
..................
1456.73.05.22.32
1466.32.55.01.90
1476.53.05.22.02
1486.23.45.42.32
1495.93.05.11.80

150 rows × 5 columns




kms.cluster_centers_

output:

array([[5.9016129 , 2.7483871 , 4.39354839, 1.43387097],
       [5.006     , 3.418     , 1.464     , 0.244     ],
       [6.85      , 3.07368421, 5.74210526, 2.07105263]])


fig, ax = plt.subplots(figsize=(15,7)) 
plt.scatter(x=clusters[clusters['Cluster_Prediction'] == 0]['SepalLengthCm'],
            y=clusters[clusters['Cluster_Prediction'] == 0]['SepalWidthCm'],
            s=70,edgecolor='teal', linewidth=0.3, c='teal', label='Iris-versicolor')


plt.scatter(x=clusters[clusters['Cluster_Prediction'] == 1]['SepalLengthCm'],
            y=clusters[clusters['Cluster_Prediction'] == 1]['SepalWidthCm'],
            s=70,edgecolor='lime', linewidth=0.3, c='lime', label='Iris-setosa')


plt.scatter(x=clusters[clusters['Cluster_Prediction'] == 2]['SepalLengthCm'],
            y=clusters[clusters['Cluster_Prediction'] == 2]['SepalWidthCm'],
            s=70,edgecolor='magenta', linewidth=0.3, c='magenta', label='Iris-virginica')

plt.scatter(x=kms.cluster_centers_[:, 0], y=kms.cluster_centers_[:, 1], s = 170, c = 'yellow', label = 'Centroids',edgecolor='black', linewidth=0.3)
plt.legend(loc='upper right')
plt.xlim(4,8)
plt.ylim(1.8,4.5)
ax.set_ylabel('Sepal Width (in cm)')
ax.set_xlabel('Sepal Length (in cm)')
plt.title('Clusters', fontsize = 20)
plt.show()

fig, ax = plt.subplots(figsize=(15,7)) 
plt.scatter(x=clusters[clusters['Cluster_Prediction'] == 0]['SepalLengthCm'],
            y=clusters[clusters['Cluster_Prediction'] == 0]['SepalWidthCm'],
            s=70,edgecolor='teal', linewidth=0.3, c='teal', label='Iris-versicolor')


plt.scatter(x=kms.cluster_centers_[0, 0], y=kms.cluster_centers_[0, 1], s = 170, c = 'yellow', label = 'Centroids',edgecolor='black', linewidth=0.3)
plt.legend(loc='upper right')
plt.xlim(4,8)
plt.ylim(1.8,4.5)
ax.set_ylabel('Sepal Width (in cm)')
ax.set_xlabel('Sepal Length (in cm)')
plt.title('Individual Clusters', fontsize = 20)
plt.show()


output:



fig, ax = plt.subplots(figsize=(15,7)) 
plt.scatter(x=clusters[clusters['Cluster_Prediction'] == 1]['SepalLengthCm'],
            y=clusters[clusters['Cluster_Prediction'] == 1]['SepalWidthCm'],
            s=70,edgecolor='lime', linewidth=0.3, c='lime', label='Iris-versicolor')
plt.scatter(x=kms.cluster_centers_[1, 0], y=kms.cluster_centers_[1, 1], s = 170, c = 'yellow', label = 'Centroids',edgecolor='black', linewidth=0.3)
plt.legend(loc='upper right')
plt.xlim(4,8)
plt.ylim(1.8,4.5)
ax.set_ylabel('Sepal Width (in cm)')
ax.set_xlabel('Sepal Length (in cm)')
plt.title('Individual Clusters', fontsize = 20)
plt.show()
output:




fig, ax = plt.subplots(figsize=(15,7)) 
plt.scatter(x=clusters[clusters['Cluster_Prediction'] == 2]['SepalLengthCm'],
            y=clusters[clusters['Cluster_Prediction'] == 2]['SepalWidthCm'],
            s=70,edgecolor='magenta', linewidth=0.3, c='magenta', label='Iris-versicolor')
output:


plt.scatter(x=kms.cluster_centers_[2, 0], y=kms.cluster_centers_[2, 1], s = 170, c = 'yellow', label = 'Centroids',edgecolor='black', linewidth=0.3)
plt.legend(loc='upper right')
plt.xlim(4,8)
plt.ylim(1.8,4.5)
ax.set_ylabel('Sepal Width (in cm)')
ax.set_xlabel('Sepal Length (in cm)')
plt.title('Individual Clusters', fontsize = 20)
plt.show()
output:

























Tuesday, August 25, 2026

Database Management Systems Theory:

 CMSDSC509T/CMSMIN704T/CMSCOR404T:

Database Management Systems Theory: 45 Lectures

1. Introduction (4 Lectures)

Characteristics of database approach,

 data models  CLICK

database system architecture CLICK

and  data independence. CLICK

2. Entity Relationship(ER) Modeling (5 Lectures)

 Entity types, relationships, CLICK

 constraints. CLICK

3. Relation data model (15 Lectures)

Relational model concepts, 

relational constraints, 

relational algebra, CLICK

SQL queries. CLICK

4. Database design (12 Lectures)

Mapping ER/EER model to relational database,  CLICK

functional dependencies, CLICK

Lossless decomposition,  CLICK

Normal forms (up to BCNF). CLICK

5. Transaction Processing (3 Lectures)

ACID properties,  CLICK

concurrency control.CLICK

6. File Structure and Indexing (6 Lectures)

Operations on files, CLICK

 File of Unordered and ordered records, CLICK

overview of File organizations,

Indexing structures for files( Primary index, secondary index, clustering index), CLICK

Multilevel indexing using B and B+ trees. CLICK

Text Books

1. R. Elmasri, S.B. Navathe, Fundamentals of Database Systems 6th Edition, Pearson Education, 2010.

2. R. Ramakrishanan, J. Gehrke, Database Management Systems 3rd Edition, McGraw-Hill, 2002.

Books Recommended:

1. A. Silberschatz, H.F. Korth, S. Sudarshan, Database System Concepts 6th Edition, McGraw Hill,

2010.

2. R. Elmasri, S.B. Navathe Database Systems Models, Languages, Design and application

Programming, 6th Edition, Pearson Education, 2013.


HUFFMAN ALGORITHM ONLINE TOOL

Huffman Coding Visualizer

Interactive Step-by-Step Lossless Data Compression Tool

How Huffman Coding Works

Huffman Coding is a greedy algorithm used for lossless data compression. Instead of using a fixed-length code (like standard 8-bit ASCII) for every character, it assigns variable-length codes based on character frequencies:

  • High-Frequency Characters: Assigned shorter binary codes (e.g., 2 or 3 bits).
  • Low-Frequency Characters: Assigned longer binary codes.

Prefix Rule: No valid code is a prefix of another code. This allows the decoder to continuously parse a stream of bits without needing explicit separators between characters.

Original Size (8-bit ASCII) 0 bits
Compressed Size 0 bits
Space Saved 0%
Character Frequency Assigned Huffman Code Bit Length
Left = 0 Right = 1
Ready to build tree.

Image Morphing & Spatial Transformations

Image Morphing & Spatial Transformations

Gonzalez & Woods • DIP

According to Digital Image Processing by Gonzalez & Woods, image morphing belongs to the class of Geometric Spatial Transformations (Image Warping) combined with intensity interpolation. A spatial transformation modifies the spatial relationship between pixels in an image.

1. Two-Step Mapping Mechanism

A complete morphing process relies on two fundamental operations applied to image coordinates $(x, y)$:

  • Spatial Coordinate Transformation (Warping): Mapping spatial coordinates $(x, y)$ to new coordinates $(x', y')$ using transformation equations.
  • Intensity Interpolation (Gray-Level Mapping): Assigning pixel values to the newly mapped coordinates using methods like Nearest-Neighbor, Bilinear, or Bicubic Interpolation.

2. Affine & Matrix Transformations

Forward spatial mapping transforms coordinates via linear combination matrices:

// General Affine Transformation Matrix (Gonzalez & Woods)
[x' y' 1] = [x y 1] * T

T = | t11 t12 0 | (Rotates, scales, shears, and translates)
| t21 t22 0 |
| t31 t32 1 |
Affine Transformation Grid Warping Diagram

3. Tie-Points & Mesh-Based Warping

When the transformation cannot be modeled globally by a single matrix, Tie-Points (Control Points) are established across quadrangle or triangular meshes (Delaunay Triangulation) over both images.

Image Morphing Triangulation Mesh Diagram

For a triangular region with vertices $(x_1, y_1), (x_2, y_2), (x_3, y_3)$, the mapped coordinates are uniquely determined using affine coefficient solvers:

x' = c1x + c2y + c3
y' = c4x + c5y + c6

// Solved via 3 non-collinear tie-points per triangle pair

4. Inverse Mapping vs. Forward Mapping

Mapping Type Mechanism Key Advantage / Disadvantage
Forward Mapping Maps directly from source $(x, y)$ to destination $(x', y')$ Causes hole artifacts or overlap when multiple pixels map to one destination.
Inverse Mapping Iterates target coordinates $(x', y')$ backward to source $(x, y)$ Guarantees every output pixel is filled via bilinear/bicubic interpolation.

5. Intensity Cross-Dissolving

Once both images are spatially warped to an intermediate control-point geometry at morph stage $t \in [0, 1]$, pixel intensities are combined:

fmorph(x, y, t) = (1 - t) · fA(xA', yA') + t · fB(xB', yB')

Image Morphing

Image Morphing Workstation

Digital Image Processing
0%


1. Definition & Core Objective

Image Morphing is an advanced digital image processing technique that smoothly transforms a source image into a target image through a seamless visual transition. Unlike simple cross-fading, morphing combines spatial geometric deformation (warping) with color intensity blending (cross-dissolving) to preserve structural alignment during transition.

2. Comprehensive Step-by-Step Pipeline

  1. Feature Specification & Point Mapping:
    Key structural control points (landmarks such as eyes, mouth contours, or corners) are specified on both Source Image $A$ and Target Image $B$.
  2. Intermediate Mesh Generation:
    An intermediate feature point grid is calculated for time $t$ ($0 \le t \le 1$) using linear interpolation:
    P_intermediate = (1 - t) * P_source + t * P_target
  3. Warping (Delaunay Triangulation / Splines):
    Both source and target images are geometrically distorted toward the intermediate shape using affine transformations or Thin-Plate Splines (TPS).
  4. Cross-Dissolving (Color Interpolation):
    The warped images are color-blended pixel-by-pixel using weighted intensity interpolation to produce the final morph frame.

3. Mathematical Framework

The pixel-wise intensity blending equation at frame $t$ is expressed as:

// Cross-Dissolve / Intensity Interpolation Equation
Im(x, y) = (1 - t) · IA(x', y') + t · IB(x'', y'')

// Where:
t = Morph Progress Parameter [0.0 ≤ t ≤ 1.0]
IA(x', y') = Intensity at warped coordinates of Image A
IB(x'', y'') = Intensity at warped coordinates of Image B

4. Key Differences: Morphing vs. Cross-Dissolving

Feature Standard Cross-Dissolve Image Morphing
Geometric Alignment None (Static overlay) Full feature alignment via warping
Visual Quality Produces double-exposure / ghosting artifacts Smooth, realistic structural transition
Computational Complexity $O(N)$ — Very Low $O(N \log N)$ to $O(N^2)$ — High (Triangulation/TPS)

5. Real-World Applications

  • Entertainment & Visual Effects (VFX): Character transformations in movies, animation, and video games.
  • Biometrics & Security: Facial age-progression modeling and landmark tracking validation.
  • Medical Imaging: Visualizing anatomical changes over time (e.g., tumor growth or surgical outcome simulation).

Reference Textbook Notes

Image Morphing & (Gonzalez & Woods)

Access Notes

Huffman Coding Algorithm

Huffman Coding Algorithm Lossless Compression

Overview: Huffman Coding is a greedy algorithm created by David Huffman in 1952 while working on his Ph.D. at MIT. It is an optimal prefix-free, variable-length statistical entropy encoding technique. The core principle dictates that symbols occurring more frequently in a source message receive shorter binary codes, while less frequent symbols receive longer binary codes.

Because it is prefix-free (no assigned binary codeword is a prefix of any other codeword), a bitstream can be decoded sequentially in a single pass without needing explicit boundaries or delimiters between symbols.

Algorithmic Complexity

Time Complexity

O(N log N) — Where N is the number of unique characters. Building the min-heap takes O(N), and extracting the minimum nodes N-1 times takes O(N log N).

Space Complexity

O(N) — Requires storage for the priority queue, leaf nodes, and internal tree structures representing the N unique symbols.

Core Algorithm Steps

  1. Frequency Counting & Analysis:
    Scan the input stream to compute the frequency distribution of each distinct character or byte sequence.
  2. Priority Queue Initialization:
    Create a leaf node for each symbol containing its character value and frequency count. Insert all leaf nodes into a Min-Heap (priority queue sorted by frequency).
  3. Tree Construction (Greedy Approach):
    Iterate while the min-heap contains more than one node:
    • Pop the two lowest-frequency nodes (Node_1, Node_2).
    • Create a parent node with a combined frequency equal to Node_1.freq + Node_2.freq.
    • Set Node_1 as the left child and Node_2 as the right child.
    • Insert the new parent node back into the min-heap.
  4. Bit Assignment & Dictionary Generation:
    Perform a Depth-First Search (DFS) starting from the root of the constructed Huffman Tree. Assign a bit value of 0 to every left branch and 1 to every right branch. The path from the root to any leaf node defines that symbol's unique binary code.

Detailed Worked Example

Launch Huffman Tree Generator

Input String: BCCABBDDAAEE (12 characters, 96 bits under standard 8-bit ASCII encoding)

Step 1: Calculate Frequency Table

  • A: 3 occurrences (P = 3/12)
  • B: 3 occurrences (P = 3/12)
  • C: 2 occurrences (P = 2/12)
  • D: 2 occurrences (P = 2/12)
  • E: 2 occurrences (P = 2/12)

Step 2: Tree Synthesis Sequence

  • Combine lowest nodes C (2) and D (2) → Internal Node [CD: 4]
  • Combine lowest remaining E (2) and A (3) → Internal Node [EA: 5]
  • Combine B (3) and [CD: 4] → Internal Node [BCD: 7]
  • Combine [EA: 5] and [BCD: 7]Root Node [12]

Step 3: Visual Huffman Tree Structure

[Root: 12] / \ (0) / \ (1) / \ [EA: 5] [BCD: 7] / \ / \ (0) / \ (1) (0)/ \ (1) / \ / \ E (2) A (3) B (3) [CD: 4] / \ (0) / \ (1) / \ C (2) D (2)

Step 4: Final Binary Encoding Dictionary

Symbol Frequency Huffman Code Bit Length Total Encoded Bits
E 2 00 2 bits 4 bits
A 3 01 2 bits 6 bits
B 3 10 2 bits 6 bits
C 2 110 3 bits 6 bits
D 2 111 3 bits 6 bits

Compression Ratio Achieved:

  • Original Size (8-bit ASCII): 12 characters × 8 bits = 96 bits
  • Compressed Huffman Size: 4 + 6 + 6 + 6 + 6 = 28 bits
  • Space Reduction: (96 - 28) / 96 = 70.83% savings

Applications in Image Processing

In digital image processing, raw image data contains vast spatial redundancy. Huffman coding serves as the final, critical step in lossless and lossy compression formats (such as JPEG and PNG).

  • Entropy Coding in the JPEG Pipeline:
    In JPEG compression, image blocks (8x8 pixels) are transformed using Discrete Cosine Transform (DCT) and then quantized. The resulting high-frequency coefficients contain long runs of zeroes. Huffman coding is executed on these final run-length pairs to store the image coefficients without further data loss.
  • Handling Pixel Intensity Distribution:
    Images (like medical X-rays or astronomical photography) frequently exhibit dominant background shades. Instead of wasting 8 bits per grayscale pixel (0-255), Huffman coding assigns short 2 to 4-bit codes to dominant background pixel intensities, dramatically reducing raw image payload size.
  • Integration with Run-Length Encoding (RLE):
    For lossy image routines, pixel coefficients are reordered in a Zig-Zag pattern to consolidate zero-value frequencies. RLE creates tuples of (run_length, value), which are subsequently mapped to optimized pre-defined or dynamic Huffman Tables.
  • PNG Compression (DEFLATE Algorithm):
    PNG image formats use the DEFLATE compression engine. DEFLATE combines LZ77 (sliding window dictionary substitution) with dual dynamic Huffman trees—one tree for literal/length symbols and another for distance metrics—producing high compression ratios for graphics.

Key Takeaway: Huffman Coding achieves maximum efficiency when symbol probabilities are inverse powers of two (2-1, 2-2, 2-3). For datasets with skewed distributions—like quantized image coefficients—it approaches Shannon's theoretical Entropy limit.

IMAGE PROCESSING




CMSDSC716T: Image Processing and Computer Vision Theory: 45 Lectures

CMSDSC716P: CLICK HERE FOR PRACTICAL USING OPENCV 


1. Introduction (4 Lectures)

Light, Brightness adaption and discrimination, Pixels, Coordinate conventions, Imaging Geometry,

Perspective Projection, Spatial Domain Filtering, Sampling and quantization.

2. Spatial Domain Filtering: (8 Lectures)

Intensity transformations, contrast stretching, histogram equalization, Correlation and convolution,

Smoothing filters, Sharpening filters, Gradient and Laplacian.

3. Filtering in the Frequency domain: (8 Lectures)

Hotelling Transform, Fourier Transforms and properties, FFT (Decimation in Frequency and

Decimation in Time Techniques), Convolution, Correlation, 2-D sampling, Discrete Cosine Transform,

Frequency domain filtering.

4. Image Restoration: (8 Lectures)

Basic Framework, 

Interactive Restoration, 

Image deformation and geometric transformations,

 image morphing, 

Restoration techniques,

 Noise characterization, 

Noise restoration filters,

 Adaptive filters,

Linear, 

Position invariant degradations, 

Estimation of Degradation functions, 

Restoration from projections.

5. Image Compression & Segmentation: (10 Lectures)

Encoder-Decoder model:

Types of redundancies:

Lossy and Lossless compression:

 Entropy of an

information source:

 Shannon's 1st Theorem:
 Huffman Coding- CLICK HERE,

 Arithmetic Coding: , 

Run length coding.

JPEG. 

Boundary detection based techniques

, Point, line detection,

 Edge detection,

 Edge linking, 

Local processing, 

Regional processing, 

Hough transform, 

Thresholding,

 Iterative thresholding.

6. Image Description (5 Lectures)

Introduction to Computer Vision: Comparison of Image Processing, Computer Vision and Computer

Graphics, What is Computer Vision - Low-level, Mid-level, High-level processing, Overview of Diverse

Computer Vision Applications: Document Image Analysis, Biometrics, Object Recognition, Object

Tracking, Gesture Recognition, Motion Estimation

 

Tuesday, August 18, 2026

Data Preprocessing


Data Preprocessing Core Framework

Data preprocessing is a foundational phase in data science that transforms raw, real-world data into a clean, integrated, and optimized format suitable for downstream mining algorithms.

3.2

Data Cleaning

Resolves data quality flaws by explicitly handling missing values and smoothing out noisy data structures to minimize system bias.

3.3

Data Integration

Consolidates multi-source schemas, eliminates entity redundancies, tracks value conflicts, and clears duplicate metadata profiles.

3.4

Data Reduction

Compresses volume and dimension footprints via mechanisms like Wavelets, PCA, Sampling, Histograms, and Data Cube Aggregation.

3.5

Transformation & Discretization

Standardizes ranges through data normalization, structural binning, and histogram cluster segmentations into actionable categorical intervals.

_________________