SlideShare a Scribd company logo
1 of 19
Identification of Image
scale using Computer
vision
• ENGI 981B – MASc. Computer Engineering project
• By : Vigneshwar Ramaswamy
• Supervisor: Dr. Stephen Czarnuch
Topics
• Overview of project
• Background
• Objective
• Flow chart
• Methodologies
• Conclusion
Overview
• By 2021, the Canadian Radio Television and Telecommunication has mandated that all the
Canadian telephone companies must support next generation 911 voice and text messaging.
• Next generation text messaging includes provision for videos and Images.
• To achieve this, we develop an Image processing technique to next generation media to pre-
process information and showing the type of severity of the graphic image before Canadian
telecommunications operators receive it.
• The next generation 911 project has a list of challenges like Detection of presence or absence of
humans, Fire detection, Detection of image orientation and camera perspective, Automatic
detection of image blur and distortion in RGB images and finding the image scale of the unknown
image.
• In this project, I am working on part of problem which determines the scale of the image or field of
view of the unknown image.
Background
• The input image will be the Depth image which is estimated by self supervised monocular depth
estimation method which is an existing approach which leads to methodology.
• Following the estimation of the depth, the image is then analyzed to automatically find the image
scale by proposed methodology by using the libraries like OpenCV, Pillow (PIL), NumPy.
Input Depth Image
Raw Image
Proposed
method
Result
Flow Chart
Estimation of Dark
Pixel
• Dark
Pixel
Score
Finding the
Horizon
• Horizon
Score
Removing
Foreground Gradient
• Smooth
gradien
t Score
Object Pixels
• Number
of
Object
Pixels
Final Result
• Final
Score
Input
Image
Estimation of Dark Pixel
• The Dark pixel in this process represents the “Far Background” in the input image. They are not
informative directly but they may help to an understanding of the scale of the image.
• Far Background pixels also called Dark pixels should exist only in Wide field of view Images.
• Range function in OpenCV is used here to estimate the Dark pixel in the input image. The
estimation is determined by counting the dark pixels from the depth image by creating lower and
upper boundary of the dark pixels and counting all the pixels within the boundary.
• Score is determined by following expression,
• Score_stage1 = (Percentage of pixels in boundary/100) * 10
• Where Percentage = (pixel count in boundary/total pixel) *100
Estimation of Dark Pixel
Figure 1: Input image Figure 2: Dark Pixels or far background
Figure 3: Stage 1 score
Figure 4: Output image of stage 1
Finding the horizon in the image
• In this stage, the input image will be the output of the stage 1.
• The horizon in the image will be the region between the background and foreground.
• The horizon gives better understanding of image scale and orientation.
• Horizon is found by Otsu’s thresholding method.
• Horizon score is calculated by the following expression,
• average = (horizon_y1 + horizon_y2)/2
• percentage_of_horizon = (average/height)*100
• score_stage2 = (percentage_of_horizon/100) * 10
• Otsu’s thresholding in image processing is used to perform Automatic image thresholding.
• cv.threshold() function is used where cv.THRESH_OTSU is passed as extra flag.
• The threshold value can be chosen arbitrary. The algorithm then finds the optimal threshold value which
is returned as the output.
• The horizon is plotted in the region between the foreground and the background and the score of the
horizon is calculated.
Finding the horizon in the image
• After finding the horizon, the region above the horizon is removed. The resulting image will be the
input image to the next stage.
Figure 5: Input image Figure 6: output of Otsu’s thresholding Figure 7: plotting the Horizon
Figure 8: Score of stage 2 Figure 9: output image
Removing Foreground Gradient
• Aim of this stage is calculate the smooth gradient (foreground) and the Object pixels in the image.
Here the input image will be the output image of the stage 2.
• The parts of the foreground image that are un-interesting are removed.
• The physical ground is always recorded as the smooth gradient in an image and the gradient occurs
in a direction perpendicular to the horizon. Hence we can remove the pixels of the foreground with
this knowledge.
Figure 10: Input image of stage 3
Smooth
gradient
0
255 uneven
gradient
Removing Foreground Gradient
• Let us consider the input image in matrix form. The values in the first column decreases gradually
because of the smooth gradients and there are no objects in between.
Figure 11: NumPy object array of input image
Removing Foreground Gradient
• To remove the smooth gradients, a condition is passed. “ if the value keeps decreasing and the
difference between the lower pixel and upper pixel is less than or equal to the margin value, that
pixel is removed. This is done to all the columns in the matrix.
• If there is an object in between, the iteration is stopped for that particular column and it starts
from the next column. After the iteration is complete, the output image of the final stage looks like
this. Since the score of foreground gradient is 7.7 and object is 2.29, we can estimate that the
image has maximum of foreground and medium object.
Figure 13: Score of stage 3
Figure 12: output image of stage 3
Graphical Analysis
• This graph shows the analysis of intensity value of the left most column of the image.
• Values move up gradually without any deviation.
Graphical Analysis
• This graph shows the analysis of intensity value of right most column of the image.
• The gradient is smooth, as values move up gradually without any deviation
Graphical Analysis
• This graph shows the analysis of intensity value of the middle column of the image.
• The gradient is not smooth because there is object in this part of the image, hence there is
deviation in the graph.
Uneven gradient
Overall Score
• The overall score is calculated by the following expression
• C_1 * dark_score + C_2 * horizon_score + C_3 * gradient_score + C_4 * Object_pixels
• Where C_i is weighted constants
• The overall score will give you an estimate of the image scale or the field of view, where 0 being
narrow field of view and 10, wide field of view.
• In this case, the overall score will be
• 0.4 * 5.107 + 0.4 * 5.29 + 0.2 * 7.7 + 0.2 * 2.29 = 6.1568
• Since the score is above 5, we can estimate that the Image has wider field of view with medium
size object.
Case 2
Figure 13: score stage 1
Figure 14: score stage 2
Figure 15: score stage 3
Final score = 0.4*3.16+0.4*3.53+0.2*3.69+0.2*6.3 = 4.46
Since the score is below 5, the image scale can be estimated as narrow
field of view with large object.
Conclusion
• A simple approach to estimate the field of view of an unknown image
• With the information obtained from this approach, one could then use existing approaches which
are dependent on the field of view of the image.
•Thank you!

