Instrument image processing method and device, computer device and storage medium
By performing regional analysis and feature matching on digital instrument images, the target region of interest is automatically identified, solving the problem of low efficiency in manual reading of digital instruments and achieving efficient and accurate automated reading.
Patent Information
- Application Number
- CN202110597680.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-31
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-01-30
AI Technical Summary
In the existing technology, digital instruments without data interfaces require manual reading, resulting in low reading processing efficiency.
By acquiring instrument images, performing regional analysis, determining the region of interest, performing feature matching, identifying the target region of interest, and performing numerical recognition, automated readings are achieved using computer equipment and storage media.
It improves the processing efficiency of digital instrument readings, ensures the accuracy and relevance of numerical recognition, and reduces the amount of data processing.
Smart Images

Figure CN113221893B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to an instrument image processing method and device, computer equipment and storage medium. BACKGROUND
[0002] With the continuous development of society, digital instruments are widely used in industrial production and daily life due to their high precision, easy reading and writing, etc. For example, various medical instruments such as blood pressure meters, heart rate meters, and various medical instruments, as well as electric meters, substation instruments, etc. For data reading of digital instruments, for digital instruments with data interface, data transmission can be performed through the data interface. However, for digital instruments without data interface, manual reading is still required, resulting in low reading processing efficiency of digital instruments. SUMMARY
[0003] Therefore, it is necessary to provide an instrument image processing method and device, computer equipment and storage medium capable of improving the reading processing efficiency of digital instruments.
[0004] An instrument image processing method, the method comprising:
[0005] obtaining an instrument image photographed for a digital instrument;
[0006] performing region analysis on the instrument image to obtain each region of interest in the instrument image;
[0007] performing feature matching on the instrument image and a standard feature image corresponding to the digital instrument to determine matching feature points in the instrument image;
[0008] determining a target region of interest from each region of interest based on the distribution characteristics of the matching feature points in each region of interest;
[0009] performing numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image.
[0010] In one embodiment, the region analysis on the instrument image to obtain each region of interest in the instrument image comprises: performing binaryzation processing on each channel image corresponding to each channel of the instrument image to obtain each channel binary image; performing contour extraction on each channel binary image to obtain the contour in each channel binary image; and performing region construction based on the contour in each channel binary image to obtain each region of interest in the instrument image.
[0011] In one of the embodiments, the contour extraction is respectively performed on each channel binary image to obtain the contour in each channel binary image, including: performing first contour extraction on each channel binary image to obtain first contour extraction result; performing contour deformation processing on the first contour extraction result to obtain contour deformation result; performing second contour extraction based on the contour deformation result to obtain the contour in each channel binary image.
[0012] In one of the embodiments, the region construction is performed based on the contour in each channel binary image to obtain each region of interest in the instrument image, including: performing region fitting based on the contour in each channel binary image to obtain first region of interest; performing contour reconstruction on the contour in each channel binary image through a contour reconstruction algorithm to obtain second region of interest; obtaining each region of interest in the instrument image according to the first region of interest and the second region of interest.
[0013] In one of the embodiments, the target region of interest is determined from each region of interest based on the distribution characteristics of the matching feature points in each region of interest, including: counting the number of feature points in each region of interest; obtaining the feature point proportion corresponding to each region of interest according to the number of feature points and the area of the corresponding region of interest; determining the target region of interest from each region of interest based on the feature point proportion.
[0014] In one of the embodiments, the numerical recognition is performed on the target region of interest to obtain the numerical recognition result of the instrument image, including: determining the numerical type of the to-be-recognized numerical value in the digital instrument; performing numerical region division on the target region of interest based on the numerical type to obtain the sub-region corresponding to each numerical type; performing numerical recognition on each sub-region to obtain the numerical recognition result of the instrument image.
[0015] In one of the embodiments, the numerical recognition is performed on each sub-region to obtain the numerical recognition result of the instrument image, including: performing contour enhancement processing on each sub-region to obtain the contour enhancement result corresponding to each sub-region; performing contour extraction based on each contour enhancement result to obtain the sub-region numerical contour corresponding to each sub-region; matching the sub-region numerical contour with the numerical mapping feature in the numerical mapping table to determine the sub-region numerical value corresponding to the sub-region numerical contour according to the matching result; obtaining the numerical recognition result of the instrument image according to the sub-region numerical value corresponding to each sub-region numerical contour.
[0016] An instrument image processing apparatus, the apparatus comprising:
[0017] An instrument image acquisition module is configured to acquire an instrument image obtained by photographing a digital instrument;
[0018] The region-of-interest determination module is configured to perform region analysis on the instrument image to obtain each region of interest in the instrument image.
[0019] The feature matching module is configured to perform feature matching between the instrument image and a standard feature image corresponding to the digital instrument to determine matching feature points in the instrument image.
[0020] The target region determination module is configured to determine a target region of interest from the regions of interest based on distribution characteristics of the matching feature points in the regions of interest.
[0021] The numerical value recognition processing module is configured to perform numerical value recognition on the target region of interest to obtain a numerical value recognition result of the instrument image.
[0022] A computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0023] An instrument image captured for a digital instrument is obtained.
[0024] Region analysis is performed on the instrument image to obtain each region of interest in the instrument image.
[0025] Feature matching is performed between the instrument image and a standard feature image corresponding to the digital instrument to determine matching feature points in the instrument image.
[0026] A target region of interest is determined from the regions of interest based on distribution characteristics of the matching feature points in the regions of interest.
[0027] Numerical value recognition is performed on the target region of interest to obtain a numerical value recognition result of the instrument image.
[0028] A computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0029] An instrument image captured for a digital instrument is obtained.
[0030] Region analysis is performed on the instrument image to obtain each region of interest in the instrument image.
[0031] Feature matching is performed between the instrument image and a standard feature image corresponding to the digital instrument to determine matching feature points in the instrument image.
[0032] A target region of interest is determined from the regions of interest based on distribution characteristics of the matching feature points in the regions of interest.
[0033] Numerical value recognition is performed on the target region of interest to obtain a numerical value recognition result of the instrument image.
[0034] The instrument image processing method, apparatus, computer device and storage medium described above perform region analysis on the instrument image obtained by shooting the digital instrument, obtain each region of interest in the instrument image, determine the distribution characteristics of the matching feature points determined based on the feature matching of the standard feature image corresponding to the digital instrument in each region of interest, determine a target region of interest from each region of interest, perform numerical identification on the target region of interest, and obtain the numerical identification result of the instrument image. The target region of interest is determined based on the distribution characteristics of the matching feature points determined from the instrument image in each region of interest, and the target region of interest is subjected to numerical identification, so that the region including the numerical value in the instrument image is accurately determined for numerical identification, the data amount of numerical identification processing can be reduced under the premise of ensuring the pertinence of numerical identification, and the processing efficiency of the digital instrument reading is effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 An application environment diagram of the instrument image processing method in an embodiment;
[0036] Figure 2 A flowchart of the instrument image processing method in an embodiment;
[0037] Figure 3 A flowchart of obtaining a numerical identification result in an embodiment;
[0038] Figure 4 An instrument image in an embodiment;
[0039] Figure 5 A channel image of the G channel in the embodiment shown in FIG. 8; Figure 4
[0040] A channel image of the B channel in the embodiment shown in FIG. 9; Figure 6 Figure 4 A binary channel image in the embodiment shown in FIG. 10;
[0041] Figure 7 Figure 6 A schematic diagram of a contour extraction result in the embodiment shown in FIG. 11;
[0042] Figure 8 A schematic diagram of a target region of interest after the grayscale processing in an embodiment; Figure 7
[0043] A schematic diagram of a target region of interest after the grayscale processing in an embodiment; Figure 9
[0044] A schematic diagram of a sub-region corresponding to the systolic pressure SYS in the embodiment shown in FIG. 13; Figure 10 Figure 9 A schematic diagram of a sub-region corresponding to the diastolic pressure DIA in the embodiment shown in FIG. 14;
[0045] Figure 11 Figure 10 A schematic diagram of a sub-region numerical profile in the illustrated embodiment;
[0046] Figure 12 A structural block diagram of an instrument image processing device in an embodiment;
[0047] Figure 13 An internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0048] For the purpose, technical solutions and advantages of the present application to be clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0049] The instrument image processing method provided by the present application can be applied to the application environment as shown in Figure 1 . Wherein, the terminal 102 communicates with the server 104 through the network. The digital instrument can be a sphygmomanometer, and the terminal 102 can photograph the display panel of the sphygmomanometer to obtain the instrument image corresponding to the sphygmomanometer. The terminal sends the instrument image obtained by photographing to the server 104. The server 104 performs region analysis on the instrument image sent by the terminal 102 to obtain each region of interest in the instrument image. The distribution characteristics of the matching feature points determined based on the feature matching between the instrument image and the standard feature image corresponding to the digital instrument in each region of interest are determined. The target region of interest is determined from each region of interest. The numerical value of the target region of interest is recognized to obtain the numerical recognition result of the instrument image, and the numerical recognition result is returned to the terminal 102. The terminal 102 can display the numerical recognition result in the interface. In addition, after the terminal 102 photographs the instrument image of the digital instrument, the terminal 102 can also perform instrument image processing on the instrument image alone, that is, the terminal 102 can directly perform region analysis on the instrument image to obtain each region of interest in the instrument image. The distribution characteristics of the matching feature points determined based on the feature matching between the instrument image and the standard feature image corresponding to the digital instrument in each region of interest are determined. The target region of interest is determined from each region of interest. The numerical value of the target region of interest is recognized to obtain the numerical recognition result of the instrument image and display it.
[0050] Wherein, the terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0051] In one embodiment, as shown in Figure 2 , an instrument image processing method is provided. Taking the server in Figure 1 as an example, the method comprises the following steps:
[0052] At step 202, an instrument image of a digital instrument is obtained.
[0053] The digital instrument refers to an instrument that displays measured values in digital form, i.e., the digital instrument converts measurement into digital quantity and displays it in digital form. The digital instrument displays the measured quantity in digital form, and the reading is intuitive and free of visual errors. The digital instrument generally includes three parts: a scale and pointer indicating electric quantity, an electromagnetic force-based electric measurement circuit, and analog-to-digital conversion and digital display. The digital instrument can be applied to different scenarios to display various measurement data, such as medical instruments, such as a sphygmomanometer, to directly display the blood pressure value measured by the sphygmomanometer in digital form. The specific product form of the digital instrument is determined according to the actual application scenario, and the meaning of the displayed value corresponds to the actual application scenario. The instrument image is an image obtained by photographing the digital instrument, which can be obtained by a user photographing the display panel of the digital instrument for displaying measurement values through an image perception device, such as a terminal.
[0054] Specifically, the server obtains an instrument image of a digital instrument, which is specifically obtained by photographing the display panel of the digital instrument, such as photographing the display panel of the digital instrument by a user through a terminal and sending the obtained instrument image to the server. The server receives the instrument image uploaded by the terminal to perform value recognition processing on the instrument image.
[0055] At step 204, the instrument image is subjected to region analysis to obtain each region of interest in the instrument image.
[0056] The region of interest is a region in the instrument image that needs to be recognized, and since the photographing range of the instrument image is different, the digital instrument can display various values. The region of interest obtained by region analysis of the instrument image can be multiple, and the range included in each region of interest is different. Therefore, it is necessary to screen appropriate regions from each region of interest for value recognition to achieve accurate reading processing of the digital instrument.
[0057] Specifically, after the server obtains the instrument image, the server performs region analysis on the instrument image. Specifically, the server can perform binaryzation processing on the instrument image, perform contour extraction based on the binaryzation processing result, and construct each region of interest in the instrument image based on the extracted contour.
[0058] At step 206, the instrument image is subjected to feature matching with a standard feature image corresponding to the digital instrument to determine matching feature points in the instrument image.
[0059] The standard feature image is a standard image of a display panel of the digital instrument, that is, the standard feature image corresponds to the display panel of the digital instrument and can accurately and comprehensively display all data of the digital instrument. The instrument image obtained by the user through terminal shooting may be shot to other irrelevant environment in addition to the display panel of the digital instrument due to shooting angle and shooting distance, and therefore it is necessary to intercept the instrument image, to intercept the region corresponding to the display panel of the digital instrument from the instrument image for numerical recognition, that is, to intercept the image region matched with the standard feature image from the instrument image for numerical recognition. The matching feature point is a feature point matched successfully between the instrument image and the standard feature image corresponding to the digital instrument after feature matching.
[0060] Specifically, after the server obtains the instrument image shot for the digital instrument, the server further queries the standard feature image corresponding to the digital instrument. The standard feature image can be set in advance, for example, the display panel of the digital instrument can be shot in advance and the standard feature image corresponding to the display panel can be intercepted. The standard feature image can cover the display panel of the digital instrument, including all data in the digital instrument and not including other irrelevant environment background. The server performs feature matching between the instrument image and the standard feature image, for example, the instrument image and the standard feature image can be matched based on an image matching algorithm, for example, a gray-based matching algorithm, a feature-based matching algorithm or a relationship-based matching algorithm. According to the feature matching result, the matching feature point in the instrument image is determined, which refers to the feature point in the instrument image matched successfully with the standard feature image. In one specific application, the instrument image and the standard feature image corresponding to the digital instrument can be matched based on a SIFT (Scale-invariant feature transform) algorithm to obtain the matching feature point in the instrument image.
[0061] Step 208, determining the target region of interest from each region of interest based on the distribution characteristics of the matching feature points in each region of interest.
[0062] The target region of interest is an image region in the instrument image corresponding to the display panel of the digital instrument, that is, the target region of interest includes the measurement data of the digital instrument and does not carry other environment background. Numerical recognition on the target region of interest can realize accurate reading of the digital instrument.
[0063] Specifically, the server determines distribution features of the matching feature points in the instrument image in each region of interest, such as the number of feature points, the distribution density, and the like of the matching feature points in the instrument image in each region of interest. The server screens each region of interest based on the distribution features, and obtains a target region of interest. For example, a region of interest including the largest number of matching feature points and the smallest area can be screened from each region of interest, and is determined as the target region of interest, so as to remove the environmental background from the instrument image, and based on the target region of interest, numerical recognition can be performed, and accurate reading processing of the digital instrument can be realized.
[0064] In step 210, numerical recognition is performed on the target region of interest, and a numerical recognition result of the instrument image is obtained.
[0065] The numerical recognition result refers to a recognition result of each value displayed in the digital instrument, that is, a reading result of the digital instrument. Specifically, after the target region of interest in the instrument image is determined, the server performs numerical recognition on the target region of interest, such as performing numerical feature extraction on the target region of interest, performing numerical matching based on the extracted numerical features, and obtaining the numerical recognition result of the instrument image according to the numerical matching result, so as to realize reading processing of the numerical instrument.
[0066] In the above instrument image processing method, the instrument image captured by the digital instrument is analyzed to obtain each region of interest in the instrument image, the distribution features of the matching feature points determined by the feature matching between the instrument image and the standard feature image corresponding to the digital instrument in each region of interest are determined, the target region of interest is determined from each region of interest, numerical recognition is performed on the target region of interest, and the numerical recognition result of the instrument image is obtained. The target region of interest is determined based on the distribution features of the matching feature points in each region of interest determined from the instrument image, and numerical recognition is performed on the target region of interest, so as to accurately determine the region including the value from the instrument image for numerical recognition, reduce the data amount of numerical recognition processing under the premise of ensuring the pertinence of numerical recognition, and effectively improve the processing efficiency of the digital instrument reading.
[0067] In one embodiment, the instrument image is analyzed to obtain each region of interest in the instrument image, including: performing binaryzation processing on each channel image corresponding to each channel of the instrument image, respectively, to obtain each channel binary image; performing contour extraction on each channel binary image, respectively, to obtain the contour in each channel binary image; and performing region construction based on the contour in each channel binary image, to obtain each region of interest in the instrument image.
[0068] The channel is a gray image of the color image, which is composed of only one primary color of the color image. For example, for an RGB color image, three channels R, G and B are included respectively, each of which corresponds to a channel image. The channel image can include images corresponding to different channels of the instrument image, and the channel image can also include images formed by combination of different channel components. For example, the channel image can include channel images of three channels R, G and B, and can also include channel images obtained by taking 50% components of the R channel and the G channel respectively, and can also include channel images formed by other channel combination relationships. The channel combination relationship can be set according to actual needs, such as setting different channel combination relationships for different shooting environments of the instrument image, so as to obtain various types of channel images to ensure the accuracy of the region analysis.
[0069] The channel binary image is an image obtained by binarizing the channel image, and the channel binary image only includes black and white colors, that is, the gray value of any pixel point in the channel binary image is 0 or 255, which respectively represents black and white. The contour reflects the edge in the image, and the image edge is a reflection of the local feature discontinuity (gray level mutation, color mutation, etc.) of the image, which marks the end of one region and the beginning of another region. The image can be regionally divided through the contour.
[0070] Specifically, when the instrument image is regionally analyzed, the server separates the instrument image into channels to obtain channel images corresponding to each channel of the instrument image. Further, the server can also fuse the channel images corresponding to each individual channel according to a preset channel combination relationship to form a corresponding fused channel image, and obtain the channel images corresponding to the instrument image according to the fused channel image and the individual channel image. The server respectively performs binarization processing on each channel image, which can be specifically performed by a binarization algorithm, such as OTSU (maximum inter-class variance method) algorithm, Bernsen binarization algorithm, block analysis-based binarization algorithm or loop threshold algorithm, to obtain each channel binary image.
[0071] Further, the server respectively extracts the contour from each channel binary image, such as by the hollowing internal point method, to obtain the contour in each channel binary image. The number of contours in each channel binary image is related to the actual application, and generally the contour includes multiple. The server constructs a region based on the contour in each channel binary image, so as to further construct the region of interest based on the contour.
[0072] In this embodiment, the server respectively performs binarization processing on the channel images corresponding to the instrument image of each channel, respectively performs contour extraction on the obtained channel binary images of each channel, and then performs region construction based on the contours in the channel binary images, so as to determine each region of interest in the instrument image. The instrument image can be accurately segmented to ensure the processing efficiency of the instrument image.
[0073] In one embodiment, considering that the instrument image obtained under different shooting environments has a corresponding channel image suitable for instrument image processing, a mapping relationship between the shooting environment and the channel image can be constructed in advance, so that the shooting environment of the instrument image is used to determine the corresponding channel image for subsequent instrument image processing. Specifically, after obtaining the instrument image, the server can perform shooting environment analysis on the instrument image, such as using a pre-trained neural network model to perform shooting environment analysis on the instrument image to obtain the shooting environment corresponding to the instrument image. After determining the shooting environment corresponding to the instrument image, the server queries the mapping relationship between the shooting environment and the channel image constructed in advance, and determines the target channel image corresponding to the instrument image based on the shooting environment corresponding to the instrument image and the mapping relationship, so as to determine the channel image corresponding to the instrument image that needs to be obtained, and perform subsequent instrument image processing on the channel image. By performing shooting environment analysis on the instrument image, determining the target channel image according to the shooting environment corresponding to the instrument image, and performing instrument image processing based on the target channel image, the channel can be screened according to the shooting environment corresponding to the instrument image, so as to avoid processing each channel image of the instrument image respectively, which can further reduce the data amount in instrument image processing and improve the processing efficiency of the instrument image.
[0074] In one embodiment, the contour extraction is performed on each channel binary image to obtain the contour in the channel binary image, including: performing first contour extraction on each channel binary image to obtain a first contour extraction result; performing contour deformation processing on the first contour extraction result to obtain a contour deformation result; and performing second contour extraction based on the contour deformation result to obtain the contour in the channel binary image.
[0075] The contour deformation processing can be contour enhancement processing based on the first contour extraction result, such as sequentially performing contour widening processing, contour narrowing processing, etc. on the first contour extraction result, so as to improve the contour extraction effect and obtain an accurate contour.
[0076] Specifically, the server performs first contour extraction on each channel binary image to obtain a first contour extraction result when performing contour extraction on the channel binary image. The first contour extraction is direct contour extraction based on the channel binary image. The first contour extraction result includes contours obtained by directly performing contour extraction on the channel binary image. Further, the server performs contour morphing processing on the first contour extraction result. For example, the server can perform contour widening processing and contour narrowing processing on each contour in the first contour extraction result in sequence, thereby enhancing the contours in the first contour extraction result to obtain a contour morphing result. After obtaining the contour morphing result, the server performs second contour extraction based on the contour morphing result, that is, performs contour extraction based on the contour morphing result after contour enhancement. The server obtains contours in each channel binary image based on the second contour extraction result, for example, by directly taking the second contour extraction result as the contours in each channel binary image.
[0077] In this embodiment, after performing first contour extraction on the channel binary image, contour morphing processing is performed on the first contour extraction result of the first contour extraction, and second contour extraction is further performed on the contour morphing result after contour enhancement by contour morphing processing to obtain contours in the channel binary image. Therefore, by twice contour extraction and contour enhancement, the effect of contour extraction can be effectively improved to ensure the accuracy of the contours.
[0078] In one embodiment, each region of interest in the instrument image is obtained based on the contours in each channel binary image by performing region fitting based on the contours in each channel binary image to obtain a first region of interest, and performing contour reconstruction on the contours in each channel binary image by a contour reconstruction algorithm to obtain a second region of interest, and obtaining each region of interest in the instrument image according to the first region of interest and the second region of interest.
[0079] The region fitting is fitting processing of the contours in each channel binary image to fit the corresponding region. Specifically, the region fitting can be polygon fitting to fit a polygon corresponding to the contour, for example, a quadrilateral corresponding to the contour. The region fitting can be performed by various fitting algorithms, such as a polygon fitting algorithm or an iterative endpoint fitting algorithm. The contour reconstruction is contour line reconstruction of the contours in each channel binary image. The contour reconstruction can be performed by a contour reconstruction algorithm, such as a shortest diagonal method parallel contour line reconstruction algorithm.
[0080] Specifically, when performing region construction based on the contours in the channel binary images, the server can perform region fitting based on the contours in the channel binary images to obtain first regions of interest; on the other hand, the server can perform contour reconstruction on the contours in the channel binary images by a contour reconstruction algorithm to obtain second regions of interest. The first regions of interest and the second regions of interest are obtained by different region construction manners, which enriches the region construction results. After obtaining the first regions of interest and the second regions of interest, the server obtains each region of interest in the instrument image according to the first regions of interest and the second regions of interest, for example, the first regions of interest and the second regions of interest can be directly taken as each region of interest in the instrument image, or the first regions of interest and the second regions of interest can be further screened to filter out region construction results that do not meet the requirements of the region of interest from the first regions of interest and the second regions of interest, so as to obtain each region of interest in the instrument image.
[0081] In this embodiment, the contours in the channel binary images are region constructed by two manners of region fitting and contour reconstruction respectively, and each region of interest in the instrument image is obtained according to the obtained first regions of interest and second regions of interest, so as to enrich the region construction results and ensure the accuracy of the region construction, which is beneficial to improve the processing efficiency of the instrument image.
[0082] In one embodiment, the target region of interest is determined from the regions of interest based on the distribution characteristics of the matching feature points in the regions of interest, including: counting the number of feature points of the matching feature points included in each region of interest; obtaining the feature point proportion corresponding to each region of interest according to the number of feature points and the area of the corresponding region of interest; and determining the target region of interest from the regions of interest based on the feature point proportion.
[0083] The number of feature points is the number of matching feature points in the region of interest. The area of the region of interest is the size of the area of the region of interest, which can be determined according to the pixel size of the region of interest. The feature point proportion can be obtained according to the ratio of the number of feature points of the region of interest to the corresponding area, and the feature point proportion reflects the number of matching feature points in a unit area range in the region of interest. The higher the value of the feature point proportion, the more concentrated the matching feature points in the region of interest, that is, the stronger the relevance of the region of interest to the display panel of the digital instrument, and the more accurate the data obtained based on the region of interest for numerical recognition. The target region of interest is the image region in the instrument image corresponding to the display panel of the digital instrument, that is, the target region of interest includes the measurement data of the digital instrument and does not carry other environmental backgrounds, and numerical recognition on the target region of interest can achieve accurate reading of the digital instrument.
[0084] Specifically, when screening the target region of interest from the regions of interest, the server counts the matching feature points in each region of interest, to obtain the number of feature points in each region of interest. The server determines the area of each region of interest, for example, the area of each region of interest can be obtained according to the pixel range of each region of interest. The server obtains the feature point proportion of each region of interest according to the number of feature points and the area of the corresponding region of interest. Specifically, the feature point proportion of each region of interest can be obtained according to the ratio of the number of feature points and the area of the corresponding region of interest. After obtaining the feature point proportion of each region of interest, the server determines the target region of interest from each region of interest based on the feature point proportion. In specific implementation, the server can sort the feature point proportions, and determine the region of interest with the largest feature point proportion as the target region of interest. In addition, the area of the target region of interest can also be limited, that is, the area of the target region of interest needs to be greater than the area threshold, so as to ensure that the range of the target region of interest can cover the display panel of the digital instrument. Specifically, the server can query the preset area threshold, and screen the regions of interest based on the feature point proportion and the area threshold, so as to determine the target region of interest from the regions of interest. For example, the region of interest with the largest feature point proportion and the area greater than the area threshold can be determined as the target region of interest.
[0085] In this embodiment, the feature point proportion is determined according to the number of matching feature points and the area of each region of interest, and each region of interest is screened based on the feature point proportion to determine the target region of interest. Therefore, each region of interest is screened by using the matching feature points, so as to ensure the accuracy of the target region of interest, and improve the accuracy of instrument image processing, thereby ensuring the accuracy of the digital instrument reading.
[0086] In one embodiment, the target region of interest is numerically identified to obtain a numerical identification result of the instrument image, including: determining the numerical type of the numerical value to be identified in the digital instrument; performing numerical region division on the target region of interest based on the numerical type, to obtain sub-regions corresponding to each numerical type; and performing numerical identification on each sub-region to obtain the numerical identification result of the instrument image.
[0087] In this context, "numerical type" refers to the type of data that a digital instrument needs to recognize. Different digital instruments have different numerical types. For example, a multi-functional blood pressure monitor can simultaneously display measured systolic blood pressure, diastolic blood pressure, and heart rate. Therefore, the numerical types to be recognized in the digital instrument include systolic blood pressure, diastolic blood pressure, and heart rate. In a digital instrument, different types of data are displayed in different areas, and the format of the data displayed in different areas can also differ, such as different font sizes, font colors, and font formats. Correspondingly, within the region of interest (ROI), different types of data are displayed in different sub-regions. By dividing the ROI into numerical regions, sub-regions corresponding to various data types are created to facilitate numerical recognition and improve the accuracy of numerical identification.
[0088] Specifically, when performing numerical recognition on the target region of interest, the server determines the numerical type of the value to be recognized in the digital instrument. The numerical type corresponds to the digital instrument; different digital instruments have different numerical types and are displayed in their respective preset display areas. The server divides the target region of interest into numerical regions based on the numerical type, obtaining sub-regions corresponding to each numerical type, thus establishing a connection between each numerical type and its sub-region. Further, the server performs numerical recognition on each sub-region, obtaining data for each sub-region. The server then integrates the data from each sub-region to obtain the numerical recognition result of the instrument image. This result includes the recognition results corresponding to each numerical type in the digital instrument, thereby achieving comprehensive and accurate recognition processing of the digital instrument.
[0089] In this embodiment, the target region of interest is divided into numerical regions according to the numerical type of the numerical value to be identified in the digital instrument, and numerical identification is performed on each sub-region obtained by the division. In this way, the numerical identification of the target region of interest is performed by combining the distribution of various numerical types in the digital instrument, which improves the accuracy of the numerical identification results.
[0090] In one embodiment, such as Figure 3 As shown, the processing to obtain the numerical recognition results involves performing numerical recognition on each sub-region separately to obtain the numerical recognition results of the instrument image, including:
[0091] Step 302: Perform contour enhancement processing on each sub-region to obtain the contour enhancement results corresponding to each sub-region.
[0092] The contour enhancement processing can improve the extraction effect of the contour extraction of the sub-regions, and can specifically perform contour widening, contour narrowing processing, etc. on the sub-regions in sequence to obtain the contour enhancement results corresponding to each sub-region. In a specific application, after the server obtains the sub-regions corresponding to each numerical type, the server can perform grayscale processing on each sub-region, and perform binarization processing based on the grayscale processing result, so as to obtain a sub-region binary image, and perform contour enhancement processing according to the sub-region binary image to obtain the sub-region numerical contour corresponding to each sub-region. In other implementations, after the server determines the target region of interest from the regions of interest, the server can directly perform grayscale processing on the target region of interest, and perform numerical region division based on the target region of interest after the grayscale processing to obtain the sub-regions corresponding to each numerical type. The server further performs binarization processing on each sub-region, and performs contour enhancement processing according to each sub-region after the binarization processing to obtain the contour enhancement results corresponding to each sub-region.
[0093] Step 304: performing contour extraction based on each contour enhancement result to obtain a sub-region numerical contour corresponding to each sub-region.
[0094] After obtaining the contour enhancement results corresponding to each sub-region, the server performs contour extraction based on each contour enhancement result, such as performing contour extraction on each contour enhancement result by the hollowing internal point method to obtain a sub-region numerical contour corresponding to each sub-region.
[0095] Step 306: matching the sub-region numerical contour with the numerical mapping feature in the numerical mapping table, and determining a sub-region numerical value corresponding to the sub-region numerical contour according to a matching result.
[0096] After obtaining the sub-region numerical contour corresponding to each sub-region, the server obtains a numerical mapping table, and the numerical mapping table includes a numerical mapping feature. The numerical mapping feature represents contour features corresponding to various numerical values. The server matches the sub-region numerical contour with the numerical mapping feature in the numerical mapping table to obtain a matching result. The server determines a sub-region numerical value corresponding to the sub-region numerical contour according to the matching result. Specifically, the server can determine a numerical value represented by the numerical mapping feature in the numerical mapping table that matches the sub-region numerical contour as the sub-region numerical value corresponding to the sub-region numerical contour, thereby realizing numerical recognition processing of the sub-region.
[0097] Step 308: obtaining a numerical recognition result of the instrument image according to the sub-region numerical value corresponding to each sub-region numerical contour.
[0098] After obtaining the sub-region numerical value corresponding to each sub-region numerical contour, i.e., obtaining the numerical recognition result of each sub-region, the server obtains the numerical recognition result of the instrument image according to the sub-region numerical value corresponding to each sub-region numerical contour. For example, the server can associate the sub-region numerical value corresponding to each sub-region numerical contour with the corresponding numerical type to obtain the numerical recognition result of the instrument image.
[0099] In this embodiment, the contour extraction is performed after the contour enhancement processing of each sub-region, which can ensure the contour extraction effect of each sub-region. The obtained sub-region numerical contour is matched with the numerical mapping feature in the numerical mapping table, so as to obtain the sub-region numerical value of each sub-region. The numerical recognition result of the instrument image is obtained by comprehensively considering the sub-region numerical values of each sub-region, so as to realize accurate recognition of each type of data in the instrument image.
[0100] In one embodiment, an instrument image processing method is provided. The method is applied to Figure 1 a server in Figure 4 . In this embodiment, as shown in , the digital instrument is a sphygmomanometer, and three types of measurement data, i.e., systolic pressure, diastolic pressure, and pulse rate, are displayed on the display panel of the sphygmomanometer. This embodiment needs to recognize and process the three types of measurement data displayed on the sphygmomanometer.
[0101] Figure 5 Specifically, a user measures blood pressure by using the sphygmomanometer. After the sphygmomanometer displays the measurement data, the user photographs the sphygmomanometer by using a terminal to obtain an instrument image corresponding to the sphygmomanometer. The terminal sends the instrument image to the server. After receiving the instrument image, the server extracts the gray-scale images of RGB channels of the instrument image, and extracts the gray-scale images of RG components each with 50%. The contrast is increased. As shown in Figure 4 , it is a channel image corresponding to the G channel of the instrument image shown in Figure 6 . As shown in Figure 4 , it is a channel image corresponding to the B channel of the instrument image shown in Figure 7 . After obtaining the channel image, the server performs binarization processing on each channel image to obtain a binary image corresponding to each channel image. As shown in Figure 6 , it is a channel binary image obtained by performing binarization processing on the channel image of the B channel shown in Figure 8 . After obtaining each channel binary image, the server performs contour extraction on each channel binary image to obtain a contour in the channel binary image. As shown in Figure 7The contour extraction result obtained after the contour extraction of the channel binary image shown. The server constructs regions based on the contours in each channel binary image to obtain each region of interest in the instrument image. Specifically, on the one hand, the server performs region fitting based on the contours in each channel binary image to obtain a first region of interest; on the other hand, the server performs contour reconstruction on the contours in each channel binary image through a contour reconstruction algorithm to obtain a second region of interest; further, the server obtains each region of interest in the instrument image according to the first region of interest and the second region of interest, and each region of interest in this embodiment is a quadrilateral region.
[0102] Further, the server performs feature matching on the instrument image and the standard feature image corresponding to the digital instrument to determine the matching feature points in the instrument image. Specifically, the server can perform feature matching on the instrument image through the SIFT algorithm to obtain the matching feature points in the instrument image. After obtaining the matching feature points, the server counts the number of feature points included in each region of interest, and obtains the feature point proportion corresponding to each region of interest according to the ratio of the number of feature points to the area of the corresponding region of interest. The server determines the region of interest with the largest feature point proportion as the target region of interest from each region of interest. After obtaining the target region of interest, the server extracts the target region of interest from the instrument image and performs grayscale processing on the target region of interest to obtain the target region of interest after grayscale processing. As shown in Figure 9 The server performs numerical region division on the target region of interest based on the numerical type of the to-be-recognized numerical value in the digital instrument to obtain sub-regions corresponding to each numerical type. Specifically, the server can perform numerical region division on the target region of interest according to three numerical types of systolic pressure, diastolic pressure and pulse rate of the to-be-recognized numerical value in the digital instrument, separate the foreground and background in the target region of interest, and perform clustering processing to obtain the circumscribed rectangle corresponding to each numerical type, i.e., to obtain the sub-regions corresponding to each numerical type. As shown in Figure 10 The server performs numerical region division on the target region of interest based on the numerical type of the to-be-recognized numerical value in the digital instrument to obtain sub-regions corresponding to each numerical type. Specifically, the server can perform numerical region division on the target region of interest according to three numerical types of systolic pressure, diastolic pressure and pulse rate of the to-be-recognized numerical value in the digital instrument, separate the foreground and background in the target region of interest, and perform clustering processing to obtain the circumscribed rectangle corresponding to each numerical type, i.e., to obtain the sub-regions corresponding to each numerical type. As shown in Figure 9 The server performs numerical region division on the target region of interest based on the numerical type of the to-be-recognized numerical value in the digital instrument to obtain sub-regions corresponding to each numerical type. Specifically, the server can perform numerical region division on the target region of interest according to three numerical types of systolic pressure, diastolic pressure and pulse rate of the to-be-recognized numerical value in the digital instrument, separate the foreground and background in the target region of interest, and perform clustering processing to obtain the circumscribed rectangle corresponding to each numerical type, i.e., to obtain the sub-regions corresponding to each numerical type. As shown in Figure 11 The server performs numerical region division on the target region of interest based on the numerical type of the to-be-recognized numerical value in the digital instrument to obtain sub-regions corresponding to each numerical type. Specifically, the server can perform numerical region division on the target region of interest according to three numerical types of systolic pressure, diastolic pressure and pulse rate of the to-be-recognized numerical value in the digital instrument, separate the foreground and background in the target region of interest, and perform clustering processing to obtain the circumscribed rectangle corresponding to each numerical type, i.e., to obtain the sub-regions corresponding to each numerical type. As shown in Figure 10 The server performs numerical region division on the target region of interest based on the numerical type of the to-be-recognized numerical value in the digital instrument to obtain sub-regions corresponding to each numerical type. Specifically, the server can perform numerical region division on the target region of interest according to three numerical types of systolic pressure, diastolic pressure and pulse rate of the to-be-recognized numerical value in the digital instrument, separate the foreground and background in the target region of interest, and perform clustering processing to obtain the circumscribed rectangle corresponding to each numerical type, i.e., to obtain the sub-regions corresponding to each numerical type. As shown in
[0103] After obtaining the sub-region numerical profile corresponding to each sub-region, the server matches the sub-region numerical profile with the numerical mapping features in the numerical mapping table, and determines the sub-region numerical corresponding to the sub-region numerical profile according to the matching result, to obtain the numerical recognition result of the instrument image. Specifically, the bright and dark conditions of the 8-segment Nixie tube in each sub-region numerical profile are judged, and the corresponding numbers are calculated according to the bright and dark conditions. Specifically, the corresponding numbers can be obtained by querying the mapping table of the Nixie tube display condition to the numbers, so as to realize accurate and efficient reading of the digital instrument.
[0104] It should be understood that, although Figure 2 and Figure 3 the steps in the flowcharts are displayed in sequence according to the arrows, these steps are not necessarily executed in sequence according to the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, Figure 2 and Figure 3 at least part of the steps in and can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.
[0105] In one embodiment, as shown in Figure 12 , an instrument image processing apparatus 1200 is provided, comprising: an instrument image acquisition module 1202, a region of interest determination module 1204, a feature matching module 1206, a target region determination module 1208, and a numerical recognition processing module 1210, wherein:
[0106] The instrument image acquisition module 1202 is configured to acquire an instrument image obtained by photographing a digital instrument;
[0107] The region of interest determination module 1204 is configured to perform region analysis on the instrument image to obtain each region of interest in the instrument image;
[0108] The feature matching module 1206 is configured to perform feature matching between the instrument image and a standard feature image corresponding to the digital instrument to determine matching feature points in the instrument image;
[0109] The target region determination module 1208 is configured to determine a target region of interest from each region of interest based on the distribution characteristics of the matching feature points in each region of interest;
[0110] The numerical recognition processing module 1210 is configured to perform numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image.
[0111] In an embodiment, the region of interest determining module 1204 comprises a binarization processing module, a contour extraction module and a region constructing module; wherein: the binarization processing module is configured to perform binarization processing on the channel images corresponding to each channel of the instrument image respectively to obtain the binary channel images; the contour extraction module is configured to perform contour extraction on the binary channel images respectively to obtain the contours in the binary channel images; and the region constructing module is configured to perform region construction based on the contours in the binary channel images to obtain each region of interest in the instrument image.
[0112] In an embodiment, the contour extraction module comprises a first extraction module, a deformation processing module and a second extraction module; wherein: the first extraction module is configured to perform first contour extraction on the binary channel images respectively to obtain first contour extraction results; the deformation processing module is configured to perform contour deformation processing on the first contour extraction results to obtain contour deformation results; and the second extraction module is configured to perform second contour extraction based on the contour deformation results to obtain the contours in the binary channel images.
[0113] In an embodiment, the region constructing module comprises a region fitting module, a contour reconstruction module and a region of interest obtaining module; wherein: the region fitting module is configured to perform region fitting based on the contours in the binary channel images to obtain a first region of interest; the contour reconstruction module is configured to perform contour reconstruction on the contours in the binary channel images by a contour reconstruction algorithm to obtain a second region of interest; and the region of interest obtaining module is configured to obtain each region of interest in the instrument image according to the first region of interest and the second region of interest.
[0114] In an embodiment, the target region determining module 1208 comprises a feature point statistical module, a proportion determining module and a target region determining module; wherein: the feature point statistical module is configured to count the number of feature points in each region of interest; the proportion determining module is configured to obtain the feature point proportion of each region of interest according to the number of feature points and the area of the corresponding region of interest; and the target region determining module is configured to determine a target region of interest from each region of interest based on the feature point proportion.
[0115] In an embodiment, the numerical value recognition processing module 1210 comprises a numerical value type determining module, a numerical value region dividing module and a sub-region recognition module; wherein: the numerical value type determining module is configured to determine the numerical value type of the numerical value to be recognized in the digital instrument; the numerical value region dividing module is configured to perform numerical value region division on the target region of interest based on the numerical value type to obtain sub-regions corresponding to each numerical value type respectively; and the sub-region recognition module is configured to perform numerical value recognition on each sub-region respectively to obtain the numerical value recognition result of the instrument image.
[0116] In one embodiment, the sub-region identification module comprises an enhancement processing module, a sub-region contour module, a feature matching module and a numerical synthesis module; wherein: the enhancement processing module is configured to perform contour enhancement processing on each sub-region to obtain a contour enhancement result corresponding to each sub-region respectively; the sub-region contour module is configured to perform contour extraction based on each contour enhancement result to obtain a sub-region numerical contour corresponding to each sub-region; the feature matching module is configured to match the sub-region numerical contour with a numerical mapping feature in the numerical mapping table, and determine a sub-region value corresponding to the sub-region numerical contour according to a matching result; and the numerical synthesis module is configured to obtain a numerical recognition result of the instrument image according to the sub-region values corresponding to each sub-region numerical contour.
[0117] The specific limitations of the instrument image processing apparatus can be referred to the limitations of the instrument image processing method in the foregoing, which will not be repeated here. Each module in the instrument image processing apparatus described above can be realized by software, hardware and combinations thereof in whole or in part. Each module described above can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0118] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram thereof can be as shown in Figure 13 The computer device comprises a processor, a memory and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store data. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement an instrument image processing method.
[0119] Those skilled in the art can understand that Figure 13 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can comprise more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0120] In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the following steps:
[0121] An instrument image obtained by shooting a digital instrument is acquired;
[0122] perform region analysis on the instrument image to obtain each region of interest in the instrument image;
[0123] perform feature matching on the instrument image and a standard feature image corresponding to the digital instrument to determine matching feature points in the instrument image;
[0124] determine a target region of interest from the regions of interest based on distribution characteristics of the matching feature points in the regions of interest;
[0125] perform numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image.
[0126] In an embodiment, the processor, when executing the computer program, further implements the following steps: performing binarization processing on each channel image corresponding to each channel of the instrument image to obtain a binary image of each channel; performing contour extraction on each binary image of each channel to obtain a contour in each binary image of each channel; and performing region construction based on the contour in each binary image of each channel to obtain each region of interest in the instrument image.
[0127] In an embodiment, the processor, when executing the computer program, further implements the following steps: performing first contour extraction on each binary image of each channel to obtain a first contour extraction result; performing contour morphing processing on the first contour extraction result to obtain a contour morphing result; and performing second contour extraction based on the contour morphing result to obtain the contour in each binary image of each channel.
[0128] In an embodiment, the processor, when executing the computer program, further implements the following steps: performing region fitting based on the contour in each binary image of each channel to obtain a first region of interest; performing contour reconstruction on the contour in each binary image of each channel through a contour reconstruction algorithm to obtain a second region of interest; and obtaining each region of interest in the instrument image according to the first region of interest and the second region of interest.
[0129] In an embodiment, the processor, when executing the computer program, further implements the following steps: counting a number of feature points of the matching feature points included in each region of interest; obtaining a feature point proportion corresponding to each region of interest according to the number of feature points and a region area of the corresponding region of interest; and determining the target region of interest from the regions of interest based on the feature point proportion.
[0130] In an embodiment, the processor, when executing the computer program, further implements the following steps: determining a numerical value type of a numerical value to be recognized in the digital instrument; performing numerical region division on the target region of interest based on the numerical value type to obtain a sub-region corresponding to each numerical value type; and performing numerical recognition on each sub-region to obtain the numerical recognition result of the instrument image.
[0131] In one embodiment, the processor, when executing the computer program, also implements the following steps: performing contour enhancement processing on each sub-region to obtain a contour enhancement result corresponding to each sub-region respectively; performing contour extraction based on the contour enhancement results to obtain a sub-region numerical contour corresponding to each sub-region; matching the sub-region numerical contour with the numerical mapping features in the numerical mapping table, and determining a sub-region value corresponding to the sub-region numerical contour according to a matching result; and obtaining a numerical recognition result of the instrument image according to the sub-region values corresponding to the sub-region numerical contours.
[0132] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program, when executed by a processor, implements the following steps:
[0133] obtaining an instrument image captured by shooting a digital instrument;
[0134] performing region analysis on the instrument image to obtain each region of interest in the instrument image;
[0135] performing feature matching on the instrument image and a standard feature image corresponding to the digital instrument to determine a matching feature point in the instrument image;
[0136] determining a target region of interest from the regions of interest based on distribution characteristics of the matching feature points in the regions of interest;
[0137] performing numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image.
[0138] In one embodiment, the computer program, when executed by the processor, also implements the following steps: performing binarization processing on each channel image corresponding to each channel of the instrument image to obtain a binary image of each channel; performing contour extraction on each binary image of each channel to obtain a contour in each binary image of each channel; and performing region construction based on the contours in the binary images of each channel to obtain each region of interest in the instrument image.
[0139] In one embodiment, the computer program, when executed by the processor, also implements the following steps: performing first contour extraction on each binary image of each channel to obtain a first contour extraction result; performing contour morphing processing on the first contour extraction result to obtain a contour morphing result; and performing second contour extraction based on the contour morphing result to obtain the contour in each binary image of each channel.
[0140] In one embodiment, the computer program, when executed by the processor, also implements the following steps: performing region fitting based on the contours in the binary images of each channel to obtain a first region of interest; performing contour reconstruction on the contours in the binary images of each channel by a contour reconstruction algorithm to obtain a second region of interest; and obtaining each region of interest in the instrument image according to the first region of interest and the second region of interest.
[0141] In one embodiment, the computer program, when executed by the processor, further implements the following steps: counting the number of feature points included in each of the regions of interest; obtaining a feature point proportion corresponding to each region of interest according to the number of feature points and the area of the corresponding region of interest; and determining a target region of interest from the regions of interest based on the feature point proportions.
[0142] In one embodiment, the computer program, when executed by the processor, further implements the following steps: determining the type of the value to be recognized in the digital instrument; performing value region division on the target region of interest based on the type of the value to obtain sub-regions corresponding to each type of value respectively; and performing value recognition on each sub-region to obtain the value recognition result of the instrument image.
[0143] In one embodiment, the computer program, when executed by the processor, further implements the following steps: performing contour enhancement processing on each sub-region to obtain a contour enhancement result corresponding to each sub-region respectively; performing contour extraction based on the contour enhancement results to obtain a sub-region value contour corresponding to each sub-region; matching the sub-region value contour with the value mapping feature in the value mapping table to determine a sub-region value corresponding to the sub-region value contour according to the matching result; and obtaining the value recognition result of the instrument image according to the sub-region values corresponding to the sub-region value contours.
[0144] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium in each embodiment provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0145] Any combination of the technical features in the above embodiments can be made, and for the sake of brevity, not all possible combinations are described above, however, as long as the combination of the technical features does not exist in contradiction, it shall be considered within the scope of the present disclosure.
[0146] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it shall not be understood as a limitation on the patent scope of the present application. It shall be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these shall be within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. An instrument image processing method characterized by, The method comprises: acquiring an instrument image obtained by photographing a digital instrument; channel separation is performed on the instrument image to obtain images corresponding to each channel of the instrument image, and the images corresponding to each individual channel are fused according to a preset channel combination relationship to obtain a fused channel image, and a channel image corresponding to the instrument image is obtained according to the fused channel image and the individual channel image; determining a target channel image corresponding to the shooting environment from the channel images of each channel according to a mapping relationship between the shooting environment of the instrument image and the channel images of each channel corresponding to the instrument image; performing binarization processing on the target channel image, performing contour extraction based on the binarization processing result, and obtaining each region of interest in the target channel image based on the extracted contour; the region of interest is determined based on a first region of interest and a second region of interest of the target channel, the first region of interest is obtained by region fitting on the contour, and the second region of interest is obtained by contour reconstruction on the contour; performing feature matching on the instrument image and a standard feature image corresponding to the digital instrument to determine a matching feature point in the instrument image; determining a target region of interest from each region of interest based on the distribution characteristics of the matching feature points in each region of interest; performing numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image; determining a target region of interest from each region of interest based on the distribution characteristics of the matching feature points in each region of interest, comprising: counting the number of feature points included in each region of interest; determining the area of each region of interest according to the pixel range of each region of interest; obtaining the feature point proportion corresponding to each region of interest according to the number of feature points and the area of the corresponding region of interest; querying a preset area threshold, and determining a target region of interest from each region of interest based on the feature point proportion and the area threshold; performing numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image, comprising: determining the numerical type of the numerical value to be recognized in the digital instrument; performing numerical region division on the target region of interest based on the numerical type to obtain sub-regions corresponding to each numerical type; performing numerical recognition on each sub-region to obtain the numerical recognition result of the instrument image.
2. The method of claim 1, wherein, The method comprises: acquiring an instrument image obtained by photographing a digital instrument; channel separation is performed on the instrument image to obtain images corresponding to each channel of the instrument image, and the images corresponding to each individual channel are fused according to a preset channel combination relationship to obtain a fused channel image, and a channel image corresponding to the instrument image is obtained according to the fused channel image and the individual channel image; determining a target channel image corresponding to the shooting environment from the channel images of each channel according to a mapping relationship between the shooting environment of the instrument image and the channel images of each channel corresponding to the instrument image; performing binarization processing on the target channel image, performing contour extraction based on the binarization processing result, and obtaining each region of interest in the target channel image based on the extracted contour; the region of interest is determined based on a first region of interest and a second region of interest of the target channel, the first region of interest is obtained by region fitting on the contour, and the second region of interest is obtained by contour reconstruction on the contour; performing feature matching on the instrument image and a standard feature image corresponding to the digital instrument to determine a matching feature point in the instrument image; determining a target region of interest from each region of interest based on the distribution characteristics of the matching feature points in each region of interest; performing numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image; determining a target region of interest from each region of interest based on the distribution characteristics of the matching feature points in each region of interest, comprising: counting the number of feature points included in each region of interest; determining the area of each region of interest according to the pixel range of each region of interest; obtaining the feature point proportion corresponding to each region of interest according to the number of feature points and the area of the corresponding region of interest; querying a preset area threshold, and determining a target region of interest from each region of interest based on the feature point proportion and the area threshold; performing numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image, comprising: determining the numerical type of the numerical value to be recognized in the digital instrument; performing numerical region division on the target region of interest based on the numerical type to obtain sub-regions corresponding to each numerical type; performing numerical recognition on each sub-region to obtain the numerical recognition result of the instrument image. The method comprises: acquiring an instrument image obtained by photographing a digital instrument; channel separation is performed on the instrument image to obtain images corresponding to each channel of the instrument image, and the images corresponding to each individual channel are fused according to a preset channel combination relationship to obtain a fused channel image, and a channel image corresponding to the instrument image is obtained according to the fused channel image and the individual channel image; determining a target channel image corresponding to the shooting environment from the channel images of each channel according to a mapping relationship between the shooting environment of the instrument image and the channel images of each channel corresponding to the instrument image; performing binarization processing on the target channel image, performing contour extraction based on the binarization processing result, and obtaining each region of interest in the target channel image based on the extracted contour; the region of interest is determined based on a first region of interest and a second region of interest of the target channel, the first region of interest is obtained by region fitting on the contour, and the second region of interest is obtained by contour reconstruction on the contour; performing feature matching on the instrument image and a standard feature image corresponding to the digital instrument to determine a matching feature point in the instrument image; determining a target region of interest from each region of interest based on the distribution characteristics of the matching feature points in each region of interest; performing numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image; determining a target region of interest from each region of interest based on the distribution characteristics of the matching feature points in each region of interest, comprising: counting the number of feature points included in each region of interest; determining the area of each region of interest according to the pixel range of each region of interest; obtaining the feature point proportion corresponding to each region of interest according to the number of feature points and the area of the corresponding region of interest; querying a preset area threshold, and determining a target region of interest from each region of interest based on the feature point proportion and the area threshold; performing numerical recognition on the target region of interest to obtain a numerical recognition result of the instrument image, comprising: determining the numerical type of the numerical value to be recognized in the digital instrument; performing numerical region division on the target region of interest based on the numerical type to obtain sub-regions corresponding to each numerical type; performing numerical recognition on each sub-region to obtain the numerical recognition result of the instrument image.
3. The method of claim 2, wherein, The profile extraction on the channel binary image respectively comprises: The first profile extraction is performed on the channel binary image respectively to obtain a first profile extraction result; The profile morphing processing is performed on the first profile extraction result to obtain a profile morphing result; The second profile extraction is performed based on the profile morphing result to obtain the profile in the channel binary image.
4. The method of claim 2, wherein, The region construction based on the profile in the channel binary image comprises: The region fitting is performed based on the profile in the channel binary image to obtain a first region of interest; The profile reconstruction is performed on the profile in the channel binary image by a profile reconstruction algorithm to obtain a second region of interest; The regions of interest in the target channel image are obtained according to the first region of interest and the second region of interest.
5. The method of claim 1, wherein, The numerical value recognition of each sub-region comprises: The profile enhancement processing is performed on each sub-region to obtain a profile enhancement result corresponding to each sub-region respectively; The profile extraction is performed based on each profile enhancement result to obtain a sub-region numerical value profile corresponding to each sub-region; The sub-region numerical value profile is matched with a numerical value mapping feature in a numerical value mapping table, and a sub-region numerical value corresponding to the sub-region numerical value profile is determined according to a matching result; The numerical value recognition result of the instrument image is obtained according to the sub-region numerical value corresponding to each sub-region numerical value profile.
6. An instrument image processing apparatus characterized by comprising: The device comprises: An instrument image acquisition module is configured to acquire an instrument image captured by a digital instrument; An interest region determination module is configured to separate the instrument image into channel images, fuse the channel images according to a preset channel combination relationship, and obtain a target channel image corresponding to a shooting environment of the instrument image; the interest region determination module is further configured to perform binary processing on the target channel image, perform profile extraction based on a binary processing result, and obtain regions of interest in the target channel image; the regions of interest are determined based on a first region of interest and a second region of interest of the target channel; the first region of interest is obtained by performing region fitting on the profile, and the second region of interest is obtained by performing profile reconstruction on the profile; A feature matching module is configured to perform feature matching between the instrument image and a standard feature image corresponding to the digital instrument, and determine matching feature points in the instrument image; A target region determination module is configured to determine a target region of interest from the regions of interest based on distribution characteristics of the matching feature points in the regions of interest. The numerical identification processing module is configured to perform numerical identification on the target region of interest to obtain a numerical identification result of the instrument image. The target region determination module is further configured to: count a number of feature points of the matching feature points included in each of the regions of interest; determine an area of each of the regions of interest according to a pixel range of the region of interest; obtain a feature point proportion corresponding to each of the regions of interest according to the number of feature points and the area of the corresponding region of interest; query a preset area threshold, and determine a target region of interest from each of the regions of interest based on the feature point proportion and the area threshold. The numerical identification processing module is further configured to determine a numerical type of a to-be-identified numerical value in the digital instrument; perform numerical region division on the target region of interest based on the numerical type to obtain a sub-region corresponding to each numerical type; and perform numerical identification on each of the sub-regions to obtain the numerical identification result of the instrument image.
7. The apparatus of claim 6, wherein, The region of interest determination module includes a binarization processing module, a contour extraction module, and a region construction module; wherein: The binarization processing module is configured to perform binarization processing on the target channel image to obtain a channel binary image. The contour extraction module is configured to perform contour extraction on the channel binary image respectively to obtain a contour in the channel binary image. The region construction module is configured to perform region construction based on the contour in the channel binary image to obtain each region of interest in the target channel image.
8. The apparatus of claim 7, wherein, The contour extraction module includes a first extraction module, a deformation processing module, and a second extraction module; wherein: The first extraction module is configured to perform first contour extraction on the channel binary image respectively to obtain a first contour extraction result. The deformation processing module is configured to perform contour deformation processing on the first contour extraction result to obtain a contour deformation result. The second extraction module is configured to perform second contour extraction based on the contour deformation result to obtain the contour in the channel binary image. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 5.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Instrument image automatic identification method based on OpenCV
CN107153848A
Image processing method and device, electronic equipment and computer readable storage medium
CN110070083A
Image processing method and device, electronic equipment and computer readable storage medium
CN112258579A