SlideShare uma empresa Scribd logo
1 de 60
2
This presentation is for informational purposes only. INTEL MAKES NO WARRANTIES, EXPRESS OR
IMPLIED, IN THIS SUMMARY.
Intel technologies’ features and benefits depend on system configuration and may require enabled
hardware, software or service activation. Performance varies depending on system configuration. Check
with your system manufacturer or retailer or learn more at intel.com.
This sample source code is released under the Intel Sample Source Code License Agreement.
Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
*Other names and brands may be claimed as the property of others.
Copyright © 2018, Intel Corporation. All rights reserved.
Legal Notices and Disclaimers
Processing Type
Applications of Image Processing
Example Applications
Enhancement
Example: Changing
saturation, contrast
to enhance look
• Marketing
• Photography
Understanding
Example: Object
detection, image
classification to
understand image
content
• Self-driving cars
• Security
Perturbation
Example: Blurring,
rotating images to
produce desired effect
• Censoring
• Animations
Image Processing Tools
Jupyter
Notebook*†
Matlab*
C++
IDEs
(Integrated Development
Environments)
Languages
Python*†
Libraries
NumPy† OpenCV†
Focus of this lesson
† = Taught in this course
If you do arithmetic with NumPy, overflow can occur:
Here, uint8 stores a max of 256: 300 is rounded down to 300 - 256 = 44.
To avoid this, we have to promote to a bigger type than our expected result, do arithmetic, then convert
back to smaller type:
Here, we promote uint8 to uint16, do arithmetic, convert back into uint8.
Computer Arithmetic with NumPy
Or
• Can use openCV arithmetic, which handles overflow (numbers being added to
quantities greater than 255), and clipping (automatically reducing numbers greater
than 255 down to 255) for us.
• With OpenCV, adding 100+200 with a max of 255 gets rounded down to 255, as
expected.
Computer Arithmetic with OpenCV
Resizing an image requires reassigning pixels from the original image to the new
image space.
Matplotlib* and OpenCV have the same interpolation methods.
The difference: Matplotlib applies interpolation at display time. OpenCV applies
interpolation prior to displaying the images.
Interpolation is used to address forward projection problems. These problems are
defined as:
1. Stretching the size of an image creates locations in the new image where pixels do
not have values.
2. Shrinking the size of an image creates float pixel values that need to be assigned to
an integer pixel value in the new image.
Interpolation
Interpolation Methods: Images
Nearest Neighbor (cv2.INTER.NN)
Linear (cv2.INTER_LINEAR)
Interpolation Methods: Data
spline16 quadric laczos hermite kaiser
mitchell sinc hamming bessel hanning
guassian spline36 catron area
You can play with these, but we will not get into them.
Other Interpolation in OpenCV
Imshow arguments
o (m,n):
Rows, columns: NOT x,y coordinates
Can (m,n,3) and (m,n,4)
Values uint8 or float in [0,1]
(m,n,3) = RGB
(m,n,4) = RGBA
A  alpha
o “cmap”
Color map: can be RGB, grayscale, and so on
See upcoming slide for examples
o “vmin”, “vmax”
Used to change brightness
Display with matplotlib*: imshow
Display of 2D Arrays with matplotlib*: matshow
vmin (minimum brightness) defaults to min data
vmax (maximum brightness) defaults to max of data
Scalar, optional, default: None
Used to normalize
Tip: To prevent scaling (0,255) for a restricted range (say 100,200), pass in vmin=0,
vmax=255.
Display with matplotlib*: vmin and vmax
Interpolation = 'none' and interpolation = 'nearest'
• Are equivalent when converting a figure to an image file (that is, PNG)
Interpolation = 'none' and interpolation = 'nearest'
• Behave quite differently when converting a figure to a vector graphics file (that is,
PDF)
In our examples, interpolation = 'none' works well when a big image is scaled down.
While interpolation = 'nearest' works well when a small image is scaled up.
Display with matplotlib*: Interpolation
Display with matplotlib*: cmap
Color Spaces
Color Spaces: Introduction
All images are represented by pixels with values in color spaces. Must represent an image
in a color space before applying any processing techniques.
Examples of color spaces:
Grayscale (black and white)
Color
RGB (red, green, blue)
HSV (hue, saturation, value)
CMYK (cyan, magenta, yellow, black)
Color Spaces: Grayscale
Grayscale to RGB conversion assumes all components of images are equal.
RGB to grayscale conversion uses
Y = (0.299)R + (0.587)G + (0.114)B
Color Spaces: RGB (Red, Green, Blue)
RGB (red, green, blue)
8-bit images 0-255
16-bit images 0-65,536
Floating point 0.0-1.0
Color Spaces: HSV (Hue, Saturation, Value)
Hue is normally 0-360
• Hue is walking around a color wheel
• OpenCV uses 0-179 to fit in 8 bit
Saturation (s) and value (v) are ranges
of light to dark (intensity)
• Trade off black/white
• OpenCV uses 0-255 for both s and v
In cone models
• s is white; distance from cone axis
• v is black; distance from cone point
Color Conversion in OpenCV
RGB is 8- or 16-bit colors.
Each pixel is represented by three values (one for each channel).
These values are pixel intensities
000 = black
111 = white
Color Conversion in OpenCV
When converted to grayscale, all RGB are equal.
When converted from RGB (or BGR) to grayscale:
𝑌 = 0.299 𝑅 + 0.587 𝐺 + 0.114 𝐵
Color in matplotlib*
Histograms
Histograms are a way of showing the intensity of color across an image.
Abnormal histograms can be used to detect poor image exposure, saturation,
and contrast.
Example:
The image on the left has poor exposure, which can be detected via the
histogram.
Histograms: Introduction and Grayscale
Example
Histogram Examples: RGB
2D Histograms
Histograms: Bin Widths
Histogram Equalization
Histogram equalization: Technique to adjust contrast to evenly spread
y-values from an original distribution to a new distribution.
Usually increases global contrast of an image.
Histogram Equalization: Probability Integral
Transform
Recall our original distribution:
• Bimodal peaks
• Want to flatten this effect to get a uniform
distribution
Probability integral transform allows us to convert
an arbitrary distribution to a uniform distribution
Histogram Equalization: Probability Integral
Transform
Covert an event from an arbitrary to a uniform distribution.
OriginalConverted
Histogram Equalization: Probability Integral
TransformOur original is a distribution of pixel intensities.
We will use percentiles from both the arbitrary distribution and the uniform distribution
to do this conversion.
We need to know, for our input intensity x, what percentile it falls in to.
We compute the cumulative (running total) of the probabilities of the values less than x.
Once we know that, we have an output value between [0,1] or U(0,1)
We can map U(0,1) to U(0,255) to get uniformly scaled pixel intensities.
Simple linear scaling for (0,1) to (0, 255)
Thresholding
Foreground/Background
Only part of the image has important data; we call these regions of interest (ROI).
In this case, we are interested in the foreground, but NOT the background of the logo
image.
foreground
background
foreground
In the case when the background has distinctively different color than the foreground,
we can use thresholding to separate them.
Example application:
Thresholding Application
Image source: https://upload.wikimedia.org/wikipedia/commons/2/23/Gfp-texas-big-bend-national-park-plants-on-the-desert-horizon.jpg
OpenCV Logo Example
Thresholding: Foreground Versus Background
We need to build and interpret an image as foreground and background.
We need to make a final decision about points.
We will create a mask to denote regions of interest (foreground versus background).
Thresholding: Simple Methods
cv2.threshold( ) methods:
These methods are global / independent of neighbors.
Thresholding: Simple Methods
Thresholding: Neighborhood Methods
cvAdaptiveThreshold( ) is used when there is uneven illumination.
To calculate threshold for neighborhood:
Calculate neighborhood means, using equal weights or weighted-averages based on
Gaussian windows/filters.
Subtract neighborhood mean from each point in the neighborhood.
Code to plot neighborhood thresholding:
Thresholding: Neighborhood Methods
Neighborhood methods illustration:
Thresholding: Neighborhood Methods
Thresholding: Otsu’s Method
In Otsu's method, we don't know the classes:
• We try every break point (for example, say 127, or an empirical mean or median)
and assume it is the separator.
• The data is in two classes and we can compute the ratio of the within class variance
and the between class variance.
• Only one break point maximizes the ratio of within class variance to between class
variance.
This is our desired threshold.
Generally, Otsu works well with a large region of interest (compared to background) and
a strong bimodal distribution.
Thresholding: Otsu’s Method
Optimal threshold unclear
(OpenCV finds 116)
Optimal threshold = 126
Geometric Transforms
Geometric Transforms: Resizing
x,y  fx(x,y), fy(x,y)
Decreasing resolution (throwing out data) requires
decimation
Increasing resolution (creating data from nothing)
requires interpolation
Matrix Glossary
T Translation
R Rotation
A Affine (arbitrary)
S Scaling
H Homography (prospective, projective)
Translation
What you would see in trig class: OpenCV affine matrix:
Translation
The OpenCV affine matrix is applied to an augmented p
• p with a constant 1 tacked on to it.
Translation - Code
Rigid (Rotation and Translation)
Again, in OpenCV, this is applied to an augmented point:
Rigid (Rotation and Translation)
Scale (Similarity Transform)
What you would see in trig class: OpenCV affine matrix:
Scale (Similarity Transform)
Scale
When combining scaling with other transformation:
When xscale= yscale = 1
We get a rigid transformation
– Also called isometry or a Euclidean transformation
– Preserves scale (distance)
When xscale= yscale
We have a similarity transformation
– Also called a scaled-rotation
Perspective (Projective or Homography)
In a perspective transform, we have an arbitrary 3x3 matrix, P, applied to an augmented
point:
The first two columns represent the scale-rotation component.
The last column represents the shift component.
Perspective (Projective or Homography)
Geometric Transforms
Translation
Rigid
Similarity
Affine
Perspective
2
3
4
6
8
Orientation
Lengths
Angles
Parallelism
Straight lines
Transform Type Degrees of Freedom Attribute
preserved

