Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 47

[Type the document title]

CHAPTER NO. 1

ABSTRACT
A sampling method of gathering representative data from a group. For example, a
manufacturer might check only 2 or 3 gears from a batch of 100 gears. Due to which the
whole lot gets rejected if any gear in between has error in it.Thus we need to check each
and every gear in the batch but manually this process is time consuming. In our project
we are designing and manufacturing a system which will be checking each and every
gear.We use a conveyor belt for movement of gear , a camera for capturing and checking
the gear parameters for its error by comparing the parameters stored at the back end.If
the parameters are matched with the stored parameters then it goes to the accepted lot
otherwise with the help of shooting gun it goes to the rejected lot.

Precision measurement of gears plays a vital role in gear measurement and inspection.
The current methods of gear measurement are either time consuming or expensive. In
addition, no single measurement method is available and capable of accurately measuring
all gear parameters while significantly reducing the measurement time. The aim of this
paper is to utilize the computer vision technology to develop a non-contact and rapid
measurement system capable of measuring and inspecting most of spur gear parameters
with an appropriate accuracy. A vision system has been established and used to capture
images for gears to be measured or inspected.
The introduced vision system has been calibrated for metric units then it was verified by
measuring two sample gears and comparing the calculated parameters with the actual
values of gear parameters. For small gears, higher accuracy could be obtained and as well
as small difference.
[Type the document title]

INTRODUCTION
Gear is a widely used mechanical component whose primary use is to transmit
power from one shaft to other. These gears are of many types namely spur gear, helical
gears, worm gears etc.

Gear drives are used to various kinds of machines like automobiles, metal cutting
tools, material handling equipment, rolling mills, marine power plants etc. The friction
and other losses in this type of power transmission equipment is comparatively very low.

In this work we use a software called “MATLAB” to determine gear parameters.


MATLAB is extensively used for scientific & research purposes. It is accurate & also has
a number of built in functions which makes it versatile. The program is a user friendly
one & when executed it ask the inputs and performs the necessary design calculations and
gives necessary output values. As computers are used to perform the task of gear design
becomes simple, friendly & error free.

In this world of fast paced computation where resources with time and
money/capital are very important the activities in manufacturing and processing
industries are day by day being performed by computers, algorithms and computing
agents replacing human or semi-human intervention. Here in the industries that require
gears the filtering and classification of gears is very important and is done by human
labor, precisely human labor is limited to its way of working and the time, cost required.
Classification can be done with the use of imaging devices, Cameras and scanners with
developing an algorithm that describes what to accept and reject.

Computer science image processing technology is gradually becoming a part of


our daily life as it continues to get excellent results while promoting the technological
advancement and development. As the key role of technology that presents gear size and
measurement and guides to do research and develop more advanced computer
technologies, such as DSP (digital signal processing) technology, and DIP (digital image
[Type the document title]

processing) technology. We will measure the image object features easily by using these
technologies.

The measurement is essential task to limit the gear at specific size. By using image
processing the fundamental work has been carried out to measure following things which
are its most important features.
a. To calculate outer diameter (Addendum diameter).
b. To calculate inner diameter (Dedendum diameter).
c. To count the number of teeth in gear image object.
c. To calculate tooth height.
d. To calculate PCD of gear.
e. To calclulate module of gear

In this regard we have converted the original gear image object into grayscale,
and then gray scale of original gear image goes from steps to count the teeth of the gear.
It means by using programming code, we measure the gear teeth in respect of teeth
counted through image processing.

The gears are used in machinery and we know that gear transmissions can be used
to alter a machine motion property, although it ensures the modification in the motion
through linear and rotary development of gear. It is an old technology and gear
transmission was invented having complexity.

In light of gear teeth count and to measure the parameter of the gear object
complexity of transmission. The geometry is used to measure the gear transmissions for
commercial vehicles. Here it presents a technical exposure of gear basics. On the other
hand, for appropriate use of gear and design of gear that is necessary to have a minimum
know how about the gear.
[Type the document title]

The research shows that special tooth calipers could be used to measure the Gear
teeth. There are different types of gears in market according to need that can be used. It
means gears have different profiles. Hence these are in different size and having odd or
even number of teeth. The gear may be odd number of teeth profile and also it may be
even number of teeth profile.

Hence the gear parameters measurement will be more simple, fast and less time
consuming.
[Type the document title]

1.1 Problem Defination:


Gears have a wide variety of use in mechanical and electrical industries and need
to be perfect and flawless with accurate and required number of jaws, diameter, used
material , size of jaws, distance between jobs and so on. These all features define the
correctness and application in sense where these gears are to be used. This problem of
seeing and classifying gears are done by humans but have limitations of speed and
accuracy .This responsibility of classification of items can be speeded and made more
accurate by the use of imaging technology and computers aided by some mechanical
devices.

A gear or more correctly a "gear wheel" is a rotating machine part having cut
teeth, or cogs, which mesh with another toothed part in order to transmit torque. Two or
more gears working in tandem are called a transmission and can produce a mechanical
advantage through a gear ratio and thus may be considered a simple machine. Geared
devices can change the speed, torque, and direction of a power source.

The gears in a transmission are analogous to the wheels in a crossed


belt pulley system. An advantage of gears is that the teeth of a gear prevent slippage.

When two gears mesh, and one gear is bigger than the other (even though the size
of the teeth must match), a mechanical advantage is produced, with the rotational
speeds and the torques of the two gears differing in an inverse relationship.

