Counter-type meter data expansion method and apparatus

By acquiring and processing images of the wheel-type instrument, high-quality image data that conforms to the rotation logic is generated, solving the problems of large discrepancies and logical inconsistencies in instrument image data in existing technologies, and improving the training effect of deep learning models.

WO2026032314A1PCT designated stage Publication Date: 2026-02-12GUANGDI MAOMING CHEM CO LTD +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/112873
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-07
Filing Date
2025-08-06
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

The instrument image data generated by existing technologies differs significantly from the real instrument image data and does not conform to the instrument rotation logic, resulting in poor training performance of deep learning models.

Method used

By acquiring multiple images of similar digit wheel instruments, cropping and stitching them into a uniform-sized character pattern image, and using a sliding box to simulate sliding according to a preset sliding logic, high-quality image data is generated. Image processing and annotation are then performed to simulate the rotation logic of a real instrument.

Benefits of technology

It generates a large amount of high-quality image data that is similar to real instrument images and meets the rotation logic, providing a high-quality, abundant and diverse image dataset to support the effective training of deep learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025112873_12022026_PF_FP_ABST
    Figure CN2025112873_12022026_PF_FP_ABST
Patent Text Reader

Abstract

A counter-type meter data expansion method and apparatus. The method comprises: acquiring a plurality of pictures of counter-type meters of the same type, cropping dial readings in the pictures to obtain complete numerical values, so as to obtain digit template pictures, wherein the sizes of the digit template pictures are uniformly set to preset horizontal pixels × preset vertical pixels (S1); stitching the digit template pictures in a first preset order, and performing image processing on stitching positions, so as to obtain a digit strip picture (S2); and performing duplication to obtain a plurality of digit strip pictures, using sliding windows on the digit strip pictures to perform simulated sliding according to preset sliding logic, and outputting sliding window images and stitching same, so as to generate image data (S3). By means of the present invention, a large amount of high-quality image data which is similar to real meter images and satisfies meter rotation logic can be generated, thereby facilitating the effective training of a deep learning model.
Need to check novelty before this filing date? Find Prior Art

Description

A dial instrument data expansion method and device TECHNICAL FIELD

[0001] The present application relates to the technical field of image data generation, and in particular to a dial instrument data expansion method and device. BACKGROUND

[0002] The image-based AMR (Automatic Meter Reading) technology can automatically read meter data from captured images by modifying traditional meters without replacing the meters, significantly reducing the labor intensity and error rate of manual meter reading. However, training a deep learning-based AMR model requires learning a large amount of meter image data, but the meter image data generated by the prior art has a large gap with the real meter image data and does not conform to the meter rotation logic, only the quantity is increased, and the overall quality of the pictures is reduced. SUMMARY

[0003] The present application provides a dial instrument data expansion method and device to solve the problem that the meter image data generated by the prior art has a large gap with the real meter image data and does not conform to the meter rotation logic, which can improve the picture quality while generating a large amount of image data.

[0004] To achieve the above-mentioned purpose, the embodiment of the present application provides a dial instrument data expansion method, comprising:

[0005] Obtaining multiple pictures of the same type of dial instrument, and cutting each complete numerical value from the dial reading of the pictures to obtain a font picture, wherein the size of the font picture is uniform as a preset horizontal pixel x a preset vertical pixel;

[0006] Splicing the font pictures in a first preset order, and performing image processing on each splicing position to obtain a font strip picture;

[0007] Copying multiple font strip pictures, simulating sliding of a sliding frame on the font strip picture according to a preset sliding logic, outputting each sliding frame picture and splicing to generate image data.

[0008] As an improvement of the above-mentioned scheme, the numerical value is located in the middle position of the font picture without inclination.

[0009] As an improvement of the above-mentioned scheme, the image processing includes smoothing processing of the splicing trace of the splicing position of the two font pictures.

[0010] As an improvement of the above-mentioned scheme, the copying of multiple font strip pictures, the simulation sliding of the sliding frame on the font strip picture according to the preset sliding logic, the output of each sliding frame picture and the splicing to generate image data, comprises:

[0011] copying the word strip pictures to obtain word strip pictures with the same number as the number of word wheels in the word wheel type instrument;

[0012] each of the word strip pictures has a sliding frame, and the size of the sliding frame is the same as the size of the word template picture;

[0013] when the sliding frame completes a sliding according to a preset sliding logic, a sliding frame picture corresponding to each of the word strip pictures is output and sequentially spliced according to a second preset order to generate image data.

[0014] As an improvement of the above scheme, the sliding logic comprises:

[0015] the initial position of each of the sliding frames is at the top of the word strip picture;