Mais conteúdo relacionado

Mais procurados

08 neural networks
08 neural networks08 neural networks
08 neural networksankit_ppt
 
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8Hakky St
 
Foundations: Artificial Neural Networks
Foundations: Artificial Neural NetworksFoundations: Artificial Neural Networks
Foundations: Artificial Neural Networksananth
 
Machine Learning - Introduction to Convolutional Neural Networks
Machine Learning - Introduction to Convolutional Neural NetworksMachine Learning - Introduction to Convolutional Neural Networks
Machine Learning - Introduction to Convolutional Neural NetworksAndrew Ferlitsch
 
07 dimensionality reduction
07 dimensionality reduction07 dimensionality reduction
07 dimensionality reductionMarco Quartulli
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality ReductionKnoldus Inc.
 
Convolutional Neural Network (CNN) presentation from theory to code in Theano
Convolutional Neural Network (CNN) presentation from theory to code in TheanoConvolutional Neural Network (CNN) presentation from theory to code in Theano
Convolutional Neural Network (CNN) presentation from theory to code in TheanoSeongwon Hwang
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality ReductionSaad Elbeleidy
 
Machine Learning using Support Vector Machine
Machine Learning using Support Vector MachineMachine Learning using Support Vector Machine
Machine Learning using Support Vector MachineMohsin Ul Haq
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine LearningPranav Challa
 
