Industrial instrument data collection method and system

By collecting instrument images under different light intensities and performing image enhancement processing, the problem of image clarity under the influence of light is solved, efficient and safe industrial instrument data collection is realized, and the rapidly developing production and scientific research needs are met.

CN117789182BActive Publication Date: 2024-10-18SHIJIAZHUANG XINTUO AUTOMATION SYST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311783207.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2024-10-18
Estimated Expiration
2043-12-22

AI Technical Summary

Technical Problem

Existing video image recognition technology is greatly affected by lighting when collecting industrial instrument data, resulting in poor image clarity and unable to meet the needs of rapidly developing industrial production and scientific research. In addition, manual data collection is inefficient and costly, and there are potential safety hazards. .

Method used

By collecting instrument images under different light intensities as preset images, extract the part that does not include the instrument, adjust the image enhancement parameters, and perform image enhancement processing to obtain an effective image that is less affected by ambient lighting, and perform binarization processing for identification Meter reading.

Benefits of technology

It improves the clarity of the instrument image, reduces the impact of light, achieves high-quality data collection, improves work efficiency, reduces costs, and reduces the safety hazards of manual collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117789182B_ABST
    Figure CN117789182B_ABST
Patent Text Reader

Abstract

The present disclosure provides an industrial instrument data acquisition method and system, the method comprising: matching a target instrument image with a plurality of preset background images corresponding to the target instrument to obtain a target background image; wherein each background image corresponds to a set of image enhancement parameters, and the target background image is a background image that matches the target instrument image; performing image enhancement on the target instrument image based on the image enhancement parameters corresponding to the target background image; segmenting the dial in the target instrument image after image enhancement to obtain a binary image of the dial in the target instrument image; and recognizing the reading of the target instrument based on the binary image. The industrial instrument data acquisition method and system provided by the present disclosure can improve the clarity when acquiring instrument images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the technical field of instrument data collection, and more specifically, relates to an industrial instrument data collection method and system. Background Art

[0002] In industrial production and scientific research experiments, instruments and meters, as an important detection equipment in the production and research links, hold the lifeline of safe production and scientific research. It can always reflect the monitoring quantity of the monitored object, such as temperature, pressure, etc. At the same time, it reflects the operating status of the entire industrial production and scientific research experiments. Through the acquisition of these instrument data, the warning limit of the relevant equipment can be obtained in advance, which can effectively reduce the occurrence of accidents. At present, a large number of old pointer instruments and digital instruments without data communication interfaces are still used in industrial production, and the data recording still needs to be completed manually. Manual data collection is labor-intensive and inefficient, and the replacement of intelligent instruments is expensive and costly. In some special environments, there are still some safety hazards. In addition, at this stage, on-site manual data collection can no longer meet the current rapidly developing production and scientific research needs. Therefore, in order to meet the needs of digital development of industrial production, video image recognition technology is used to collect instrument data, which can provide instrument data communication functions for pointer instruments or digital instruments that do not have data communication functions, and improve the efficiency of instrument reading and recording. However, the existing video image recognition technology is greatly affected by light, resulting in poor clarity when collecting instrument images. Summary of the invention

[0003] The purpose of the present disclosure is to provide an industrial instrument data acquisition method and system to improve the clarity when acquiring instrument images.

[0004] A first aspect of an embodiment of the present disclosure provides an industrial instrument data collection method, comprising:

[0005] Matching the target instrument image with a plurality of preset background images corresponding to the target instrument to obtain a target background image; wherein each of the background images corresponds to a set of image enhancement parameters, and the target background image is a background image that matches the target instrument image;

[0006] Performing image enhancement on the target instrument image based on image enhancement parameters corresponding to the target background image;

[0007] Segmenting the dial in the target instrument image after image enhancement to obtain a binary image of the dial in the target instrument image;

[0008] A reading of the target meter is identified based on the binarized image.

[0009] A second aspect of the embodiments of the present disclosure provides an industrial instrument data acquisition system, including:

[0010] Image matching module: used to match the target instrument image with a plurality of preset background images corresponding to the target instrument to obtain a target background image; wherein each of the background images corresponds to a set of image enhancement parameters, and the target background image is a background image that matches the target instrument image;

[0011] Image enhancement module: performing image enhancement on the target instrument image based on image enhancement parameters corresponding to the target background image;

[0012] Image segmentation module: segmenting the dial in the target instrument image after image enhancement to obtain a binary image of the dial in the target instrument image;

