A Method for Measuring Shaft Diameter Based on Light Stripe Image Enhancement
Abstract
:1. Introduction
2. Methods
2.1. Visual System Calibration
2.1.1. The Camera-Based Imaging System
2.1.2. Planar Calibration
2.2. Image Enhancement
- (1)
- Two structured light images with different exposure times were taken as shown in Figure 4. The lower exposure time ensures that there are no specular highlights or secondary reflections in the center of the image. The goal is to avoid overexposure and capture the details in the central region. On the other hand, higher exposure time ensures that the light patterns on both sides are bright and well-defined.
- (2)
- Extract the center points of the light patterns from the image captured with the lower exposure time. If the center points at the ends of the light patterns are sparse, interpolation methods should be used to fill in the gaps and ensure continuity of the center points. Let the coordinate values of three adjacent points in the extracted center points be . If the condition is satisfied, then insert a new center point between them. This interpolation can be accomplished using the following formula:
- (3)
- To assign weights to each pixel in the image, generate a weight map. This weight map assigns lower weights to points farther away from the center of the light pattern and greater weights to points closer to the center. The center points that were extracted and interpolated from the image captured with the low exposure time are denoted as , and the coordinates of each pixel in the image are represented by . The shortest distance between a pixel point and all the center points is calculated as follows:
- (4)
- To obtain the enhanced image, multiply the weight map by the high-exposure image. Let the grayscale value of pixel j in the high-exposure image be . The adjusted grayscale value of pixel j in the enhanced image, denoted as , can be calculated using the following formula:
2.3. Shaft Diameter Measurement
3. Experiments and Results
3.1. Camera Calibration
3.2. The Calibration of the Light Plane
3.3. The Enhancement of the Structured Light Stripe Images
3.4. The Measurement Results of the Shaft Diameter Ignoring Shape Errors
3.5. The Measurement Results of the Shaft Diameter with Shape Errors
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Li, W.; Li, F.; Jiang, Z.; Wang, H.; Huang, Y.; Liang, Q.; Huang, M.; Li, T.; Gao, X. A machine vision–based radial circular runout measurement method. Int. J. Adv. Manuf. Technol. 2023, 126, 3949–3958. [Google Scholar] [CrossRef]
- Miao, J.; Yuan, H.; Li, L.; Liu, S. Line Structured Light Vision Online Inspection of Automotive Shaft Parts. In Advances in Intelligent Systems and Computing; Springer: Berlin/Heidelberg, Germany, 2019; pp. 585–595. [Google Scholar]
- Bai, R.; Jiang, N.; Yu, L.; Zhao, J. Research on industrial online detection based on machine vision measurement system. In Journal of Physics: Conference Series; IOP Publishing: Bristol, UK, 2021. [Google Scholar]
- Chen, S.; Tao, W.; Zhao, H.; Lv, N. A Review: Application Research of Intelligent 3D Detection Technology Based on Linear-Structured Light. In Transactions on Intelligent Welding Manufacturing; Springer: Berlin/Heidelberg, Germany, 2021; pp. 35–45. [Google Scholar]
- Li, X.; Wang, S.; Xu, K. Automatic Measurement of External Thread at the End of Sucker Rod Based on Machine Vision. Sensors 2022, 22, 8276. [Google Scholar] [CrossRef] [PubMed]
- Fu, X.B.; Liu, B.; Zhang, Y.C. An optical non-contact measurement method for hot-state size of cylindrical shell forging. Meas. J. Int. Meas. Confed. 2012, 45, 1343–1349. [Google Scholar] [CrossRef]
- Gu, L.; Fei, Z.; Wang, W.; Wu, J.; Xu, X. High precision FPGA real-time linear structured light imaging system. In Proceedings of the SPIE—The International Society for Optical Engineering, Beijing, China, 23–25 July 2021. [Google Scholar]
- Bao, N.; Wu, Z.; Ran, X.; Wang, K.; Xue, Y. Research on machine vision size measurement method based on particle weight. In Proceedings of the 2017 IEEE 2nd Information Technology, Networking, Electronic and Automation Control Conference, ITNEC 2017, Chengdu, China, 15–17 December 2017; pp. 1498–1503. [Google Scholar]
- Ding, Y.; Zhang, X.; Kovacevic, R. A laser-based machine vision measurement system for laser forming. Meas. J. Int. Meas. Confed. 2016, 82, 345–354. [Google Scholar] [CrossRef]
- Hao, M.; Yu, H.; Li, D. The measurement of fish size by machine vision—A review. In IFIP Advances in Information and Communication Technology; Springer: Berlin/Heidelberg, Germany, 2016; pp. 15–32. [Google Scholar]
- Ji, T.; Zhao, Z.; Zhao, N. A Machine Vision Measurement Method for Large Plates Based on Reference Point Assistance. In Proceedings of the 2022 5th International Conference on Electronics and Electrical Engineering Technology, EEET 2022, Beijing, China, 2–4 December 2022; pp. 23–26. [Google Scholar]
- Fu, L.; Cheng, T. Research on 3-D contours measuring method with linear structured light and its development trend. Appl. Mech. Mater. 2011, 63–64, 390–394. [Google Scholar] [CrossRef]
- Zheng, Z.Y.; Yao, L.; Yao, T.T.; Ma, L.Z. Simple method for shape recovery based on linear structured light. Ruan Jian Xue Bao/J. Softw. 2006, 17, 176–183. [Google Scholar]
- Zhang, Z.; Wang, D.; Liu, N.; Feng, X.; Geng, N.; Hu, S. Research on 3D point cloud data acquisition technology based on linear structured light. In Proceedings of the 2019 NICOGRAPH International, NicoInt 2019, Shenzhen, China, 15–17 November 2019; pp. 1–4. [Google Scholar]
- Li, Q.; Wang, Z.; Li, Y. Linear structured light scanning for 3-D object modeling. In Proceedings of the SPIE—The International Society for Optical Engineering, Wuhan, China, 31 October–2 November 2005. [Google Scholar]
- Hao, F.; Shi, J.J.; Chen, D.L.; Wang, F.; Hu, Y.T. Shaft diameter measurement using digital image composition at two different object distances. In IOP Conference Series: Materials Science and Engineering; IOP Publishing: Bristol, UK, 2019. [Google Scholar]
- Li, X.; Xu, K.; Wang, S. Precision Measurement Method of Large Shaft Diameter Based on Dual Camera System. Sensors 2022, 22, 3982. [Google Scholar] [CrossRef]
- Zhang, Z. A flexible new technique for camera calibration. IEEE Trans. Pattern Anal. Mach. Intell. 2000, 22, 1330–1334. [Google Scholar] [CrossRef]
- Nogueira, V.V.E.; Barca, L.F.; Pimenta, T.C. A Cost-Effective Method for Automatically Measuring Mechanical Parts Using Monocular Machine Vision. Sensors 2023, 23, 5994. [Google Scholar] [CrossRef]
- Liu, S.; Tan, Q.; Zhang, Y. Shaft diameter measurement using structured light vision. Sensors 2015, 15, 19750–19767. [Google Scholar] [CrossRef]
- Wan, Z.R.; Lai, L.J.; Mao, J.; Zhu, L.M. Extraction and segmentation method of laser stripe in linear structured light scanner. Opt. Eng. 2021, 60, 046104. [Google Scholar] [CrossRef]
- Yang, H.; Wang, Z.; Yu, W.; Zhang, P. Center Extraction Algorithm of Linear Structured Light Stripe Based on Improved Gray Barycenter Method. In Proceedings of the 33rd Chinese Control and Decision Conference, CCDC 2021, Kunming, China, 22–24 May 2021; pp. 1783–1788. [Google Scholar]
- Dworkin, S.B.; Nye, T.J. Image processing for machine vision measurement of hot formed parts. J. Mater. Process. Technol. 2006, 174, 1–6. [Google Scholar] [CrossRef]
- Wang, Z.; Wu, C. On-machine measurement of metal parts based on machine vision. Appl. Mech. Mater. 2011, 66, 235–239. [Google Scholar] [CrossRef]
- Tian, Z.; Dai, N.; Cui, H.; Cheng, X. One method for geometric size measurement based on dual linear structured light. In Proceedings of the 2011 International Conference on Instrumentation, Measurement, Computer, Communication and Control, IMCCC 2011, Beijing, China, 21–23 October 2011; pp. 141–144. [Google Scholar]
- Li, Q.Q.; Wang, Z.; Li, Y.G. Measurement of multi-resolution modeling of 3D object using linear structured light projection. Acta Geod. Cartogr. Sin. 2006, 35, 371–378. [Google Scholar]
- Li, S.; Gao, X.; Wang, H.; Xie, Z. Monocular underwater measurement of structured light by scanning with vibrating mirrors. Opt. Lasers Eng. 2023, 169, 107738. [Google Scholar] [CrossRef]
- Qu, X.J.; Song, Y.W.; Wang, Y. 3D measurement method based on binocular vision and linear structured light. Adv. Mater. Res. 2012, 422, 17–23. [Google Scholar] [CrossRef]
- Xiao, Z.; Li, Y.; Lei, G.; Xi, J. Measurement of large steel plates based on linear scan structured light scanning. In Proceedings of the SPIE—The International Society for Optical Engineering, Beijing, China, 28–30 October 2018. [Google Scholar]
- Song, Z.; Yau, S.T. High dynamic range scanning technique. Opt. Eng. 2009, 48, 033604. [Google Scholar]
- Chen, C.; Gao, N.; Wang, X.; Zhang, Z. Adaptive projection intensity adjustment for avoiding saturation in three-dimensional shape measurement. Opt. Commun. 2018, 410, 694–702. [Google Scholar] [CrossRef]
- Lin, H.; Gao, J.; Mei, Q.; He, Y.; Liu, J.; Wang, X. Adaptive digital fringeprojection technique for high dynamic range three-dimensional shape measurement. Opt. Express 2016, 24, 7703–7718. [Google Scholar] [CrossRef]
- Feng, S.; Zhang, Y.; Chen, Q.; Zuo, C.; Li, R.; Shen, G. General solution for high dynamic range three-dimensional shape measurement using the fringe projection technique. Opt. Lasers Eng. 2014, 59, 56–71. [Google Scholar] [CrossRef]
- Kowarschik, R.M.; Kuehmstedt, P.; Gerber, J.; Schreiber, W.; Notni, G. Adaptive optical three-dimensional measurement with structured light. Opt. Eng. 2000, 39, 150–158. [Google Scholar]
- Li, C.; Xu, X.; Ren, Z.; Liu, S. Research on Calibration Method of Line-Structured Light Based on Multiple Geometric Constraints. Appl. Sci. 2023, 13, 5998. [Google Scholar] [CrossRef]
- Xie, K.; Liu, W.Y.; Pu, Z.B. The hybrid calibration of linear structured light system. In Proceedings of the 2006 IEEE International Conference on Automation Science and Engineering, CASE, Shanghai, China, 7–10 October 2006; pp. 611–614. [Google Scholar]
- Chen, R.; Huang, R.; Zhang, Z.; Shi, J.; Chen, Z. Distortion correction method based on mathematic model in machine vision measurement system. Jixie Gongcheng Xuebao/J. Mech. Eng. 2009, 45, 243–248. [Google Scholar] [CrossRef] [PubMed]
CCD camera | Model: MER-125-30UM | ||||
photosensitive unit | frame rate | resolution | size | image sensor | |
3.75 × 3.75 μm | 30 f/s | 1292 × 964 pixel | 29 × 29 × 29 mm | 1/3″grayscale | |
Optical lens | Model: Computar M2514-MP | ||||
aperture | interface | focal length | aperture ratio | working temperature | |
F1.4-F16C | C-type | 25 mm | 1:1.4 | −20–50 °C | |
Calibration board | Model: NANO CBC 75 mm-2.0 | ||||
shape | graphic accuracy | accuracy | Shape size | grid size | |
checkerboard | ±1.0 μm | Level 1 | 75 × 75 × 3.0 mm | 2.0 × 2.0 mm | |
Laser | Model: LH650-80-3 | ||||
size | color | wavelength | power | exit pupil diameter | |
ф 16 × 45 mm | red light | 650 nm | 0~20 mW | Ф 8 mm | |
Backlight | Model: CCS LFL-200 | ||||
color | installation size | power | external dimensions | light-emitting area | |
red | 200 × 212 mm | 12 V/10 W | 234 × 222 mm | 200 × 180 mm |
Camera Intrinsic Parameters | Distortion Coefficients | ||
---|---|---|---|
18,607.65 | k1 | −0.0085 | |
18,690.94 | k2 | 1.5291 | |
−42.20 | p1 | 0.0003 | |
3413.44 | p2 | 0.0004 | |
1587.62 | re | 0.005 |
1 | 2 | 3 | 4 | 5 | 6 | Mean Value | Root Mean Squared Error | |
---|---|---|---|---|---|---|---|---|
Low-exposure image | 39.801 | 39.780 | 39.922 | 39.896 | 39.792 | 39.806 | 39.8330 | 0.05497 |
absolute error | 0.071 | 0.083 | 0.068 | 0.032 | 0.053 | 0.055 | 0.06 | |
High-exposure image | 41.107 | 40.602 | 43.156 | 42.106 | 40.997 | 43.264 | 41.872 | 1.04920 |
absolute error | 1.253 | 1.748 | 3.302 | 2.252 | 1.143 | 3.41 | 2.185 | |
Processed image | 39.872 | 39.863 | 39.841 | 39.864 | 39.845 | 39.861 | 39.858 | 0.01098 |
absolute error | 0.018 | 0.009 | 0.013 | 0.010 | 0.009 | 0.007 | 0.011 | |
ground truth | 39.854 |
Camera Intrinsic Parameters | Distortion Coefficients | ||
---|---|---|---|
13,622.09 | k1 | −0.0651 | |
13,604.25 | k2 | 1.1355 | |
21.13 | p1 | 0.0011 | |
1879.12 | p2 | 0.0011 | |
1417.97 | re | 0.0576 |
Position1 | Position2 | Position3 | Mean | RMSE | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Angle 1 | Angle 2 | Angle 3 | Mean | Angle 1 | Angle 2 | Angle 3 | Mean | Angle 1 | Angle 2 | Angle 3 | Mean | ||||
shaft1 | Low-exposure | 40.031 | 40.062 | 40.043 | 40.0453 | 40.122 | 40.125 | 40.119 | 40.1220 | 40.113 | 40.196 | 40.098 | 40.1357 | 40.1010 | 0.0475 |
High-exposure | 41.045 | 41.067 | 41.030 | 41.0473 | 40.094 | 41.255 | 41.452 | 40.9337 | 42.003 | 41.762 | 41.411 | 41.7253 | 41.2354 | 0.5115 | |
Processed image | 40.064 | 40.072 | 40.059 | 40.0650 | 40.088 | 40.103 | 40.095 | 40.0953 | 40.092 | 40.096 | 40.089 | 40.0923 | 40.0842 | 0.0145 | |
Ground truth | 40.080 | ||||||||||||||
shaft2 | Low-exposure | 39.934 | 40.024 | 40.009 | 39.9890 | 40.020 | 40.017 | 39.982 | 40.0063 | 40.016 | 40.012 | 40.007 | 40.0117 | 40.0023 | 0.0267 |
High-exposure | 41.438 | 42.054 | 42.047 | 41.8463 | 40.099 | 41.768 | 41.574 | 41.1470 | 42.073 | 41.067 | 42.068 | 41.7360 | 41.5764 | 0.6179 | |
Processed image | 40.031 | 40.039 | 40.043 | 40.0377 | 40.058 | 40.066 | 40.059 | 40.0610 | 40.073 | 40.059 | 40.077 | 40.0697 | 40.0561 | 0.0147 | |
Ground truth | 40.050 |
Position 1 | Position 2 | Position 3 | Mean | RMSE | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Angle 1 | Angle 2 | Angle 3 | Mean | Angle 1 | Angle 2 | Angle 3 | Mean | Angle 1 | Angle 2 | Angle 3 | Mean | ||||
shaft1 | Low-exposure | 0.0490 | 0.0180 | 0.0370 | 0.0347 | 0.0420 | 0.0450 | 0.0390 | 0.0420 | 0.0330 | 0.1160 | 0.0180 | 0.0557 | 0.0441 | 0.0274 |
High-exposure | 0.9650 | 0.9870 | 0.9500 | 0.9673 | 0.0140 | 1.1750 | 1.3720 | 0.8537 | 1.9230 | 1.6820 | 1.3310 | 1.6453 | 1.1554 | 0.5115 | |
Processed image | 0.0160 | 0.0080 | 0.0210 | 0.0150 | 0.0080 | 0.0230 | 0.0150 | 0.0153 | 0.0120 | 0.0160 | 0.0090 | 0.0123 | 0.0142 | 0.0052 | |
shaft2 | Low-exposure | 0.1160 | 0.0260 | 0.0410 | 0.0610 | 0.0300 | 0.0330 | 0.0680 | 0.0437 | 0.0340 | 0.0380 | 0.0430 | 0.0383 | 0.0477 | 0.0267 |
High-exposure | 1.3880 | 2.0040 | 1.9970 | 1.7963 | 0.0490 | 1.7180 | 1.5240 | 1.0970 | 2.0230 | 1.0170 | 2.0180 | 1.6860 | 1.5264 | 0.6179 | |
Processed image | 0.0190 | 0.0110 | 0.0070 | 0.0123 | 0.0080 | 0.0160 | 0.0090 | 0.0110 | 0.0230 | 0.0090 | 0.0270 | 0.0197 | 0.0143 | 0.0068 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, C.; Xu, X.; Liu, S.; Ren, Z. A Method for Measuring Shaft Diameter Based on Light Stripe Image Enhancement. Sensors 2024, 24, 303. https://doi.org/10.3390/s24010303
Li C, Xu X, Liu S, Ren Z. A Method for Measuring Shaft Diameter Based on Light Stripe Image Enhancement. Sensors. 2024; 24(1):303. https://doi.org/10.3390/s24010303
Chicago/Turabian StyleLi, Chunfeng, Xiping Xu, Siyuan Liu, and Zhen Ren. 2024. "A Method for Measuring Shaft Diameter Based on Light Stripe Image Enhancement" Sensors 24, no. 1: 303. https://doi.org/10.3390/s24010303
APA StyleLi, C., Xu, X., Liu, S., & Ren, Z. (2024). A Method for Measuring Shaft Diameter Based on Light Stripe Image Enhancement. Sensors, 24(1), 303. https://doi.org/10.3390/s24010303