You are on page 1of 24

Project Report

On
Non-Contact Detection And
Classification Technique Of Surface
Defects
Submitted by:

Submitted to:

Abhijit Deka

Mr. Manish Kr. Roy

(Reg. No.-200715003)

()

Himanshu Goyal
(Reg. No.-200715020)

Jyotish Prakash Kalita


(Reg. No.-200715021)

Shreyanse Sisodia
(Reg. No.-200715049)

Contents
1. Introduction
2. Problem Definition
3. Objective of the Project Work
4. Methodology
5. Results and Discussions
6. Conclusion
7. Demo Program

SIKKIM MANIPAL INSTITUTE OF TECHNOLOGY


(A Constituent College Of Sikkim Manipal University Of Health, Medical And Technological Sciences)

CERTIFICATE
This is to certify that the project entitled Non-Contact
Detection And Classification Technique Of Surface Defects
was successfully done by Abhijit Deka, Himanshu Goyal,
Jyotish Prakash Kalita and Shreyanse Sisodia, students of
B.tech, 4th year Mechanical Engineering Department as their
Mini Project during the 7th Semester.

Mr. Manish Kr. Roy

1 Introduction
A great advancement in the present machine age has been possible due to the increased knowledge
and constant improvement of the surface textures. The need of producing smoother and harder
surfaces was realized as a greater strength and bearing loads were demanded. It was also found that
the functioning of the machined parts , low carrying capacity, tool life, fatigue life, bearing corrosion,
and wear qualities of any component of a machine have direct bearing with its surface texture.
Therefore, these effects made the control of surface texture very important.
Quality control of engineering products is an issue of paramount importance in the current
competitive global manufacturing scenario driving a strong demand for high-quality, low-cost
products. Inspection as a part of quality control effort plays a predominant role in examining a product
and its components, subassemblies, and materials to determine whether they conform to the design
specifications or standards as defined by the product designer. Product quality inspection, in its most
general form, comprises a number of steps, such as presenting the product to the inspection system,
examining the product for identifying the non-conforming features, deciding (based on the results of
the above-mentioned examination) whether the product satisfies the acceptable standards or
specifications, accepting or rejecting the product, or sorting it into an appropriate quality grade. Based
on whether these inspection steps are performed automatically or with human intervention, product
quality inspection may be classified as (i) automated inspection, and (ii) manual inspection.
It was during the 1970s that computers were introduced for automating the task of product quality
control. Before the advent of computer-aided automated inspection of product quality, the only
alternative was manual inspection, which suffered from a large number of drawbacks. Operating a
full-fledged quality control department manually with a large number of inspectors and data handlers
along with constant supervision is an extremely costly and difficult affair. The fatigue and other
psychological factors, associated with the personnel involved in a manual inspection had influenced,
performance of the human inspectors. It is generally subjective and variable since inspectors may
have their own standard of inspecting and classifying products and defects. Thus, it is possible that the
same product or defect may be classified into different pre-defined classes by different inspectors.
Furthermore, the same human inspector might produce different judgments at different times. In
addition, specification limits need to be broad in case of manual inspection due to lack of process
insights as information available is often inadequate. All these drawbacks make manual inspection

slow, expensive, erratic, and subjective and thereby render it unsuitable for meeting the demands of
todays competitive global manufacturing scenario.

Depending on the criticality of quality characteristics of a product or its parts or components, either
100% or sampling inspection is recommended to be used for quality control. Although sampling
inspection has a number of advantages, it principally suffers from some inherent shortcomings. In
sampling inspection, the sample size is often small as compared to the size of the population from
which it is drawn. Since the entire population is not inspected in sampling inspection, it involves the
risk of some defective parts getting accepted (consumers risk) and some good-quality parts getting
rejected (producers risk). An effective alternative to sampling inspection is 100% inspection.
Theoretically, 100% inspection allows only the good-quality parts to pass (qualify as acceptable)
through the inspection procedure. However, if performed manually, 100% inspection may be highly
expensive and time-consuming and may also not be able to provide adequate inspection accuracy and
precision owing to the shortcomings of manual inspection. Sometimes the inspection cost may exceed
the cost of producing the part being inspected if 100% inspection is performed manually. Automated
inspection, being capable of overcoming most of the problems encountered with manual inspection,
seems to be an efficient approach for accomplishing 100% inspection. Automated inspection makes
use of advanced inspection and sensor technologies coupled with computer-based systems to track
and analyze the sensor measurements in real time. In a situation where each critical quality
characteristic of a given product is required to be monitored and controlled, automated 100%
inspection is to be used particularly when the production rate is very high.