[0013] Image reading module: identifies the reading of the target instrument based on the binary image.

[0014] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned industrial instrument data acquisition method when executing the computer program.

[0015] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned industrial instrument data collection method are implemented.

[0016] The beneficial effects of the industrial instrument data collection method and system provided by the embodiments of the present disclosure are:

[0017] In the process of acquiring instrument images, the quality of the image may be affected by the ambient light intensity. In places where the light is insufficient, the image is easily distorted, which is reflected in low brightness, low contrast, unclear color performance, and loss of important detail information. The industrial instrument data acquisition method provided by the present invention collects multiple industrial instrument images under different light intensities as preset images before collecting industrial instrument data, extracts the part of the industrial instrument image that does not contain the instrument, and each background image with different light intensities corresponds to an image enhancement parameter. The background image of each industrial instrument under different light intensities and the enhancement parameters corresponding to the background images under different light intensities are saved in a memory. After determining the target background image that matches the target image, the collected target instrument image is enhanced according to the enhancement parameters corresponding to the target background image, and an effective instrument image that is less affected by the ambient light intensity is obtained. Then, the enhanced image is segmented to obtain a high-quality binary black-and-white image, and the reading of the target instrument is identified according to the binary black-and-white image. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A flowchart of an industrial instrument data collection method provided by an embodiment of the present disclosure;

[0020] Figure 2 A schematic diagram of a binary image of an industrial instrument provided by an embodiment of the present disclosure;

[0021] Figure 3 A structural block diagram of an industrial instrument data acquisition system provided by an embodiment of the present disclosure;

[0022] Figure 4 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0024] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0025] Please refer to Figure 1 , Figure 1 A flow chart of an industrial instrument data collection method provided by an embodiment of the present disclosure, the method comprising:

[0026] S100: Matching a target instrument image with a plurality of preset background images corresponding to the target instrument to obtain a target background image; wherein each background image corresponds to a set of image enhancement parameters, and the target background image is a background image that matches the target instrument image.

[0027] Although the functions of current instrumentation equipment are becoming increasingly rich and complete, in some specific fields such as industrial production, deep coal mining, high-voltage power industry, dangerous scientific research experiments and other complex environments with uncertain safety hazards, traditional pointer-type instrumentation equipment is still used, and the acquisition of relevant test data still needs to be completed manually. The manual recording method has many uncertain factors, large additional investment, low efficiency, unstable data information and other disadvantages; in addition, working in such a harsh environment also poses certain risks to the life safety of the staff. It is difficult to collect and enter industrial instrument data in a long-term and stable manner. Once a danger occurs, it will not be worth the loss; finally, the collection of manual data is not long-term stable and correct, and will be more or less interfered by uncertain factors, resulting in missed detection and false detection of data.

[0028] In this embodiment, the inspection robot is used as a carrier and equipped with a camera. The inspection robot is used to collect industrial instrument data at a fixed point and at a fixed time. The industrial instrument in this embodiment is a pointer-type instrument. During the inspection and collection of industrial instrument data, the collection camera is affected by the ambient light intensity. The clarity of the image collected under different lighting conditions is different. If the light is too dark, the instrument data will not be recognized normally. For this reason, before collecting the data of the industrial instrument, in this embodiment, 5 industrial instrument images under different light intensities are collected. These 5 industrial instrument images under different light intensities are used as preset images, and each industrial instrument contains 5 preset images. Each industrial instrument image contains both an instrument image and a background image. The part of the industrial instrument image that does not contain the instrument is extracted by feature extraction, and the 5 background images (historically shot) with different light intensities are subjected to image enhancement processing. During this period, the image enhancement parameters are adjusted multiple times until the optimal image enhancement parameters are obtained. The optimal image enhancement parameters corresponding to each background image are determined as the image enhancement parameters corresponding to the background image described in step S100. That is, five background images with different light intensities correspond to one image enhancement parameter.

[0029] The target instrument image in this embodiment is the instrument image collected by the inspection robot during a normal inspection task. When the inspection robot collects instrument data, it first extracts the part of the target instrument image that does not contain the target instrument to obtain the target instrument background image. The target instrument background image is then compared with the brightness of five preset background images to find the one with the highest brightness similarity as the target background image.

[0030] S200: Performing image enhancement on the target instrument image based on image enhancement parameters corresponding to the target background image.