[0016] starting from a current sliding frame, the current sliding frame slides downward by a preset pixel value at a preset frequency, and a sliding is completed;

[0017] each time a sliding is completed, a sliding frame picture corresponding to each of the word strip pictures is output;

[0018] when the current sliding frame slides to a preset progressive position, a previous sliding frame is driven to start to slide downward by a preset pixel value at the preset frequency in synchronization, until the current sliding frame slides to a preset zero-return position, and a cycle of zero-return is completed;

[0019] each time a cycle of zero-return is completed, the previous sliding frame stops sliding, and the current sliding frame returns to the initial position to continue sliding;

[0020] when the previous sliding frame slides to the preset progressive position, a previous sliding frame of the previous sliding frame is driven to start to slide downward by the preset pixel value at the preset frequency in synchronization;

[0021] the above process is repeated until each of the sliding frames slides to the preset progressive position, and all the sliding frames stop sliding.

[0022] As an improvement of the above scheme, the output of the sliding frame picture corresponding to each of the word strip pictures comprises:

[0023] when the sliding frame is located at the initial position to the preset progressive position, the picture in the sliding frame is directly output;

[0024] When the sliding frame is located at the preset progressive position to the preset zero-return position, the sliding frame is divided into a sliding upper frame and a sliding lower frame, wherein the sliding upper frame is in a range from the preset progressive position to the preset zero-return position, and the sliding lower frame is in a range from the initial position to the preset progressive position, the pictures in the sliding upper frame and the pictures in the sliding lower frame are sequentially spliced from top to bottom to obtain a complete picture of the sliding frame and output.

[0025] As an improvement of the above scheme, the word strip picture is composed of N word template pictures, the progressive position is a position where N-1 preset vertical pixels are located, and the preset zero-return position is a position where N preset vertical pixels are located.

[0026] As an improvement of the above scheme, the number of word wheels is M, the current sliding frame is a sliding frame on the Mth word strip picture, and the previous sliding frame is a sliding frame on the M-1th word strip picture.

[0027] As an improvement of the above scheme, after the image data is generated, the method further includes:

[0028] According to information generated at each of the image data, a label file in a YOLO format is automatically created for the image data.

[0029] The image data is subjected to single processing or superimposed processing of blur processing, exposure processing, low-light processing, noise processing and light spot processing to obtain processed image data.

[0030] To achieve the above object, the embodiment of the present application further provides a word wheel type instrument data expansion device, which comprises:

[0031] A word template picture acquisition module is configured to acquire multiple pictures of the same type of word wheel type instrument, to obtain word template pictures by cutting complete numerical values from dial readings of the pictures, and to uniformly set a size of the word template picture as preset horizontal pixels x preset vertical pixels.

[0032] A word strip picture acquisition module is configured to splice the word template pictures according to a first preset order, to perform image processing on each splicing position, and to obtain word strip pictures.

[0033] An analog sliding and data generation module is configured to copy multiple word strip pictures, to perform analog sliding on the sliding frames of the word strip pictures according to a preset sliding logic, to output each sliding frame picture and splice the sliding frame pictures, and to generate image data.

[0034] To achieve the above object, the embodiment of the present application further provides a word wheel type instrument data expansion device, comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the word wheel type instrument data expansion method when executing the computer program.

[0035] To achieve the above object, the embodiment of the present application further provides a computer readable storage medium, comprising a stored computer program; wherein the computer program controls the device where the computer readable storage medium is located to execute the word wheel type instrument data expansion method when running.

[0036] To achieve the above object, the embodiment of the present application further provides a computer program product, comprising a computer program; wherein the computer program controls the device where the program product is located to execute the word wheel type instrument data expansion method when running.

[0037] The embodiment of the present application has the following beneficial effects:

[0038] The word wheel type instrument data expansion method and device provided by the embodiment of the present application can obtain multiple pictures of the same type of word wheel type instrument, cut each complete numerical value from the dial reading of the pictures to obtain a word module picture, wherein the size of the word module picture is unified as a preset horizontal pixel x a preset vertical pixel; the word module picture is spliced in a first preset order, and each splicing position is processed to obtain a word strip picture; multiple word strip pictures are copied, the sliding frame on the word strip picture is simulated to slide according to a preset sliding logic, each sliding frame picture is output and spliced to generate image data, a large amount of high-quality image data similar to the real instrument image and meeting the instrument rotation logic can be generated, a high-quality, sufficient and diversified image data set is provided for the deep learning model, and the effective training of the model is facilitated. BRIEF DESCRIPTION OF DRAWINGS

