The Machine Vision Dial Automatic Drawing System—Based on CAXA Secondary Development
Abstract
:1. Introduction
1.1. Research Background and Significance
- (1)
- The device should be designed with the MKZB-IP SF6 density controller product and should be easy to install, have a small equipment volume, be easy to operate, have a high degree of automation, and have high safety performance.
- (2)
- The device should be easily adaptable to detect different types of products.
- (3)
- The accuracy of the dial should reach 1.0.
- (4)
- The final output should be a CRX file for technical personnel to modify.
- (5)
- Please refer to Table 1 for product parameters.
1.2. Research Status at Home and Abroad
1.2.1. Research Status of Instrument Representation Number Recognition
1.2.2. Research Status of Secondary Development of Computer-Aided Design Software
2. Dial Pointer Angle Recognition System
2.1. Construction of Visual Detection Platform
2.2. Watch Face Image Recognition
2.2.1. Image Acquisition
2.2.2. Outline Data Extraction from within Tick Marks
2.2.3. Dial Image Coordinate Transformation
- (1)
- Image Rotation:
- (2)
- Image Coordinate Transformation:
- The tick marks in the rectangular strip image are arranged from left to right, and the width (W) of the rectangle is the circumference (2Πr) of the outline circle inside the tick mark. The height (H) is 1/4 of the length of the pointer, as shown in Figure 4a.
- The angle (θ) and radius (r) of each rotation are determined.
- c.
- After the coordinate transformation, the resulting coordinate transformation plot is shown in Figure 4b. However, the generated image contains too much irrelevant information. Therefore, the tick mark area is obtained by extracting the region of interest of the image, as shown in Figure 4c. The image is flipped for easy observation, and the result is shown in Figure 4d.
2.2.4. Image Preprocessing
2.3. Angle Recognition
2.4. Socket Communication
3. Automatic Drawing System Design
3.1. Introduction to the ObjectCRX Development Package
3.2. Design Ideas
3.2.1. Parametric Design Ideas
3.2.2. Requirements Analysis
3.3. System Design
3.3.1. Invariant Parameter Model Creation
- (1)
- Creating the inner and outer contours of the tick marks and the precision numeric outer contours
- (2)
- Creating the −0.1 long baseline
- (3)
- Drawing text
3.3.2. Variadic Model Creation
- (1)
- Creating customizable product numbers
- (2)
- Creating 0~0.9 long tick marks
- (3)
- Create 5 equal angle lines between each 0.1 tile
- (4)
- Create a fill object
4. System Validation
4.1. Angle Recognition System Verification
4.2. Automatic Drawing System Validation
5. Conclusions and Prospect
5.1. Conclusions
- A visual acquisition system that meets the image feature acquisition requirements of the dial. SF6 density controller dial image acquisition equipment is built according to the design scheme.
- An angle recognition algorithm based on the OpenCV open-source vision library and designed by using An SF6 density controller dial image acquisition device for image acquisition. This algorithm extracts the scale line ROI area through contour data extraction, coordinate transformation, preprocessing, and other operations. By traversing the image threshold method, the pointer angle is characterized by the coordinate value of each position in the image to obtain the angle value. This method has higher accuracy and adaptability than traditional angle recognition algorithms in the situation described in this paper.
- An analysis of the requirements of the CAD automatic drawing function using parametric design. VS is used in the secondary development of the CAXA electronic drawing board 2021. Constant parameters and variable parameters are created based on the demand analysis. Finally, the angle information is obtained by communicating with the angle recognition system and is imported into the automatic drawing system for verification. The CAD drawing of the dial can be accurately drawn according to the actual deflection of the dial pointer of the tested product. This system can greatly improve the speed of the generation and modification of the product dial model and has great application value in the design of product series.
5.2. Prospect
- Adding an automatic printing function and printer equipment to realize the full automation of the instrument calibration process.
- Improving the circle detection algorithm to further enhance its accuracy.
- Adding a manipulator device to complete the replacement of the old dashboard and the installation of the new dashboard based on the printed dashboard. This will achieve the automation of the entire process of dial checking, including detection, drawing, printing, and installation.
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Peng, J.; Pu, Y.; Jia, Z.; Zhu, X.; Ye, H. Analysis of a 110 kV Outdoor sulfur hexafluorated Circuit Breaker B Phase Fault. High Volt. Appar. 2023, 59, 216–220. [Google Scholar]
- Jing, G.; Hua, L.; Tao, Z. Machine Vision and Application. Electron. Sci. Technol. 2014, 27, 185–188. [Google Scholar]
- Liu, C.; Yang, T. Application and industrial development of machine vision in intelligent manufacturing. Mach. Tool Hydraul. 2021, 49, 172–178. [Google Scholar]
- Zhang, Y. Research on Visual Measurement System of Refractory Bricks Based on Linear Structured Ligh. Master’s Thesis, Zhejiang University, Zhejiang, China, 2018. [Google Scholar]
- Ling, T.; Bo, G.; Lei, L.; Lu, J.; Zheng, X. Automatic Verification System of Pointer Precision Pressure Gauge Based on Machine Vision. Ind. Metrol. 2020, 30, 28–31. [Google Scholar]
- Kucheruk, V.; Kurytnik, I.; Kulakov, P.; Lishchuk, R.; Moskvichova, Y.; Kulakova, A. Definition of dynamic characteristics of pointer measuring devices on the basis of automatic indications determination. Arch. Control Sci. 2018, 28, 401–418. [Google Scholar]
- Han, J.; Li, E.; Tao, B.; Lv, M. Reading recognition method of analog measuring instruments based on improved hough transform. In Proceedings of the International Conference on Electronic Measurement & Instruments, Chengdu, China, 16–19 August 2011. [Google Scholar]
- Jia, Q. Research on Detection of Industrial Pointer Pressure Instrument. Master’s Thesis, Shanghai University of Engineering Science, Shanghai, China, 2020. [Google Scholar]
- Cao, S.; Dai, Y.; Yu, H.; Li, F.; Sun, W. Travel Time Accuracy Measurement of Mechanical Watch Based on Machine Vision. J. Hunan Univ. Nat. Sci. Ed. 2020, 47, 9. [Google Scholar]
- Shen, Y.; Xiong, W.; Huang, W.; Xu, W. Instrument Recognition Based on template Matching and Hough Circle Detection. Comput. Technol. Dev. 2021, 31, 69–73. [Google Scholar]
- Bu, L.; Wang, H.; Zhu, M.; Dai, W. Multi-source Number Recognition Algorithm Based on Improved Convolutional Neural Network. J. Comput. Appl. 2018, 38, 3403–3408. [Google Scholar]
- Zhang, S.; Wan, J.; Wang, H.; Guan, M.; Yang, B.; Li, F. Convolutional neural network pointer meter image readout recognition method based on attention mechanism. Electr. Power Autom. Equip. 2022, 42, 218–224. [Google Scholar]
- Xin, H.; Hua, O.; Yang, Y.; Zhuocheng, H. An Improved Indicator Recognition Method for Pointer Gauge. Electron. Meas. Technol. 2021, 44, 132–137. [Google Scholar]
- Li, H.; Yan, K.; Zhang, L.; Liu, W.; Li, Z. Circular Pointer Instrument Recognition System Based on MobileNetV2. J. Comput. Appl. 2021, 41, 1214–1220. [Google Scholar]
- Xu, C.; Wu, X. AutoCAD secondary development technology in high-standard basic farmland planning and design. Hubei Agric. Sci. 2013, 52, 3412–3414. [Google Scholar]
- Qiu, R. Analysis of secondary development technology and related applications of Auto CAD. Heilongjiang Sci. Technol. Inf. 2011, 106. [Google Scholar]
- Qiu, S. Fatigue Life Analysis of Soft Wheel of Harmonic Reducer Based on CAD/CAE Technology. Master’s Thesis, Nanjing University of Information Science and Technology, Nanjing, China, 2020. [Google Scholar]
- Cai, H.; Li, Z.; Li, X. Application of C# Development AutoCAD in Parametric Drawing of Disc Groove Cam. Mech. Electr. Eng. 2019, 36, 40–43. [Google Scholar]
- Gao, L. Development of gear CAD system based on AutoCAD. Intern. Combust. Engine Accessories 2021, 198–199. [Google Scholar]
- Zhu, Z.X.; Cheng, Y.D.; Wang, B. Research on parametric drawing of steel truss bridge based on CAD secondary development technology. Railw. Stand. Des. 2014, 58, 78–82. [Google Scholar]
- You, L. Research on Pointer Instrument Image Preprocessing Technology under Visual Recognition Background. Electr. Meas. Instrum. 2013, 50, 129–131. [Google Scholar]
- Zhu, L.; Sun, J.; Shao, Z.; Cao, Z. Ethernet FinsTCP Communication Based on Socket Mode. Forg. Equip. Manuf. Technol. 2020, 55, 108–110. [Google Scholar]
- Zhang, X.; Chang, L.; Wu, W.; Liao, J.; Shen, L. Implementation of Socket Communication under Linux System. Electroacoust. Technol. 2020, 44, 87–89. [Google Scholar]
- Shao, K.; Gao, Z. Parametric Drawing Software Based on VBA Mode. Cem. Technol. 2021, 72–75+79. [Google Scholar]
- Gu, Y. Research and Application of Parametric Drawing Design Based on AutoCAD Secondary Development. Master’s Thesis, Anhui Jianzhu University, Anhui, China, 2017. [Google Scholar]
- Xu, S. Research on Parametric Design of Curved Curtain Wall of Special-Shaped Space Based on BIM Technology. Master’s Thesis, Wuhan Institute of Technology, Wuhan, China, 2020. [Google Scholar]
- Qin, B. Development of ObjectARX Based Mold Parametric Library. Mod. Manuf. Eng. 2015, 61–64. [Google Scholar]
- Mao, L.; Liu, G. Meteorological monitoring system based on Lora technology. Electron. Des. Eng. 2018, 26, 113–118. [Google Scholar]
Type | Parameter | Remark |
---|---|---|
Product diameter × height (mm) | 100 × 200 | |
Dial diameter (mm) | 88 | |
Range (MPa) | −0.1–0.9 | −0.1 tick mark unchanged |
Angle 270° | ||
Output mode | RS485 | |
interface | M20 × 1.5 | |
Rated pressure/Pn (MPa) | 0.5 | Tested when blood pressure reduction is required |
Low pressure closing pressure/Pa (MPa) | 0.45 | Tested when blood pressure reduction is required |
Low pressure alarm pressure/Pv | Tested when blood pressure reduction is required |
Name | Model |
---|---|
Industrial cameras | MV-EM200M |
Industrial lenses | BT-118C2520MP5 |
Type of light | MV-RL66X41A60-V |
Invariant Parameters | Numeric Value | Variadic Parameters |
---|---|---|
Tick mark outer contour diameter | 88 mm | 0~0.9 Each long tick line is −0.1 reference line angle |
The diameter of the outline inside the tick mark | 72 mm | |
−0.1 long reference line distance vertical direction angle | 45° | |
Short tick mark length | 4 mm | 5 equal angles between each 0.1 cell |
Rated pressure Pn (MPa) | 0.50 | |
Low pressure closing pressure Pa (MPa) | 0.45 | Product number |
Low pressure alarm pressure Pv | 0.40 | |
Accuracy class | 1.0(Circle diameter 3.6 mm) |
−0.1 Tick Mark | 0.9 Tick Mark | |
---|---|---|
The outer contour is rounded (88 mm) | (−31.1127, −31.1127) | (31.1127, −31.1127) |
The inner contour is rounded (72 mm) | (−25.4558, −25.4558) | (25.4558, −25.4558) |
Tick Marks | 0 | 0.1 | 0.2 | 0.3 | 0.6 | 0.7 | 0.8 | 0.9 | 0.5 | 0.45 | 0.4 |
---|---|---|---|---|---|---|---|---|---|---|---|
−0.1 angle from distance | A[0] | A[1] | A[2] | A[3] | A[4] | A[5] | A[6] | A[7] | A[8] | A[9] | A[10] |
Coincident Tick Marks | −0.1 | 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 |
---|---|---|---|---|---|---|---|---|---|---|
numbering | S[0] | S[1] | S[2] | S[3] | S[4] | S[5] | S[6] | S[7] | S[8] | S[9] |
Tick Marks | −0.1–0 | 0–0.1 | 0.1–0.2 | 0.2–0.3 | 0.3–0.4 |
---|---|---|---|---|---|
angle | |||||
Tick marks | 0.4–0.5 | 0.5–0.6 | 0.6–0.7 | 0.7–0.8 | 0.8–0.9 |
angle |
The Tick Mark at Which the Pointer Is Located | Circle Center Coordinates (x, y) | Radius (mm) | The Actual Pointer Angle | Test the Pointer Angle | Absolute Error |
---|---|---|---|---|---|
0 | (672, 588) | 458 | 27° | 26.64° | 0.36° |
0.1 | (669, 586) | 455 | 54° | 53.52° | 0.48° |
0.2 | (666, 587) | 458 | 81° | 80.79° | 0.21° |
0.3 | (669, 585) | 455 | 108° | 107.42° | 0.58° |
0.4 | (671, 583) | 453 | 135° | 134.56° | 0.44° |
0.5 | (669, 586) | 455 | 162° | 161.25° | 0.75° |
0.6 | (670, 587) | 456 | 189° | 187.80° | 1.20° |
0.7 | (669, 586) | 455 | 216° | 214.97° | 1.03° |
0.8 | (671, 588) | 457 | 243° | 241.99° | 1.01° |
0.9 | (668, 585) | 456 | 270° | 269.00° | 1.00° |
0.45 | (669, 586) | 456 | 148.5° | 147.89° | 0.61° |
The Tick Mark at Which the Pointer Is Located | Test the Pointer Angle | SF6 Density Controller Potential Signal | Test the Pointer Angle |
---|---|---|---|
0 | 27.51° | Rated pressure Pn = 0.5 | 162.45° |
0.1 | 51.27° | ||
0.2 | 80.91° | ||
0.3 | 108.18° | Low pressure closing pressure Pa = 0.45 | 145.62° |
0.6 | 189.59° | ||
0.7 | 215.97° | Low pressure alarm pressure Pv = 0.4 | 136.94° |
0.8 | 240.11° | ||
0.9 | 269.00° |
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. |
© 2023 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
Zhang, N.; Li, F.; Zhang, E. The Machine Vision Dial Automatic Drawing System—Based on CAXA Secondary Development. Appl. Sci. 2023, 13, 7365. https://doi.org/10.3390/app13137365
Zhang N, Li F, Zhang E. The Machine Vision Dial Automatic Drawing System—Based on CAXA Secondary Development. Applied Sciences. 2023; 13(13):7365. https://doi.org/10.3390/app13137365
Chicago/Turabian StyleZhang, Ning, Fei Li, and Enxu Zhang. 2023. "The Machine Vision Dial Automatic Drawing System—Based on CAXA Secondary Development" Applied Sciences 13, no. 13: 7365. https://doi.org/10.3390/app13137365