[0031] In this embodiment, five background images with different light intensities correspond to one image enhancement parameter. Before the inspection robot collects instrument data, the background images of each industrial instrument under different light intensities and the image enhancement parameters corresponding to the background images under different light intensities are first saved in the memory. After the target background image matching the target image is determined, the collected target instrument image is enhanced according to the image enhancement parameters corresponding to the target background image.

[0032] S300: Segmenting the dial in the target instrument image after image enhancement to obtain a binary image of the dial in the target instrument image.

[0033] In this embodiment, after the original image acquired by the inspection robot is enhanced, an effective instrument image that is less affected by the ambient light intensity is obtained. In order to accurately recognize characters, the image needs to be binarized, and the dial of the target instrument is divided into a background part and a target part. In order to avoid the influence of contrast and uneven illumination on binarization, the image is first top-hatted and then binarized. In this way, the binarization effect can achieve the desired goal, and then binarization is performed to obtain a high-quality binary black and white image.

[0034] S400: Recognize the reading of the target instrument based on the binary image.

[0035] In this embodiment, after segmenting the dial, a high-quality binary black-and-white image is obtained, in which the scale values ​​and the pointer of the dial can be clearly displayed, and the degree of the target instrument can be judged by the position of the scale value pointed by the pointer.

[0036] It can be concluded from the above that in the process of acquiring the instrument image, the image quality may be affected by the ambient light intensity, and the image is easily distorted in places with insufficient light. It is manifested in low brightness, low contrast, unclear color performance and loss of important detail information. The industrial instrument data acquisition method provided in this embodiment collects multiple industrial instrument images under different light intensities as preset images before collecting industrial instrument data, extracts the part of the industrial instrument image that does not contain the instrument, and each background image with different light intensities corresponds to an image enhancement parameter. The background image of each industrial instrument under different light intensities and the enhancement parameters corresponding to the background images under different light intensities are saved in the memory. After determining the target background image that matches the target image, the collected target instrument image is enhanced according to the enhancement parameters corresponding to the target background image, and an effective instrument image that is less affected by the ambient light intensity is obtained. Then, the enhanced image is segmented to obtain a high-quality binary black-and-white image, and the reading of the target instrument is identified according to the binary black-and-white image.

[0037] In one embodiment of the present disclosure, the industrial instrument data collection method further includes:

[0038] Acquire multiple frames of candidate images, where the candidate images are the most recently acquired images of the target instrument;

[0039] A coordinate system is established based on pixels of a preset frame image, the origin of the preset frame image coordinate system is located at the center of the preset frame image, the horizontal direction of the preset frame image is the X axis, and the vertical direction of the preset frame image is the Y axis; the preset frame image is an image of the target instrument taken in advance;

[0040] Establishing a coordinate system of a first reference area based on a preset frame image, wherein the origin of the first reference area coordinate system coincides with the center of the preset frame image coordinate system, and the area of ​​the first reference area is smaller than the area of ​​the preset frame image;

[0041] Calculate the similarity function value between the second reference area of ​​each frame in the target instrument image and the first reference area in the preset frame image by using the first formula, and take the frame with the highest similarity as the target instrument image;

[0042] The second reference area is an area corresponding to the first reference area.

[0043] In this embodiment, the inspection robot is used as a carrier to detect the data of industrial instruments. The industrial production environment is poor. During the detection process, the industrial instruments may shake continuously due to the operation of the on-site equipment, or the inspection robot may shake during the process of collecting instrument images, which will cause the collected images to be unclear. For this reason, this embodiment will collect multiple instrument images every time it reaches a collection point.

[0044] Before the inspection robot conducts inspection, it first collects an instrument image under normal conditions as a preset frame image, converts the preset frame image into a grayscale image, establishes a coordinate axis with the center of the preset frame image as the origin, takes the horizontal pixels as the X-axis, and takes the vertical pixels as the Y-axis, selects a first reference area at the center of the preset frame image, establishes a coordinate axis based on the first reference area, the center of the first reference area is the center of the preset frame image, and the first reference area and the preset frame image share a coordinate axis.

[0045] Then the pixel grayscale value and coordinates of the first reference area in the preset frame image are Save to memory and set the initial value of offset and motion trend. , the initial value is , the movement trend is , v x and v y When +1 is taken, it means shifting to the right and downward, and when -l is taken, it means shifting to the left and upward. Assuming (+l, +1), when collecting industrial instrument data, the camera will collect 10 frames of images at the same time. After starting processing, assuming that the matching area in the previous frame has been obtained for any frame of image and .