Being a fast process, automated inspection allows on-line real-time 100% inspection, which helps in
replacing slow sampling inspection procedure with more precise and accurate high-speed quality
control. Information about the product being inspected is acquired and processed at a very high speed,
which usually matches production speeds even when multiple complex inspection operations are
carried out within the same cycle. This results in huge savings in the material handling time. Unlike
manual inspection, automated inspection utilizes a well-defined set of criteria or standards for
inspection and classification (sorting of products into appropriate quality grades) purposes. In
automated inspection, the inspection criteria or standards are consistently and objectively applied.
Moreover, since automated inspection allows on-line inspection in real time, it is possible to provide
in-time feedback to the production process so that the production of defective parts may be stopped as
early as possible. In addition, automated inspection does not require the specification limits to be as
broad as manual inspection does.All these advantages of automated inspection over manual inspection
result in less critical management and greater predictability, which in turn lead to improvement and

simplification of management systems leading to customer satisfaction due to better and more
consistently performing products.

In situations where bad consequences on the quality characteristics result when the measurement
system is in physical contact with the components or parts or products being inspected, automated
inspection needs to be carried out in non-contact mode. Consequently, automated non-contact
inspection plays an extremely vital role in quality control of engineering products and thus, achieving
improvements in different areas pertaining to the field of automated non-contact inspection have
always been in demand. In this context, an in-depth study in the field of automated non-contact
inspection of engineering products is a prime necessity from the viewpoints of identifying some
pertinent issues that are required to be adequately addressed through further research, and developing
the means of achieving improvements in the identified areas by eliminating the associated lacunae.

2. Problem Definition
Although considerable research has been carried out over the years in the areas of automated noncontact inspection of surface roughness, surface defects, and physical dimensions of engineering
products, several imperative issues pertaining to these areas are required to be addressed adequately
through further research effort. One such issue is highlighted in this section.
Inspection (detection and classification) of surface defects is another important inspection issue in the
manufacturing industries. It is of extreme importance from the viewpoint of achieving high quality in
both functionality and aesthetics. A large number of manufacturing industries depend mainly on
human inspectors for inspection of surface defects through visual inspection. However, owing to some
of its inherent drawbacks, manual inspection of surface defects may often fail to satisfy the rapidly
growing demands of industrial automation in todays manufacturing world.
The drawbacks encountered with manual inspection of surface defects eventually call for automation
in order to maintain high quality of products particularly for high-speed production. Consequently,
automated non-contact detection and classification of surface defects has received remarkable
attention from the researchers and a rudimentary literature search may reveal examples too numerous
to mention.
The most commonly and widely used means of achieving automation in inspection of surface defects
is in the utilization of computer vision-based optical techniques for the same. For inspection of
surface defects, computer vision-based methods represents a surface texture by establishing
appropriate relationship between the defects and the optical features. However, as has been observed
from the review of literature, no generic method of surface texture representation exists, which is
adequately suitable for a wide variety of inspection problems. The term inspection problem here
refers to manufacturing or machining operations used, types and numbers of defects, type of material,
and shape and size of the part or component being inspected. Developing an appropriate surface
texture representation method for a particular type of inspection problem may often involve timeconsuming experimentations. Since frequent change in the nature of an inspection problem may
occur, developing a generic method of surface texture representation in this context is a prime
necessity and calls for further study.

3. Objective of the Project Work


To propose a generic approach for non-contact detection and classification of surface defects with an
acceptable level of accuracy irrespective of shape and size of a part or component, the manufacturing
or machining operations used, and the types and numbers of defects.

4. Methodology
This section explores the potential of several combinations of image statistical features, such as
contrast, energy, homogeneity, entropy, range, standard deviation, and image shape features, such as
major axis length, minor axis length, area, perimeter, equivalent diameter, elongation, compactness,
convex area, solidity, extent, and eccentricity, as tools for non-contact classification of surface defects.
In this context, modelling and prediction of surface defects are carried out utilizing several
combinations of these image features. Detailed descriptions of the experimentations conducted in the
research work for collecting data to be utilized for modelling and prediction of surface defects as
mentioned are presented in this section. This section also discusses in detail the results obtained on
carrying out comparison between the surface defects models developed in the project work. Such
discussion brings out the effectiveness of different combinations of various image features as tools for
computer vision-based automated non-contact detection and classification of surface defects.

Artificial Neural Network (ANN)


ANN are non linear information (signal) processing devices, which are built from inter connected
elementary processing devices called neurons. An artificial neural network is an information
processing paradigm i.e. inspired by the way biological nervous system, such as the brain, process
information. The key element of this paradigm is the novel structure of the information processing
system.aim of ANN is to mimic the human ability to adapt to changing circumstances and the current
environment. It is used to learn pattern and relationship in data. They do not require explicit coding of
the problems.
A typical multi layer ANN abbreviated as MNN comprises an input, output and hidden (intermediate)
layer of neurons. They can implement arbitrary complex input/output mappings or decision surfaces
separating different patterns. In a MNN a layer of input units is connected to a layer of hidden units,
which is connected to the layer of output unit. The activity of neurons in the input layer represents the
raw information i.e fed into the network. The activity of neurons in the hidden layer is determined by
the activities of the input neurons and the connecting weights between the input and hidden units.

