Professional Documents
Culture Documents
Hydropower - Balkrishna Chaudhary - 41155
Hydropower - Balkrishna Chaudhary - 41155
School of Engineering
Department of Mechanical Engineering
Dhulikhel, Kavrepalanchok
Tutorial 02
Submitted to
Dr. Ranjit Shrestha
Department of Mechanical Engineering
Kathmandu University
Submitted by
Balkrishna Chaudhary
Exam Roll No.: 41155
Mechanical Engineering (Hydropower)
A square shaped sample of austenitic stainless steel (SUS 316) plate has been taken to simulate
the defects. The plate consists of flat bottom holes where defect mean is to calculate and Signal to
noise ratio (SNR) is to be computed with respected to sound area. The dimension of plate is 180mm
× 180mm and thickness of 10mm. Artificial FBHs of different sizes at varying depth levels were
milled at the rear surface to evaluate the detection capability of the proposed technique. The FBHs
in each column represents the defects with a constant diameter, but of different depth from
uppermost to lowermost row.
The flat bottom holes in figure 1 are defined in a way that ‘A’, ‘B’, ‘C’, and ‘D’ represent defects
along the horizontal rows and have different defect diameters. Similarly, ‘1’, ‘2’, ‘3’, and ‘4’
represent the defect size along with vertical columns and have different depths.
The binary images S1, S2, S3 and S4 is loaded and the images are defined with the name of X1,
X2, X3 and X4 respectively. The images are cropped into the size of [97 15 459 459] defining
with name Y1, Y2, Y3 and Y4 respectively. S3 and S4 are subtracted from S1 and S2 respectively.
The two subtracted value are assigned as I and J. I was divided by J and the result is defined by K.
The phase is calculated using equation(𝑝ℎ𝑖 = 𝑡𝑎𝑛−1 𝑘). The image of phase is then computed to
calculate SNR of defects. The matlab command done to calculate phase is given below:
The phase of combined image is computed is extracted and the defects on sample are seen. The
region of interest of defect and sound area are selected to find SRN of each defect.
Roipoly has been used to select the polygon of region of interest with in image. Roipoly returns a
binary image that we can use as a mask for masked filtering. BW = roipoly (phi, defx, defy) returns
the region of interest selected by the polygon described by vectors defx and defy. The matlab
command on futher procedure to calculated SNR1 is:
The matlab codes mentioned above have calculated the SNR value of A1 region. SNR of other
defect regions have also been calculated using similar process and codes. The average sound mean
at ROI of center [230, 230] calculated is -1.1185. The standard deviation calculated is 0.0217.
The values calculated in other defect regions of interest while computing with single sound region
have been tabulated below:
The codes used in matlab to find out SRN values of all defects have been mentioned below:
>> Y1=imcrop(X1,[97 15 459 459]); (crop the image X1 into size of [97 15 459 459])
>> X2=S2;
>> imagesc(Y2),colorbar
>> load('S3.mat')
>> X3=S3;
>> imagesc(Y3),colorbar
>> load('S4.mat')
>> X4=S4;
>> imagesc(Y4),colorbar
>> DBW=roipoly(phi,defx,defy); (ROI selected by the polygon with vectors defx and defy)
dmean =
-0.6436
>> soundx=[225 225 235 235]; (Define x components of ROI of sound area)
>> soundy=[225 235 235 225]; (Define x components of ROI of sound area)
>> SBW=roipoly(phi,soundx,soundy);
smean =
-1.1185
ABS =
0.4750
sigma =
0.0217
>> DIV=ABS/sigma (Dividing Absoulte value with standard deviation)
DIV =
21.8548
SNR1 =
26.7910
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-0.9687
>> ABS=abs(dmean-smean)
ABS =
0.1498
>> DIV=ABS/sigma
DIV =
6.8944
SNR3 =
16.7699
>> defx=[65 65 75 75];
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-0.8188
>> ABS=abs(dmean-smean)
ABS =
0.2998
>> DIV=ABS/sigma
DIV =
13.7931
SNR4 =
22.7932
>> imagesc(phi),colorbar
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-0.9930
>> ABS=abs(dmean-smean)
ABS =
0.1256
>> DIV=ABS/sigma
DIV =
5.7777
SNR5 =
15.2350
>> imagesc(phi),colorbar
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-1.0731
>> ABS=abs(dmean-smean)
ABS =
0.0455
>> DIV=ABS/sigma
DIV =
2.0929
SNR6 =
6.4151
>> imagesc(phi),colorbar
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-1.0258
>> ABS=abs(dmean-smean)
ABS =
0.0927
>> DIV=ABS/sigma
DIV =
4.2657
SNR7 =
12.5998
>> imagesc(phi),colorbar
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-0.8091
>> ABS=abs(dmean-smean)
ABS =
0.3094
>> DIV=ABS/sigma
DIV =
14.2373
SNR8 =
23.0685
>> imagesc(phi),colorbar
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-1.0106
>> ABS=abs(dmean-smean)
ABS =
0.1079
>> DIV=ABS/sigma
DIV =
4.9664
SNR9 =
13.9209
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-0.9020
>> ABS=abs(dmean-smean)
ABS =
0.2165
>> DIV=ABS/sigma
DIV =
9.9620
19.9669
>> imagesc(phi),colorbar
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-0.9174
>> ABS=abs(dmean-smean)
ABS =
0.2011
>> DIV=ABS/sigma
DIV =
9.2533
SNR11 =
19.3260
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-1.0745
>> ABS=abs(dmean-smean)
ABS =
0.0441
>> DIV=ABS/sigma
DIV =
2.0275
SNR12 =
6.1393
>> DBW=roipoly(phi,defx,defy);
>> DBW=roipoly(phi,defx,defy);
>> imshow(DBW);
>> dmean=mean(phi(DBW))
dmean =
-0.9781
>> ABS=abs(dmean-smean)
ABS =
0.1404
>> DIV=ABS/sigma
DIV =
6.4601
SNR13 = 16.2048
SNR values
30
25
20
SRN Values
15
10
0
0 1 2 3 4 5 6
depth of hole (mm)
The figure 3 has been extracted by computing the SRN values of A1, B1, C1 and D1 region. The
sizes of these holes are same but the depth of holes differ. The result of Figure 3 shows that SRN
value decreases with increase in depth of holes.