[0039] Fig. 1 is a flow chart of the word wheel type instrument data expansion method provided by the embodiment of the present application;

[0040] Fig. 2 is a schematic diagram of the word module acquisition process provided by the embodiment of the present application;

[0041] Fig. 3 is a schematic diagram of the word strip acquisition process provided by the embodiment of the present application;

[0042] Fig. 4 is a schematic diagram of the image data simulation generation process provided by the embodiment of the present application;

[0043] Fig. 5 is a schematic diagram of the sliding frame sliding process provided by the embodiment of the present application;

[0044] Fig. 6 is a schematic view of a sliding upper frame and a sliding lower frame and splicing thereof according to an embodiment of the present application;

[0045] Fig. 7 is a schematic view of label generation corresponding to image data according to an embodiment of the present application;

[0046] Fig. 8 is an effect diagram after different processing of image data according to an embodiment of the present application;

[0047] Fig. 9 is a structural block diagram of a dial instrument data expansion device according to an embodiment of the present application;

[0048] Fig. 10 is a structural block diagram of a dial instrument data expansion device according to an embodiment of the present application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0050] In the description of the present application, it should be noted that the step numbers in the text are only for the convenience of explaining the specific embodiments, and do not serve as the function of limiting the execution sequence of the steps. The terms "first" and "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features limited by "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited.

[0051] Referring to Fig. 1, Fig. 1 is a flow chart of a dial instrument data expansion method according to an embodiment of the present application. The dial instrument data expansion method comprises steps S1 to S3, and specifically as follows:

[0052] S1, acquiring multiple pictures of the same type of dial instrument, and obtaining a character matrix picture by cutting each complete numerical value from the dial reading of the picture, wherein the size of the character matrix picture is uniform as a preset horizontal pixel x a preset vertical pixel;

[0053] S2, splicing the character matrix picture according to a first preset order, and performing image processing on each splicing position to obtain a character strip picture;

[0054] S3, copying multiple character strip pictures, simulating sliding on the character strip picture according to a preset sliding logic by using a sliding frame on the character strip picture, outputting each sliding frame picture and splicing to generate image data.

[0055] It can be understood that the dial type meter data expansion method can be applied to any type of dial type meter such as an electricity meter, a water meter, a gas meter, etc. In order to make the finally generated image data more realistic, the font extraction should be performed from the meter pictures taken in actual life.

[0056] In the embodiment of the present application, the complete values are intercepted from the dial type meter pictures and uniformly sized to form font pictures, the font pictures are spliced into a font strip picture according to a preset order, and a large amount of high-quality image data similar to real meter images and meeting the meter rotation logic is generated by simulating sliding on the sliding frame on the font strip picture according to the preset sliding logic, which provides a high-quality, sufficient and diversified image data set for the deep learning model, and helps the effective training of the model.

[0057] In an optional embodiment, the value is located in the middle position of the font picture without inclination.

[0058] In the embodiment of the present application, since the values of the meter in actual use are usually vertically aligned and stable in position, the values in the font picture are in the middle position without inclination, which can ensure that the position and size of each value are consistent in the subsequent font strip production and simulation generation process, and improve the similarity between the generated image data and the real meter image data.

[0059] For example, as shown in FIG. 2, taking a common water meter as an example, first, a sufficient number of pictures of the same type of dial type meter are obtained, and then a screenshot tool is used to intercept each complete value from the dial reading of the picture and adjust the same size of pixels for saving as a font picture. Each font is adjusted to 60x70 pixels; the intercepted font picture should be consistent with the actual picture, each font picture should contain a complete value of any independent occurrence of the numbers from 0 to 9, and the value is located in the middle position of the font picture without inclination, and there is also a certain interval between the upper and lower.

[0060] In an optional embodiment, the image processing includes smoothing the splicing traces at the splicing position of the two font pictures.

[0061] It can be understood that the process of font strip production simulates the dial in the dial type meter. Since the obvious traces at the splicing position will make the generated image data look unnatural, inconsistent with the real meter data, and also introduce additional noise or abnormalities, which will affect the learning and inference ability of the deep learning model on the image data.

[0062] In the embodiments of the present application, the stitching traces are eliminated by smoothing processing, which usually involves image inpainting techniques, such as image inpainting techniques using a biharmonic function basis, to eliminate unnatural traces at the stitching positions, so that the stitched image looks more natural and seamless, thereby making the generated image data closer to the actual situation and enhancing the authenticity and usability of the image data set.