Similarly, the behaviour of the output units depends on the activity of the neuron in the hidden layer
and the connecting weights between the hidden and the output layer.

The procedure adopted in the project work for collecting data and utilizing the same for modelling of
surface defects for each type of inspection problem considered, may be described through the
following steps:
(i)

The types of defects present on the surface of each of the workpieces are identified using
a magnifying glass.

(ii)

Based on the types of defects as identified in (i) above for each workpiece, the concerned
workpiece is assigned to a particular class of defect. A particular class of defect may
either be a single type of defect or may be a combination of multiple types of defects.

(iii)

By processing the digital image of each of the workpieces, various image shape features,
such as major axis length (lmaj), minor axis length (lmin), area (A), perimeter (P), equivalent
diameter (DEqv), elongation (e), compactness (c), convex area (A convex), solidity (s), extent
(Ex), and eccentricity (Ec), as well as various statistical features, such as contrast (C),
energy (E), homogeneity (H), entropy (Q), range (R), standard deviation (S) are extracted
from the image.

(iv)

A total of three ANN(Artificial Neural Network) models, as shown in Table 1, are


developed for the prediction of surface defects.

Table 1: Surface Defect Models Developed for each of the Six Types of Inspection
Problems

ANN Models of
Surface Defects

Model Inputs
(Image Features utilized by the ANN Model for Prediction of

Model Output

Class of Defect)
The output neuron(s) that
correspond to the type(s) of
defect(s) present on the concerned
workpiece surface generate an

ANN Model No. 1

Image statistical features


(C, E, H, Q, R, and S)

output of 1 and the remaining


output neurons generate an output
of 0. Based on these outputs, the
concerned workpiece is assigned to
a particular pre-defined class of
defect*

ANN Model No. 2

ANN Model No. 3

Image shape features


(lmaj, lmin, A, P, DEqv, e, c, Aconvex, s, Ex, and Ec)
Combination of image statistical and shape features
(C, E, H, Q, R, S, lmaj, lmin, A, P, DEqv, e, c, Aconvex, s, Ex, and Ec)

Same as ANN Model No. 1

Same as ANN Model No. 1

* A pre-defined class of defect may either be a single type of defect or may be a combination of multiple types of defects

(v)

Each of the ANN models is trained using the following data:


(a) Data collected through steps (i) (iv) as mentioned above, and
(b) Data pertaining to image statistical features (C, E, H, Q, R, and S).

(vi)

Data required for testing the trained ANN models of surface defects are collected using
the another random sample of workpieces.

(vii)

Adopting exactly the same procedure as described through steps (i) (iii) above, each of
the workpieces mentioned in step (vi) is assigned to a particular class of defect and the
image features, such as C, E, H, Q, R, S, lmaj, lmin, A, P, DEqv, e, c, Aconvex, s, Ex, and Ec are
extracted from its image.

(viii)

Each of the trained ANN models is then tested for further verifying its prediction
accuracy by presenting it with unseen input data (data not presented to the model during
its training) as obtained in step (vii) and comparing its outputs (classes of defects) with
the classes of defects obtained in step (vii).
Table 2: Pre-Defined Classes of Defects

Pre-Defined
Class of
Defect

Type(s) of Defect(s) Representing the PreDefined Class

Class-1

Scratch Marks

Class-2

Crack

Class-3

Pore

Class-4

Burn Marks

Class-5

Crack and Pore

Class-6

Crack, Pore, and Scratch Marks

Class-7

Dent

Class-8

No Defect

Table 3: Database for Training Surface Defect Models

Pre-

Image Features (Extracted through Computer Vision-Based Image Processing)


Statistical Features
Shape Features

Defin
ed
Workpi
ece No.

Class
of
Defe

lmaj

lmin

DEqv

Aconv

Ex

Ec

ex

ct

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

Class

0.2

0.2

0.8

6.8

24.8

8.61

3.30

2.1

5.00

5.41

2.52

4.0

0.4

5.00

1.0

0.8

0.7

-3
Class

90
0.2

30
0.2

90
0.8

40
6.4

30
23.0

0
7.93

7
4.61

29
1.1

0
4.00

4
6.00

3
2.25

00
4.0

67
0.7

0
4.00

00
1.0

36
1.0

65
0.9

-3
Class

40
1.1

70
0.0

90
0.7

70
7.4

90
67.9

0
24.2

8
8.21

55
7.8

0
37.0

0
26.9

