5. Page 5
Solution Methodology
• Conveyor design
• Install operating system openCV and other necessary
packages to raspberry pi minicomputer
• Colour detection method
• Shape detection method
• Data send method
6. Page 6
Machine Vision System
Computer
Hardware+Software
Cameras
lighting
Vision systems can be
thought of as
computers with eyes
that can identify,
inspect and
communicate critical
information.
Eliminate Defects
Improve Quality
Automate Production
Track & Identify Parts
Reduce Cost
Image Captured
Stored In Memory
Algorithmically
Compared
Visual Based
Product
Identification
System
7. Page 7
Project Objectives
Build a system that can detect, recognize objects according to the
Colour
Shape
The whole process should be done in real time
Should be used ease & efficient algorithms
8. Page 8
Software Part & Hardware Part
Hardware
Lighting system
Web Camera
Raspberry-pi Computer
Monitor
Conveyor
Software
OpenCV
Python
Numpy
9. Page 9
OpenCV
OpenCV
Speed
Resource-saving
Cost
Portability
Open source
computer vision
library
Core module.
Imgproc module
Highgui module
Feature 2D module
Calib 3D module
Library is written in
C & C++
Runs under
linux,windows
Provides interfaces
Python,Ruby,Matlab
,etc
10. Page 10
Programing Software Development
Colour
Detection
Use contours methodShape
Detection
Use RGB to HSV conversion
method
11. Page 11
Colour Detection
STEPS
1. Capture image
2. Convert from BGR to HSV color-space
3. Threshold the HSV image for a range of color
4. Show the mask image.
12. Page 12
RGB to HSV Conversion Method
RGB
In terms of Hue ,Saturation and ValueHSV
In terms of the amount of RED,GREEN,BLUE present
13. Page 13
RGB to HSV Conversion Method
Hue –Represents colour type
Range 0 to 255
Saturation –Represents the vibrancy of the colour
Range 0 to 255
Value –Represents brightness of the colour
0 – Completely DARK
255 – Fully BRIGHT
15. Page 15
Shape Detection
STEPS
1. Capture the image
2. Get an image after 30 frames
3. Delete the camera
4. Threshold the image
5. Find contours
6. Approximate contours
7. Show correct shape
19. Page 19
Raspbery pi Circuit
Raspberry pi
Circuit
Monitor
Keyboard
Mouse
Small credit card
size single board
computer
Low cost
Simplicity
Easy to handle
Rasbian Jessie used
as operating system
OpenCV,
Python,Numpy
should be installed
20. Page 20
Raspberry –pi Circuit
5v Micro usb
HDMI port
CSI Camera
connector Ethernet socket
Usb Ports
Micro SD card slot
21. Page 21
Software Installation
• Installing OpenCV 3 on Raspbian Jessie
Installing OpenCV 3 is a multi-step (and even time consuming) process requiring you to
install many dependencies and pre-requisites.
– Step #1: Install dependencies
– Step #2: Grab the OpenCV source code
– Step #3: Setup Python
– Step #4: Compile and install OpenCV
– Step #5: Finishing the install
– Step #6: Verifying your OpenCV 3 install
22. Page 22
SSH via direct Ethernet cable
• What is the meaning of SSH?
Secure Shell (SSH) is a UNIX-based command
interface and protocol for securely getting access to
a remote computer.
• What is the use of SSH server?
An SSH server is a software program which uses
the secure shell protocol to accept connections from
remote computers. SFTP/SCP file transfers and
remote terminal connections are popular use cases
for an SSH server.
26. Page 26
OpenCV
Since Version 2.2, the OpenCV library is divided into several modules.
1.The opencv_core module that contains the core functionalities of the library, in
particular, basic data structures and arithmetic functions
2.The opencv_imgproc module that contains the main image processing functions
3.The opencv_highgui module that contains the image and video reading and writing
functions along with some user interface functions
4.The opencv_features2d module that contains the feature point detectors and
descriptors and the feature point matching framework
5.The opencv_calib3d module that contains the camera calibration, two-view
geometry estimation, and stereo function
27. Page 27
6.The opencv_video module that contains the motion estimation, feature
tracking, and
foreground extraction functions and classes
7.The opencv_obj detect module that contains the object detection functions
such as
the face and people detectors