51
Computer Vision From scratch Henry Ruiz Master's student in Artificial Intelligence, Autonomous University of Baja California Research Assistant at Texas A&M University Research Assistant at CIAT Microsoft Student Partner Colombia Microsoft Community Specialist Colombia Microsoft Professional developer

Computer vision from scratch

Embed Size (px)

Citation preview

Page 1: Computer vision from scratch

Computer VisionFrom scratch

Henry RuizMaster's student in Artificial Intelligence, Autonomous University of Baja

California Research Assistant at Texas A&M University

Research Assistant at CIATMicrosoft Student Partner Colombia

Microsoft Community Specialist ColombiaMicrosoft Professional developer

Page 2: Computer vision from scratch

Review• What people think about AI?• What artificial intelligence “really

means”?• What Microsoft, Google and IBM are

doing?• Computer Vision • Images Processing• Machine Learning

• Opencv

Page 3: Computer vision from scratch

What people think about AI?

Page 4: Computer vision from scratch

What people think about AI?

If you were to ask the average person what they thought of when someone

mentions “artificial inteligence”, they would

say “robots”.

Page 5: Computer vision from scratch

What people think about AI?But Artificial Intelligence

is more than “robots”

Page 6: Computer vision from scratch

What artificial intelligence “really means”?

Page 7: Computer vision from scratch

What artificial intelligence “really

means”?Artificial intelligence is the study of how to make machines that can think and act like humans, that are able to learn and use their knowledge to solve problems on their own

Page 8: Computer vision from scratch

What artificial intelligence “really means”?

IA

Weak AI(narrow AI)

Machines simulate intelligence

Machines can demonstrate intelligence, but don´t

necessarily have a mind, mental states or consciousness (experts

systems, speech recognition, natural language understanding)

Strong AI(General AI)

Machines are intelligent

artificial intelligence that matches or exceeds human

intelligence(“robotic”)

Page 9: Computer vision from scratch

AI approaches

AI

Research fields

Intelligent machine/agent

Knowledge representation

Machine learning

Computer visión

Planning

Robotics

Research techniques

Artificial neuronal networks

Evolutionary computing

Expert Systems

Fuzzy logic

Genetic algorithm

Probabilistics computing

Page 10: Computer vision from scratch

What Microsoft, Google and IBM are doing?

Page 11: Computer vision from scratch

What big companies are doing?What Microsoft is doing? (Microsoft Cognitive Services)https://www.youtube.com/watch?v=R2mC-NUAmMk What google is doing? (Cloud Vision API)https://www.youtube.com/watch?v=eve8DkkVdhI What IBM is doing?(Watson) https://www.youtube.com/watch?v=jC0I08qt5VU

Page 12: Computer vision from scratch

Computer Vision

Page 13: Computer vision from scratch

What artificial vision is?

People generally use vision as their primary means of sensing their environment, we generally see more than we hear, feel or smell or taste.The goal of computer vision research is to give machines this same powerful facility for understanding their surrounding. Here AI helps computer to understand what they see through attached cameras.

Page 14: Computer vision from scratch

Computer VisionComputer vision is a field that includes methods for acquiring,

processing, analyzing, and understanding images and, in general, high-dimensional data from the real world in order to produce numerical or symbolic information, e.g., in the forms of decisions.

As a scientific discipline, computer vision is concerned with the theory behind artificial systems that extract information from images. The image data can take many forms, such as video sequences, views from multiple cameras, or multi-dimensional data from a medical scanner. As a technological discipline, computer vision seeks to apply its theories and models to the construction of computer vision systems.

Page 15: Computer vision from scratch

Artificial Vision Systems (AVS)System that have like objective:The detection, segmentation, localization

and recognition of objects or things inside the images ( for example human faces, patterns, shapes or features).

improvement and restoration of images. Image Analysis and interpretation of images.Tracking of objects inside a sequence of

processed images (video).

Page 16: Computer vision from scratch

Areas of knowledge embedded

Page 17: Computer vision from scratch

Human vision System

The eyes, let us collect information from the

environment like object colors, form, size, depth The brain takes the information

which is taken for the eyes and using all this information (that has been stored inside throughout our

live) in order to let us classify, identify, differentiate the objects,

the things etc.

Page 18: Computer vision from scratch

Human vision system

photoreceptor cells 

Page 19: Computer vision from scratch

Artificial vision System

Image processing is a method to convert an

image into digital form and perform some operations

on it, in order to get an enhanced image or to

extract some useful information from it.

In 1959, Arthur Samuel defined machine learning as a "Field of

study that gives computers (machines) the ability to learn

without being explicitly programmed". Machine learning

explores the study and construction of algorithms that can learn from

and make predictions on data.

Page 20: Computer vision from scratch

Computer vision components

Computer Vision

Optics

Digital Images

processing

Machine Learning/

IA

Page 21: Computer vision from scratch

Components of a AVSIm

age

Acqu

isitio

n Sy

stem

Ligh

t sou

rce

Stor

age

Syst

em

Proc

essin

g sy

stem

Com

mun

icati

on sy

stem

Filin

g sy

stem

Page 22: Computer vision from scratch

Work flow AVS (Anderson’s IRIS)

http://archive.ics.uci.edu/ml/datasets/Iris

Page 23: Computer vision from scratch

How do the humans solve it?

Iris virginica

Page 24: Computer vision from scratch

Work Flow AVS

Knowledge Base

segmentationRepresentati

on and Description

Pre-processing

Image Acquisition

Recognition and

interpretation

ResultsProficiency issue

Page 25: Computer vision from scratch