Image processing
Image processingImage processing
Image processingmaheshpene
 
Beginners Guide to Non-Negative Matrix Factorization
Beginners Guide to Non-Negative Matrix FactorizationBeginners Guide to Non-Negative Matrix Factorization
Beginners Guide to Non-Negative Matrix FactorizationBenjamin Bengfort
 
Data Science - Part IX - Support Vector Machine
Data Science - Part IX -  Support Vector MachineData Science - Part IX -  Support Vector Machine
Data Science - Part IX - Support Vector MachineDerek Kane
 
Curse of dimensionality
Curse of dimensionalityCurse of dimensionality
Curse of dimensionalityNikhil Sharma
 
Machine learning Algorithms with a Sagemaker demo
Machine learning Algorithms with a Sagemaker demoMachine learning Algorithms with a Sagemaker demo
Machine learning Algorithms with a Sagemaker demoHridyesh Bisht
 
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...Simplilearn
 
Decision Trees
Decision TreesDecision Trees
Decision TreesStudent
 
Kohonen self organizing maps
Kohonen self organizing mapsKohonen self organizing maps
Kohonen self organizing mapsraphaelkiminya
 

Mais procurados (20)

08 neural networks
08 neural networks08 neural networks
08 neural networks
 
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
 
Foundations: Artificial Neural Networks
Foundations: Artificial Neural NetworksFoundations: Artificial Neural Networks
Foundations: Artificial Neural Networks
 