[0063] For example, as shown in FIG. 3, if the size of the font picture is 60x70 pixels, the font pictures are sequentially stitched from top to bottom in the order of numbers from 0 to 9 (i.e., a first preset order), to obtain a font strip with a size of 60x700 pixels. Since direct stitching will cause obvious stitching traces at the stitching positions of each font picture, resulting in a certain difference between the finally generated font strip picture and the font wheel picture in the actual font wheel type instrument, it is necessary to perform smoothing processing on each stitching position. The red box marked part in FIG. 2 shows the comparison of the effects before and after image processing.

[0064] In an alternative embodiment, the plurality of font strip pictures are copied, the sliding frame on the font strip picture is simulated to slide according to a preset sliding logic, a sliding frame picture corresponding to each font strip picture is outputted and stitched, and image data is generated, including:

[0065] The font strip picture is copied to obtain a plurality of font strip pictures with the same number as the number of font wheels in the font wheel type instrument;

[0066] Each of the font strip pictures has a sliding frame, and the size of the sliding frame is the same as the size of the font picture;

[0067] When the sliding frame completes a sliding according to the preset sliding logic, a sliding frame picture corresponding to each of the font strip pictures is outputted and sequentially stitched in a second preset order, to generate image data.

[0068] In an alternative embodiment, the sliding logic includes:

[0069] The initial position of each of the sliding frames is at the top of the font strip picture;

[0070] The current sliding frame starts to slide, and the current sliding frame slides downward by a preset pixel value at a preset frequency, to complete a sliding;

[0071] Each time a sliding is completed, a sliding frame picture corresponding to each of the font strip pictures is outputted;

[0072] When the current sliding frame slides to a preset progressive position, the previous sliding frame is driven to start to slide downward by a preset pixel value at the preset frequency, until the current sliding frame slides to a preset zero position, to complete a cycle of zeroing.

[0073] When each cycle is completed, the previous sliding frame stops sliding, and the current sliding frame returns to the initial position to continue sliding;

[0074] When the previous sliding frame slides to the preset progressive position, the previous sliding frame driving the previous sliding frame starts to slide downward synchronously according to the preset frequency and the preset pixel value;

[0075] The above process is repeated until each sliding frame slides to the preset progressive position, and all the sliding frames stop sliding.

[0076] It can be understood that the process of simulation generation is to simulate sliding according to the rotation logic of the real dial type instrument (i.e. the preset sliding logic) by using the sliding frame on the word picture, intercepting and splicing the picture, so as to achieve the effect of data generation. At the same time, by setting the preset frequency and the preset pixel value, the sliding speed of the sliding frame and the acquisition frequency of the sliding frame picture can be controlled, so as to control the number of finally generated image data.

[0077] For example, as shown in FIG. 4, taking a common water meter as an example, it usually contains 5 effective digits, so the number of dials is 5, and 5 word strips with the same 60x700 pixel position are used, and each word strip has a 60x70 pixel sliding frame. According to the rotation logic of the dial type instrument, the sliding frame is slid, and the 5 sliding frames are spliced in turn from left to right (i.e. the second preset order) to obtain the corresponding image data.

[0078] In an optional embodiment, the output of the sliding frame picture corresponding to each word strip picture comprises:

[0079] When the sliding frame is located from the initial position to the preset progressive position, the picture in the sliding frame is directly outputted;

[0080] When the sliding frame is located from the preset progressive position to the preset zero position, the sliding frame is divided into a sliding upper frame and a sliding lower frame, wherein the sliding upper frame is in the range from the preset progressive position to the preset zero position, and the sliding lower frame is in the range from the initial position to the preset progressive position. The picture in the sliding upper frame and the picture in the sliding lower frame are spliced in turn from top to bottom to obtain the complete picture of the sliding frame and output.

[0081] In an optional embodiment, the word strip picture is composed of N word template pictures, and the progressive position is located at the position of N-1 times the preset vertical pixel, and the preset zero position is located at the position of N times the preset vertical pixel.

[0082] In an alternative embodiment, the number of the word wheels is M, the current sliding frame is a sliding frame on the Mth word strip picture, and the previous sliding frame is a sliding frame on the (M-1)th word strip picture.

[0083] As shown in FIG. 5, there are 5 word strip pictures with a size of 60x700 pixels, and each word strip has a sliding frame with a size of 60x70 pixels. The initial position of each sliding frame is at the top of the word strip picture. The sliding frame on the 5th word strip starts to slide, and slides once per millisecond (i.e., the preset frequency) and outputs image data once per millisecond. When the sliding frame on the 5th word strip slides to the 630th pixel position (i.e., the cumulative position), the sliding frame on the 4th word strip starts to slide, and slides once per millisecond. When the sliding frame on the 5th word strip slides to the 700th pixel position (i.e., the reset position), a cycle of resetting is completed, and at this time, the sliding frame on the 4th word strip slides 70 pixels downward and stops. Then, the sliding frame on the 4th word strip slides 70 pixels downward again when the sliding frame on the 5th word strip slides to the 630th pixel position. In this way, when the sliding frame on the 4th word strip slides to the 630th pixel position, the sliding frame on the 3rd word strip starts to slide. The process is repeated until all the sliding frames slide to the 630th pixel position simultaneously.