[0046] Predict the matching starting point based on the offset of the previous frame, assuming that the coordinates of the upper left corner of the second reference area in the current frame coordinate system Satisfies X=X0+u x , Y=Y0+u y , and then the similarity function value between the second reference area in the current frame of the target instrument image and the first reference area in the preset frame image is obtained according to the first formula. The first formula is expressed as:

[0047] in, is the coordinate of the origin of the second reference area in the current frame of the target instrument image in the current frame coordinate system, The similarity function value between the second reference area in the current frame of the target instrument image and the first reference area in the preset frame image, A and B are the number of pixels in the horizontal direction and the vertical direction of the first reference area in the preset frame image, respectively. are the corresponding coordinates in the second reference area, are the corresponding coordinates in the first reference area, is the grayscale of the pixel corresponding to the second reference area, is the grayscale of the pixel corresponding to the first reference area.

[0048] The larger the similarity function value between the second reference area in the current frame of the target instrument image and the first reference area in the preset frame image, the lower the similarity between the current frame of the target instrument image and the preset frame image. The similarity function value of each frame image is calculated respectively, and the frame image with the smallest similarity function value is taken as the target instrument image, thereby obtaining a target instrument image with high clarity.

[0049] In one embodiment of the present disclosure, segmenting the dial in the target instrument image after image enhancement to obtain a binary image of the dial in the target instrument image includes:

[0050] The dial in the target instrument image is segmented based on the connected domain, and features in the connected domain whose area is greater than a first preset value and less than a second preset value are extracted to obtain the scale of the dial in the target instrument image. Features whose length of the connected domain is greater than a third preset value are extracted to obtain the pointer of the dial.

[0051] like Figure 2 As shown, in this embodiment, after the above processing of the instrument image, we can obtain a high-quality binary black and white image. Then, we need to locate and segment the readings of the pointer instrument, so that the basic data of the binary image can be effectively stabilized. Accurate positioning and segmentation can effectively improve the recognition rate of instrument data. In this embodiment, the 4-neighborhood connectivity standard is used to find the connected domain with all pixels of 255 (black), so that each separated area in the image can be detected. In this way, the connected domain that meets the requirements can be screened out, that is, the pixel points of the scale value and the pointer in the dial are extracted, and the other pixel points are discarded. Among them, the first preset value is a value greater than the area of ​​the connected domain of the dial scale, and the second preset value is a value less than the area of ​​the connected domain of the dial scale. The connected domain with the longest area is the pointer ( Figure 2 “L is the length of the connected domain area”).

[0052] In one embodiment of the present disclosure, recognizing the reading of the target instrument based on the binary image includes: obtaining the reading of the target instrument based on the angle between the pointer and the zero scale in the binary image.

[0053] After extracting the scale value and the pixel points of the pointer in the dial, the degree of the pointer instrument is obtained according to the ratio of the angle corresponding to the scale value pointed by the pointer and the zero scale value to the full scale angle of the dial.

[0054] In one embodiment of the present disclosure, the industrial data collection method further includes: scanning a binary image of a dial in the target instrument image, with the scale value at the leftmost end of the dial being zero scale and the scale value at the rightmost end of the dial being full scale.

[0055] The pointer instrument in this embodiment is a circular instrument, and the instrument is not a full scale of 0-360°, so the dial is first scanned to determine the zero scale value. In this embodiment, the scale value at the far left is the zero scale, and the scale value at the far right is the full scale. The coordinate axis is established with the center of the dial as the origin, and a straight line is fitted based on the center of the dial and the zero scale of the dial. This straight line is used as the X-axis of the coordinate axis, so that the angle corresponding to the zero scale is 0.

[0056] In one embodiment of the present disclosure, the industrial data collection method also includes: based on a coordinate axis established with the center of the dial as the origin, obtaining the angle between the zero scale of the dial and the scale indicated by the pointer according to the coordinates of the zero scale pixels of the dial and the coordinates of the scale pixels indicated by the pointer.

[0057] In this embodiment, the angle between the zero scale and the scale pointed by the pointer can be calculated according to the coordinates of the scale pixel pointed by the pointer, and the degree of the pointer instrument can be obtained according to the ratio of the angle corresponding to the scale value pointed by the pointer and the zero scale value to the full scale angle of the dial.