Machine Learning - Introduction to Convolutional Neural Networks
Machine Learning - Introduction to Convolutional Neural NetworksMachine Learning - Introduction to Convolutional Neural Networks
Machine Learning - Introduction to Convolutional Neural Networks
 
PCA and SVD in brief
PCA and SVD in briefPCA and SVD in brief
PCA and SVD in brief
 
07 dimensionality reduction
07 dimensionality reduction07 dimensionality reduction
07 dimensionality reduction
 
Matrix Factorization
Matrix FactorizationMatrix Factorization
Matrix Factorization
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality Reduction
 
Convolutional Neural Network (CNN) presentation from theory to code in Theano
Convolutional Neural Network (CNN) presentation from theory to code in TheanoConvolutional Neural Network (CNN) presentation from theory to code in Theano
Convolutional Neural Network (CNN) presentation from theory to code in Theano
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality Reduction
 
Machine Learning using Support Vector Machine
Machine Learning using Support Vector MachineMachine Learning using Support Vector Machine
Machine Learning using Support Vector Machine
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine Learning
 
Image processing
Image processingImage processing
Image processing
 
Beginners Guide to Non-Negative Matrix Factorization
Beginners Guide to Non-Negative Matrix FactorizationBeginners Guide to Non-Negative Matrix Factorization
Beginners Guide to Non-Negative Matrix Factorization
 
Data Science - Part IX - Support Vector Machine
Data Science - Part IX -  Support Vector MachineData Science - Part IX -  Support Vector Machine
Data Science - Part IX - Support Vector Machine
 
Curse of dimensionality
Curse of dimensionalityCurse of dimensionality
Curse of dimensionality
 
Machine learning Algorithms with a Sagemaker demo
Machine learning Algorithms with a Sagemaker demoMachine learning Algorithms with a Sagemaker demo
Machine learning Algorithms with a Sagemaker demo
 
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...
 
Decision Trees
Decision TreesDecision Trees
Decision Trees
 
Kohonen self organizing maps
Kohonen self organizing mapsKohonen self organizing maps
Kohonen self organizing maps
 

Semelhante a 02 image processing

project presentation-90-MCS-200003.pptx
project presentation-90-MCS-200003.pptxproject presentation-90-MCS-200003.pptx
project presentation-90-MCS-200003.pptxNiladriBhattacharjee10
 
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...ijsrd.com
 
Comparison of image segmentation
Comparison of image segmentationComparison of image segmentation
Comparison of image segmentationHaitham Ahmed
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfnagwaAboElenein
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging SystemVrushali Lanjewar
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...IJMER
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialpotaters
 
Deep learning: Mathematical Perspective
Deep learning: Mathematical PerspectiveDeep learning: Mathematical Perspective
Deep learning: Mathematical PerspectiveYounusS2
 
Image processing sw & hw
Image processing sw & hwImage processing sw & hw
Image processing sw & hwamalalhait
 
International Journal of Engineering Research and Development (IJERD)
 International Journal of Engineering Research and Development (IJERD) International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
MNIST and machine learning - presentation
MNIST and machine learning - presentationMNIST and machine learning - presentation
MNIST and machine learning - presentationSteve Dias da Cruz
 
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...mmjalbiaty
 
Image segmentation
Image segmentationImage segmentation
Image segmentationkhyati gupta
 

Semelhante a 02 image processing (20)

project presentation-90-MCS-200003.pptx
project presentation-90-MCS-200003.pptxproject presentation-90-MCS-200003.pptx
project presentation-90-MCS-200003.pptx
 
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
 
Comparison of image segmentation
Comparison of image segmentationComparison of image segmentation
Comparison of image segmentation
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Report
ReportReport
Report
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
 
Himadeep
HimadeepHimadeep
Himadeep
 
2. filtering basics
2. filtering basics2. filtering basics
2. filtering basics
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
 
Image compression Algorithms
Image compression AlgorithmsImage compression Algorithms
Image compression Algorithms
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorial
 
Deep learning: Mathematical Perspective
Deep learning: Mathematical PerspectiveDeep learning: Mathematical Perspective
Deep learning: Mathematical Perspective
 