[0084] As shown in FIG. 6, when the sliding frame slides to the 630th pixel position (i.e., the cumulative position) and slides downward, the sliding frame may slide out of the word strip. At this time, the sliding frame is automatically divided into two parts, the sliding upper frame and the sliding lower frame. The sliding lower frame appears at the top of the word strip (i.e., the initial position), and the sliding upper frame is still at the end of the word strip. The pictures in the sliding upper frame and the pictures in the sliding lower frame are spliced from top to bottom to obtain the complete picture of the sliding frame, and then the complete picture is outputted.

[0085] In an alternative embodiment, after the image data is generated, the method further includes:

[0086] According to the information generated at each of the image data, a YOLO format annotation file is automatically created for the image data.

[0087] The image data is subjected to single processing or superimposed processing of blur processing, exposure processing, low-light processing, noise processing, and light spot processing to obtain processed image data.

[0088] It can be understood that a deep learning model needs a large amount of image data for training, however, manual annotation of a large amount of generated image data requires a large amount of time and labor cost. Therefore, while generating image data, according to the information at the time of generating each image, a corresponding YOLO format annotation file is generated, without manual annotation, greatly solving the time and labor cost, and improving the efficiency.

[0089] For example, as shown in FIG. 7, the left is generated image data, and the right is a corresponding automatically generated annotation file, wherein the first to fifth rows of the annotation file correspond to five numerical values from left to right in the image data, respectively, the first data of each row is the category corresponding to the numerical value, 0-9 belongs to the 0-9 category, respectively, the second and third data represent the relative coordinates of the center point of the sliding box of the category in the image data, and the fourth and fifth data represent the width and height of the sliding box around the center point relative to the entire image data.

[0090] In order to make the generated image data more consistent with the pictures taken in the real scene, the generated image data is subjected to blur processing, exposure processing, low light processing, noise processing and light spot processing. As shown in FIG. 8, they are respectively the original image data without any processing, the effect diagram after blur processing, the effect diagram after exposure processing, the effect diagram after low light processing, the effect diagram after adding salt and pepper noise (simulating dust) and the result diagram after adding light spot. At the same time, not only can the image data be processed singly, but also can be superimposed.

[0091] The word wheel type instrument data expansion method provided by the embodiment of the application obtains multiple pictures of the same type of word wheel type instrument, intercepts each complete numerical value from the dial reading of the pictures to obtain a word module picture, wherein the size of the word module picture is uniform as a preset horizontal pixel x a preset vertical pixel, splices the word module pictures in a first preset order, and processes the image at each splice to obtain a word strip picture, copies multiple word strip pictures, simulates sliding on the word strip pictures by using a sliding box according to a preset sliding logic, outputs each sliding box picture and splices them to generate image data, which can generate a large amount of high-quality image data similar to real instrument images and meeting the instrument rotation logic, provides a high-quality, sufficient and diversified image data set for a deep learning model, and is helpful for effective training of the model.

[0092] It can be understood that an image data set of a data class balanced is very important for the training of a deep learning model, which can avoid model bias to the majority class, thereby improving the classification performance of each class, reducing the risk of overfitting, and ensuring that the model has better generalization ability and representation in actual application. However, it is almost impossible to obtain an instrument data set with balanced values of each numerical category of a dial reading through a picture taken in reality. The dial instrument data expansion method provided in the embodiment of the present application can generate a data set with completely balanced values of each numerical category of a dial reading by adjusting the probability of each sliding box sliding to a specific area, thereby adapting to the needs of a deep learning model.

[0093] In addition, the specified data can be output in the simulation process by setting the output parameters. For example, for the sliding box on the second word sheet, when it slides in the pixel range of (0, 35] and (665, 700], it represents the number 0, and when it slides in the pixel range of (35, 105], (105, 175], (175, 245], (245, 315], (315, 385], (385, 455], (455, 525], (525, 595] and (595, 665], it represents the numbers 1, 2, 3, 4, 5, 6, 7, 8 and 9, respectively. For other word sheets, although this range is still applicable, but except for the special stage of carrying, there will be no half-character situation, so usually the pixels 0, 70, 140, 210, 280, 350, 420, 490, 560 and 630 represent the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9, respectively. Therefore, when the parameter is set as {0:70, 1:350, 2:560, 3:280, 4:195}, it represents saving the image data with the display reading (1, 5, 8, 4, 3), and when the parameter is set as {3:280}, it represents saving all the image data with the fourth reading as the number 4, thereby realizing the output of specified data.

