SlideShare a Scribd company logo
2
Most read
12
Most read
13
Most read
Tejus Adiga M
Department of Electronics and Communication, NMAMIT, Nitte.
Presented By:
Resampling
• Ideal resampling: Discrete -> Continuous -> Discrete.
• Practical resampling: Done entirely in discrete domain.
• Types of Resampling:
• Downsampling: Decrease size by M.
• Upsampling: Increase size by N.
• Fractional Resampling: Increase size my M and decrease by N (M/N).
• Traditional Methods:
• Blind Resampling: 2D Convolution. Eg Kernels Nearest Neighbor, Bilinear,
Bicubic, Bspline.
• Content Aware Resampling: Seam Carving, Edge Directed Interpolation (EDI),
Super Resolution.
• Seperability: 2D filtering = Performing 1D filtering two times in
each dimension one after another.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
2
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
3
Downsampling
• General Approach:
Anti Alias Filter
(LPF)
Downsampler
↓ 𝑁
Image 𝑊𝑥𝐻
Downsampled
Image
𝑊
2
𝑥
𝐻
2
• Practical Approach
𝑦 𝑚 =
𝑘=−𝑁/2
𝑁/2
𝐶 𝑘 𝑥2𝑚 −𝑘−1 0 ≤ 𝑚 ≤ 𝑊, 𝐻. 𝑁 𝑖𝑠 𝑓𝑖𝑙𝑡𝑒𝑟 𝑙𝑒𝑛𝑔𝑡ℎ
Downsampling
Kernel
Downsampled Image
𝑊
2
𝑥
𝐻
2
Image 𝑊𝑥𝐻
• Convolution
m-2 m-1 m m+1 m+2 m+3
Downscaled Image
Original Image
Fig 1: Downsampling process
x
Ck1Ck1 Ck2Ck2
hd(x)
0
1 Pixel
Distance
Fig 2: Downsampling Kernel
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
4
Upsampling
• General Approach:
Upsampler
↑ 𝑀
Low Pass FilterImage 𝑊𝑥𝐻
Upsampled Image
2𝑊 𝑥 2𝐻
• Practical Approach
𝑦2𝑚+1 =
𝑘=−𝑁/2
𝑁/2
𝐶 𝑘 𝑥 𝑚 −𝑘−1 0 ≤ 𝑚 ≤ 𝑊, 𝐻. 𝑁 𝑖𝑠 𝑓𝑖𝑙𝑡𝑒𝑟 𝑙𝑒𝑛𝑔𝑡ℎ
Upsampling Kernel
Upsampled Image
2𝑊 𝑥 2𝐻
Image 𝑊𝑥𝐻
• Convolution
Upscaled Image
m-2 m-1 m m+1 m+2 m+3
Original Image
m-3 m+4
Fig 3: Upsampling process
hu(k)
x
0
Fig 4: Upsampling Kernel
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
5
Blind Resampling – Nearest Neighbor
Fig 5: Spatial kernel and Frequency Response
• Downsampling: Discard Every alternate pixel.
• Upsampling: Replicate the Nearest Pixel.
• Artifacts: Aliasing-Increase 4 times for two fold resample.
• Kernel: Rectangular spatial kernel. Infinite frequency contents.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
6
Blind Resampling – Nearest Neighbor
Downsampled by 4
Downsampled by 2
Captured Image
Upsampled by 4
Fig 6: Downsampled and
Upsampled by factor of 2 and 4
Upsampled by 2
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
7
Blind Resampling – Bilinear
Fig 7: Spatial kernel and Frequency Response
• Downsampling and Upsampling: Average of two pixels. (4 pixels in 2D)
• Artifacts: Aliasing, Blurring.
• Filter Coefficients: ℎ 𝑏 𝑥 =
1
2
,
1
2
2
= 0.5, 0.5
• Kernel: Triangular or Tent Spatial kernel.
• Frequency response: Stop band attenuation better than Nearest Neighbor.
• Aliasing is reduced when compared to nearest Neighbor.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
8
Blind Resampling – Bilinear
Captured Image
Upsampled by 4
Fig 8: Downsampled and
Upsampled by factor of 2 and 4
Upsampled by 2
Downsampled by 4
Downsampled by 2
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
9
Blind Resampling – Bicubic
Fig 9: Spatial kernel and Frequency Response
• Downsampling and Upsampling: Weighted average of 4 pixels.
• Artifacts: Blurring.
• Filter: ℎ 𝑏 𝑥 =
3
2
𝑥 3 −
5
2
𝑥 2 + 1, 0 ≤ 𝑥 ≤ 1
−
1
2
𝑥 3 +
5
2
𝑥 2 − 4 𝑥 + 2, 1 < 𝑥 ≤ 2
0, 𝑥 > 2
• Frequency response: Stop band attenuation better than Bilinear.
• The 1st negative side lobe introduce controlled Ringing effect which makes image
appear sharper than they actually are.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
10
Blind Resampling – Bicubic
Captured Image
Upsampled by 4
Fig 10: Downsampled and
Upsampled by factor of 2 and 4
Upsampled by 2
Downsampled by 4
Downsampled by 2
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
11
Blind Resampling – Windowed Sinc
Fig 11: Windowed Sinc Kernel
• Artifacts: Ringing, Blurring.
• Filter: Truncated Sinc function. ℎ 𝑏 𝑥 =
sin
𝜋𝑥
2
𝜋𝑥
2
• Side lobes significantly contributes to Ringing.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
12
Blind Resampling – Lanczos
Fig 12: Lanczos Kernel for a=2 and a=3
• Weighted Average of 4 pixels.
• Artifacts: Blurring.
• Filter: ℎ 𝑏 𝑥 = 𝑠𝑖𝑛𝑐 𝑥 𝑠𝑖𝑛𝑐
𝑥
𝑎
− 𝑎 ≤ 𝑥 ≤ 𝑎 𝑎𝑛𝑑 𝑎 = 2, 3
• ‘a’ indicates number of lobes in one half of the filter.
• Effect of side lobes is decreased by multiplying another scaled sinc function.
But stronger enough to make image look sharper.
• Upsampled image sharper than Bicubic, Bilinear.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
13
Blind Resampling – Lanczos
Captured Image
Upsampled by 4
Fig 13: Downsampled and
Upsampled by factor of 2 and 4
Upsampled by 2
Downsampled by 4
Downsampled by 2
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
14
Artifacts in Image Resampling
• Aliasing:
• Jagged Edges.
• Introduced in Downsampling and Enhanced in Upsampling.
• Priority: Lanczos, Bicubic, Bilinear, nearest Neighbor.
• Ringing:
• Side lobes of lengthy filter contribute to false edges.
• Optimal filter length 4.
• Windowed Sinc.
• Blurring:
• LPF gains get multiplied while Downsampling and Upsampling.
• Information lost during Downsampling is irreversible. So in upsampling pixels
are filled with he help of existing information in Downsampled image.
• Priority: Nearest Neighbor, Bilinear, Lanczos, Bicubic.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
15
Artifacts
Ringing Example
Aliasing Example
Blurring Example
Fig 14: Examples of Ringing,
Aliasing and Blurring
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
16
Content Aware Resampling – Seam Carving
• Seam: 8-Connected set of pixels that runs from top to bottom or Left to Right.
• Principle: Low energy seam is not appealing to eyes.
• Applications:
• Image Retargeting: Resizing image, Changing Aspect Ratio.
• Object removal or insertion.
• Algorithm:
• Find the Gradient Map of the input image I.
𝐺 𝑥, 𝑦 =
𝜕𝐼
𝜕𝑥
+
𝜕𝐼
𝜕𝑦
• In Gradient Map search a unique path (seam) from top to bottom or left
to right such that Energy of the seam is minimum than all other possible
seam.
𝑠 = min
𝑠
𝑊/𝐻
𝑔(𝑥, 𝑦)
• Remove the seam or Duplicate the seam from the image I and G which
reduces/increases the width/height by 1 pixel.
• Iterate the above steps until desired size is achieved.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
17
Content Aware Resampling – Seam Carving
Fig 15: Seam Calculation using Gradient.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
18
Content Aware Resampling – Seam Carving
Fig 16: Comparison of Seam Carving with Scaling
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
19
Seam Carving – Failure Cases
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
20
Seam Carving – Failure Cases
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
21
Content Aware Resampling –
New Edge Directed interpolation (NEDI)
• Principle: Inter pixel relations are retained while Downscaling. Hence
Covariance in original Image and Downscaled image are nearly same.
• New Pixel Value = Weighted Sum of nearest 4 pixels. Weights are computed
dynamically according to local image characteristics.
𝑌2𝑖+1,2𝑗+1 =
𝑘=0
1
𝑙=0
1
𝛼2𝑘+𝑙 𝑌2 𝑖+𝑘 ,2 𝑗+𝑙
𝛼 = 𝑅−1
𝑟
𝑅 =
1
22
𝐶 𝑇
𝐶, 𝑎𝑛𝑑 𝑟 =
1
22
𝐶 𝑇
𝑦
Where 𝑦 = [𝑦1 … 𝑦 𝑘 … 𝑦22] 𝑇
is the data vector
containing the 2x2 pixels inside the local window
and C is a 4x22 data matrix whose kth column
vector is the four nearest neighbors of along the
diagonal direction.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
22
Content Aware Resampling – (NEDI)
Fig 16: Comparison of NEDI with Bicubic filter
Downscaled Image
Upscaled 4X using NEDI Upscaled 4X using Bicubic
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
23
Conclusion
• Trade off:
• Quality
• Speed of Operation
• Requirement
• Information lost during Downsampling cannot be recovered while upsampling.
• Future Work:
• Improvement of Content Aware Resizing methods.
• Adding Resolution.
28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte.
24
References
1. New Edge-Directed Interpolation, Xin Li and Michael T. Orchard. IEEE TRANSACTIONS ON
IMAGE PROCESSING, VOL. 10, NO. 10, OCTOBER 2012.
2. Local and Nonlocal Regularization to Image Interpolation, Yi Zhan, Sheng Jie Li, and Meng Li,
Mathematical Problems in Engineering, Volume 2014 (2014), Article ID 230348.
3. Adaptive multidirectional edge directed interpolation for selected edge regions. TENCON 2011 -
2011 IEEE Region 10 Conference.
4. V.R. Algazi, G.E. Ford and R. Potharlanka, "Directional interpolation of images based on visual
properties and rank order filtering", Proceeding of ICASSP' 1991, pp.3005-3008.
5. Seam Carving for Content-Aware Image Resizing. Shai Avidan and Ariel Shamir. Proceedings of
ACM SIGGRAPH, 417–424.
6. J. Allebach and P.W. Wong, "Edge-directed interpolation", Proceeding of ICIP 1996, Page No
707-710.
7. Keys, R., “Cubic Convolution Interpolation for Digital Image Processing”, IEEE Trans on ASSP, vol
ASSP-29, No. 6, Page No 1153-1160. Dec 1981.
8. New Filters for Image Interpolation and Resizing, Amir Said, IEEE International Conference on
Image Processing, VOL. 8, 2007.
9. Image Zooming Methods, Bax Smith.
10. “Interpolation Theory”
http://sepwww.stanford.edu/public/docs/sep107/paper_html/node20.html