Image processing sw & hw
Image processing sw & hwImage processing sw & hw
Image processing sw & hw
 
International Journal of Engineering Research and Development (IJERD)
 International Journal of Engineering Research and Development (IJERD) International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
MNIST and machine learning - presentation
MNIST and machine learning - presentationMNIST and machine learning - presentation
MNIST and machine learning - presentation
 
G0813841
G0813841G0813841
G0813841
 
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
 
h.pdf
h.pdfh.pdf
h.pdf
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 

Mais de ankit_ppt

Deep learning summary
Deep learning summaryDeep learning summary
Deep learning summaryankit_ppt
 
01 foundations
01 foundations01 foundations
01 foundationsankit_ppt
 
Text similarity measures
Text similarity measuresText similarity measures
Text similarity measuresankit_ppt
 
Text generation and_advanced_topics
Text generation and_advanced_topicsText generation and_advanced_topics
Text generation and_advanced_topicsankit_ppt
 
Nlp toolkits and_preprocessing_techniques
Nlp toolkits and_preprocessing_techniquesNlp toolkits and_preprocessing_techniques
Nlp toolkits and_preprocessing_techniquesankit_ppt
 
Latent dirichlet allocation_and_topic_modeling
Latent dirichlet allocation_and_topic_modelingLatent dirichlet allocation_and_topic_modeling
Latent dirichlet allocation_and_topic_modelingankit_ppt
 
Intro to nlp
Intro to nlpIntro to nlp
Intro to nlpankit_ppt
 
Ot regularization and_gradient_descent
Ot regularization and_gradient_descentOt regularization and_gradient_descent
Ot regularization and_gradient_descentankit_ppt
 
Ml9 introduction to-unsupervised_learning_and_clustering_methods
Ml9 introduction to-unsupervised_learning_and_clustering_methodsMl9 introduction to-unsupervised_learning_and_clustering_methods
Ml9 introduction to-unsupervised_learning_and_clustering_methodsankit_ppt
 
Ml8 boosting and-stacking
Ml8 boosting and-stackingMl8 boosting and-stacking
Ml8 boosting and-stackingankit_ppt
 
Ml6 decision trees
Ml6 decision treesMl6 decision trees
Ml6 decision treesankit_ppt
 
Ml5 svm and-kernels
Ml5 svm and-kernelsMl5 svm and-kernels
Ml5 svm and-kernelsankit_ppt
 
Ml4 naive bayes
Ml4 naive bayesMl4 naive bayes
Ml4 naive bayesankit_ppt
 
Lesson 3 ai in the enterprise
Lesson 3   ai in the enterpriseLesson 3   ai in the enterprise
Lesson 3 ai in the enterpriseankit_ppt
 
Ml3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsMl3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsankit_ppt
 
Ml2 train test-splits_validation_linear_regression
Ml2 train test-splits_validation_linear_regressionMl2 train test-splits_validation_linear_regression
Ml2 train test-splits_validation_linear_regressionankit_ppt
 
Ml1 introduction to-supervised_learning_and_k_nearest_neighbors
Ml1 introduction to-supervised_learning_and_k_nearest_neighborsMl1 introduction to-supervised_learning_and_k_nearest_neighbors
Ml1 introduction to-supervised_learning_and_k_nearest_neighborsankit_ppt
 
Lesson 2 ai in industry
Lesson 2   ai in industryLesson 2   ai in industry
Lesson 2 ai in industryankit_ppt
 

Mais de ankit_ppt (20)

Deep learning summary
Deep learning summaryDeep learning summary
Deep learning summary
 
01 foundations
01 foundations01 foundations
01 foundations
 
Word2 vec
Word2 vecWord2 vec
Word2 vec
 
Text similarity measures
Text similarity measuresText similarity measures
Text similarity measures
 
Text generation and_advanced_topics
Text generation and_advanced_topicsText generation and_advanced_topics
Text generation and_advanced_topics
 
Nlp toolkits and_preprocessing_techniques
Nlp toolkits and_preprocessing_techniquesNlp toolkits and_preprocessing_techniques
Nlp toolkits and_preprocessing_techniques
 
Latent dirichlet allocation_and_topic_modeling
Latent dirichlet allocation_and_topic_modelingLatent dirichlet allocation_and_topic_modeling
Latent dirichlet allocation_and_topic_modeling
 