Procesamiento Audiovisual 26Tema 1. Adquisición y representación de imágenes.

• A digital image is a matrix or two-dimensional array of numbers. • Each cell in the matrix represents a

pixel.Sample: Image of 20x15. Un píxel90 67 68 75 78 98 185 180 153 139 132 106 70 80 81 69 69 67 35 34

92 87 73 78 82 132 180 152 134 120 102 106 95 75 72 63 75 42 19 29

63 102 89 76 98 163 166 164 175 159 120 103 132 96 68 42 49 46 17 22

45 83 109 80 130 158 166 174 158 134 105 71 82 121 80 51 12 50 31 17

39 69 92 115 154 122 144 173 155 105 98 86 82 106 83 76 17 29 41 19

34 80 73 132 144 110 142 181 173 122 100 88 141 142 111 87 33 18 46 36

37 93 88 136 171 164 137 171 190 149 110 137 168 161 132 96 56 23 48 49

66 117 106 147 188 202 198 187 187 159 124 151 167 158 138 105 80 55 59 54

127 136 107 144 188 197 188 184 192 172 124 151 138 108 116 114 84 46 67 54

143 134 99 143 188 172 129 127 179 167 106 118 111 54 70 95 90 46 69 52

141 137 96 146 167 123 91 90 151 156 121 93 78 82 97 91 87 45 66 39

139 137 80 131 162 145 131 129 154 161 158 149 134 122 115 99 84 35 52 30

137 133 56 104 165 167 174 181 175 169 165 162 158 142 124 103 67 19 31 23

135 132 65 86 173 186 200 198 181 171 162 153 145 135 121 104 53 14 15 33

132 132 88 50 149 182 189 191 186 178 166 157 148 131 106 78 28 10 15 44

Digital Representation of Images

Page 26: Computer vision from scratch

Procesamiento Audiovisual 27Tema 1. Adquisición y representación de imágenes.

• A more common way to display an image ...

píxel

Digital Representation of Images

Page 27: Computer vision from scratch

•Another possible way to visualize / interpret an image is...

as a two dimensional surface.As a discrete sampling of the continuous signal.

Digital Representation of Images

Page 28: Computer vision from scratch

Procesamiento Audiovisual 29 Tema 2. Procesamiento global de imágenes.

Operations between Images• Question: What is the theoretical basis of

image processing? What operations apply? • Reminder: a digital image is nothing more

than a matrix or two-dimensional array of numbers!

We can apply the same operations that covers any number: add, subtract, multiply, divide, apply and, or, maximum, minimum, integrals, derivatives ...

90 67 68 75 7892 87 73 78 8263 102 89 76 9845 83 109 80 13039 69 92 115 154

Page 29: Computer vision from scratch

Wich operation Should I Apply? How Can I determine it?

Page 30: Computer vision from scratch

Procesamiento Audiovisual 31 Tema 2. Procesamiento global de imágenes.

Using the histogram

0 255127

Frec

uenc

ia0 255127

Frec

uenc

ia

Page 31: Computer vision from scratch

Procesamiento Audiovisual 32 Tema 2. Procesamiento global de imágenes.

0 255127

Frec

uenc

ia0 255127

Frec

uenc

ia

Using the histogram

Page 32: Computer vision from scratch

OpenCV (Image Analysis Technology ) “OpenCV is released under a BSD

(Berkeley Software Distribution) license and hence it’s free for both academic and commercial use. It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library can take advantage of multi-core processing. Adopted all around the world, OpenCV has more than 47 thousand people of user community and estimated number of downloads exceeding 6 million. Usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics.”

Page 33: Computer vision from scratch

OpenCV (Image Analysis Technology )

Page 34: Computer vision from scratch

OpenCV (Image Analysis Technology )

• Java - http://goo.gl/FXOQdB • Python - http://goo.gl/UyUzAt • C++ - http://docs.opencv.org/ • C - http://docs.opencv.org/ • .Net(Emgu CV)- http://www.emgu.com/• Android - http://web.stanford.edu/class/ee368/Android/ • IOs

Page 35: Computer vision from scratch

OpenCV (Image Analysis Technology )

Page 36: Computer vision from scratch

What do you need to know…?• Have basic programming skills

(programming fundamentals)• Basic knowledge using C++, python or

another programming language • You can find a lot of Information over C+

+,python etc. in internet• Basic skills in Image Processing and

Linear Algebra

Page 37: Computer vision from scratch
Page 38: Computer vision from scratch
Page 39: Computer vision from scratch
Page 40: Computer vision from scratch
Page 41: Computer vision from scratch
Page 42: Computer vision from scratch

Rice Platform

Page 43: Computer vision from scratch

Biotechnology

Page 44: Computer vision from scratch

NDVI (Normalized difference vegetation index

Page 45: Computer vision from scratch

CIAT NDVI (Normalized difference vegetation index )

Healthy Plant Dry and chl. reduced plant

REDhealthy= 0.05 REDstressed = 0.4

NIRhealthy = 0.5 NIRstressed = 0.5

Page 46: Computer vision from scratch

Features Extraction- Chalky grains

Page 47: Computer vision from scratch

characterization of diseases

Page 48: Computer vision from scratch

future works

Page 49: Computer vision from scratch

future works

Page 50: Computer vision from scratch

future works

Page 51: Computer vision from scratch

Thanks• https://dharuiz.wordpress.com/ (blog)• [email protected] (Hotmail)• [email protected] (gmail)• https://www.facebook.com/devharuiz

(facebook)• https://co.linkedin.com/in/haruiz

(linkedin)• @devharuiz (twitter)