[0094] Referring to FIG. 9, FIG. 9 is a structural block diagram of the dial instrument data expansion device 10 provided by the embodiment of the present application, the dial instrument data expansion device 10 comprises:

[0095] The word template picture acquisition module 11 is configured to acquire multiple pictures of the same type of dial instrument, cut out each complete numerical value from the dial reading of the pictures to obtain word template pictures, wherein the size of the word template pictures is uniform as preset horizontal pixels x preset vertical pixels;

[0096] The word sheet picture acquisition module 12 is configured to splice the word template pictures in a first preset order and perform image processing on each splicing position to obtain word sheet pictures;

[0097] The simulation sliding and data generation module 13 is configured to replicate a plurality of the word strip pictures, simulate sliding of the sliding frame on the word strip picture according to a preset sliding logic, output a sliding frame picture corresponding to each word strip picture, and splice the sliding frame pictures to generate image data.

[0098] Optionally, the numerical value is located in a middle position of the word template picture without inclination.

[0099] Optionally, the image processing includes smoothing processing of a splicing trace at a splicing position of the two word template pictures.

[0100] Optionally, the simulation sliding and data generation module 13 is further configured to:

[0101] replicate the word strip pictures to obtain word strip pictures in a number same as that of word wheels in the word wheel type instrument;

[0102] each of the word strip pictures has a sliding frame, and a size of the sliding frame is same as that of the word template picture;

[0103] when the sliding frame completes one sliding according to the preset sliding logic, a sliding frame picture corresponding to each of the word strip pictures is output and spliced in a second preset order to generate image data.

[0104] Optionally, the sliding logic includes:

[0105] an initial position of each of the sliding frames is at a top of the word strip picture;

[0106] the current sliding frame starts to slide, and the current sliding frame slides downward by a preset pixel value at a preset frequency, and one sliding is completed;

[0107] each time one sliding is completed, a sliding frame picture corresponding to each of the word strip pictures is output;

[0108] when the current sliding frame slides to a preset progressive position, a previous sliding frame is driven to start to slide downward by a preset pixel value at a preset frequency synchronously until the current sliding frame slides to a preset zero-reset position, and one cycle of zero-reset is completed.

[0109] each time one cycle of zero-reset is completed, the previous sliding frame stops sliding, and the current sliding frame returns to the initial position to continue sliding;

[0110] when the previous sliding frame slides to the preset progressive position, a previous sliding frame of the previous sliding frame is driven to start to slide downward by the preset pixel value at the preset frequency synchronously.

[0111] the above process is repeated until each of the sliding frames slides to the preset progressive position and all the sliding frames stop sliding.

[0112] Optionally, the output of each said word picture corresponding to the sliding frame chart comprises:

[0113] When the sliding frame is located from the initial position to the preset progressive position, the picture in the sliding frame is directly outputted;

[0114] When the sliding frame is located from the preset progressive position to the preset zero position, the sliding frame is divided into a sliding upper frame and a sliding lower frame, wherein the sliding upper frame is in the range from the preset progressive position to the preset zero position, the sliding lower frame is in the range from the initial position to the preset progressive position, the pictures in the sliding upper frame and the pictures in the sliding lower frame are sequentially spliced from top to bottom to obtain the complete picture of the sliding frame and outputted.

[0115] Optionally, the word picture is composed of N said word template pictures, the progressive position is located at N-1 times of the preset vertical pixel, and the preset zero position is located at N times of the preset vertical pixel.

[0116] Optionally, the number of said word wheels is M, the current sliding frame is a sliding frame on the Mth word picture, and the previous sliding frame is a sliding frame on the M-1th word picture.

[0117] Optionally, after the image data is generated, the method further comprises:

[0118] According to the information generated at each said image data, a YOLO format annotation file is automatically created for the image data;

[0119] The image data is subjected to single processing or superimposed processing of blur processing, exposure processing, low-light processing, noise processing and light spot processing to obtain processed image data.

[0120] It is worth noting that the working process of each module in the word wheel type instrument data expansion device 10 described in the embodiments of the present application can refer to the working process of the word wheel type instrument data expansion method described in the above embodiments, which will not be repeated here.