More Related Content

PPT
Digital image classification22oct
Aleemuddin Abbasi
 
PPTX
Image filtering in Digital image processing
Abinaya B
 
PPT
Image pre processing
Ashish Kumar
 
DOCX
Resampling- GIS
Sadia Rahat
 
PDF
Landuse Classification from Satellite Imagery using Deep Learning
DataWorks Summit
 
PPTX
IMAGE FUSION IN IMAGE PROCESSING
garima0690
 
PPT
Image degradation and noise by Md.Naseem Ashraf
MD Naseem Ashraf
 
Digital image classification22oct
Aleemuddin Abbasi
 
Image filtering in Digital image processing
Abinaya B
 
Image pre processing
Ashish Kumar
 
Resampling- GIS
Sadia Rahat
 
Landuse Classification from Satellite Imagery using Deep Learning
DataWorks Summit
 
IMAGE FUSION IN IMAGE PROCESSING
garima0690
 
Image degradation and noise by Md.Naseem Ashraf
MD Naseem Ashraf
 

What's hot (20)

PPTX
Features image processing and Extaction
Ali A Jalil
 
PPTX
Image feature extraction
Rushin Shah
 
PPTX
Spatial databases
Dabbal Singh Mahara
 
PPTX
SPATIAL FILTERING IN IMAGE PROCESSING
muthu181188
 