6
6.86

00
1.0

17
1.5

0
52.0

00
0.7

00
0.4

68
0.3

-4
Clas-

10
0.5

70
0.1

20
0.8

50
7.4

00
37.2

60
13.2

2
3.92

10
3.0

00
8.00

70
8.24

3
3.19

51
1.3

65
0.6

0
8.00

11
1.0

56
0.6

08
0.6

1
Class

10
0.2

40
0.3

40
0.9

40
6.4

60
21.5

90
7.51

5
3.43

00
1.6

0
3.00

2
4.82

1
2.25

84
2.0

76
0.6

0
4.00

00
1.0

66
0.6

44
0.8

-3
Class

20
0.2

30
0.3

00
0.9

90
6.6

80
20.9

0
7.17

5
4.75

91
1.6

0
4.01

8
7.40

6
2.51

31
2.0

19
1.0

0
6.00

00
0.8

66
0.6

70
0.9

-3
Class

30
1.5

20
0.0

00
0.6

40
7.6

30
84.6

0
30.3

8
26.5

23
8.9

5
175.

1
64.6

4
14.9

45
2.9

86
1.9

0
193.

11
0.9

57
0.4

56
0.9

-5
Class

60
0.4

50
0.1

60
0.8

30
7.0

40
37.0

80
12.6

02
3.88

01
3.0

00
6.00

69
8.31

27
3.22

77
1.4

03
0.9

00
8.00

06
1.0

16
0.7

41
0.6

-1
Class

00
0.1

60
0.2

30
0.9

30
6.4

20
14.3

70
5.09

8
3.25

00
2.1

0
5.00

1
5.36

5
2.50

02
4.1

17
0.4

0
5.00

00
0.9

11
0.8

27
0.7

-3
Class

50
0.1

90
0.3

30
0.9

90
6.3

20
14.1

0
4.90

8
15.5

11
5.2

8
72.0

5
54.2

3
10.2

25
3.8

58
3.2

0
111.

87
0.9

88
0.4

24
0.9

-5
Class

50
1.5

20
0.0

30
0.6

80
7.6

50
84.2

0
30.4

55
14.2

57
3.4

0
35.0

28
47.2

18
15.2

88
6.5

52
5.0

00
90.0

06
0.9

22
0.4

67
0.9

-5
Class

80
0.1

50
0.4

60
0.9

70
5.8

80
10.2

50
3.72

57
8.11

22
7.9

0
35.0

06
25.9

22
6.89

47
1.1

70
1.5

0
53.0

11
0.7

24
0.4

81
0.3

-4
Class

00
0.1

10
0.4

50
0.9

10
6.0

50
10.0

0
3.61

1
7.36

95
6.2

00
37.7

90
19.5

7
7.90

10
1.0

37
0.8

00
44.7

99
0.8

47
0.6

00
0.1

-7
Class

00
0.0

20
0.4

50
0.9

90
6.2

70
9.33

0
3.25

5
2.30

22
1.1

50
2.00

55
2.00

7
1.59

04
2.0

07
0.1

11
2.00

85
1.0

24
1.0

58
0.8

-8
Class

70
1.5

80
0.0

60
0.6

00
7.6

0
86.0

0
30.8

9
11.2

54
3.8

0
28.0

0
24.5

5
7.01

31
5.2

59
1.7

0
32.0

00
0.8

00
0.6

66
0.9

-6
Class

60
1.6

50
0.0

60
0.6

00
7.6

60
85.6

50
30.7

28
11.9

87
3.6

00
29.0

55
24.4

9
6.07

85
3.2

15
1.6

00
33.0

88
0.8

47
0.6

19
0.9

-6
Class

10
0.7

60
0.0

70
0.7

30
7.5

40
50.8

20
18.3

13
1.15

43
1.1

00
1.00

85
0.00

7
1.12

72
1.0

46
0.0

00
1.00

79
1.0

59
1.0

52
0.0

-2
Class

40
0.6

70
0.1

70
0.7

30
7.4

00
48.9

80
17.6

4
1.16

54
1.1

0
1.03

0
1.01

8
1.13

51
1.0

00
0.0

0
1.00

00
1.0

00
1.0

00
0.0

-2
Class

50
0.5

00
0.1

80
0.8

20
7.3

20
41.6

80
14.9

8
3.96

57
3.0

1
8.00

0
7.24

0
3.14

48
1.2

79
0.5

0
6.00

00
1.0

00
0.6

00
0.6

-1
Class

90
0.0

10
0.4

10
0.9

80
5.6

80
6.48

90
2.32

1
2.32

00
1.1

0
2.00

0
1.00

7
1.50

97
2.0

22
0.0

0
1.00

00
1.0

15
0.9

99
0.8

-8
Class

80
0.0

90
0.6