In transmissions with multiple gear ratios such as bicycles, motorcycles, and cars
the term gear, as in first gear, refers to a gear ratio rather than an actual physical gear.
The term describes similar devices, even when the gear ratio is continuous rather
than discrete, or when the device does not actually contain gears, as in a continuously
variable transmission.

There are different types of gears and this fact gives us the idea of the complexity
of the problem we are attempting to solve with use of imaging and computers.
[Type the document title]

1.2 Solution:
In this solution we are going to use imaging technology with computer aided
MATLAB algorithm/Code to accept, analyze and compare the image to classify the gears
into acceptable and faulty ones. The overall idea and logic used is explained in these
steps:
The basic idea is to use the following procedure:

1) Capture the image.

2) Convert the RGB image to grayscale using pixel color change algorithm.

3) Use the median filtering algorithm to reduce the complexity and number of colors.

4) Convert the image thereby to the one with black and white pixels where only the white
pixels represent the gear.

5) Partition the image into segments to analyze and distinguish the gear from the
conveyor and external surrounding.

6) Analyze the white pixels to find out Teeth height, Teeth number, Teeth size, Inner
diameter and outer diameter and store these features.

7) Compare these stored features with the set of dimensions in the algorithm's set that
representing the gear type and reject the gears that fail in this comparison. and accept that
is move the ones that succeed through the conveyor.

8) The faulty (defective) gears that are kicked out of the conveyor using a gear shaft can
be collected in a bin that can be sent back to the seller and manufacturer.

The methodology is followed to measure the gear image object by using image
processing in scientific tool Matlab. To accomplish this task, we have developed the code
by which a gear image object pixels has been measured and teeth have been counted. The
flow chart is given below.
[Type the document title]

Read RGB image from object


file

Convert the object RGB to


gray

Calculate threshold value

Convert gray scale to binary


by using threshold value

Invert binary image

Remove small objects


fromboundary

Fill holes in binary image


object

Count the pixels axiswise

Measure the region properties

Count the teeth

Display result

Fig 1.2.1 Flowchart


[Type the document title]

1.3 Gear Nomenclature:

Fig 1.3.1 Gear Nomenclature


1. Pitch circle. It is an imaginary circle which by pure rolling action, would give the
samemotion as the actual gear.
2. Pitch circle diameter. It is the diameter of the pitch circle. The size of the gear is
usually specified by the pitch circle diameter. It is also called as pitch diameter.
3. Pitch point. It is a common point of contact between two pitch circles.
4. Pitch surface. It is the surface of the rolling discs which the meshing gears have
replaced at the pitch circle.
5. Pressure angle or angle of obliquity. It is the angle between the common normal to
two gear teeth at the point of contact and the common tangent at the pitch point. It is
usually denoted by φ. The standard pressure angles are 14 .5° and 20°.
[Type the document title]

6. Addendum. It is the radial distance of a tooth from the pitch circle to the top of the
tooth.
7. Dedendum. It is the radial distance of a tooth from the pitch circle to the bottom of the
tooth.
8. Addendum circle. It is the circle drawn through the top of the teeth and is concentric
with the pitch circle.
9. Dedendum circle. It is the circle drawn through the bottom of the teeth. It is also
called root circle.
Note :Root circle diameter = Pitch circle diameter × cos φ, where φ is the pressure angle.
10. Circular pitch. It is the distance measured on the circumference of the pitch circle
from a point of one tooth to the corresponding point on the next tooth. It is usually
denoted by pc.
Mathematically,
Circular pitch, pc = π D/T
whereD = Diameter of the pitch circle, and
T = Number of teeth on the wheel.
A little consideration will show that the two gears will mesh together correctly, if the two
wheels have the same circular pitch.
11. Diametral pitch. It is the ratio of number of teeth to the pitch circle diameter in
millimeters.
It denoted by pd. mathematically,
Diametral pitch, pd= T/D
whereT = Number of teeth, and
D = Pitch circle diameter.
12. Module. It is the ratio of the pitch circle diameter in millimeters to the number of
teeth. It is usually denoted by m. Mathematically,
Module, m = D / T
Note :The recommended series of modules in Indian Standard are 1, 1.25, 1.5, 2, 2.5, 3,
4, 5, 6, 8, 10, 12, 16, 20, 25, 32, 40 and 50.
[Type the document title]

The modules 1.125, 1.375, 1.75, 2.25, 2.75, 3.5, 4.5,5.5, 7, 9, 11, 14, 18, 22, 28, 36 and
45 are of second choice.
13. Clearance. It is the radial distance from the top of the tooth to the bottom of the
tooth, in a meshing gear. A circle passing through the top of the meshing gear is known
as clearance circle.
14. Total depth. It is the radial distance between the addendum and the dedendum circle
of a gear. It is equal to the sum of the addendum and dedendum.
15. Working depth. It is radial distance from the addendum circle to the clearance circle.
It is equal to the sum of the addendum of the two meshing gears.
16. Tooth thickness. It is the width of the tooth measured along the pitch circle.
17. Tooth space. It is the width of space between the two adjacent teeth measured along
the pitch circle.
18. Backlash. It is the difference between the tooth space and the tooth thickness, as
measured on the pitch circle.
19. Face of the tooth. It is surface of the tooth above the pitch surface.
20. Top land. It is the surface of the top of the tooth.
21. Flank of the tooth. It is the surface of the tooth below the pitch surface.
22. Face width. It is the width of the gear tooth measured parallel to its axis.
23. Profile. It is the curve formed by the face and flank of the tooth.
24. Fillet radius. It is the radius that connects the root circle to the profile of the tooth.
25. Path of contact. It is the path traced by the point of contact of two teeth from the
beginning to the end of engagement.
26. Length of the path of contact. It is the length of the common normal cut-off by the
addendum circles of the wheel and pinion.
27. Arc of contact. It is the path traced by a point on the pitch circle from the beginning
to the end of engagement of a given pair of teeth. The arc of contact consists of two parts.
(a) Arc of approach. It is the portion of the path of contact from the beginning of the
engagement to the pitch point.
(b) Arc of recess. It is the portion of the path of contact from the pitch point to the end of
the engagement of a pair of teeth.
[Type the document title]