[0121] The word wheel type instrument data expansion device provided by the embodiment of the present application obtains multiple pictures of the same type of word wheel type instrument, intercepts each complete numerical value from the dial reading of the pictures to obtain a word module picture, wherein the size of the word module picture is unified as a preset horizontal pixel x a preset vertical pixel; the word module picture is spliced in a first preset order, and each splicing position is processed to obtain a word strip picture; multiple word strip pictures are copied, the sliding frame on the word strip picture is simulated to slide according to a preset sliding logic, each sliding frame picture is output and spliced to generate image data, a large amount of high-quality image data similar to the real instrument image and meeting the instrument rotation logic can be generated, a high-quality, sufficient and diversified image data set is provided for a deep learning model, and the effective training of the model is facilitated.

[0122] In addition, the embodiment of the present application further provides a computer readable storage medium, which comprises a stored computer program; wherein the computer program controls the device where the computer readable storage medium is located to execute the word wheel type instrument data expansion method when running.

[0123] The embodiment of the present application further provides a computer program product, which comprises a computer program; wherein the computer program controls the device where the computer program product is located to execute the word wheel type instrument data expansion method when running.

[0124] Referring to FIG. 10, FIG. 10 is a structural block diagram of a word wheel type instrument data expansion device 20 provided by the embodiment of the present application, the word wheel type instrument data expansion device 20 comprises a processor 21, a memory 22 and a computer program stored in the memory 22 and capable of running on the processor 21. The processor 21 implements the steps in the word wheel type instrument data expansion method embodiment when executing the computer program. Alternatively, the processor 21 implements the functions of each module / unit in each device embodiment when executing the computer program.

[0125] For example, the computer program can be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the word wheel type instrument data expansion device 20.

[0126] The dial instrument data expansion device 20 can include, but is not limited to, a processor 21, a memory 22. Those skilled in the art can understand that the schematic diagram is only an example of the dial instrument data expansion device 20, and does not constitute a limitation on the dial instrument data expansion device 20, and can include more or less components than the diagram, or combine certain components, or different components, for example, the dial instrument data expansion device 20 can also include an input / output device, a network access device, a bus, etc.

[0127] The processor 21 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor 21 is the control center of the dial instrument data expansion device 20, and connects various parts of the entire dial instrument data expansion device 20 through various interfaces and lines.

[0128] The memory 22 can be used to store computer programs and / or modules, and the processor 21 realizes various functions of the dial instrument data expansion device 20 by running or executing computer programs and / or modules stored in the memory 22, and calling data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required for a function (such as a sound playing function, an image playing function, etc.), etc.; and the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0129] The modules / units integrated in the dial type instrument data expansion equipment 20 can be stored in a computer readable storage medium if they are realized in the form of software function units and sold or used as independent products. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer readable storage medium. When the computer program is executed by the processor 21, the steps of the above-mentioned various method embodiments can be realized. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0130] The above is the preferred embodiment of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are also considered within the scope of protection of the present application.

Claims

1. A method for expanding the data capacity of a dial-type instrument, characterized by, The method comprises the following steps: acquiring multiple pictures of the same type of dial instrument, and cutting out complete numerical values from the dial readings of the pictures to obtain a font picture, wherein the size of the font picture is uniform as preset horizontal pixels by preset vertical pixels; splicing the font picture according to a first preset order and performing image processing on each splicing position to obtain a font strip picture; copying multiple font strip pictures and simulating sliding of a sliding frame on the font strip picture according to a preset sliding logic to output each sliding frame picture and splice the pictures to generate image data; wherein the copying of multiple font strip pictures and the simulating sliding of the sliding frame on the font strip picture according to the preset sliding logic to output each sliding frame picture and splice the pictures to generate image data comprises: copying the font strip picture to obtain font strip pictures in a number same as the number of dials in the dial instrument; each of the font strip pictures has a sliding frame, and the size of the sliding frame is same as the size of the font picture; when the sliding frame completes one sliding according to the preset sliding logic, outputting a sliding frame picture corresponding to each of the font strip pictures and splicing the pictures in a second preset order to generate image data; the sliding logic comprises: the initial position of each of the sliding frames is at the top of the font strip picture; starting sliding from a current sliding frame, the current sliding frame slides downward by a preset pixel value at a preset frequency to complete one sliding; each time one sliding is completed, a sliding frame picture corresponding to each of the font strip pictures is outputted; when the current sliding frame slides to a preset progressive position, the previous sliding frame is driven to start sliding downward by the preset pixel value at the preset frequency synchronously until the current sliding frame slides to a preset zero position, and then one cycle of zeroing is completed; each time one cycle of zeroing is completed, the previous sliding frame stops sliding, and the current sliding frame returns to the initial position to continue sliding; when the previous sliding frame slides to the preset progressive position, the previous sliding frame of the previous sliding frame is driven to start sliding downward by the preset pixel value at the preset frequency synchronously; the above sliding logic process is repeated until each of the sliding frames slides to the preset progressive position, and all the sliding frames stop sliding.