PPT
Texture in image processing
Anna Aquarian
 
PPT
Image enhancement ppt nal2
Surabhi Ks
 
PPT
Cnn method
AmirSajedi1
 
PDF
Map Design and Symbology in GIS Environment
Kaium Chowdhury
 
PPTX
Image feature extraction
Rishabh shah
 
PPTX
Object extraction from satellite imagery using deep learning
Aly Abdelkareem
 
PDF
"Understanding and Implementing Face Landmark Detection and Tracking," a Pres...
Edge AI and Vision Alliance
 
PDF
Deep Learning for Computer Vision: Object Detection (UPC 2016)
Universitat Politècnica de Catalunya
 
PPT
Digital Image Processing_ ch2 enhancement spatial-domain
Malik obeisat
 
PPTX
Edge detection
Ishraq Al Fataftah
 
PPTX
Remote Sensing: Georeferencing
Kamlesh Kumar
 
PDF
Spatial data analysis
Johan Blomme
 
PPTX
Three dimensional (3D) GIS
Wellington Gwavava
 
PPTX
Object detection
ROUSHAN RAJ KUMAR
 
PPTX
Object detection presentation
AshwinBicholiya
 
PPT
Image enhancement techniques
sakshij91
 
Features image processing and Extaction
Ali A Jalil
 