1.4 About MATLAB:


MATLAB (Matrix Laboratory) is an interactive system for matrix-based
computation, designed for scientific and engineering use. MATLAB is a high
performance language for technical computing. It integrates computation, visualization,
and programming in an easy-to-use environment where problems and solutions are
expressed in familiar mathematical notations. Typically uses include: Math and
computation Algorithm development Modeling, simulation, and prototyping Data
analyzing, exploration and visualization Scientific and engineering graphics Application
development including graphical user interface building

MATLAB is a software package for high-performance numerical computation


and visualization. It provides an interactive environment with hundreds of built-in
functions for technical computation, graphics, and animation. Best of all, it also provides
easy extensibility with its own high-level programming language. MATLAB is an
interactive system whose basic data element is an array that does not requires
dimensioning. This allows solving many technical computing problems especially those
with matrix and vectoring foundation.
[Type the document title]

1.5 Image Processing:

Digital image processing processes and evaluates images through computer with
particular algorithm. At present, image processing techniques have been applied and
researched in various fields with great achievement. Digital image processing can divide
into: image transformation, image intensification and restoration, image segmentation,
image analysis, image recognition and other technique branches. MATLAB as one kind
of high-level computer language, it has a powerful data processing ability that obtains
widely application in digital image processing .This paper takes advantage of MATLAB
image processing for gear defect detection. Gear shows different defect forms during the
using process Corrosive pitting and attrition is the most important type. Different defect
forms will create different image characteristics.

We can effectively distinguish and decide the defect type through these image
characteristic. An image processing toolbox of Matlab has great functions. It has an
abundant supported image format, and this software provides 15 types of image
processing function which includes all the research findings of image processing methods
in recent days .Take the advantages of these image processing toolboxes and combine the
powerful data handling capacity, it is necessary to pay attention to image format, read-
write, display and other details. Instead, we can focus on algorithm research, which
greatly improve the working efficiency. Moreover, when testing these algorithms, we can
conveniently get the statistical data and view the graphical representation. Then we can
operate picture segmentation, characteristic abstract and image recognition. At last, it is
necessary to judge and test disadvantages of silicon solar cell. researches about digital
image processing that how to realize the non-contact measurement of geometric
dimensioning in straight spur gear. The characteristics of gear defect image, and provides
the research of these defect abstract technologies. Although there have relevant
references about image characteristics of gear defect, the above researches only find out
the defects by image processing technology. It cannot distinguish the gear defect formats,
and the characteristic differences among the various defects. Therefore, it is necessary to
[Type the document title]

find the deeper research, which will provide powerful technical support for the working
condition of high-efficiency gear monitoring.

Gear drive is the most important transmission type of mechanical transmission.


The gear will operate monitoring and control during the process. For the normal machine
usage, especially the emphasis machine such as gearbox, and reducer, it is always the
difficulty and key technology. We can take the advantage of image processing to detect
gear defect. It is an effective method and still belongs to the starting. During the entire
research, we combine image character of gear defect, user the mature image processing
theory, and graying the selected defect image samples. Moreover, we provide relative
weighted factor. Filtering and noise reduction considers about the much noise point after
long-term usage of the gear. At the same time, it considers about the image feature
requirement. The key point of image filtering is to keep defect contour feature. Moreover,
the gear defect image has differences in shape and location. How to extract texture
feature and morphological characteristics is the key point and innovation point of this
research.

1.5.1 Experimental Material and Equipment:

Computer and digital camera belong to hardware system. Use CCD (Charge
Coupled Device)photosensitive sensor can reduce effects from other lights. Image
collection processes in camera obscura. Then the typical gear defect image will be
collected. MATLAB software is an image processing instrument.

1.5.2 Graying Processing of Image:

The color has three characteristics. They are lightness, tone, and saturation.
Human eyes can distinguish different colors through these three characteristics. Color
lightness is one kind of energy measurement. The more energy that reflected on color
surface, the object will have higher lightness. However, the tone is the characteristic to
[Type the document title]

distinguish different colors. It indicates the color type depends on dominating wave
length. Saturation means the close degree between one color and monochromatic light of
the relative tone.

Human eyes have different sensitivities about R, G, and B lightness. We can use
lightness to be the basis of image graying, which means ignore tone and saturation of
various pixels and take the lightness information only. This method will obtain a better
subjective color effect. Theoretically, the same R, G, B addition can turn into white.
MTALAB image can read image data through ‘imread’ command. Due to the RGB file
that we obtained, it includes color information and luminance information which has
great processing difficulty. Therefore, we have to project colorful information on the gray
space. RGB image transforms into a gray image we need to usergb2gray function of
Matlab.
f(i, j) =α R(i, j) +βG(i, j) +γ B(i, j)) …1

In this formula, R, G, B is three components of one pixel of color image. α , β, γ is