2. The method for expanding the data capacity of a dial type instrument according to claim 1, wherein, The numerical value is located in the middle of the font picture without inclination.

3. The method of claim 1, wherein the data capacity of the dial-type instrument is expanded by: The image processing comprises smoothing processing of splicing traces at the splicing position of two font pictures.

4. The method of claim 1, wherein the data capacity of the dial-type instrument is expanded by using a plurality of data storage means. The outputting of the sliding frame picture corresponding to each of the font strip pictures comprises: when the sliding frame is located at the initial position to the preset progressive position, the picture in the sliding frame is directly outputted; when the sliding frame is located at the preset progressive position to the preset zero position, the sliding frame is divided into a sliding upper frame and a sliding lower frame, wherein the sliding upper frame is in the range from the preset progressive position to the preset zero position, and the sliding lower frame is in the range from the initial position to the preset progressive position, the picture in the sliding upper frame and the picture in the sliding lower frame are spliced in order from top to bottom to obtain a complete picture of the sliding frame and output the complete picture.

5. The data expansion method for a character wheel-type instrument as described in claim 4, characterized in that, The cumulative position is a position where N-1 times of the preset vertical pixel is located, and the preset zero-return position is a position where N times of the preset vertical pixel is located.

6. The method for expanding the data capacity of a character wheel type instrument according to claim 5, wherein, The number of the dials is M, the current sliding frame is a sliding frame on the Mth word strip picture, and the previous sliding frame is a sliding frame on the M-1th word strip picture.

7. The method of claim 1, wherein the data capacity of the dial-type instrument is expanded by using a plurality of data storage means. After the image data is generated, the method further includes: According to information generated at each of the image data, automatically creating a label file in YOLO format for the image data; The image data is subjected to single processing or superimposed processing of blur processing, exposure processing, low-light processing, noise processing, and light spot processing, to obtain processed image data.

8. A data capacity expansion device for a dial-type meter, characterized by comprising: The method comprises: a word template picture acquisition module configured to acquire multiple pictures of the same type of dial gauge, and to obtain word template pictures by cutting complete numerical values from dial readings of the pictures, wherein the sizes of the word template pictures are uniform as preset horizontal pixels by preset vertical pixels; a word strip picture acquisition module configured to splice the word template pictures according to a first preset order, and to obtain word strip pictures by performing image processing on each splicing position; a simulation sliding and data generation module configured to copy multiple word strip pictures, to simulate sliding of sliding frames on the word strip pictures according to a preset sliding logic, to output sliding frame pictures corresponding to each of the word strip pictures, and to splice the sliding frame pictures in a second preset order to generate image data; The simulation sliding and data generation module is further configured to: copy the word strip pictures to obtain word strip pictures with a number same as that of dials in the dial gauge; each of the word strip pictures has a sliding frame with a size same as that of the word template picture; when the sliding frame completes one sliding according to the preset sliding logic, output a sliding frame picture corresponding to each of the word strip pictures and splice the sliding frame pictures in the second preset order to generate image data; the sliding logic comprises: an initial position of each of the sliding frames is at a top of the word strip picture; starting from a current sliding frame, the current sliding frame slides downward by a preset pixel value according to a preset frequency to complete one sliding; each time one sliding is completed, a sliding frame picture corresponding to each of the word strip pictures is outputted; when the current sliding frame slides to a preset cumulative position, a previous sliding frame is driven to start synchronous sliding downward by the preset pixel value according to the preset frequency until the current sliding frame slides to a preset zero-return position, and then one cycle of zero-return is completed; each time one cycle of zero-return is completed, the previous sliding frame stops sliding, and the current sliding frame returns to the initial position to continue sliding; when the previous sliding frame slides to the preset cumulative position, a previous sliding frame of the previous sliding frame is driven to start synchronous sliding downward by the preset pixel value according to the preset frequency. The sliding logic is repeated until each of the sliding frames slides to the preset cumulative position, and all the sliding frames stop sliding.

Citation Information

Patent Citations

  • Digital instrument reading identification method

    CN110033037A

  • Reading frame detection method, target recognition model training method and related devices

    CN110443242A

  • Data generation method and system for pointer dial plate

    CN114581306A

  • Instrument panel reading training and identification method based on three-dimensional simulation sample generation

    CN116051929A

  • Electric power meter small sample target detection method based on domain adaptation

    CN116310596A