More Related Content

What's hot

COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingHemantha Kulathilake
 
Threshold Selection for Image segmentation
Threshold Selection for Image segmentationThreshold Selection for Image segmentation
Threshold Selection for Image segmentationParijat Sinha
 
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLIMETHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLIijcsit
 
Fuzzy c-means clustering for image segmentation
Fuzzy c-means  clustering for image segmentationFuzzy c-means  clustering for image segmentation
Fuzzy c-means clustering for image segmentationDharmesh Patel
 
face recognition based on PCA
face recognition based on PCAface recognition based on PCA
face recognition based on PCA@zenafaris91
 
Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)Moe Moe Myint
 
Visual cryptography scheme for color images
Visual cryptography scheme for color imagesVisual cryptography scheme for color images
Visual cryptography scheme for color imagesiaemedu
 
Comparative study on image segmentation techniques
Comparative study on image segmentation techniquesComparative study on image segmentation techniques
Comparative study on image segmentation techniquesgmidhubala
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESVicky Kumar
 
Image segmentation
Image segmentation Image segmentation
Image segmentation Amnaakhaan
 
Image representation
Image representationImage representation
Image representationRahul Dadwal
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and SegmentationA B Shinde
 

What's hot (19)

COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image Processing
 
Threshold Selection for Image segmentation
Threshold Selection for Image segmentationThreshold Selection for Image segmentation
Threshold Selection for Image segmentation
 
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLIMETHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Segmentation Techniques -II
Segmentation Techniques -IISegmentation Techniques -II
Segmentation Techniques -II
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Fuzzy c-means clustering for image segmentation
Fuzzy c-means  clustering for image segmentationFuzzy c-means  clustering for image segmentation
Fuzzy c-means clustering for image segmentation
 
PPT s04-machine vision-s2
PPT s04-machine vision-s2PPT s04-machine vision-s2
PPT s04-machine vision-s2
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
face recognition based on PCA
face recognition based on PCAface recognition based on PCA
face recognition based on PCA
 
Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)
 
Visual cryptography scheme for color images
Visual cryptography scheme for color imagesVisual cryptography scheme for color images
Visual cryptography scheme for color images
 
Comparative study on image segmentation techniques
Comparative study on image segmentation techniquesComparative study on image segmentation techniques
Comparative study on image segmentation techniques
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUES
 