Intro to nlp
Intro to nlpIntro to nlp
Intro to nlp
 
Ot regularization and_gradient_descent
Ot regularization and_gradient_descentOt regularization and_gradient_descent
Ot regularization and_gradient_descent
 
Ml9 introduction to-unsupervised_learning_and_clustering_methods
Ml9 introduction to-unsupervised_learning_and_clustering_methodsMl9 introduction to-unsupervised_learning_and_clustering_methods
Ml9 introduction to-unsupervised_learning_and_clustering_methods
 
Ml8 boosting and-stacking
Ml8 boosting and-stackingMl8 boosting and-stacking
Ml8 boosting and-stacking
 
Ml7 bagging
Ml7 baggingMl7 bagging
Ml7 bagging
 
Ml6 decision trees
Ml6 decision treesMl6 decision trees
Ml6 decision trees
 
Ml5 svm and-kernels
Ml5 svm and-kernelsMl5 svm and-kernels
Ml5 svm and-kernels
 
Ml4 naive bayes
Ml4 naive bayesMl4 naive bayes
Ml4 naive bayes
 
Lesson 3 ai in the enterprise
Lesson 3   ai in the enterpriseLesson 3   ai in the enterprise
Lesson 3 ai in the enterprise
 
Ml3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsMl3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metrics
 
Ml2 train test-splits_validation_linear_regression
Ml2 train test-splits_validation_linear_regressionMl2 train test-splits_validation_linear_regression
Ml2 train test-splits_validation_linear_regression
 
Ml1 introduction to-supervised_learning_and_k_nearest_neighbors
Ml1 introduction to-supervised_learning_and_k_nearest_neighborsMl1 introduction to-supervised_learning_and_k_nearest_neighbors
Ml1 introduction to-supervised_learning_and_k_nearest_neighbors
 
Lesson 2 ai in industry
Lesson 2   ai in industryLesson 2   ai in industry
Lesson 2 ai in industry
 

Último

Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 

Último (20)

Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 

