# Image Transformation in Image preprocessing

Transformations is common in computer science in order to reduce complexity of calculations remember that strength reduction concept of compiler design, where multiplications in iterative approaches are replace with addition operations. Analogy to that in image preprocessing images are converted into another but equivalent form which reduces the complexity of operations performed over that image is image transformation concept. This post is about brief understanding of image transformation in image. preprocessing.

## What is Image Transformation ?

Transformation is a mathematical tool, which enables to change an image from one domain to another domain for easy task performing. Transformation do not change the image information content.

## Types of Image Transformation

**Orthogonal Sinusoidal Basis Function**

** Use case**: Image compression, JPEG uses discrete cosine transform uses to concentrating the image information in over range of few frequency components which makes the JPEG to achieve efficient compression, which reduces the size of file and also maintain the image quality.

**Non-Sinusoidal orthogonal Basis Function**

** Use case**: Medical image denoising, used in MRI to separate the features and noise from the MRI or CT scans.

**Basis Function Depending on statics of input signal**

** Use case**: Face recognition, transformation simplify by focusing on the principal components of the image that capture the essential variations on facial features in order to recognize with better accuracy.

**Directional Transformation**

** Use case**: Texture analysis in remote sensing

**,**it can be applied to satellite imagery to detect and analyze different types of terrain and land cover by identifying textures that vary in specific directions, aiding in land use classification and environmental monitoring.

## Need of Image Transformation

** Mathematical Convenience:** Every action in time domain will have impact in frequency domain. The complex convolution operation in time domain is equal to simple multiplication in frequency domain.

** To extract more information:** Transformation allow us to extract more relevant information.

## How it works ?

**Input image** =[[100,150,100],[150,200,150],[100,150,100]] , applying discrete cosine transform (DCT) on a 3x3 image.

Finding value of alpha 0,1,2 by :

Compute C(0,0) by :

Similairy for C (0,1):

Repeat the same process for all C(u,v), will give you final output image matrix as:

## Python implemtation

Python program for the above mentioned numerical program.

import numpy as np

from scipy.fftpack import dct

image = np.array([

[100, 150, 100],

[150, 200, 150],

[100, 150, 100]

], dtype=np.float32)

dct_transformed = dct(dct(image.T, norm=’ortho’).T, norm=’ortho’)

dct_transformed

## Limitations

Loss of High-Frequency Detail

Block Artifacts

Loss of Information

Limited Frequency Range

Over-enhancement

Not Suitable for All Images

## Advantages

Energy Compaction and Compression

Multiresolution and Frequency Analysis

Contrast Enhancement

## Applications

Watermarking

Image/video compression

HDR Imaging

Frequency Analysis

Industrial Inspection

Remote Sensing and Satellite Imaging

**Conclusion**

Transformation in image preprocessing is allows to select appropriate features from the image, which makes the significant improvements in the image quality and analysis. With this, the post reaches to end, here we explored about its definition, types, numerical and python implementation example, advantages and some disadvantages, and i hope that, this post adds some value in your learning.

Thank you readers !!