Digital identification method for gear measurement report image data
By pre-processing and positioning the image data of the gear measurement report and identifying and verifying it with the gear-specific OCR model, the problem of low digital recognition rate of gear data in the existing technology is solved, and efficient digital processing and errors are achieved Reduction provides reliable digital means for large-scale gear data applications.
Patent Information
- Application Number
- CN202411183149.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-17
AI Technical Summary
The existing commercial OCR model has poor recognition rate when dealing with complex special symbols in the gear professional field, resulting in information omission or errors, and the inability to effectively digitalize paper-based gear measurement reports.
By obtaining the image data of the gear measurement report for pre-processing optimization, the Canny edge detection algorithm is used to locate and segment the key area images, and input it into the OCR model trained based on the gear-specific training character set for recognition and extraction, and perform data segmentation processing and numerical values Verify, obtain correct identification results and judgment error results.
提高了齿轮测量数据的数字化处理效率,减少了人为错误的产生,为大规模齿轮测量数据应用提供了可靠的数字化手段。
Smart Images

Figure CN119152510A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of precision measurement technology, and in particular to a method for digitally identifying image data of a gear measurement report. Background Art
[0002] Data acquisition and application are the foundation of digital transformation. Taking gear measurement as an example, most of the instruments and equipment at home and abroad currently have the function of printing measurement reports. The measurement report contains most of the measurement data and is presented in text and curve information. Paper measurement reports can only be read, saved and recorded manually, and cannot be processed by computer, which brings great trouble to the subsequent big data extraction and application. At the same time, manual processing is inefficient and prone to errors.
[0003] With the rise of artificial intelligence, it has become possible to use artificial intelligence to replace human labor to extract image data. Optical Character Recognition (OCR) is an important technology for artificial intelligence applications. Simply put, OCR technology uses artificial intelligence and machine learning algorithms to identify and read text content in image documents, and then converts these text information into digital data that can be recognized and processed by machines. Its essence is to convert paper analog images into digital forms that can be processed and stored by computers.
[0004] Although OCR technology has made significant progress in many applications, the existing commercial OCR models are not applicable to professional gear data. The recognition rate is not ideal when dealing with complex special symbols in the gear professional field, which often leads to omissions or errors in information. Therefore, it is necessary to propose a digital recognition method for gear measurement report image data. Summary of the invention
[0005] The purpose of the present invention is to provide a method for digitally identifying image data of a gear measurement report, so as to solve the problem of digitalizing a paper gear measurement report.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] A method for digitally identifying image data of a gear measurement report, comprising:
[0008] Obtain image data of gear measurement report and perform pre-processing optimization;
[0009] Perform key area positioning and segmentation on the image data after pre-processing optimization to obtain several key area images;
[0010] Input the key area image into an OCR model, perform data recognition and extraction on the key area image, and obtain a temporary array, wherein the OCR model is trained based on a gear-specific training character set;
[0011] The temporary array is subjected to data segmentation processing and value verification to obtain correct recognition results and to determine results with errors.
[0012] Optionally, pre-processing optimization includes: tilt correction, histogram equalization, local contrast enhancement and binarization.
[0013] Optionally, performing key area positioning and segmentation on the image data after pre-processing optimization includes:
[0014] Using the Canny edge detection algorithm to identify the table border in the pre-processed optimized image data, and obtaining a table positioning result, wherein the table positioning result includes the pixel coordinate value of the preset position of the table border, the table width and height;
[0015] According to the table positioning result, a plurality of key area images containing characters and numerical values are segmented.
[0016] Optionally, the gear-specific training character set includes: Greek letter symbols, numerical unit symbols and special symbols, and variants of the Greek letter symbols, the numerical unit symbols and the special symbols.
[0017] Optionally, performing data segmentation processing on the temporary array includes: segmenting out English character strings, numerical values and units.
[0018] Optionally, split out English strings and values including:
[0019] Determine whether the first number in the temporary array is preceded by a minus sign. If so, separate the English string and the numerical value using the minus sign as a boundary. If not, separate the English string and the numerical value using the first number as a boundary.
[0020] Optionally, the split units include:
[0021] Using the last number in the temporary array as a boundary, separate the length units;
[0022] The angle units are separated by their symbolic representation.
[0023] Optionally, performing numerical verification on the temporary array includes: determining whether the segmented numerical values contain special characters other than a decimal point and whether the numerical value is within a preset reasonable range.
[0024] The beneficial effects of the present invention are as follows: the present invention can solve the problem of digitizing paper gear measurement reports. Compared with manual processing, it not only greatly improves efficiency but also reduces the occurrence of human errors, and provides a digital means for large-scale gear measurement data applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 The present invention is a flowchart of a method for digitally identifying image data of a gear measurement report according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0029] like Figure 1 As shown, this embodiment provides a method for digitally identifying image data of a gear measurement report, comprising:
[0030] Obtain image data of gear measurement report and perform pre-processing optimization;
[0031] Perform key area positioning and segmentation on the image data after pre-processing optimization to obtain several key area images;
[0032] Input the key area image into the OCR model, perform data recognition and extraction on the key area image, and obtain a temporary array, wherein the OCR model is trained based on a gear-specific training character set;
[0033] Perform data segmentation and value verification on the temporary array to obtain correct recognition results and determine erroneous results.
[0034] Furthermore, the pre-processing optimization includes: tilt correction, histogram equalization, local contrast enhancement and binarization processing, which converts the processed image into a form with only black and white colors.
[0035] In this embodiment, the paper measurement report is scanned to obtain a report image, that is, image data of the gear measurement report is obtained.
[0036] Furthermore, the key area positioning and segmentation of the image data after pre-processing optimization include: using the Canny edge detection algorithm to identify the table border in the image data after pre-processing optimization, and obtaining the table positioning result, wherein the table positioning result includes the pixel coordinate value of the preset position of the table border, the table width and height; according to the table positioning result, segmenting a number of key area images containing characters and numbers.
[0037] In this embodiment, the key area positioning includes: using the Canny edge detection algorithm to identify all table borders in the report image, and then obtaining the pixel coordinate values of the upper left corners of all rectangular tables, the table width and height.
[0038] Key area segmentation includes: In the report image, all characters and data have fixed positions. Therefore, according to the table positioning results, the table pixel coordinates, width and height are used to segment several rectangular images containing characters and values to reduce the area space that needs to be identified and reduce the computational burden of subsequent processing.
[0039] Furthermore, the gear-specific training character set includes: Greek letter symbols, numerical unit symbols and special symbols, and variants of Greek letter symbols, numerical unit symbols and special symbols.
[0040] In this embodiment, constructing a gear-specific training character set specifically includes: the character set includes Greek alphabetic symbols, numerical unit symbols and special symbols, wherein the Greek alphabetic symbols are 24 uppercase and lowercase alphabetic symbols, such as α, β and μ. Numerical unit symbols include length units mm and μm, angle units °, ' and ", etc. Special characters are characters corresponding to gear professional terms specified in the two international gear standards ISO1328-1 and ISO1328-2, such as L α 、f Hα and f fα In addition, all the above characters need to be mutated to expand their font types. Further, the OCR model training specifically includes: based on the constructed gear-specific training character set, the jTessBoxEditor tool is used to train the TesseractOCR model to obtain the trained gear-specific font gear.traineddata, and the font is placed in the installation directory of TesseractOCR.
[0041] Furthermore, the key area image data recognition and extraction includes: calling the gear-specific font gear.traineddata in the TesseractOCR model, and performing data recognition and extraction on the key area image containing characters and numerical values, and saving the data after extraction as a temporary array, wherein the temporary array is a combination of symbols and numerical values.
[0042] Furthermore, performing data segmentation processing on the temporary array includes: segmenting out the English character string, the numerical value and the unit.
[0043] Furthermore, separating the English string and the numerical value includes: determining whether a minus sign is preceding the first number in the temporary array, if so, separating the English string and the numerical value using the minus sign as a boundary, and if not, separating the English string and the numerical value using the first number as a boundary.
[0044] In this embodiment, the data in the key area image generally includes the English name, value and unit of the parameter. First, the identified temporary array is judged. After finding the first number, it is judged whether it is preceded by a minus sign (-). If so, the parameter English string and value are separated by the minus sign. Otherwise, the first number is used as the boundary for segmentation.
[0045] Furthermore, dividing out the units includes: dividing out the length units using the last number in the temporary array as a boundary; dividing out the angle units using the symbolic representation of the angle units as a boundary.
[0046] In this embodiment, the numerical value after segmentation includes the unit, which can be further divided into two categories: length unit and angle unit. The length unit is relatively easy to segment. Find the last digit and use this digit as the boundary to separate the number and the unit. If the angle unit is in degrees, it can be directly segmented with degrees as the boundary. If it is expressed in degrees, ' and ", the numbers can be extracted with degrees, ' and " as the boundaries respectively.
[0047] After the above data segmentation, we can get English strings, values and units respectively.
[0048] Furthermore, performing numerical verification on the temporary array includes: determining whether the segmented numerical values contain special characters other than the decimal point and whether the numerical values are within a preset reasonable range.
[0049] The extracted values must also be verified to determine whether they conform to the predefined format and logic. The verification rules include:
[0050] 1) Does the value contain any special characters other than the decimal point, such as spaces or the letters I and o (corresponding to the numbers 1 and 0)? If so, the spaces should be removed and the letters I and o should be replaced with the numbers 1 and 0 respectively.
[0051] 2) Whether the value is within a reasonable range, including the number of teeth greater than 0 and less than or equal to 1000, the module greater than 0 and less than or equal to 70, the base circle diameter greater than 0 and less than 750, and the helix angle greater than -90 and less than 90. If it is found that the value exceeds the reasonable range, the wrong value will be recorded for subsequent manual verification.
[0052] Furthermore, the data extracted from each key area is output, including the correct identification results and the results of errors determined by the numerical verification process, for subsequent processing and application.
[0053] The present invention scans a paper measurement report into an electronic image, and divides the measurement report into a plurality of small rectangular images by locating and segmenting key areas. Characters and values in each small rectangular image are extracted by OCR recognition, and English character strings, values and unit characters are segmented. The values are output after format and logic verification processing. The difficult problem of digitizing paper gear measurement reports can be solved. Compared with manual processing, it not only greatly improves efficiency, but also reduces the occurrence of human errors, and provides a digital means for large-scale gear measurement data applications.
[0054] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for digital recognition of gear measurement report image data, It is characterized in that include: Obtain image data of gear measurement report and perform pre-processing optimization; Perform key area positioning and segmentation on the image data after pre-processing optimization to obtain several key area images; Input the key area image into an OCR model, perform data recognition and extraction on the key area image, and obtain a temporary array, wherein the OCR model is trained based on a gear-specific training character set; The temporary array is subjected to data segmentation processing and value verification to obtain correct recognition results and to determine results with errors.
2. The method for digitally identifying gear measurement report image data according to claim 1, It is characterized in that Pre-processing optimization includes: tilt correction, histogram equalization, local contrast enhancement and binarization.
3. The method for digitally identifying gear measurement report image data according to claim 1, It is characterized in that The key area positioning and segmentation of the image data after pre-processing optimization include: Using the Canny edge detection algorithm to identify the table border in the pre-processed optimized image data, and obtaining a table positioning result, wherein the table positioning result includes the pixel coordinate value of the preset position of the table border, the table width and height; According to the table positioning result, a plurality of key area images containing characters and numerical values are segmented.
4. The method for digitally identifying gear measurement report image data according to claim 1, It is characterized in that The gear-specific training character set includes: Greek letter symbols, numerical unit symbols and special symbols, and variants of the Greek letter symbols, the numerical unit symbols and the special symbols.
5. The method for digitally identifying gear measurement report image data according to claim 1, It is characterized in that The data segmentation process for the temporary array includes: segmenting out English character strings, numerical values and units.
6. The method for digitally identifying gear measurement report image data according to claim 5, It is characterized in that The English strings and values to be separated include: Determine whether the first number in the temporary array is preceded by a minus sign. If so, separate the English string and the numerical value using the minus sign as a boundary. If not, separate the English string and the numerical value using the first number as a boundary.
7. The method for digitally identifying gear measurement report image data according to claim 5, It is characterized in that The split units include: Using the last number in the temporary array as a boundary, separate the length units; The angle units are separated by their symbolic representation.
8. The method for digitally identifying gear measurement report image data according to claim 1, It is characterized in that The value checking of the temporary array includes: determining whether the segmented values contain special characters other than the decimal point and whether the value is within a preset reasonable range.