strength coefficient. People have the greatest sensitive to green, the lowest sensitive to
blue. Therefore, under the following formula we can operate weighted average to RGB
for obtaining the reasonable gray image. In function rgb2gray, the parameter value is
[0.30 0.59 0.11].We process the collected image under the above formula, 256 -level gray
image will be obtained. The image after processing is in figure.

Fig 1.5.1Image after graying


[Type the document title]

1.5.3 Image Smoothing:

During the collection, conversion and transformation procedure, the image will be
influenced by the imaging device, transmission equipment, and outside noise
interference. It will infect some noise signals and influence image quality. In order to
reduce this kind of effect as far as possible, we need to depress noise process. This paper
provides two general filtering methods :

1.5.3.1 Neighborhood averaging:

Neighborhood averaging is one kind of linear smoothing filtering. It is suitable for


removing gain noise in the images. Every image point of (m,n) in the provided image f (i,
j) we take the neighborhood S. If we suppose S has M pixels, and the average value is the
gray level of image point (m,n) after processing. The shape and size of the neighborhood
S will be confirmed under image point. The ordinary obtained shapes are square,
rectangle, and cross. The point (m,n) usually places in the center of S .Neighborhood
averaging means average window pixel replaces the original gray value. This paper uses
3×3 pixel image F(x, y) . After smoothing process, we can obtain an image G(x, y) . And
G(x, y) is decided by the following formula.


G(x,y) = ∑ G (m, n)/ L 2 …2
( x , y ) =L

In the formula, x, y = 0,1,2,…, N −1 , and L is a neighbor coordination collection of (x, y)


. However,(x, y) is not included, and L is the coordination amount of the collection.
[Type the document title]

1.5.3.2 Median filtering:

Median filter is one common low-pass smoothing filter. Through` median


filtering we can effectively remove noise. At the same time, it can protect the image edge.
The principle is sequence area pixels follow gray levels. The middle value is output pixel.
The expression is:

G(i,j) = Med[G(i,j)] …3
(x,y)ϵA

Fig 1.5.3.1 Images after two kinds algorithms

The median filter is easy that can better protect the edge. However, the window
size and shape will influence the filtering effect. This paper compares the different
windows of 3×3,5×5,7×7. The too large window will leach the lesion part. Moreover,
this paper uses 5×5 rectangular window for filtering. The figure 2 is the comparison of
two different filtering effects. The upper is neighborhood average and the lower one is
median filtering. Compare these two flatting methods, neighborhood averaging has the
characteristic of simple and practicable, operating rate, and perfect denoising effect.
However, the neighborhood averaging leads a certain degree of boundary dim when
removing the noise and it will affect the accuracy of boundary extraction. Although, the
median filtering is better than the neighborhood averaging in boundary conservation and
texture detail, it is necessary to consider about the size sequence of each pixel.
[Type the document title]

1.5.4 Image Segmentation:

For the convenient analysis of gear defect detection, we need to test image edge.
Matlab software provides differential operator functions for edge test. The common
differential operators are Roberts operator, prewitt operator, Sobel operator, canny
operator, and soon. Canny operator is the best edge detection operator of trap cut. We use
canny edge detection for image strengthen processing. The image after edge detection
processing is figure 3.

Fig 1.5.4.1 Image after edge detection processing

In the image area after segmentation, for pitting defect concentrates upon the gear
mesh pitch line with dotted distribution. Moreover, gear attrition expresses teeth surface
scarification. The area calculation principle is binary image f ( x , y ) = 1, 1 stands for the
object, 0 is the background, and the area is the number of f ( x , y ) =1 after statistic.
From the area static we can find out two types of gear defect forms have great differences
in the area occupancy. We can effectively distinguish gear defect form through area ratio.
Therefore, area ratio is one reference characteristic value to distinguish normal tooth
surface and the defected tooth surface.
[Type the document title]

CHAPTER NO. 2

LITERATURE REVIEW

[1] Haque Nawaz, Himat Ali , “Gear Measurement Using Image Processing in Matlab”,
‘International Journal of Innovative Technology and Exploring Engineering (IJITEE)’,
2014, Volume-3,pp43-47.

Gear Measurement has been carried out by focusing two features of gear image
object. The problems are to measure the gear features of gear image object, in the sense
the measurement of the Area of the gear image object and as well the teeth of the gear
will be counted. We have used Matlab tool and development code which overcome these
problems and measured the area as well as teeth of the gear image object counted. To
accomplish this task we have measured five different gear image objects area and
counted the teeth by using image processing.

The gear Area calculated and teeth counted by using image processing in the
matlab tool. This paper having the five gear image objects which are processed from
developed matlab code, all gear image objects found having different value of area and
varying teeth with another. These have been measured through the same developed
matlab code. In this paper each experimental work figure of different gear objects
measured with the help of matlab tool by using image processing.

Computer science image processing technology is gradually become a part of our


daily life as it continues to get excellent results while promoting the technological
advancement and development. As the key role of technology that presents gear size and
measurement and guides to do research and develop more advanced computer
technologies, such as DSP (digital signal processing) technology, and DIP (digital image
processing) technology. We will measure the image object features easily by using these
technologies.
[Type the document title]

The measurement is essential task to limit the gear at specific size. By using
image processing the fundamental work has been carried out to measure two things
which are its most important features.
a. To measure the Area of the gear image object
b. To count the number of teeth in gear image object.

In this regard we have converted the original gear image object into grayscale,
and then gray scale of original gear image goes from steps to count the teeth of the gear.
It means by using programming code, we measure the gear teeth in respect of teeth
counted through image processing.

[2] Cheng Pengfei and Feng Changyong Henan , “Characteristic Value Extraction of
Gear Defect Based on Image Processing”, ‘Journal of Multimedia’, 2013, Volume- 8, pp
198-205.

Based on the two different image expressions of defect forms, this paper abstract
defect are ratio as well as the characteristic value and abstract contrast with gray co-
occurrence matrix as image characteristics. In order to verify the abstracted image
characteristic for evaluating pitting and wearing effectiveness, we use the neighboring
method to construct are cognition model, and analyze the collected image samples. The
result is correct, but the recognition accuracy needs to be improved. At last, eccentricity
ratio and circularity is abstracted as the characteristic value based on image
morphological characteristics.

Digital image processing processes and evaluates images through computer with
particular algorithm. At present, image processing techniques have been applied and
researched in various fields with great achievement. Digital image processing can divide
into: image transformation, image intensification and restoration, image segmentation,
image analysis, image recognition and other technique branches. MATLAB as one kind
of high-level computer language, it has a powerful data processing ability that obtains
[Type the document title]

widely application in digital image processing. This paper takes advantage of MATLAB
image processing for gear defect detection. Gear shows different defect forms during the
using process. Corrosive pitting and attrition is the most important type. Different defect
forms will create different image characteristics. We can effectively distinguish and
decide the defect type through these image characteristics. An image processing toolbox
of Matlab has great functions. It has an abundant supported image format, and this
software provides 15 types of image processing function which includes all the research
findings of image processing methods in recent day. Take the advantages of these image
processing toolboxes and combine the powerful data handling capacity, it is necessary to
pay attention to image format, read-write, display and other details. Instead, we can focus
on algorithm research, which greatly improve the working efficiency. Moreover, when
testing these algorithms, we can conveniently get the statistical data and view the
graphical representation.

[3] Zhang Jing , “The Research on the Application to Digital Image Technology in
Hypoid Gear Contact Zone Detection”, ‘Journal of Computers’, 2011, Volume-. 6,PP
1519-1525

Computer image technology is increasingly applied to all walks of life, continue


to achieve good results, and effectively promote the technological progress and
development. As a key part of technology, the present gear contact pattern detection, it is
necessary to research and develop more advanced, more intelligent, and more integrated
digital detection system connecting with today's advanced science and technology
(computer technology, digital signal processing technology, image processing, and
precision instrument technology).Computer image processing as an embodiment and the
development of various advanced science and technology(including computer
technology, signal processing, etc.) is the hot point for the development and application
of the current technology.
[Type the document title]

During the transmission of pictures, the quality of pictures will be fallen because
of the noise pollution. Therefore, the achieved grayscale must be improved, in other
words, pictures enhancement. Picture enhancement is a method to highlight some
information of one picture according to certain requirements, at the same time, weaken or
remove some unnecessary information. The main purpose is to make the processed
pictures is much more suitable to certain application compared with the original pictures.
So this kind of handle aims to improve picture's quality with the certain application
purpose. The results of process can make the picture much better to suitto people's visual
sense or the recognition system of machine. The technologies of picture enhancement
include image smooth process, image sharpening process and so on.

The method is to gain the image of tooth profile and contact spot by using digital
camera, to reconstruct diametrically the contact spot of hypoid gear through the computer
graphics techniques, to make sure of the relative position on the edges between tooth
surface and spot, and to evaluate the size, position and direction of contact spot, in order
to provide foundation for in-line inspection of gear.
[Type the document title]

CHAPTER NO. 3

EXPERIMENTAL PROCEDURE

3.1 Methodology
In figure, the original gear image is read by tool and converted into grayscale then
threshold it, after that the area of gear image calculated and highlighted the interested
region for to count the teeth, then teeth of the gear counted as shown in below steps.

Read the Image from file

Converted the RGB image to Gray


Scale image

Convert Gray scale image to binary


image using threshold
[Type the document title]

Inverted the binary image

Highlighted the region of interest

Counted the teeth of gear are 12

Fig 3.1.1 Methodology


[Type the document title]

3.2 Construction:

Fig 3.2.1 Model Setup

i) The gear parameters are calculated and teeth counted by using image
processing in the matlab tool.
ii) Computer is the main unit of the project. The I/O devices are connected across
the parallel port of computer.
iii) Image processing is any form of signal processing for which the input is an
image, such as a photograph or video frame; the output of image processing
may be either an image or, a set of characteristics or parameters related to the
image.
iv) Most image-processing techniques involve treating the image as a two-
dimensional signal and applying standard signal-processing techniques to it.
[Type the document title]

v) Two rollers are mounted according to the required distance, the belt is
mounted on the rollers on which the materials are placed.
vi) The rollers shaft is coupled with the Motor drive hence when power is
supplied to the motor rollers rotate with a certain time delay according to the
Motor drive and the belt moves along the rollers. Thus material handling is
carried out.
vii) With help of the Motor drive the time delay can be achieved.
viii) Initially Motor conveyor is stationary,
ix) Gear is kept on conveyor belt and the gear image is captured by the camera
which is fixed at the top of the setup.
x) The captured image is sent to the computer
xi) Matlab algorithm read image and processes with the help of image processing
and results are displayed on command window of Matlab.
xii) Selected piece (right gear) is collected in a separate tray and the rejected piece
(wrong gear)is collected in another tray with the help of dc gun motor.
xiii) A pushing rod is mounted in front of the dc gun with help of hinge and spring
arrangement. When the dc gun extends it pushes the plate hence the work
piece in front is also pushed and collected in the tray. When the dc gun is
retracted the plate also comes back to its position with help of spring.
[Type the document title]

3.3 Actual Model Setup:

Fig 3.3.1 Actual model setup


[Type the document title]

3.4 Working:
We have developed Matlab code by using image processing, read the image
original gear object and converted original gear object into gray scale image, then
calculated the threshold value of gray scale image and by using threshold value we have
converted the gray scale image into binary image.

After this process it has removed small objects from the binary image, to
overcome the holes of the object it has filled the holes of binary image object, then
calculated the surface of binary image of gear object, showing the area of gear object here
it is measured.

The code has sequenced in this way, it has measured the properties of the image
object regions, after that we have convex the polygon which are in regions, finally it is
converted into regions of interest to the regions mask through which it has been
highlighted the region with red and yellow lines which indicates the teeth region of a gear
object.

Obviously through this process it has measured the gear object area and counted
the teeth by using the MATLAB tool, the five different gear objects measured by
changing the name of the gear object in same developed code. It is shown in experimental
work figures.

The results are shown in results section in which we have found the Outer
diameter (Adedendum diameter), Inner Diameter (Dedendum diameter),PCD, Module,
Number of teeth and tooth height of a gear image object and counted the teeth.
[Type the document title]

3.5 Material Specifications:

3.5.1 Foam Sheet


3.5.1.1 Length : 42 cm
3.5.1.2 Width : 40 cm

3.5.2 Foam Strip


3.5.2.1 DC Motor Support Height : 21 cm
3.5.2.2 DC Gun Motor Support Height : 18 cm
3.5.3 DC Motor

Fig 3.5.3 DC MOTOR

3.5.3.1 Speed: 30 RPM


3.5.3.2 Diameter: 37 mm
3.5.3.3 Input Voltage: 4 V to 12 V
3.5.3.4 Torque: 28 kg-cm
3.5.3.5 Shaft Diameter: 6 mm
3.5.3.6 Shaft Length: 22 mm
[Type the document title]

3.5.4 Belt
3.5.4.1 Length: 540 mm
3.5.4.2 Width: 90mm
3.5.4.3 Thickness: 1 mm
3.5.6 Camera

Fig 3.5.6 Camera

3.5.6.1 Pixels - 30 MP
3.5.6.2 Resolution - 640 * 440 PIXELS
[Type the document title]

3.5.6.1 Video Frames - 30 fps (frames per second)

3.5.7 Microcontroller:

Fig 3.5.7 Microcontroller

3.5.7.1 TYPE: 16F877A 8-bit 40 pin


[Type the document title]

3.5.9 Motor Driver IC:

Fig 3.5.9 Motor driver IC

Type: L293D motor driver IC


Supply voltage: 4.5 TO 36 VOLTS
[Type the document title]

3.6 Image Processing Algorithm:

function main
%% input image
clc;
closeall;
clear all;
vid = videoinput('winvideo',1);

3.6.1 INPUT IMAGE- This algorithm used for getting the input image to program. First
of all it closes all the previous output in command window and video preview is now
played on screen.

preview(vid);
fori = 1:5
snapshot = getsnapshot(vid);
imagesc(snapshot);
end

3.6.2 DISPLAY IMAGE- Now the video preview is played on screen then snapshot is
taken with the help of above command and the image captured is named as ’imagesc’.

imwrite(snapshot,'E:\Gear_Parameter_detection_Final.jpg');
inp = imread('E:\Gear_Parameter_detection_Final.jpg');

3.6.3 SAVE IMAGE- Image is now saved in the path provided in above command then it
is taken as input image and named as ‘inp’.
[Type the document title]

if size(inp,3) > 1
inp = rgb2gray(inp);
end
figure,
subplot(1,2,1);
imshow(inp,[]);
title('input image');

3.6.4 IMAGE CONVERSION TO GRAY IMAGE- Image which is captured from


camera may be in various colors depending on light conditions is need to convert in gray
color image. Now this gray image is plotted in command window and named as ‘input
image’.

%% preprocessing
dimg = medianfilter(inp);
subplot(1,2,2);
imshow(dimg,[]);
title('denoised image');

3.6.5 TO CALCULATE MEDIAN- ‘medianfilter’ performs median filtering of the


matrix in two dimensions. Each output pixel contains the median value in a 3-by-3
neighborhood around the corresponding pixel in input image. Median filter pads the
image with 0’s on the edges, so the median value for points within one-half of the edges
might be distorted. In short image which is converted in gray image might contain
impurities in the image. These impurities need to remove or in case image contain holes
then also these holes need to fill up, thus pure gray image is now obtained and plotted and
named as ‘denoised image’.

%% segmentation
seg_f = otsu(dimg);
figure,
subplot(1,2,1);
[Type the document title]

imshow(seg_f);
title('Otsu image');
[imgcnt] = bwlabel(double(seg_f));
stats = regionprops(img,'all');
fori = 1:cnt
ar = stats(i).Area;
ifar<= 500
img(img==i)=0;
cnt = cnt-1;
end
end
subplot(1,2,2);
imshow(img);
title('segmented image');

3.6.6 SEGMENTED IMAGE-‘otsu’ segments the image ‘dimg’ into N classes by means
of Otsu’s N-thresholding method. OTSU returns an array ‘seg f’ containing the cluster
indices (from 1 to N) of each point. ‘regionprops’ returns measurements for the set of
properties specified by properties for each connected (object) in the binary image ‘img’.
’stats’ is struct array containing a struct for each object in the image ‘img’. In short
‘regionprops’ is used to measure the image properties such as Area, Perimeter, Centroid,
Roundness etc. Read an image and find the connected components using ‘bwlabel’
function using labeled matrix as an input, the properties can be measured.

Example:
A = [1 0 0 1
1111
0 0 1 1]
To find area: The total number of ‘ON’ pixels in the image
Here the number of ones in the matrix is 8.
To find centroid: Find the row and column having pixel value one.
[row,column]=find(label==1)
Row = [1 2 2 2 3 1 2 3]
[Type the document title]

Column = [1 1 2 3 3 4 4 4]
Find the mean of row and column having pixel calue one.
Mean of row = 2
Mean of column = 2.75
To find the Bounding box: We need 4 points, starting position (x,y), length, breadth.
Minimum value of row and column minus 0.5 guves starting position
respectively.

%% cropping
[imgcnt] = bwlabel(double(img));
fori = 1:cnt
s = regionprops(img, 'BoundingBox');
rectangle('Position', s(1).BoundingBox,'EdgeColor','r');

end
xmin = round(s(1).BoundingBox(1,1));xmax =
round(s(1).BoundingBox(1,1)+s(1).BoundingBox(1,3));
ymin = round(s(1).BoundingBox(1,2));ymax =
round(s(1).BoundingBox(1,2)+s(1).BoundingBox(1,4));
out = img(ymin:ymax,xmin:xmax);
figure,
imshow(out,[]);
holdon
stats = regionprops(out,'all');
cen = round(stats.Centroid);
plot(cen(2),cen(1),'r*');
title('cropped image with centroid');
cnt = 0;
fori = cen(2):size(out,1);
if out(i,cen(1))==0
cnt = cnt+1;
end
end
A = out;
% determine convex hull
B = regionprops(double(A), 'ConvexImage', 'BoundingBox');
[Type the document title]

3.6.7CROPPING- As our focus is to determine gear parameters we need only gear image,
thus segmented image is cropped such that only gear image will remain and centroid of
cropped image is calculated and image with centroid is plotted which is named as
‘cropped image with centroid’.

% generate mask image


C = zeros(size(A));
C(floor(B.BoundingBox(2))
+(1:size(B.ConvexImage,1)),floor(B.BoundingBox(1))
+(1:size(B.ConvexImage,2)))=B.ConvexImage;
C = bwmorph(C, 'erode', 2);
% generate teeth image
D = A;
D(C) = 0;
% count teeth
D = bwfill(D,'holes');

[D cnt] = bwlabel(D);

stats = regionprops(D,'all');
fori = 1:cnt
ar = stats(i).Area;
ifar<= 7
D(D==i)=0;
cnt = cnt-1;
end
end

3.6.8 TO COUNT THE NUMBER OF TEETH- In the above algorithm number of teeth
are counted

[imgNumTeeth] = bwlabel(D);
%disp(sprintf('Inner Diameter value: %d',cnt));
cnt1=5*cnt;
%out11=2*(size(out,2));
%out11=50+out11;
disp(sprintf('InnerDiameter value:%d mm',(2*(2*cnt1)/10)));
[Type the document title]

3.6.9 TO CALCULATE INNER DIAMETER (BASE CIRCLE OR DEDENDUM


CIRCLE DIAMETER) OF GEAR- In the above algorithm inner diameter or base circle
or dedendum circle diameter of gear and it is displayed in command window.

%disp(sprintf('Outer Diameter value: %d',out11));


disp(sprintf('Outer Diameter value: %d
mm',floor(round((3.2*size(out,2)/10)))));

3.6.10 TO CALCULATE OUTER DIAMETER (ADDENDUM CIRCLE DIAMETER)


OF GEAR- In the above algorithm outer diameter or addendum circle diameter of gear is
calculated and it is displayed in command window.

disp(sprintf('No of Teeth: %d',NumTeeth));

3.6.11 DISPLAY NUMBER OF TEETH- Number of teeth of gear is displayed in


command window.

disp(sprintf('Tooth Height: %d
mm',floor(round((3.2*size(out,2))-(2*cnt1))/100)));

3.6.12 TO CALCULATE TOOTH HEIGHT OF GEAR- In the above algorithm tooth


height of gear is calculated and it is displayed in command window.

cnt2=((6*NumTeeth)/3.1415);
disp(sprintf('PCD: %d mm',cnt2));

3.6.13 TO CALCULATE PITCH CIRCLE DIAMETER (PCD) OF GEAR- In the above


algorithm PCD of gear is calculated and it is displayed in command window.
[Type the document title]

cnt3=(cnt2/NumTeeth);
disp(sprintf('Module: %d mm',cnt3));

3.6.14 TO CALCULATE MODULE OF GEAR- In the above algorithm module of gear


is calculated and it is displayed in command window.

%if NumTeeth>= 12 &&floor(round(3.2*size(out,2)))>= 200


ifNumTeeth>= 12 && 2*(2*cnt1) >= 200
s = serial('COM4');
s.baudrate=9600;
fopen(s);
fprintf(s,'K');
fclose(s);
else
s = serial('COM4');
s.baudrate=9600;
fopen(s);
fprintf(s,'F');
fclose(s);

end
end

3.6.15CONDITION FOR REJECTION OF GEAR- In case batch of gear having 12


number of teeth is being inspected then gears having teeth less than 12 are rejected from
the batch and gears having exact 12 number of teeth are accepted.

functiondimg = medianfilter(inp)
% Padarray
c=padarray(inp,[1,1],0,'both');
[R1 C1] = size(c);
%Median filter
fori=2:R1-1
for j=2:C1-1
temp = [c(i-1,j-1) c(i-1,j) c(i-1,j+1);c(i,j-1)
c(i,j) c(i,j+1);c(i+1,j-1) c(i+1,j) c(i+1,j+1)];
[Type the document title]

d = temp(:);
e = sort(d);
med = e(5,1);
dimg(i-1,j-1) = med;
end
end

end

CHAPTER NO. 4

RESULT AND DISCUSSION


4.1 Result:

4.1.1 Right Gear Result


[Type the document title]

Fig 4.1.1 Right gear result

4.1.2 Defective Gear Results

Fig 4.1.2 Defective gear result


[Type the document title]

4.2 Future Scope:

 Applicable in nut, gear manufacturing industries.

 Applicable in quality control departments in industries, etc.

 Can be applied in gear manufacturing unit.

 Used in automobile industry

 Total error checking is done

 Used in both small scale industries as well as the large scale industries

 Its outcome can be utilized properly to a great executed in mechanical field as


well as the automobile field.

 Cost of checking the error is less

 Specified to all kinds of gear.

 All kinds of circular components can the tested.

 In automobile industries.

 In hospitals.
[Type the document title]

4.3 Applications:

 Applicable in nut, gear manufacturing industries.

 Applicable in Quality Control departments.

 Industrial applications such as production inspection, sorting .

 Automatic character recognisation such as zip code, bar code, licence plate

recognisation etc.

 Computerized photography.

 Space image recognisation.

 Remote sensing e.g. Aerial and satellite image interpretations.

 Medical/Biological image processing e.g. X-ray images, blood/cellular

microscope images.
[Type the document title]

4.4 Advantages:

 Less expensive
 High reliability
 Reduces manpower
 It consumes power but can be balanced by use of superior quality material.
 Fully automation is possible to reduce more time for inspection,

4.5 Disadvantages:

 Complex Matlab program is involved.


 Matlab skilled operator is required.
 Different program is need to prepare for different sizes of gear.
 Gear parameter detection is fully dependent on light conditions while testing is
being performed thus need to provide standard light conditions and height of
camera.
[Type the document title]

4.6 Drawbacks In Present Model:

We have developed the setup for determining the gear parameters using image
processing in matlab as shown in Fig 3.2.2 Actual model Setup. During testing, gear is
placed on conveyor manually and the matlab program is executed. In few seconds we get
output in command window of gear showing parameters of gear.

Following future improvements can be possible in present setup


 For automation gears should be loaded automatically on the conveyor instead of
placing it manually.
 When first gear is being test if gear is right then it should pass and next gear
should be available in less time for next inspection.
 As image is captured with the help of camera, standard light conditions should be
provide such that there will no any unnecessary shadow on the conveyor so that
results won’t be vary.
 Results are dependent on camera height also, thus camera height is needed to fix
and if in case it get change, we need to take number of trials to adjust camera
height to get accurate results.
 The mechanism provided for remove the wrong gear from the conveyor should
remove it as quick as possible so that next gear can be tested.
[Type the document title]

 Model setup should be more flexible, reliable.


`