02 image processing

  • 1.
  • 2. 2 This presentation is for informational purposes only. INTEL MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY. Intel technologies’ features and benefits depend on system configuration and may require enabled hardware, software or service activation. Performance varies depending on system configuration. Check with your system manufacturer or retailer or learn more at intel.com. This sample source code is released under the Intel Sample Source Code License Agreement. Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries. *Other names and brands may be claimed as the property of others. Copyright © 2018, Intel Corporation. All rights reserved. Legal Notices and Disclaimers
  • 3. Processing Type Applications of Image Processing Example Applications Enhancement Example: Changing saturation, contrast to enhance look • Marketing • Photography Understanding Example: Object detection, image classification to understand image content • Self-driving cars • Security Perturbation Example: Blurring, rotating images to produce desired effect • Censoring • Animations
  • 4. Image Processing Tools Jupyter Notebook*† Matlab* C++ IDEs (Integrated Development Environments) Languages Python*† Libraries NumPy† OpenCV† Focus of this lesson † = Taught in this course
  • 5. If you do arithmetic with NumPy, overflow can occur: Here, uint8 stores a max of 256: 300 is rounded down to 300 - 256 = 44. To avoid this, we have to promote to a bigger type than our expected result, do arithmetic, then convert back to smaller type: Here, we promote uint8 to uint16, do arithmetic, convert back into uint8. Computer Arithmetic with NumPy
  • 6. Or • Can use openCV arithmetic, which handles overflow (numbers being added to quantities greater than 255), and clipping (automatically reducing numbers greater than 255 down to 255) for us. • With OpenCV, adding 100+200 with a max of 255 gets rounded down to 255, as expected. Computer Arithmetic with OpenCV
  • 7. Resizing an image requires reassigning pixels from the original image to the new image space. Matplotlib* and OpenCV have the same interpolation methods. The difference: Matplotlib applies interpolation at display time. OpenCV applies interpolation prior to displaying the images. Interpolation is used to address forward projection problems. These problems are defined as: 1. Stretching the size of an image creates locations in the new image where pixels do not have values. 2. Shrinking the size of an image creates float pixel values that need to be assigned to an integer pixel value in the new image. Interpolation
  • 12. spline16 quadric laczos hermite kaiser mitchell sinc hamming bessel hanning guassian spline36 catron area You can play with these, but we will not get into them. Other Interpolation in OpenCV
  • 13. Imshow arguments o (m,n): Rows, columns: NOT x,y coordinates Can (m,n,3) and (m,n,4) Values uint8 or float in [0,1] (m,n,3) = RGB (m,n,4) = RGBA A  alpha o “cmap” Color map: can be RGB, grayscale, and so on See upcoming slide for examples o “vmin”, “vmax” Used to change brightness Display with matplotlib*: imshow
  • 14. Display of 2D Arrays with matplotlib*: matshow
  • 15. vmin (minimum brightness) defaults to min data vmax (maximum brightness) defaults to max of data Scalar, optional, default: None Used to normalize Tip: To prevent scaling (0,255) for a restricted range (say 100,200), pass in vmin=0, vmax=255. Display with matplotlib*: vmin and vmax
  • 16. Interpolation = 'none' and interpolation = 'nearest' • Are equivalent when converting a figure to an image file (that is, PNG) Interpolation = 'none' and interpolation = 'nearest' • Behave quite differently when converting a figure to a vector graphics file (that is, PDF) In our examples, interpolation = 'none' works well when a big image is scaled down. While interpolation = 'nearest' works well when a small image is scaled up. Display with matplotlib*: Interpolation
  • 19. Color Spaces: Introduction All images are represented by pixels with values in color spaces. Must represent an image in a color space before applying any processing techniques. Examples of color spaces: Grayscale (black and white) Color RGB (red, green, blue) HSV (hue, saturation, value) CMYK (cyan, magenta, yellow, black)
  • 20. Color Spaces: Grayscale Grayscale to RGB conversion assumes all components of images are equal. RGB to grayscale conversion uses Y = (0.299)R + (0.587)G + (0.114)B
  • 21. Color Spaces: RGB (Red, Green, Blue) RGB (red, green, blue) 8-bit images 0-255 16-bit images 0-65,536 Floating point 0.0-1.0
  • 22. Color Spaces: HSV (Hue, Saturation, Value) Hue is normally 0-360 • Hue is walking around a color wheel • OpenCV uses 0-179 to fit in 8 bit Saturation (s) and value (v) are ranges of light to dark (intensity) • Trade off black/white • OpenCV uses 0-255 for both s and v In cone models • s is white; distance from cone axis • v is black; distance from cone point
  • 23. Color Conversion in OpenCV RGB is 8- or 16-bit colors. Each pixel is represented by three values (one for each channel). These values are pixel intensities 000 = black 111 = white
  • 24. Color Conversion in OpenCV When converted to grayscale, all RGB are equal. When converted from RGB (or BGR) to grayscale: 𝑌 = 0.299 𝑅 + 0.587 𝐺 + 0.114 𝐵
  • 27. Histograms are a way of showing the intensity of color across an image. Abnormal histograms can be used to detect poor image exposure, saturation, and contrast. Example: The image on the left has poor exposure, which can be detected via the histogram. Histograms: Introduction and Grayscale Example
  • 31. Histogram Equalization Histogram equalization: Technique to adjust contrast to evenly spread y-values from an original distribution to a new distribution. Usually increases global contrast of an image.
  • 32. Histogram Equalization: Probability Integral Transform Recall our original distribution: • Bimodal peaks • Want to flatten this effect to get a uniform distribution Probability integral transform allows us to convert an arbitrary distribution to a uniform distribution
  • 33. Histogram Equalization: Probability Integral Transform Covert an event from an arbitrary to a uniform distribution. OriginalConverted
  • 34. Histogram Equalization: Probability Integral TransformOur original is a distribution of pixel intensities. We will use percentiles from both the arbitrary distribution and the uniform distribution to do this conversion. We need to know, for our input intensity x, what percentile it falls in to. We compute the cumulative (running total) of the probabilities of the values less than x. Once we know that, we have an output value between [0,1] or U(0,1) We can map U(0,1) to U(0,255) to get uniformly scaled pixel intensities. Simple linear scaling for (0,1) to (0, 255)
  • 36. Foreground/Background Only part of the image has important data; we call these regions of interest (ROI). In this case, we are interested in the foreground, but NOT the background of the logo image. foreground background foreground
  • 37. In the case when the background has distinctively different color than the foreground, we can use thresholding to separate them. Example application: Thresholding Application Image source: https://upload.wikimedia.org/wikipedia/commons/2/23/Gfp-texas-big-bend-national-park-plants-on-the-desert-horizon.jpg
  • 39. Thresholding: Foreground Versus Background We need to build and interpret an image as foreground and background. We need to make a final decision about points. We will create a mask to denote regions of interest (foreground versus background).
  • 40. Thresholding: Simple Methods cv2.threshold( ) methods: These methods are global / independent of neighbors.
  • 42. Thresholding: Neighborhood Methods cvAdaptiveThreshold( ) is used when there is uneven illumination. To calculate threshold for neighborhood: Calculate neighborhood means, using equal weights or weighted-averages based on Gaussian windows/filters. Subtract neighborhood mean from each point in the neighborhood.
  • 43. Code to plot neighborhood thresholding: Thresholding: Neighborhood Methods
  • 45. Thresholding: Otsu’s Method In Otsu's method, we don't know the classes: • We try every break point (for example, say 127, or an empirical mean or median) and assume it is the separator. • The data is in two classes and we can compute the ratio of the within class variance and the between class variance. • Only one break point maximizes the ratio of within class variance to between class variance. This is our desired threshold. Generally, Otsu works well with a large region of interest (compared to background) and a strong bimodal distribution.
  • 46. Thresholding: Otsu’s Method Optimal threshold unclear (OpenCV finds 116) Optimal threshold = 126
  • 48. Geometric Transforms: Resizing x,y  fx(x,y), fy(x,y) Decreasing resolution (throwing out data) requires decimation Increasing resolution (creating data from nothing) requires interpolation
  • 49. Matrix Glossary T Translation R Rotation A Affine (arbitrary) S Scaling H Homography (prospective, projective)
  • 50. Translation What you would see in trig class: OpenCV affine matrix:
  • 51. Translation The OpenCV affine matrix is applied to an augmented p • p with a constant 1 tacked on to it.
  • 53. Rigid (Rotation and Translation) Again, in OpenCV, this is applied to an augmented point:
  • 54. Rigid (Rotation and Translation)
  • 55. Scale (Similarity Transform) What you would see in trig class: OpenCV affine matrix:
  • 57. Scale When combining scaling with other transformation: When xscale= yscale = 1 We get a rigid transformation – Also called isometry or a Euclidean transformation – Preserves scale (distance) When xscale= yscale We have a similarity transformation – Also called a scaled-rotation
  • 58. Perspective (Projective or Homography) In a perspective transform, we have an arbitrary 3x3 matrix, P, applied to an augmented point: The first two columns represent the scale-rotation component. The last column represents the shift component.