Im seg04
Im seg04Im seg04
Im seg04
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Image representation
Image representationImage representation
Image representation
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
point processing
point processingpoint processing
point processing
 

Similar to Identification of image scale using computer vision

Object detection at night
Object detection at nightObject detection at night
Object detection at nightSanjay Crúzé
 
Image enhancement
Image enhancementImage enhancement
Image enhancementAyaelshiwi
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Sciencebaaburao4200
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfGaurav Sharma
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesBulbul Agrawal
 
image enhancement image enhancement imag
image enhancement image enhancement imagimage enhancement image enhancement imag
image enhancement image enhancement imagNaveenKumar5162
 
Practical Digital Image Processing 2
Practical Digital Image Processing 2Practical Digital Image Processing 2
Practical Digital Image Processing 2Aly Abdelkareem
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2Surabhi Ks
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1shabanam tamboli
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptShabanamTamboli1
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lectureISRAR HUSSAIN
 
motion and feature based person tracking in survillance videos
motion and feature based person tracking in survillance videosmotion and feature based person tracking in survillance videos
motion and feature based person tracking in survillance videosshiva kumar cheruku
 
Image processing
Image processingImage processing
Image processingkamal330
 

Similar to Identification of image scale using computer vision (20)

Object detection at night
Object detection at nightObject detection at night
Object detection at night
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Science
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdf
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
image enhancement image enhancement imag
image enhancement image enhancement imagimage enhancement image enhancement imag
image enhancement image enhancement imag
 
thesis
thesisthesis
thesis
 
Practical Digital Image Processing 2
Practical Digital Image Processing 2Practical Digital Image Processing 2
Practical Digital Image Processing 2
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
 
OpenCV.pdf
OpenCV.pdfOpenCV.pdf
OpenCV.pdf
 
motion and feature based person tracking in survillance videos
motion and feature based person tracking in survillance videosmotion and feature based person tracking in survillance videos
motion and feature based person tracking in survillance videos
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Report
ReportReport
Report
 
Image processing
Image processingImage processing
Image processing
 
ImSeg04.ppt
ImSeg04.pptImSeg04.ppt
ImSeg04.ppt
 
ImSeg04 (2).ppt
ImSeg04 (2).pptImSeg04 (2).ppt
ImSeg04 (2).ppt
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
 

Recently uploaded

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
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
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
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
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
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
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
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...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 