[0058] In one embodiment of the present disclosure, the target instrument image is captured by a camera device on the inspection robot. On this basis, the reading of the target instrument is recognized based on the binary image, which can be described in detail as follows:

[0059] Calculate the clarity of the binary image;

[0060] If the clarity of the binary image is greater than the preset clarity, the reading of the target instrument is recognized based on the binary image;

[0061] If the definition of the binary image is less than or equal to the preset definition, the camera device of the inspection robot is controlled to capture a first instrument image at a target position after a first preset time; the target position is the position where the camera device on the inspection robot captures the target instrument image;

[0062] Processing the first instrument image based on the method of step S100 to step S300 to obtain a binary image corresponding to the first instrument image;

[0063] Performing feature matching on the binary image of the target instrument image and the binary image of the target instrument image to obtain a matching accuracy rate of feature points between the binary image of the target instrument image and the binary image of the target instrument image;

[0064] If the matching accuracy of the aforementioned feature points is greater than the preset accuracy, a first prompt message is generated; the first prompt message is used to indicate that the image acquisition is not clear and the target instrument reading is not abnormal for the time being, and it is recommended to deal with the image acquisition problem within the second preset time;

[0065] If the matching accuracy of the aforementioned feature points is less than or equal to the preset accuracy, a second prompt message is generated; the second prompt message is used to indicate that the image acquisition is not clear and the target instrument reading may be abnormal, and it is recommended to deal with the image acquisition problem and the equipment failure problem corresponding to the target instrument within a third preset time; wherein the third preset time is less than the second preset time.

[0066] In this embodiment, if the binary image of the target instrument image is not clear enough (for example, the pointer position of the target instrument) to accurately determine the reading, this embodiment can control the camera device to take the image of the target instrument again at the same location after the first preset time to obtain the first instrument image. On this basis, the change of the pointer within the first preset time can be described by the correct matching rate of the feature points of the first instrument image (corresponding binary image) and the target instrument image (corresponding binary image). On this basis, the fault condition of the device corresponding to the target instrument can be preliminarily determined by this change, and a corresponding prompt can be given.

[0067] In this embodiment, if the binary image of the target instrument image is clear enough to accurately determine the reading, the reading of the target instrument can be identified based on the binary image of the target instrument image to achieve data collection.

[0068] In this embodiment, the method for calculating the image clarity may refer to related technologies and will not be described in detail in this embodiment.

[0069] Corresponding to the industrial instrument data collection method in the above embodiment, Figure 3 This is a structural block diagram of an industrial instrument data acquisition system provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 3 , the industrial instrument data acquisition system 20 comprises:

[0070] The image matching module 21 is used to match the target instrument image with a plurality of preset background images corresponding to the target instrument to obtain a target background image; wherein each background image corresponds to a set of image enhancement parameters, and the target background image is a background image that matches the target instrument image;

[0071] An image enhancement module 22, configured to perform image enhancement on a target instrument image based on image enhancement parameters corresponding to a target background image;

[0072] An image segmentation module 23 is used to segment the dial in the target instrument image after image enhancement to obtain a binary image of the dial in the target instrument image;

[0073] The image reading module 24 is used to recognize the reading of the target instrument based on the binary image.

[0074] In one embodiment of the present disclosure, the industrial instrument data acquisition system 20 further includes:

[0075] Acquire multiple frames of candidate images, where the candidate images are the most recently acquired images of the target instrument;

[0076] A coordinate system is established based on pixels of a preset frame image, the origin of the preset frame image coordinate system is located at the center of the preset frame image, the horizontal direction of the preset frame image is the X axis, and the vertical direction of the preset frame image is the Y axis; the preset frame image is an image of the target instrument taken in advance;

[0077] Establishing a coordinate system of a first reference area based on a preset frame image, wherein the origin of the first reference area coordinate system coincides with the center of the preset frame image coordinate system, and the area of ​​the first reference area is smaller than the area of ​​the preset frame image;

[0078] Calculate the similarity function value between the second reference area of ​​each frame in the target instrument image and the first reference area in the preset frame image by using the first formula, and take the frame with the highest similarity as the target instrument image;

[0079] The second reference area is an area corresponding to the first reference area;

[0080] The first formula is expressed as:

[0081] in, is the coordinate of the origin of the second reference area in the current frame of the target instrument image in the current frame coordinate system, The similarity function value between the second reference area in the current frame of the target instrument image and the first reference area in the preset frame image, A and B are the number of pixels in the horizontal direction and the vertical direction of the first reference area in the preset frame image, respectively. are the corresponding coordinates in the second reference area, are the corresponding coordinates in the first reference area, is the grayscale of the pixel corresponding to the second reference area, is the grayscale of the pixel corresponding to the first reference area.

[0082] In one embodiment of the present disclosure, the industrial instrument data acquisition system 20 is also used for:

[0083] The dial in the target instrument image after image enhancement is segmented to obtain a binary image of the dial in the target instrument image, including:

[0084] The dial in the target instrument image is segmented based on the connected domain, and features in the connected domain whose area is greater than a first preset value and less than a second preset value are extracted to obtain the scale of the dial in the target instrument image. Features in the connected domain whose length is greater than a third preset value are extracted to obtain the pointer of the dial.

[0085] In one embodiment of the present disclosure, the industrial instrument data acquisition system 20 is also used for:

[0086] The readings of the target instrument based on the binary image recognition include:

[0087] The reading of the target instrument is obtained based on the angle between the pointer and the zero scale in the binary image.

[0088] In one embodiment of the present disclosure, the industrial instrument data acquisition system 20 is also used for:

[0089] Scan the binary image of the dial in the target instrument image to obtain the zero scale of the dial;

[0090] The coordinate axis is established with the center of the dial as the origin, and a straight line is fitted based on the origin and the zero scale of the dial. The straight line from the center of the dial to the zero scale of the dial is used as the X-axis, the straight line passing through the center of the dial and perpendicular to the X-axis is used as the Y-axis, and the horizontal coordinate of the zero scale pixel is the radius.

[0091] In one embodiment of the present disclosure, the industrial instrument data acquisition system 20 is also used for:

[0092] Based on a coordinate axis established with the center of the dial as the origin, the angle between the zero scale of the dial and the scale pointed by the pointer is obtained according to the coordinates of the zero scale pixel of the dial and the coordinates of the scale pixel pointed by the pointer.

[0093] See also Figure 4 , Figure 4 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 4 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of the modules in the above-mentioned system embodiments, such as Figure 3 The functions of modules 21 to 24 are shown.

[0094] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may 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. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0095] The input device 302 may include a touch panel, a fingerprint sensor (for collecting fingerprint information of the user and fingerprint direction information), a microphone, etc. The output device 303 may include a display (LCD, etc.), a speaker, etc.

[0096] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0097] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of the industrial instrument data acquisition method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.

[0098] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, wherein the program instructions are executed by a processor to implement all or part of the processes in the above-mentioned embodiment method, and may also be completed by instructing the relevant hardware through the computer program, wherein the computer program may be stored in a computer-readable storage medium, and wherein the computer program may be executed by the processor to implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the contents contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signal and telecommunication signal.

[0099] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0100] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0101] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0102] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.

[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.

[0104] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0105] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for collecting industrial instrument data, It is characterized in that include: Matching the target instrument image with a plurality of preset background images corresponding to the target instrument to obtain a target background image; wherein each of the background images corresponds to a set of image enhancement parameters, and the target background image is a background image that matches the target instrument image; Performing image enhancement on the target instrument image based on image enhancement parameters corresponding to the target background image; Segmenting the dial in the target instrument image after image enhancement to obtain a binary image of the dial in the target instrument image; recognizing a reading of the target instrument based on the binarized image; The target instrument image is captured by the camera device on the inspection robot. On this basis, the reading of the target instrument is recognized based on the binary image, including: Calculate the clarity of the binary image; If the definition of the binary image is greater than the preset definition, the reading of the target instrument is recognized based on the binary image; If the definition of the binary image is less than or equal to the preset definition, the camera device of the inspection robot is controlled to capture a first instrument image at a target position after a first preset time; the target position is the position where the camera device on the inspection robot captures the target instrument image; Processing the first instrument image to obtain a binary image corresponding to the first instrument image; Performing feature matching on the binary image of the target instrument image and the binary image of the first instrument image to obtain a matching accuracy rate of feature points between the binary image of the target instrument image and the binary image of the first instrument image; If the matching accuracy of the feature points is greater than a preset accuracy, generating a first prompt message; If the matching accuracy of the feature points is less than or equal to the preset accuracy, a second prompt information is generated.