Image feature extraction
Rushin Shah
 
Spatial databases
Dabbal Singh Mahara
 
SPATIAL FILTERING IN IMAGE PROCESSING
muthu181188
 
Texture in image processing
Anna Aquarian
 
Image enhancement ppt nal2
Surabhi Ks
 
Cnn method
AmirSajedi1
 
Map Design and Symbology in GIS Environment
Kaium Chowdhury
 
Image feature extraction
Rishabh shah
 
Object extraction from satellite imagery using deep learning
Aly Abdelkareem
 
"Understanding and Implementing Face Landmark Detection and Tracking," a Pres...
Edge AI and Vision Alliance
 
Deep Learning for Computer Vision: Object Detection (UPC 2016)
Universitat Politècnica de Catalunya
 
Digital Image Processing_ ch2 enhancement spatial-domain
Malik obeisat
 
Edge detection
Ishraq Al Fataftah
 
Remote Sensing: Georeferencing
Kamlesh Kumar
 
Spatial data analysis
Johan Blomme
 
Three dimensional (3D) GIS
Wellington Gwavava
 
Object detection
ROUSHAN RAJ KUMAR
 
Object detection presentation
AshwinBicholiya
 
Image enhancement techniques
sakshij91
 
Ad

Viewers also liked (12)

PPTX
Voice Activity Detection using Single Frequency Filtering
Tejus Adiga M
 
PPTX
Resampling methods
Setia Pramana
 
PPT
Linked In Upload Gis
nadinwelsh
 
PPTX
Quadrature Sampling
Tejus Adiga M
 
PPTX
Angular MIMO
Tejus Adiga M
 
PPTX
High Efficiency Video Codec
Tejus Adiga M
 
PPTX
Voice recognition system
avinash raibole
 
PPTX
An Overview of High Efficiency Video Codec HEVC (H.265)
Varun Ravi
 