Notas do Editor

  1. Image url?
  2. x= np.unit8(200) + np.unit8(100) np.clip(x, 0, 255) Clipping happens after the value to clip is calculated
  3. https://matplotlib.org/users/colormaps.html
  4. https://commons.wikimedia.org/wiki/File:Color_solid_comparison_hsl_hsv_rgb_cone_sphere_cube_cylinder.png
  5. Image url?
  6. For colors, convert to HSV; apply to V
  7. Note: In the case of a purely continuous distribution the result will be truly uniform. But using our discrete approximations, the target will show artifacts and will be mostly uniform (similar to histogram binning).
  8. NOTE: This is all on grayscale; for color images, convert to HSV and perform on V
  9. Image source: https://upload.wikimedia.org/wikipedia/commons/2/23/Gfp-texas-big-bend-national-park-plants-on-the-desert-horizon.jpg
  10. NOTE: Can resize using a special case, but most transformations require special machinery (which we will see in the next slides). Uses a low-pass filter to keep rth sample points. In reality, only evaluates at rth points.
  11. NOTE: all of the geometric transformations in OpenCV are defined in terms of an affine matrix; simple operations may have a simpler operations structure… For example, translation has an identity matrix as the left-hand components.
  12. (pronounced “p-hat”) NOTE: all of the geometric transformations in OpenCV are defined in terms of an affine matrix; simple operations may have a simpler operations structure… For example, translation has an identity matrix as the left-hand components.
  13. NOTE: Here, we have replaced the identity part of the affine matrix with sin() cos() pieces that represent a rotation and the shift portion has been set to zeros. We could use an affine matrix with both rotation components and shift components.