60
0.9

10
5.5

0
6.46

0
2.34

2
2.21

58
1.1

0
2.00

0
2.00

5
1.69

88
2.5

40
0.1

0
2.00

00
0.9

94
1.0

88
0.9

-8
Class

60
1.0

00
0.1

70
0.7

70
7.3

0
63.7

0
23.0

5
8.20

59
7.6

0
36.0

0
26.8

7
6.75

55
1.0

59
1.5

0
50.0

98
0.7

00
0.5

01
0.2

-4
Class

80
0.3

00
0.1

40
0.8

30
7.1

40
30.7

40
10.5

1
3.92

66
3.0

01
8.00

88
8.24

4
3.19

32
1.3

99
0.6

00
8.00

77
1.0

51
0.6

87
0.6

-1

30

60

60

90

20

60

00

84

76

00

66

44

iece

24
25
26
27
28
29
30
31
32
33

Class

0.2

0.2

0.9

6.7

23.0

7.85

4.88

1.7

4.00

7.41

2.52

2.0

1.0

6.00

0.8

0.6

0.9

-3
Class

30
1.6

60
0.0

00
0.6

30
7.6

80
88.2

0
31.2

1
11.2

75
2.7

0
21.7

4
21.3

3
5.05

31
3.8

94
1.6

0
32.7

33
0.9

25
0.7

31
0.9

-6
Class

00
0.7

50
0.0

60
0.7

50
7.4

90
52.0

80
18.9

55
1.15

44
1.1

5
1.00

03
0.00

7
1.12

18
1.0

61
0.0

5
1.00

14
1.0

48
1.0

18
0.0

-2
Class

50
0.9

80
0.0

70
0.7

30
7.4

80
58.5

90
21.2

9
6.36

12
6.1

0
33.7

0
19.2

8
5.92

51
1.0

00
0.8

0
39.7

00
0.8

00
0.6

00
0.1

-7
Class

30
0.0

90
0.6

60
0.9

40
5.6

80
5.94

10
2.14

2
2.33

92
1.1

50
2.00

27
2.00

7
1.66

47
2.5

72
0.1

50
2.00

85
0.9

63
1.0

42
0.8

-8
Class

40
0.2

20
0.3

80
0.9

90
6.4

0
18.6

0
6.43

3
4.55

57
1.2

0
4.00

0
6.00

2
2.22

47
4.0

59
0.7

0
4.00

98
1.0

00
1.0

99
0.9

-3
Class

10
0.0

40
0.5

10
0.9

80
5.7

80
7.21

0
2.64

5
2.34

47
1.1

0
2.00

0
2.00

8
1.58

00
2.1

17
0.1

0
3.00

18
1.0

00
1.0

66
0.8

-8
Class

60
0.0

50
0.4

70
0.9

90
5.9

0
5.79

0
2.08

7
2.30

55
1.1

0
2.00

0
2.00

8
1.50

97
2.0

59
0.1

0
3.00

00
1.0

00
1.0

97
0.8

-8
Class

50
0.1

90
0.2

70
0.9

40
6.8

0
13.3

0
4.68

4
3.58

49
2.2

0
5.00

0
5.21

5
2.22

91
5.0

59
0.4

0
4.00

00
1.0

00
0.8

66
0.7

-3
Class

30
0.1

50
0.3

40
0.9

20
6.6

90
12.1

0
4.16

7
2.31

05
1.1

0
3.00

8
3.00

8
1.62

00
2.0

34
0.2

0
3.00

00
1.0

21
1.0

66
0.8

-8

10

30

50

50

30

44

47

39

00

00

18

Table 4: Database for Testing Surface Defect Models


Pre-

Image Features (Extracted through Computer Vision-Based Image Processing)


Shape Features

Statistical Features

Defined
Class of
Defect

lmaj

lmin

DEqv

Aconvex

Ex

Class-6
Class-6
Class-7
Class-6

1.320
1.360
1.320
1.590

0.060
0.060
0.060
0.050

0.680
0.680
0.690
0.670

7.540
7.540
7.530
7.630

78.350
78.530
77.800
84.940

27.770
28.050
27.740
30.630

11.214
11.906
7.325
11.222

3.228
4.524
6.225
3.220

26.000
29.000
37.647
25.000

24.218
24.502
19.514
24.255

7.205
5.074
7.987
7.200

5.228
3.218
1.000
5.211

1.206
1.644
0.811
1.228

34.000
33.000
44.724
35.000

0.828
0.888
0.885
0.828

0.621
0.634
0.619
0.630

Class-2
Class-4
Class-2
Class-2
Class-6
Class-4
Class-1
Class-1
Class-6
Class-1
Class-7
Class-6
Class-1
Class-5
Class-3
Class-8
Class-5
Class-3
Class-3
Class-5
Class-8
Class-3
Class-3
Class-8
Class-5
Class-3
Class-3
Class-5
Class-5