PDF
Transforming Rasters and Point Clouds using FME
Raghavendran S
 
PDF
Creating Photobooks in iBooks Author
Elaine Giles
 
PPT
Bio-metrics Technology
Avanitrambadiya
 
DOCX
Smart wheel chair based on voice recognition for handicapped
Sagar Bayas
 
Voice Activity Detection using Single Frequency Filtering
Tejus Adiga M
 
Resampling methods
Setia Pramana
 
Linked In Upload Gis
nadinwelsh
 
Quadrature Sampling
Tejus Adiga M
 
Angular MIMO
Tejus Adiga M
 
High Efficiency Video Codec
Tejus Adiga M
 
Voice recognition system
avinash raibole
 
An Overview of High Efficiency Video Codec HEVC (H.265)
Varun Ravi
 
Transforming Rasters and Point Clouds using FME
Raghavendran S
 
Creating Photobooks in iBooks Author
Elaine Giles
 
Bio-metrics Technology
Avanitrambadiya
 
Smart wheel chair based on voice recognition for handicapped
Sagar Bayas
 
Ad

Similar to Resampling (20)

PDF
Performance analysis of high resolution images using interpolation techniques...
sipij
 
PDF
mvitelli_ee367_final_report
Matt Vitelli
 
PPTX
Double patterning for 32nm and beyond
Manikandan Sampathkumar
 
PPTX
Study on Application of Ensemble learning on Credit Scoring
harmonylab
 
PDF
Multimedia Security - JPEG Artifact details
Sebastiano Battiato
 
PDF
NUMBER PLATE IMAGE DETECTION FOR FAST MOTION VEHICLES USING BLUR KERNEL ESTIM...
paperpublications3
 
PDF
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
IRJET Journal
 
PDF
IRJET- A Comparative Review of Satellite Image Super Resolution Techniques
IRJET Journal
 
PDF
X-Ray Image Enhancement using CLAHE Method
IRJET Journal
 
PPSX
Meta-MapReduce- A Technique for Reducing Communication in MapReduce Computations
Shantanu Sharma
 
PDF
Graph Analysis Beyond Linear Algebra
Jason Riedy
 
PDF
Enhanced Watemarked Images by Various Attacks Based on DWT with Differential ...
IRJET Journal
 
PDF
Comparative Analysis of image Enhancement Techniques on Real Time images
IJSRED
 
PDF
Network Deconvolution review [cdm]
Dongmin Choi
 
PDF
Metric Recovery from Unweighted k-NN Graphs
joisino
 
PDF
30thSep2014
Mia liu
 
PDF
Image enhancement techniques a review
eSAT Journals
 
PPTX
The neural tangent link between CNN denoisers and non-local filters
Julián Tachella
 
PDF
Nonlinear dimension reduction
Yan Xu
 
PDF
Novel algorithm for color image demosaikcing using laplacian mask
eSAT Journals
 
Performance analysis of high resolution images using interpolation techniques...
sipij
 
mvitelli_ee367_final_report
Matt Vitelli
 
Double patterning for 32nm and beyond
Manikandan Sampathkumar
 
Study on Application of Ensemble learning on Credit Scoring
harmonylab
 
Multimedia Security - JPEG Artifact details
Sebastiano Battiato
 
NUMBER PLATE IMAGE DETECTION FOR FAST MOTION VEHICLES USING BLUR KERNEL ESTIM...
paperpublications3
 
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
IRJET Journal
 
IRJET- A Comparative Review of Satellite Image Super Resolution Techniques
IRJET Journal
 
X-Ray Image Enhancement using CLAHE Method
IRJET Journal
 
Meta-MapReduce- A Technique for Reducing Communication in MapReduce Computations
Shantanu Sharma
 
Graph Analysis Beyond Linear Algebra
Jason Riedy
 
Enhanced Watemarked Images by Various Attacks Based on DWT with Differential ...
IRJET Journal
 
Comparative Analysis of image Enhancement Techniques on Real Time images
IJSRED
 