2. The industrial instrument data collection method according to claim 1, It is characterized in that The industrial instrument data collection method further comprises: Acquire multiple frames of candidate images, where the candidate images are the most recently acquired images of the target instrument; A coordinate system is established based on the pixels of a preset frame image, wherein the origin of the preset frame image coordinate system is located at the center of the preset frame image, the horizontal direction of the preset frame image is the X-axis, and the vertical direction of the preset frame image is the Y-axis; the preset frame image is an image of the target instrument taken in advance; Establishing a coordinate system of a first reference area based on the preset frame image, wherein the origin of the first reference area coordinate system coincides with the center of the preset frame image coordinate system, and the area of ​​the first reference area is smaller than the area of ​​the preset frame image; Calculate the similarity function value between the second reference area of ​​each frame in the target instrument image and the first reference area in the preset frame image by using the first formula, and take the frame with the highest similarity as the target instrument image; The second reference area is an area corresponding to the first reference area; The first formula is expressed as: in, is the coordinate of the origin of the second reference area in the current frame of the target instrument image in the current frame coordinate system, The similarity function value between the second reference area in the current frame of the target instrument image and the first reference area in the preset frame image, A and B are the number of pixels in the horizontal direction and the vertical direction of the first reference area in the preset frame image, respectively. are the corresponding coordinates in the second reference area, are the corresponding coordinates in the first reference area, is the grayscale of the pixel corresponding to the second reference area, is the grayscale of the pixel corresponding to the first reference area.

3. The industrial instrument data collection method according to claim 1, It is characterized in that Segmenting the dial in the target instrument image after image enhancement to obtain a binary image of the dial in the target instrument image includes: The dial in the target instrument image is segmented based on the connected domain, features in the connected domain whose area is greater than a first preset value and less than a second preset value are extracted to obtain the scale of the dial in the target instrument image, and features whose length of the connected domain is greater than a third preset value are extracted to obtain the pointer of the dial.

4. The industrial instrument data collection method according to claim 1, It is characterized in that The step of recognizing the reading of the target instrument based on the binary image comprises: The reading of the target instrument is obtained based on the angle between the pointer and the zero scale in the binary image.

5. The industrial instrument data collection method according to claim 3, It is characterized in that Also includes: The binary image of the dial in the target instrument image is scanned, with the scale value at the leftmost end of the dial being the zero scale and the scale value at the rightmost end of the dial being the full scale.

6. The industrial instrument data collection method according to claim 5, It is characterized in that Also includes: Based on a coordinate axis established with the center of the dial as the origin, the angle between the zero scale of the dial and the scale pointed by the pointer is obtained according to the coordinates of the zero scale pixel of the dial and the coordinates of the scale pixel pointed by the pointer.

7. An industrial instrument data acquisition system, It is characterized in that include: An image matching module, used for matching a target instrument image with a plurality of preset background images corresponding to the target instrument, so as to obtain a target background image; wherein each of the background images corresponds to a set of image enhancement parameters, and the target background image is a background image that matches the target instrument image; An image enhancement module, used for performing image enhancement on the target instrument image based on image enhancement parameters corresponding to the target background image; An image segmentation module, used for segmenting the dial in the target instrument image after image enhancement to obtain a binary image of the dial in the target instrument image; An image reading module, used for identifying the reading of the target instrument based on the binary image; The target instrument image is captured by the camera device on the inspection robot. On this basis, the reading of the target instrument is recognized based on the binary image, including: Calculate the clarity of the binary image; If the definition of the binary image is greater than the preset definition, the reading of the target instrument is recognized based on the binary image; If the definition of the binary image is less than or equal to the preset definition, the camera device of the inspection robot is controlled to capture a first instrument image at a target position after a first preset time; the target position is the position where the camera device on the inspection robot captures the target instrument image; Processing the first instrument image to obtain a binary image corresponding to the first instrument image; Performing feature matching on the binary image of the target instrument image and the binary image of the first instrument image to obtain a matching accuracy rate of feature points between the binary image of the target instrument image and the binary image of the first instrument image; If the matching accuracy of the feature points is greater than a preset accuracy, generating a first prompt message; If the matching accuracy of the feature points is less than or equal to the preset accuracy, a second prompt information is generated.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for recognizing instrument character wheel

    CN108052943A

  • Face recognition method, device and system and computer readable medium

    CN108875452A

  • Substation instrument reading identification method and device adaptive to environment and medium

    CN114140685A