0.490
1.070
0.680
0.670
1.560
1.130
0.420
0.350
1.230
0.380
1.410
1.510
0.350
1.190
0.130
0.120
1.180
0.170
0.240
1.250
0.090
0.250
0.270
0.100
1.260
0.230
0.160
1.510
1.510

0.140
0.090
0.120
0.150
0.050
0.070
0.140
0.170
0.070
0.180
0.050
0.050
0.190
0.070
0.290
0.320
0.070
0.300
0.290
0.090
0.380
0.320
0.290
0.460
0.080
0.290
0.280
0.060
0.060

0.820
0.730
0.800
0.790
0.660
0.710
0.850
0.850
0.690
0.840
0.680
0.670
0.860
0.700
0.940
0.940
0.690
0.920
0.890
0.700
0.960
0.900
0.890
0.950
0.700
0.900
0.930
0.670
0.680

7.120
7.400
7.370
7.130
7.570
7.460
7.320
7.010
7.460
6.930
7.600
7.560
6.860
7.470
6.880
6.820
7.400
6.620
6.550
7.290
6.090
6.530
6.560
5.900
7.370
6.440
6.880
7.620
7.610

40.200
66.400
47.030
45.440
85.820
68.290
34.690
33.460
75.080
35.040
79.360
84.220
29.780
74.910
15.160
12.870
73.060
15.900
24.540
73.540
8.760
22.530
22.880
7.690
75.020
21.210
16.840
82.270
81.650

13.790
23.670
16.990
17.270
30.730
24.550
12.300
11.460
26.600
11.970
28.710
30.100
10.430
26.270
5.490
4.560
25.990
5.420
8.370
26.330
3.170
7.760
8.140
2.710
26.690
7.230
5.750
29.650
29.430

1.154
8.115
1.169
1.157
11.245
8.126
3.913
3.937
11.115
3.900
6.352
11.501
3.910
15.543
3.246
2.321
15.567
3.184
3.270
15.53
2.294
3.219
3.233
2.308
15.54
3.243
3.165
15.516
15.481

1.154
7.954
1.158
1.111
3.206
7.924
2.988
3.012
3.145
2.975
6.184
3.195
2.985
5.245
2.099
1.145
5.269
2.037
2.123
5.232
1.118
2.072
2.086
1.132
5.242
2.096
2.018
5.218
5.183

1.000
35.000
1.035
1.000
26.000
35.000
7.988
8.012
23.000
7.975
33.751
26.020
7.985
71.988
4.996
1.988
72.012
4.934
5.02
71.975
1.961
4.969
4.983
1.975
71.985
4.993
4.915
71.961
71.926

0.000
25.924
1.010
0.000
24.278
25.990
8.230
8.254
24.286
8.217
19.234
24.227
8.227
54.216
5.353
1.988
54.24
5.291
5.377
54.203
1.961
5.326
5.340
1.975
54.213
5.350
5.272
54.189
54.154

1.128
6.890
1.132
1.125
7.209
6.845
3.179
3.203
7.001
3.166
5.910
7.227
3.176
10.206
2.491
1.65
10.23
2.429
2.515
10.193
1.623
2.464
2.478
1.637
10.203
2.488
2.410
10.179
10.144

1.051
1.151
1.044
1.049
5.254
1.119
1.372
1.396
5.201
1.359
1.055
5.208
1.369
3.876
4.113
2.535
3.900
4.051
4.137
3.863
2.508
4.086
4.100
2.522
3.873
4.110
4.032
3.849
3.814

0.000
1.511
0.080
0.000
1.228
1.547
0.664
0.688
1.206
0.651
0.869
1.224
0.661
3.24
0.446
0.147
3.264
0.384
0.470
3.227
0.12
0.419
0.433
0.134
3.237
0.443
0.365
3.213
3.178

1.000
52.000
1.000
1.000
34.000
55.003
7.988
8.012
33.000
7.975
39.747
36.000
7.985
110.988
4.988
1.988
111.012
4.926
5.012
110.975
1.961
4.961
4.975
1.975
110.985
4.985
4.907
110.961
110.926

1.000
0.796
1.000
1.000
0.888
0.800
0.988
1.012
0.834
0.975
0.810
0.830
0.985
0.894
0.975
0.986
0.918
0.913
0.999
0.881
0.959
0.948
0.962
0.973
0.891
0.972
0.894
0.867
0.832

1.000
0.450
1.000
1.000
0.657
0.496
0.654
0.678
0.644
0.641
0.647
0.630
0.651
0.41
0.876
0.988
0.434
0.814
0.900
0.397
0.961
0.849
0.863
0.975
0.407
0.873
0.795
0.383
0.348