Network Deconvolution review [cdm]
Dongmin Choi
 
Metric Recovery from Unweighted k-NN Graphs
joisino
 
30thSep2014
Mia liu
 
Image enhancement techniques a review
eSAT Journals
 
The neural tangent link between CNN denoisers and non-local filters
Julián Tachella
 
Nonlinear dimension reduction
Yan Xu
 
Novel algorithm for color image demosaikcing using laplacian mask
eSAT Journals
 

Recently uploaded (20)

PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
The Future of Artificial Intelligence (AI)
Mukul
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 

Resampling

  • 1. Tejus Adiga M Department of Electronics and Communication, NMAMIT, Nitte. Presented By:
  • 2. Resampling • Ideal resampling: Discrete -> Continuous -> Discrete. • Practical resampling: Done entirely in discrete domain. • Types of Resampling: • Downsampling: Decrease size by M. • Upsampling: Increase size by N. • Fractional Resampling: Increase size my M and decrease by N (M/N). • Traditional Methods: • Blind Resampling: 2D Convolution. Eg Kernels Nearest Neighbor, Bilinear, Bicubic, Bspline. • Content Aware Resampling: Seam Carving, Edge Directed Interpolation (EDI), Super Resolution. • Seperability: 2D filtering = Performing 1D filtering two times in each dimension one after another. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 2
  • 3. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 3 Downsampling • General Approach: Anti Alias Filter (LPF) Downsampler ↓ 𝑁 Image 𝑊𝑥𝐻 Downsampled Image 𝑊 2 𝑥 𝐻 2 • Practical Approach 𝑦 𝑚 = 𝑘=−𝑁/2 𝑁/2 𝐶 𝑘 𝑥2𝑚 −𝑘−1 0 ≤ 𝑚 ≤ 𝑊, 𝐻. 𝑁 𝑖𝑠 𝑓𝑖𝑙𝑡𝑒𝑟 𝑙𝑒𝑛𝑔𝑡ℎ Downsampling Kernel Downsampled Image 𝑊 2 𝑥 𝐻 2 Image 𝑊𝑥𝐻 • Convolution m-2 m-1 m m+1 m+2 m+3 Downscaled Image Original Image Fig 1: Downsampling process x Ck1Ck1 Ck2Ck2 hd(x) 0 1 Pixel Distance Fig 2: Downsampling Kernel
  • 4. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 4 Upsampling • General Approach: Upsampler ↑ 𝑀 Low Pass FilterImage 𝑊𝑥𝐻 Upsampled Image 2𝑊 𝑥 2𝐻 • Practical Approach 𝑦2𝑚+1 = 𝑘=−𝑁/2 𝑁/2 𝐶 𝑘 𝑥 𝑚 −𝑘−1 0 ≤ 𝑚 ≤ 𝑊, 𝐻. 𝑁 𝑖𝑠 𝑓𝑖𝑙𝑡𝑒𝑟 𝑙𝑒𝑛𝑔𝑡ℎ Upsampling Kernel Upsampled Image 2𝑊 𝑥 2𝐻 Image 𝑊𝑥𝐻 • Convolution Upscaled Image m-2 m-1 m m+1 m+2 m+3 Original Image m-3 m+4 Fig 3: Upsampling process hu(k) x 0 Fig 4: Upsampling Kernel
  • 5. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 5 Blind Resampling – Nearest Neighbor Fig 5: Spatial kernel and Frequency Response • Downsampling: Discard Every alternate pixel. • Upsampling: Replicate the Nearest Pixel. • Artifacts: Aliasing-Increase 4 times for two fold resample. • Kernel: Rectangular spatial kernel. Infinite frequency contents.
  • 6. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 6 Blind Resampling – Nearest Neighbor Downsampled by 4 Downsampled by 2 Captured Image Upsampled by 4 Fig 6: Downsampled and Upsampled by factor of 2 and 4 Upsampled by 2
  • 7. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 7 Blind Resampling – Bilinear Fig 7: Spatial kernel and Frequency Response • Downsampling and Upsampling: Average of two pixels. (4 pixels in 2D) • Artifacts: Aliasing, Blurring. • Filter Coefficients: ℎ 𝑏 𝑥 = 1 2 , 1 2 2 = 0.5, 0.5 • Kernel: Triangular or Tent Spatial kernel. • Frequency response: Stop band attenuation better than Nearest Neighbor. • Aliasing is reduced when compared to nearest Neighbor.
  • 8. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 8 Blind Resampling – Bilinear Captured Image Upsampled by 4 Fig 8: Downsampled and Upsampled by factor of 2 and 4 Upsampled by 2 Downsampled by 4 Downsampled by 2
  • 9. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 9 Blind Resampling – Bicubic Fig 9: Spatial kernel and Frequency Response • Downsampling and Upsampling: Weighted average of 4 pixels. • Artifacts: Blurring. • Filter: ℎ 𝑏 𝑥 = 3 2 𝑥 3 − 5 2 𝑥 2 + 1, 0 ≤ 𝑥 ≤ 1 − 1 2 𝑥 3 + 5 2 𝑥 2 − 4 𝑥 + 2, 1 < 𝑥 ≤ 2 0, 𝑥 > 2 • Frequency response: Stop band attenuation better than Bilinear. • The 1st negative side lobe introduce controlled Ringing effect which makes image appear sharper than they actually are.
  • 10. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 10 Blind Resampling – Bicubic Captured Image Upsampled by 4 Fig 10: Downsampled and Upsampled by factor of 2 and 4 Upsampled by 2 Downsampled by 4 Downsampled by 2
  • 11. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 11 Blind Resampling – Windowed Sinc Fig 11: Windowed Sinc Kernel • Artifacts: Ringing, Blurring. • Filter: Truncated Sinc function. ℎ 𝑏 𝑥 = sin 𝜋𝑥 2 𝜋𝑥 2 • Side lobes significantly contributes to Ringing.
  • 12. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 12 Blind Resampling – Lanczos Fig 12: Lanczos Kernel for a=2 and a=3 • Weighted Average of 4 pixels. • Artifacts: Blurring. • Filter: ℎ 𝑏 𝑥 = 𝑠𝑖𝑛𝑐 𝑥 𝑠𝑖𝑛𝑐 𝑥 𝑎 − 𝑎 ≤ 𝑥 ≤ 𝑎 𝑎𝑛𝑑 𝑎 = 2, 3 • ‘a’ indicates number of lobes in one half of the filter. • Effect of side lobes is decreased by multiplying another scaled sinc function. But stronger enough to make image look sharper. • Upsampled image sharper than Bicubic, Bilinear.
  • 13. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 13 Blind Resampling – Lanczos Captured Image Upsampled by 4 Fig 13: Downsampled and Upsampled by factor of 2 and 4 Upsampled by 2 Downsampled by 4 Downsampled by 2
  • 14. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 14 Artifacts in Image Resampling • Aliasing: • Jagged Edges. • Introduced in Downsampling and Enhanced in Upsampling. • Priority: Lanczos, Bicubic, Bilinear, nearest Neighbor. • Ringing: • Side lobes of lengthy filter contribute to false edges. • Optimal filter length 4. • Windowed Sinc. • Blurring: • LPF gains get multiplied while Downsampling and Upsampling. • Information lost during Downsampling is irreversible. So in upsampling pixels are filled with he help of existing information in Downsampled image. • Priority: Nearest Neighbor, Bilinear, Lanczos, Bicubic.
  • 15. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 15 Artifacts Ringing Example Aliasing Example Blurring Example Fig 14: Examples of Ringing, Aliasing and Blurring
  • 16. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 16 Content Aware Resampling – Seam Carving • Seam: 8-Connected set of pixels that runs from top to bottom or Left to Right. • Principle: Low energy seam is not appealing to eyes. • Applications: • Image Retargeting: Resizing image, Changing Aspect Ratio. • Object removal or insertion. • Algorithm: • Find the Gradient Map of the input image I. 𝐺 𝑥, 𝑦 = 𝜕𝐼 𝜕𝑥 + 𝜕𝐼 𝜕𝑦 • In Gradient Map search a unique path (seam) from top to bottom or left to right such that Energy of the seam is minimum than all other possible seam. 𝑠 = min 𝑠 𝑊/𝐻 𝑔(𝑥, 𝑦) • Remove the seam or Duplicate the seam from the image I and G which reduces/increases the width/height by 1 pixel. • Iterate the above steps until desired size is achieved.
  • 17. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 17 Content Aware Resampling – Seam Carving Fig 15: Seam Calculation using Gradient.
  • 18. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 18 Content Aware Resampling – Seam Carving Fig 16: Comparison of Seam Carving with Scaling
  • 19. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 19 Seam Carving – Failure Cases
  • 20. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 20 Seam Carving – Failure Cases
  • 21. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 21 Content Aware Resampling – New Edge Directed interpolation (NEDI) • Principle: Inter pixel relations are retained while Downscaling. Hence Covariance in original Image and Downscaled image are nearly same. • New Pixel Value = Weighted Sum of nearest 4 pixels. Weights are computed dynamically according to local image characteristics. 𝑌2𝑖+1,2𝑗+1 = 𝑘=0 1 𝑙=0 1 𝛼2𝑘+𝑙 𝑌2 𝑖+𝑘 ,2 𝑗+𝑙 𝛼 = 𝑅−1 𝑟 𝑅 = 1 22 𝐶 𝑇 𝐶, 𝑎𝑛𝑑 𝑟 = 1 22 𝐶 𝑇 𝑦 Where 𝑦 = [𝑦1 … 𝑦 𝑘 … 𝑦22] 𝑇 is the data vector containing the 2x2 pixels inside the local window and C is a 4x22 data matrix whose kth column vector is the four nearest neighbors of along the diagonal direction.
  • 22. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 22 Content Aware Resampling – (NEDI) Fig 16: Comparison of NEDI with Bicubic filter Downscaled Image Upscaled 4X using NEDI Upscaled 4X using Bicubic
  • 23. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 23 Conclusion • Trade off: • Quality • Speed of Operation • Requirement • Information lost during Downsampling cannot be recovered while upsampling. • Future Work: • Improvement of Content Aware Resizing methods. • Adding Resolution.
  • 24. 28 October 2015 Department of Electronics and Communications, NMAMIT, Nitte. 24 References 1. New Edge-Directed Interpolation, Xin Li and Michael T. Orchard. IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 10, NO. 10, OCTOBER 2012. 2. Local and Nonlocal Regularization to Image Interpolation, Yi Zhan, Sheng Jie Li, and Meng Li, Mathematical Problems in Engineering, Volume 2014 (2014), Article ID 230348. 3. Adaptive multidirectional edge directed interpolation for selected edge regions. TENCON 2011 - 2011 IEEE Region 10 Conference. 4. V.R. Algazi, G.E. Ford and R. Potharlanka, "Directional interpolation of images based on visual properties and rank order filtering", Proceeding of ICASSP' 1991, pp.3005-3008. 5. Seam Carving for Content-Aware Image Resizing. Shai Avidan and Ariel Shamir. Proceedings of ACM SIGGRAPH, 417–424. 6. J. Allebach and P.W. Wong, "Edge-directed interpolation", Proceeding of ICIP 1996, Page No 707-710. 7. Keys, R., “Cubic Convolution Interpolation for Digital Image Processing”, IEEE Trans on ASSP, vol ASSP-29, No. 6, Page No 1153-1160. Dec 1981. 8. New Filters for Image Interpolation and Resizing, Amir Said, IEEE International Conference on Image Processing, VOL. 8, 2007. 9. Image Zooming Methods, Bax Smith. 10. “Interpolation Theory” http://sepwww.stanford.edu/public/docs/sep107/paper_html/node20.html