| Literature DB >> 34697303 |
Rohit Sharma1, Mahesh Kumar2, M S Alam2.
Abstract
The geometric and color features of agricultural material along with related physical properties are critical to characterize and express its physical quality. The experiments were conducted to classify the physical characteristics like size, shape, color and texture and then workout the relationship between manual observations and using image processing techniques for weight and volume of the four wheat refractions i.e. sound, damaged, shriveled and broken grains of wheat variety PBW 725. A flatbed scanner was used to acquire the images and digital image processing method was used to process the images and output of image analysis was compared with the actual measurements data using digital vernier caliper. A linear relationship was observed between the axial dimensions of refractions between manual measurement and image processing method with R2 in the range of 0.798-0.947. The individual kernel weight and thousand grain weight of the refractions were observed to be in the range of 0.021-0.045 and 12.56-46.32 g respectively. Another linear relationship was found between individual kernel weight and projected area estimated using image processing methodology with R2 in the range of 0.841-0.920. The sphericity of the refractions varied in the range of 0.52-0.71. Analyses of the captured images suggest ellipsoid shape with convex geometry while the same observation was recorded by physical measurements also. A linear relationship was observed between the volume of refractions derived from measured dimensions and calculated from image with R2 in the range of 0.845-0.945. Various color and grey level co-variance matrix texture features were extracted from acquired images using the open-source Python programming language and OpenCV library which can exploit different machine and deep learning algorithms to properly classify these refractions.Entities:
Mesh:
Year: 2021 PMID: 34697303 PMCID: PMC8546099 DOI: 10.1038/s41598-021-00081-4
Source DB: PubMed Journal: Sci Rep ISSN: 2045-2322 Impact factor: 4.379
Figure 1Flow diagram for features extraction from acquired images.
List of size and shape features extracted from images using OpenCV library function.
| Extracted feature | Function used[ |
|---|---|
| Minimum bounding rectangle | cv2.boundingRect(cnt) |
| Area (A) | cv2.contourArea |
| Perimeter (P) | cv2.arcLength(cnt, True) |
| Solidity | cv2.contourArea/float(hull_area) |
| Eccentricity, minor diameter (m), major diameter (M) | cv2.fitEllipse(cnt) |
Figure 2Flow diagram for features extraction from acquired images.
Figure 3Segmented images of wheat refractions (a) sound grains, (b) damaged grains, (c) shriveled grains, (d) broken grains.
Size and shape derived features from image analysis.
| Derived feature | Equation used[ |
|---|---|
| Boundary rectangle fill (extent) | |
| Bounding rectangle to perimeter | |
| Equivalent diameter (Feret diameter) | |
| Circulation factor | P/ |
| Elongation | |
| Aspect ratio | L/B |
| Ratio of surface area to cubic volume | A/M3 |
Color features extracted from image analysis.
| Feature extracted | Function used[ |
|---|---|
| Mean red, mean green and mean blue channels | np.array(cv2.mean()) |
| Normalized red–green differential index ( | |
| Normalized red–blue differential index ( | |
| Normalized green–blue differential index ( | |
| Hue, saturation and value (HSV) | cv2.cvtColor(bgr image, cv2.COLOR_BGR2HSV) |
| GLCM texture features | greycomatrix() and greycoprops() |
The cv2.mean function returns the mean red(R), green(G), blue(B) channel in BGR format. All three mean colors are retrieved by converting function values into using numpy array function(np.array). HSV values were obtained from BGR image by using cv2.cvtColor() function. The six GLCM texture features were obtained using functions greycomatrix() and greycoprops() from skimage library.
GLCM Texture features extracted from image analysis.
| Feature extracted | Function used |
|---|---|
| Contrast | |
| Dissimilarity | |
| Homogeneity | |
| Angular second moment (ASM) | |
| Energy | |
| Correlation |
Where P[i,j,d,theta] is an 4-D ndarray grey level co-occurence matrix and represents a histogram of co-occuring greyscale values at a given offset over an image. The P value represents a matrix with value number of times that grey-level j occurs at a distance d and at an angle theta from grey-level i.
The syntax for function greycomatrix, P[i,j,d,theta] is given below. The default values were used for these parameters.
P[i,j,d,theta] = skimage.feature.texture.greycomatrix(image, distances, angles, levels = 256, symmetric = false, normed = false).
Axial dimensions of different grain fractions of selected wheat variety (n = 100).
| Characteristics | Sound grain | Damaged grain | Shriveled grain | Broken grain |
|---|---|---|---|---|
| Avg. length (Lavg), mm | 6.2 ± 0.65 | 5.82 ± 2.04 | 5.62 ± 1.15 | 4.91 ± 2.45 |
| Avg. width (Wavg), mm | 3.43 ± 0.43 | 3.04 ± 1.58 | 2.47 ± 1.07 | 3.16 ± 1.21 |
| Avg. thickness (Tavg), mm | 2.87 ± 0.41 | 2.57 ± 1.5 | 2.24 ± 0.8 | 2.59 ± 0.94 |
| Geometrical mean (Dg), mm | 3.94 ± 0.43 | 3.56 ± 1.57 | 3.24 ± 0.95 | 3.4 ± 1.03 |
| Arithmetic mean (Da), mm | 4.17 ± 0.42 | 3.81 ± 1.54 | 3.64 ± 0.88 | 3.55 ± 1.05 |
| Lateral geometric mean (Dl), mm | 3.14 ± 0.4 | 2.79 ± 1.51 | 2.35 ± 0.86 | 2.86 ± 1.03 |
| Lavg/Wavg (aspect ratio) | 1.81 ± 0.28 | 1.97 ± 1.47 | 2.56 ± 0.74 | 1.58 ± 1.41 |
| Lavg/Tavg (ellipsoid ratio) | 2.16 ± 0.31 | 2.36 ± 2.12 | 2.79 ± 0.84 | 1.94 ± 1.96 |
| Lavg/Dg | 1.58 ± 0.17 | 1.66 ± 0.83 | 1.92 ± 0.34 | 1.44 ± 0.82 |
| Wavg/Tavg (ellipsoid ratio) | 1.2 ± 0.15 | 1.2 ± 0.65 | 1.1 ± 0.48 | 1.23 ± 0.17 |
Physical characteristics of different grain fractions of selected wheat variety (n = 100).
| Characteristics | Sound grain | Damaged grain | Shriveled grain | Broken grain |
|---|---|---|---|---|
| Sphericity | 0.64 ± 0.08 | 0.61 ± 0.21 | 0.52 ± 0.11 | 0.71 ± 0.27 |
| Roundness ratio | 1.98 ± 0.3 | 2.15 ± 1.77 | 2.67 ± 0.69 | 1.75 ± 1.66 |
| Individual kernel weight (g) | 0.045 ± 0.01 | 0.036 ± 0.03 | 0.022 ± 0.03 | 0.021 ± 0.03 |
| Surface area of prolate spheroid (Sp), mm2 | 232.54 ± 47.7 | 194.06 ± 119.23 | 161.6 ± 96.65 | 175.3 ± 104.98 |
| Surface area of oblate spheroid (So), mm2 | 348.83 ± 69.23 | 302.99 ± 177.18 | 311.36 ± 122.03 | 240.58 ± 178.82 |
| Volume of prolate spheroid (Vp), mm3 | 307.67 ± 91.19 | 236.86 ± 192.02 | 163.46 ± 180.38 | 210.19 ± 201 |
| Volume of oblate spheroid (Vo), mm3 | 555.28 ± 157.59 | 445.27 ± 327.91 | 407.56 ± 316.64 | 334.7 ± 390.7 |
| Volume of ellipsoid (Ve), mm3 | 256.64 ± 75.89 | 200.58 ± 167.36 | 146.83 ± 161.51 | 171.85 ± 172.82 |
| Thousand grain weight (g) | 46.32 | 35.64 | 23.9 | 12.56 |
Figure 4Relationship between the length of refractions measured with caliper and the calculated from image.
Figure 5Relationship between the width of refractions measured with caliper and the calculated from image.
Size and shape parameters derived from image to express the shape of selected wheat refractions.
| Characteristics | Sound grain | Damaged grain | Shriveled grain | Broken grain |
|---|---|---|---|---|
| Area (px2) | 989.3 ± 223.8 | 1001.29 ± 369.21 | 756.86 ± 453.15 | 729.78 ± 498.22 |
| Perimeter (px2) | 129.43 ± 14.66 | 131.4 ± 38.68 | 118.36 ± 26.21 | 108.59 ± 38.55 |
| Solidity | 0.98 ± 0.02 | 0.97 ± 0.08 | 0.97 ± 0.04 | 0.96 ± 0.06 |
| Major diameter (px2) | 52.24 ± 6.27 | 51.53 ± 13.29 | 49.88 ± 8.86 | 38.63 ± 20.39 |
| Minor diameter (px2) | 24.41 ± 3.59 | 25.1 ± 7.01 | 19.58 ± 8.25 | 25.04 ± 8.58 |
| Boundary rectangle fill | 0.78 ± 0.12 | 0.74 ± 0.12 | 0.74 ± 0.11 | 0.73 ± 0.15 |
| Bounding rectangle to perimeter | 0.86 ± 0.04 | 0.86 ± 0.24 | 0.87 ± 0.04 | 0.85 ± 0.07 |
| Feret diameter | 35.46 ± 4.24 | 35.58 ± 7.01 | 30.88 ± 8.37 | 30.23 ± 9.59 |
| Circulation factor | 41.2 ± 4.67 | 41.83 ± 12.31 | 37.68 ± 8.34 | 34.57 ± 12.27 |
| Compactness | 0.74 ± 0.05 | 0.73 ± 0.32 | 0.67 ± 0.11 | 0.77 ± 0.23 |
| Elongation | 0.36 ± 0.07 | 0.34 ± 0.14 | 0.44 ± 0.13 | 0.2 ± 0.28 |
| Aspect ratio | 1.94 ± 1.29 | 1.8 ± 0.91 | 2.18 ± 0.71 | 1.33 ± 1.29 |
| Ratio of surface area to cubic volume | 0.007 ± 0 | 0.007 ± 0 | 0.006 ± 0 | 0.014 ± 0.02 |
| MBR fill | 0.77 ± 0.12 | 0.74 ± 0.12 | 0.74 ± 0.11 | 0.74 ± 0.15 |
Figure 6Relationship between the individual kernel weight of refractions measured with weighing balance and the calculated from image.
Figure 7Relationship between the volume of refractions derived from measured dimensions and the calculated from image.
Color and texture parameters derived from image of selected wheat refractions.
| Characteristics | Sound grain | Damaged grain | Shriveled grain | Broken grain |
|---|---|---|---|---|
| RHSCC closest color code | 148A | 165A | 199B | N199A |
| Mean red | 119.79 ± 18.79 | 114.59 ± 44.59 | 141.15 ± 22.85 | 101.96 ± 22.96 |
| Mean green | 104.98 ± 16.98 | 91.82 ± 37.82 | 117.19 ± 17.81 | 83.27 ± 19.73 |
| Mean blue | 69.62 ± 12.62 | 66.53 ± 43.47 | 90.26 ± 13.74 | 56.96 ± 21.04 |
| NDIrg | 0.07 ± 0.01 | 0.11 ± 0.05 | 0.09 ± 0.02 | 0.1 ± 0.03 |
| NDIrb | 0.27 ± 0.04 | 0.27 ± 0.14 | 0.22 ± 0.05 | 0.28 ± 0.08 |
| NDIgb | 0.2 ± 0.03 | 0.17 ± 0.09 | 0.13 ± 0.04 | 0.19 ± 0.05 |
| Value (lightness) | 116.15 ± 17.14 | 111.72 ± 41.03 | 139.47 ± 18.52 | 96.2 ± 18.77 |
| Saturation | 103.97 ± 11.98 | 103.03 ± 40.47 | 91.11 ± 17.04 | 99.75 ± 16.64 |
| Hue | 29.23 ± 6.6 | 30.73 ± 12.71 | 31.9 ± 11.9 | 33.34 ± 10.47 |
| Contrast | 1166.83 ± 608.2 | 1550.96 ± 1602.6 | 1606.83 ± 1071.4 | 2269.7 ± 1912.5 |
| Dissimilarity | 21.05 ± 8.59 | 25.91 ± 12.42 | 25.72 ± 8.65 | 31.61 ± 13.92 |
| Homogeneity | 0.09 ± 0.04 | 0.07 ± 0.04 | 0.07 ± 0.05 | 0.08 ± 0.05 |
| Angular second moment | 0.001 | 0.001 | 0.001 | 0.001 |
| Energy | 0.03 ± 0 | 0.03 ± 0.01 | 0.03 ± 0.01 | 0.04 ± 0.05 |
| Correlation | 0.56 ± 0.14 | 0.62 ± 0.28 | 0.65 ± 0.17 | 0.49 ± 0.43 |