5. Results and Discussions

Table 5: Results of Testing ANN Model No.1


(ANN Model utilizing Image Statistical Features)

Class of Defect (as

Number of Workpieces Classified to each Class of Defect

per Table 4) the

(Predicted by the ANN Model)

Inspected
Workpieces
actually belong to
Class-1
Class-2
Class-3
Class-4
Class-5
Class-6
Class-7
Class-8

Class-1

Class-2

Class-3

Class-4

Class-5

Class-6

Class-7

Class-8

2
2
0
0
0
0
0
0

2
1
0
0
0
0
0
0

0
0
4
0
0
0
1
1

0
0
0
1
0
0
0
0

0
0
0
0
1
3
0
0

0
0
0
0
5
3
0
0

0
0
3
1
0
0
1
0

0
0
0
0
0
0
0
2

Total

% of

Number of

Workpieces

Workpieces

Correctly

Inspected

Classified

4
3
7
2
6
6
2
3

50.0%
33.3%
57.1%
50.0%
16.7%
50.0%
50.0%
66.7%

Total Number of Workpieces Inspected = 33, and Number of Workpieces Correctly Classified = 15

70.00%
60.00%
50.00%
40.00%
30.00%
20.00%
10.00%
0.00%

Table 6: Results of Testing ANN Model No.2


(ANN Model utilizing Image Shape Features)

Class of Defect (as

Number of Workpieces Classified to each Class of Defect

per Table 6.3) the

(Predicted by the ANN Model)

Inspected
Workpieces
actually belong to
Class-1
Class-2
Class-3
Class-4
Class-5
Class-6
Class-7
Class-8

Class-1

Class-2

Class-3

Class-4

Class-5

Class-6

Class-7

Class-8

3
1
0
0
0
0
0
0

1
2
0
0
0
0
0
0

0
0
6
0
0
0
1
0

0
0
0
1
0
0
0
0

0
0
0
0
3
3
0
0

0
0
0
0
3
3
0
0

0
0
1
1
0
0
1
0

0
0
0
0
0
0
0
3

Total

% of

Number of

Workpieces

Workpieces

Correctly

Inspected

Classified

4
3
7
2
6
6
2
3

75.0%
66.7%
85.7%
50.0%
50.0%
50.0%
50.0%
100.0%

Total Number of Workpieces Inspected = 33, and Number of Workpieces Correctly Classified = 22

100.00%
90.00%
80.00%
70.00%
60.00%
50.00%
40.00%
30.00%
20.00%
10.00%
0.00%

Table 7: Results of Testing ANN Model No.3


(ANN Model utilizing Combination of Image Statistical and Shape Features)

Class of Defect (as

Number of Workpieces Classified to each Class of Defect

per Table 6.3) the

(Predicted by the ANN Model)

Inspected
Workpieces
actually belong to
Class-1
Class-2
Class-3
Class-4
Class-5
Class-6
Class-7
Class-8

Class-1

Class-2

Class-3

Class-4

Class-5

Class-6

Class-7

Class-8

2
0
0
0
0
0
0
0

2
3
0
0
0
0
0
0

0
0
5
0
0
0
1
0

0
0
0
2
0
0
0
0

0
0
0
0
5
0
0
0

0
0
0
0
1
6
0
0

0
0
2
0
0
0
1
0

0
0
0
0
0
0
0
3

Total

% of

Number of

Workpieces

Workpieces

Correctly

Inspected

Classified

4
3
7
2
6
6
2
3

50.0%
100.0%
71.4%
100.0%
83.3%
100.0%
50.0%
100.0%

Total Number of Workpieces Inspected = 33, and Number of Workpieces Correctly Classified = 27

100.00%
90.00%
80.00%
70.00%
60.00%
50.00%
40.00%
30.00%
20.00%
10.00%
0.00%

Table 8: Accuracy of Prediction (Classification) for ANN Models of Surface Defects

Accuracy of
Prediction of Surface
Model Inputs

Total Number of

Number of

Defects

(Image Features utilized by the ANN

Workpieces

Workpieces Correctly

(% of Total Number

Model for Prediction of Surface Defects)

Inspected

Classified

of Workpieces
Correctly Classified)

Image Statistical Features only


Image Shape Features only

Combination of Image Statistical and


Shape Features

33
33

15
22

45.5%
63.6%

33

27

81.8%

90.00%
80.00%
70.00%
60.00%
50.00%
40.00%
30.00%
20.00%
10.00%
0.00%

As mentioned, the following combinations of image features are used in the research work for noncontact prediction of the surface defects for all the six types of inspection problems:
(i)

Combination formed by image statistical features viz., contrast (C), energy (E),
homogeneity (H), entropy (Q), range (R), and standard deviation (S).