CHAPTER NO. 5
CONCLUSION

The gear Area calculated and teeth counted by using image processing in the
matlab tool. This paper having the five gear image objects which are processed from
developed matlab code, all gear image objects found having different value of area and
varying teeth with another. These have been measured through the same developed
matlab code. Gear objects can be measured with the help of matlab tool by using image
processing.
[Type the document title]

Digital image processing processes and evaluates images through computer with
particular algorithm. In future image processing techniques can been applied in various
fields with great achievement. Digital image processing can divide into: image
transformation, image intensification and restoration, image segmentation, image
analysis, image recognition and other technique branches. MATLAB as one kind of high-
level computer language, it has a powerful data processing ability that obtains widely
application in digital image processing.

With use of Matlab and Image processing technology gear inspection is achieved
in less time. It has applications in other fields such as applicable in nut, gear
manufacturing industries, applicable in Quality Control departments, can be applied in
gear manufacturing unit, can be used in automobile industry, used in automobile industry,
used in both small scale industries as well as the large scale industries, All kinds of
circular components can the tested.

We conclude that image processing technology can be effectively useful in


manufacturing industries, automobile industries, space, medical and biological study,
remote sensing, computerized photography etc.

REFERENCES
1. E.S. Gadelmawla ‘Computer Vision Algorithms For Measurement and Inspection
Of Spur Gears’, Measurement 44(2011) 1669-1678.
2. Amandeep Mavi, Mandeep Kaur ‘Identfy Defects In Gears Using Digital Image
Processing’ ISSN:2278-067X,Volume1,Issue 6(June2012)
3. MD. Hazrat Ali, Syuhei Kurokawa,Kensuke Uesugi ‘Vision Based Measurement
System For Gear Profile’ IEEE 2013
4. MD. Hazrat Ali, Syuhei Kurokawa,Kensuke Uesugi ‘ Camera Based Precision
Measurement In Improving Measurement Accuracy’ Measurement 49(2014) 138-
147.
[Type the document title]

5. Sanjana HK, Soniya MG, Sunitha NR,Vismitha PV ‘Quality management Of


Mechanical Parts Using Image Processing’ ISSN:2229-6093(2017)

You might also like