Identification of image scale using computer vision

  • 1. Identification of Image scale using Computer vision • ENGI 981B – MASc. Computer Engineering project • By : Vigneshwar Ramaswamy • Supervisor: Dr. Stephen Czarnuch
  • 2. Topics • Overview of project • Background • Objective • Flow chart • Methodologies • Conclusion
  • 3. Overview • By 2021, the Canadian Radio Television and Telecommunication has mandated that all the Canadian telephone companies must support next generation 911 voice and text messaging. • Next generation text messaging includes provision for videos and Images. • To achieve this, we develop an Image processing technique to next generation media to pre- process information and showing the type of severity of the graphic image before Canadian telecommunications operators receive it. • The next generation 911 project has a list of challenges like Detection of presence or absence of humans, Fire detection, Detection of image orientation and camera perspective, Automatic detection of image blur and distortion in RGB images and finding the image scale of the unknown image. • In this project, I am working on part of problem which determines the scale of the image or field of view of the unknown image.
  • 4. Background • The input image will be the Depth image which is estimated by self supervised monocular depth estimation method which is an existing approach which leads to methodology. • Following the estimation of the depth, the image is then analyzed to automatically find the image scale by proposed methodology by using the libraries like OpenCV, Pillow (PIL), NumPy. Input Depth Image Raw Image Proposed method Result
  • 5. Flow Chart Estimation of Dark Pixel • Dark Pixel Score Finding the Horizon • Horizon Score Removing Foreground Gradient • Smooth gradien t Score Object Pixels • Number of Object Pixels Final Result • Final Score Input Image
  • 6. Estimation of Dark Pixel • The Dark pixel in this process represents the “Far Background” in the input image. They are not informative directly but they may help to an understanding of the scale of the image. • Far Background pixels also called Dark pixels should exist only in Wide field of view Images. • Range function in OpenCV is used here to estimate the Dark pixel in the input image. The estimation is determined by counting the dark pixels from the depth image by creating lower and upper boundary of the dark pixels and counting all the pixels within the boundary. • Score is determined by following expression, • Score_stage1 = (Percentage of pixels in boundary/100) * 10 • Where Percentage = (pixel count in boundary/total pixel) *100
  • 7. Estimation of Dark Pixel Figure 1: Input image Figure 2: Dark Pixels or far background Figure 3: Stage 1 score Figure 4: Output image of stage 1
  • 8. Finding the horizon in the image • In this stage, the input image will be the output of the stage 1. • The horizon in the image will be the region between the background and foreground. • The horizon gives better understanding of image scale and orientation. • Horizon is found by Otsu’s thresholding method. • Horizon score is calculated by the following expression, • average = (horizon_y1 + horizon_y2)/2 • percentage_of_horizon = (average/height)*100 • score_stage2 = (percentage_of_horizon/100) * 10 • Otsu’s thresholding in image processing is used to perform Automatic image thresholding. • cv.threshold() function is used where cv.THRESH_OTSU is passed as extra flag. • The threshold value can be chosen arbitrary. The algorithm then finds the optimal threshold value which is returned as the output. • The horizon is plotted in the region between the foreground and the background and the score of the horizon is calculated.
  • 9. Finding the horizon in the image • After finding the horizon, the region above the horizon is removed. The resulting image will be the input image to the next stage. Figure 5: Input image Figure 6: output of Otsu’s thresholding Figure 7: plotting the Horizon Figure 8: Score of stage 2 Figure 9: output image
  • 10. Removing Foreground Gradient • Aim of this stage is calculate the smooth gradient (foreground) and the Object pixels in the image. Here the input image will be the output image of the stage 2. • The parts of the foreground image that are un-interesting are removed. • The physical ground is always recorded as the smooth gradient in an image and the gradient occurs in a direction perpendicular to the horizon. Hence we can remove the pixels of the foreground with this knowledge. Figure 10: Input image of stage 3 Smooth gradient 0 255 uneven gradient
  • 11. Removing Foreground Gradient • Let us consider the input image in matrix form. The values in the first column decreases gradually because of the smooth gradients and there are no objects in between. Figure 11: NumPy object array of input image
  • 12. Removing Foreground Gradient • To remove the smooth gradients, a condition is passed. “ if the value keeps decreasing and the difference between the lower pixel and upper pixel is less than or equal to the margin value, that pixel is removed. This is done to all the columns in the matrix. • If there is an object in between, the iteration is stopped for that particular column and it starts from the next column. After the iteration is complete, the output image of the final stage looks like this. Since the score of foreground gradient is 7.7 and object is 2.29, we can estimate that the image has maximum of foreground and medium object. Figure 13: Score of stage 3 Figure 12: output image of stage 3
  • 13. Graphical Analysis • This graph shows the analysis of intensity value of the left most column of the image. • Values move up gradually without any deviation.
  • 14. Graphical Analysis • This graph shows the analysis of intensity value of right most column of the image. • The gradient is smooth, as values move up gradually without any deviation
  • 15. Graphical Analysis • This graph shows the analysis of intensity value of the middle column of the image. • The gradient is not smooth because there is object in this part of the image, hence there is deviation in the graph. Uneven gradient
  • 16. Overall Score • The overall score is calculated by the following expression • C_1 * dark_score + C_2 * horizon_score + C_3 * gradient_score + C_4 * Object_pixels • Where C_i is weighted constants • The overall score will give you an estimate of the image scale or the field of view, where 0 being narrow field of view and 10, wide field of view. • In this case, the overall score will be • 0.4 * 5.107 + 0.4 * 5.29 + 0.2 * 7.7 + 0.2 * 2.29 = 6.1568 • Since the score is above 5, we can estimate that the Image has wider field of view with medium size object.
  • 17. Case 2 Figure 13: score stage 1 Figure 14: score stage 2 Figure 15: score stage 3 Final score = 0.4*3.16+0.4*3.53+0.2*3.69+0.2*6.3 = 4.46 Since the score is below 5, the image scale can be estimated as narrow field of view with large object.
  • 18. Conclusion • A simple approach to estimate the field of view of an unknown image • With the information obtained from this approach, one could then use existing approaches which are dependent on the field of view of the image.