(ii)

Combination formed by image shape features viz., major axis length (lmaj), minor axis
length (lmin), area (A), perimeter (P), equivalent diameter (D Eqv), elongation (e),
compactness (c), convex area (Aconvex), solidity (s), extent (Ex), and eccentricity (Ec).

(iii)

Combination formed by all the image features mentioned in (i) and (ii) above.

From Table 8, it is observed that the best level of accuracy of non-contact prediction of the surface
defects is achieved with the combination mentioned in (iii) above. The discussions carried out in this
section are indicative of the fact that a combination of image statistical features and image shape
features, as mentioned, has the capability of representing a wide variety of surface textures and thus
may be effectively used in computer vision-based automated non-contact inspection of surface defects
for a wide variety of inspection problems as mentioned even if multiple types of defects are present
on the surface of the workpiece being inspected.

w211
w212
w221

v311
b21

w222

v312

1st type of surface defect

v31y

w226

.
w216

w2y1

b22

b31
2nd type of surface defect

w2y2
3

b 2

w y6

Input layer

b2y
Hidden/Inter
-mediate
layer

mth type of surface defect

v3my
b3m

Output layer
The superscript of each term does not denote the power of that term but denotes the layer number of the ANN the concerned term belongs to

6 Conclusions
This section concerns with modelling of surface defects from the perspective of developing an
effective means of predicting surface defects utilizing image features extracted from the images of the

parts under inspection. In this context, several predictive models, based on artificial neural network
(ANN), are developed for prediction of surface defects for each of the six different types of inspection
problems considered in the research work. Results obtained from modelling of surface defects lead to
exploration of the potential of three different combinations of image features as tools for non-contact
prediction of surface defects. Comparison carried out between the ANN models reveals some
interesting information related to automated non-contact inspection of surface defects. Using this
information, this section proposes a computer vision-based inspection approach with which
considerably high level of accuracy of prediction may be achieved in automated non-contact
inspection of surface defects irrespective of the shape and size of the part or component being
inspected, the manufacturing or machining operations used, and the types and numbers of defects
present on the surface of the concerned part. The proposed approach accomplishes non-contact
inspection of surface defects by making use of an ANN model that utilizes a combination of various
image statistical features, such as contrast, energy, homogeneity, entropy, range, and standard
deviation, and image shape features, such as major axis length, minor axis length, area, perimeter,
equivalent diameter, elongation, compactness, convex area, solidity, extent, and eccentricity, for
prediction of surface defects.
As has been observed from the review of literature, there is an absence of a surface texture
representation method (in the form of a combination of image features) which is adequately suitable
for a variety of surface textures pertaining to different types of surface defect inspection problems. In
this context, it is worth mentioning that the ANN model-based approach proposed in this section may
be very useful in eliminating the time-consuming experimentations involved in developing an
appropriate surface texture representation method for a particular type of inspection problem because
it seems that an acceptable level of accuracy of non-contact detection and classification of surface
defects may be achieved with the proposed ANN model-based approach irrespective of the type of
inspection problem under consideration.

Demo Program:
#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
float c=5.0,sq=10.0,sc=5.0;
void Circle(void);
void Square(void);
void Semicircle(void);
clrscr();
printf("Enter the Radius of the Circle: ");
scanf("%f",&c);
printf("Enter the length of the sides of the square: ");
scanf("%f",&sq);
printf("Enter the Radius of the Semi-Circle: ");
scanf("%f",&sc);
if(c!=5)
{ Circle();
}
else
{ printf("The workpiece is perfect");
}
if(sq!=10)
{ Square();
}
else
{ printf("The workpiece is perfect");
}
if(sc!=5)
{ Semicircle();
}
else
{ printf("The workpiece is perfect");
}
if(c!=5 && sq!=10)
{
Circle();
Square();
}
else
{
printf("The workpiece is perfect");
}
if(c!=5 && sc!=5)
{
Circle();
Semicircle();
}
else
{
printf("The workpiece is perfect");
}
if(sq!=0 && sc!=5)
{
Square();
Semicircle();
}
else

{
printf("The workpiece is perfect");
}
getch();
}
void Circle(void)
{
printf("The workpiece is rejected because the radius is incorrect!!");
}
void Square(void)
{
printf("The workpiece is rejected because the length of the sides are incorrect!!");
}
void Semicircle(void)
{
printf("The workpiece is rejected because the radius is incorrect!!");
}

Bibliography:

1. Introduction to Neural Networks Using Matlab 6.0


by S. N. Sivanandam, S. Sumathy, S. N. Deepa

2. Total Quality Management


by Subburaj Ramasamy

3. Engineering Metrology
by R. K. Jain

4. Total Quality Management


by Besterfield

5. ANSI C
by E. Balagurusamy

You might also like