Rectifier filter device control panel multi-state integrated visual detection method and electronic device
Patent Information
- Application Number
- CN202611206200.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]本发明提供了一种整流滤波设备控制面板多状态一体化视觉检测方法及电子设备,以解决目前整流滤波设备控制面板检测效率和安全性差的问题
[0022]本发明实施例的技术方案能够对整流滤波设备控制面板的采集图像进行分割,得到液晶数字仪表区域、红绿指示灯区域及闸刀开关区域。针对液晶数字仪表区域,采用单个数字灰度识别的方式,精准识别每个液晶数字,对单个液晶数字进行整合后,得到液晶数字识别结果,实现自动化的识别液晶数字。针对红绿指示灯区域,在进行颜色空间转换后,基于红绿指示灯区域的HSV颜色空间的色调和饱和度确定是红灯还是绿灯;基于红绿指示灯区域的HSV颜色空间的亮度均值确定是否点亮;实现自动化的是被红绿指示灯的颜色和点亮情况。 针对闸刀开关区域,根据识别到的闸刀刀体轮廓边缘和闸刀底座轮廓边缘,能够对闸刀的姿态进行识别,进而确定闸刀是开闭情况,实现自动化的识别闸刀姿态。相对于人工巡检,本发明实施例提供的技术方案能够实现对整流滤波设备控制面板上的液晶数字内容、红绿指示灯的颜色及点亮情况以及闸刀开闭状态进行自动化识别,无需人工巡检,提高整流滤波设备巡检效率和安全性。
Smart Images

Figure CN123016311A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial equipment inspection technology, and in particular to a multi-state integrated visual inspection method and electronic device for rectifier and filter equipment control panels. Background Technology
[0002] During the rectification and filtering process, the control panel of the rectification and filtering equipment is equipped with LCD digital instruments, red and green indicator lights, and knife switches. The working status of these components directly reflects the operating status of the equipment and is an important guarantee for the normal operation of the equipment. Therefore, it is necessary to monitor them in real time and accurately.
[0003] Currently, the inspection of the aforementioned components on the control panel mainly relies on manual inspection. Inspectors visually observe the readings of the LCD digital instruments, the on / off state and color of indicator lights, and the position of the knife switch, manually recording the results. This manual inspection method suffers from low efficiency and significant safety risks. Improving the inspection efficiency and safety of the rectifier filter equipment control panel is an urgent problem to be solved. Summary of the Invention
[0004] This invention provides a multi-state integrated visual inspection method and electronic device for rectifier and filter control panels, to solve the problems of poor inspection efficiency and security of current rectifier and filter control panels.
[0005] According to one aspect of the present invention, a multi-state integrated visual inspection method for a rectifier filter control panel is provided, comprising:
[0006] Image segmentation is performed based on the images acquired from the control panel of the rectifier and filter equipment to obtain the LCD digital instrument area, the red and green indicator light area, and the knife switch area;
[0007] A single digit sub-region in the LCD digital instrument area is obtained; multiple candidate digits are determined based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates; a single digit recognition result is determined based on the grayscale features of the grayscale image and the grayscale features of the multiple candidate digits; the single digit recognition result is integrated to obtain the LCD digit recognition result.
[0008] The RGB color space of the red and green indicator light area is converted to the HSV color space. The average hue, average saturation, and average brightness of the red and green indicator light area are determined based on the HSV color space. Color information is determined based on the average hue and average saturation. Illumination information is determined based on the average brightness and brightness threshold. Status information corresponding to the red and green indicator lights is determined based on the color information and illumination information.
[0009] The effective area of the switch is determined based on the switch area. The outline edges of the switch body and the base are identified based on the effective area. The relative position of the switch body and the base is determined based on the outline edges of the switch body and the base. The relative position is matched with a preset switch posture template to determine the switch posture recognition result.
[0010] Output the LCD digital recognition result, the status information corresponding to the red and green indicator lights, and the switch posture recognition result.
[0011] According to another aspect of the present invention, a multi-state integrated visual inspection device for a rectifier and filter equipment control panel is provided, comprising:
[0012] The image segmentation module is used to segment the image based on the image acquired by the control panel of the rectifier and filter equipment to obtain the LCD digital instrument area, the red and green indicator light area, and the knife switch area;
[0013] The LCD digit recognition module is used to acquire a single digit sub-region in the LCD digital instrument area, determine multiple candidate digits based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates, determine a single digit recognition result based on the grayscale features of the grayscale image and the grayscale features of the multiple candidate digits, and integrate the single digit recognition results to obtain the LCD digit recognition result.
[0014] The indicator light status recognition module is used to convert the RGB color space of the red and green indicator light area to the HSV color space, determine the average hue, average saturation, and average brightness of the red and green indicator light area according to the HSV color space, determine color information according to the average hue and average saturation, determine lighting information according to the average brightness and brightness threshold, and determine the status information corresponding to the red and green indicator lights according to the color information and lighting information.
[0015] The switch status recognition module is used to determine the effective area of the switch based on the switch switch area, identify the outline edge of the switch body and the outline edge of the switch base based on the effective area of the switch body, determine the relative position of the switch body and the base based on the outline edge of the switch body and the outline edge of the switch base, and match the relative position with a preset switch posture template to determine the switch posture recognition result.
[0016] The output module is used to output the LCD digital recognition result, the status information corresponding to the red and green indicator lights, and the switch posture recognition result.
[0017] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0018] At least one processor; and
[0019] A memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to execute the multi-state integrated visual inspection method for the control panel of the rectifier filter device according to any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the multi-state integrated visual inspection method for the control panel of a rectifier filter device as described in any embodiment of the present invention.
[0022] The technical solution of this invention can segment the acquired image of the rectifier and filter equipment control panel to obtain an LCD digital instrument area, a red / green indicator light area, and a knife switch area. For the LCD digital instrument area, a single digit grayscale recognition method is used to accurately identify each LCD digit. After integrating the individual LCD digits, the LCD digit recognition result is obtained, achieving automated identification of the LCD digits. For the red / green indicator light area, after color space conversion, the hue and saturation of the HSV color space of the red / green indicator light area are used to determine whether it is a red or green light; the average brightness of the HSV color space of the red / green indicator light area is used to determine whether it is lit; the color and lighting status of the red / green indicator lights are automated. For the knife switch area, the posture of the knife switch can be identified based on the identified knife body outline edge and knife base outline edge, thereby determining whether the knife switch is open or closed, achieving automated identification of the knife switch posture. Compared to manual inspection, the technical solution provided by this invention can automatically identify the LCD digital content, the color and illumination status of the red and green indicator lights, and the opening and closing status of the switch on the control panel of the rectifier and filter equipment, eliminating the need for manual inspection and improving the inspection efficiency and safety of the rectifier and filter equipment.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A flowchart illustrating a multi-state integrated visual inspection method for a rectifier and filter equipment control panel provided in an embodiment of the present invention;
[0026] Figure 2 This is a schematic diagram of the structure of a multi-state integrated visual inspection device for a rectifier and filter equipment control panel provided in an embodiment of the present invention;
[0027] Figure 3 A schematic diagram of the structure of an electronic device for implementing the multi-state integrated visual inspection method for the control panel of a rectifier filter device according to an embodiment of the present invention. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products or devices.
[0030] The inventors discovered that during the rectification and filtering process, the control panel of the rectification and filtering equipment is equipped with LCD digital instruments, red and green indicator lights, and knife switches. The working status of these components directly reflects the operating status of the equipment and is an important guarantee for the normal operation of the equipment. Therefore, it is necessary to monitor them in real time and accurately.
[0031] Currently, the inspection of the aforementioned components on the control panel mainly relies on manual inspection. Inspectors visually observe the readings of the LCD digital instruments, the on / off state and color of indicator lights, and the position of the knife switch, manually recording the results. This manual inspection method suffers from low efficiency and significant safety risks. Improving the inspection efficiency and safety of the rectifier filter equipment control panel is an urgent problem to be solved.
[0032] Figure 1This is a flowchart illustrating a multi-state integrated visual inspection method for a rectifier and filter equipment control panel provided in this embodiment of the invention. This embodiment is applicable to the automated inspection of the control panel of a rectifier and filter equipment. The method can be executed by a multi-state integrated visual inspection device for the rectifier and filter equipment control panel. This device can be implemented in hardware and / or software and can be configured in personal computers, servers, or other electronic devices. Figure 1 As shown, the method includes:
[0033] Step S110: Perform image segmentation based on the acquired image from the control panel of the rectifier and filter equipment to obtain the LCD digital instrument area, the red and green indicator light area, and the knife switch area.
[0034] Images of the rectifier and filter equipment control panel can be captured by photographing it using a lightweight industrial camera mounted on a mobile inspection robot. The lightweight industrial camera can be a FOCATEK camera paired with a HIK lens, adaptable to the robot's load requirements. The shooting parameters can be remotely adjusted via the robot's control system, ensuring clear panel images are captured under varying distances and lighting conditions.
[0035] After the mobile inspection robot stops next to the rectifier and filter equipment, it captures images of the control panel of the rectifier and filter equipment. The captured images cover the LCD digital instrument area, the red and green indicator light area, and the knife switch area.
[0036] After acquiring the images, they are preprocessed to eliminate image anomalies caused by robot movement jitter, environmental noise, light changes, and strong magnetic interference, thereby improving image quality and providing a foundation for subsequent zoning detection.
[0037] Preprocessing includes: grayscale conversion, noise reduction, contrast enhancement, jitter correction, segmentation, and distortion correction. The order in which these preprocessing steps are performed is not critical. For example, they can also be performed sequentially as follows:
[0038] (1) Grayscale processing, specifically, can be achieved by using the average weighting method to achieve grayscale.
[0039] (2) Noise removal process, specifically, Gaussian filtering algorithm is used to remove environmental noise in the image.
[0040] (3) Contrast enhancement processing, specifically, can be achieved by using a histogram equalization algorithm to highlight the features of the detected object.
[0041] (4) Segmentation processing, specifically, using a threshold segmentation algorithm to segment the overall panel image into three independent detection areas, corresponding to the LCD digital instrument area, the red and green indicator light area, and the knife switch area, respectively.
[0042] (5) Jitter correction processing, specifically, can be to use an image registration algorithm to correct the image offset caused by robot movement jitter.
[0043] (6) Distortion correction processing, specifically, for the 18° tilt shooting angle, the slight perspective distortion caused by the tilt shooting is corrected by the preset distortion correction model to ensure accurate positioning of the detection area and no deviation in the recognition of numbers and pointers.
[0044] Step S120: Obtain a single digit sub-region in the LCD digital instrument area; determine multiple candidate digits based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates; determine a single digit recognition result based on the grayscale features of the grayscale image and the grayscale features of the multiple candidate digits; integrate the single digit recognition results to obtain the LCD digit recognition result.
[0045] LCD digit recognition can employ a lightweight approach combining template matching and grayscale feature recognition. Ten single-digit templates ("0"-"9") are pre-stored, and the digits in the instrument area are identified digit by digit based on the grayscale characteristics of the LCD digits to output accurate readings. To address potential blurring or incompleteness in the LCD digits, a grayscale threshold compensation mechanism is implemented to improve recognition accuracy. Simultaneously, algorithm complexity is optimized to reduce computational power consumption, ensuring rapid recognition even with limited computing resources. The specific process is as follows:
[0046] Based on the image preprocessing obtained from the LCD digital instrument area, the effective display area of the LCD digital instrument is accurately defined. By using the column pixel projection method, according to the gray-scale gap characteristics between digits, the display area of multi-digit numbers is divided into independent recognition sub-areas for individual digits, and invalid areas such as instrument borders and backgrounds are automatically ignored.
[0047] A standard grayscale template library is pre-built and stored for the ten LCD digits "0"-"9". These templates are based on commonly used industrial LCD digit display styles and include core features such as the digit's outline and stroke grayscale distribution. The template library supports lightweight retrieval, occupying ≤100KB of storage resources.
[0048] Optionally, multiple candidate digits can be determined based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates, which can be implemented as follows:
[0049] The grayscale image of the single digit sub-region is subjected to normalized cross-correlation matching with multiple preset single digit templates to obtain the matching degree; the multiple single digits with the highest matching degree are selected as candidate digits.
[0050] The grayscale image of each individual digit sub-region is matched with a single digit template in the standard template library using normalized cross-correlation matching. The matching similarity is calculated, and the three candidate digits with the highest similarity are initially selected, reducing the computational cost of subsequent feature recognition.
[0051] Accordingly, determining the recognition result of a single digit based on the grayscale features of the grayscale image and the grayscale features of the multiple candidate digits can be implemented as follows:
[0052] The grayscale features of the grayscale image are obtained, including: the number of connected components of the strokes, the position of grayscale transition points, or the aspect ratio of the strokes; the recognition result of a single digit is determined based on the candidate digit whose grayscale features are most similar to those of the grayscale image among the multiple candidate digits.
[0053] Extract the grayscale features of candidate digits. Grayscale features include the number of connected components in the strokes, the location of grayscale transition points, or the aspect ratio of the strokes. Compare the grayscale image of a single digit sub-region with the grayscale features of single digit templates in the standard template library, eliminate candidate digits with high similarity but inconsistent features, and determine the recognition result of a single digit.
[0054] The above-described implementation can accurately identify the number that is closest to a single digital sub-region in the LCD digital instrument area from multiple candidate numbers through grayscale features, thereby improving the accuracy of LCD digital recognition.
[0055] Furthermore, after determining the single digit recognition result based on the candidate digit whose grayscale features are most similar to those of the grayscale image among the plurality of candidate digits, the method further includes:
[0056] If the grayscale image of the single digit sub-region contains a blurred area with a grayscale value lower than a preset grayscale value threshold range, then adaptive grayscale enhancement is performed on the blurred area to improve the contrast between the single digit stroke and the background; or, if the grayscale image of the single digit sub-region contains a missing area with a clear grayscale value, then the grayscale features of the missing area are completed. Multiple candidate digits are then determined again based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates.
[0057] The average grayscale value of each individual digit recognition result is detected in real time and compared with a preset grayscale threshold range calibrated according to the industrial environment. If the grayscale value is below the lower limit (blurred area, blurred digit, dim light) or there is local grayscale loss (incomplete area, incomplete digit), the grayscale threshold compensation mechanism is activated. Specifically: 1) Adaptive grayscale enhancement is performed on blurred areas to improve the contrast between strokes and background. 2) Grayscale features of incomplete areas are completed, and the features of the incomplete parts are inferred based on the grayscale distribution of adjacent strokes; after compensation, feature recognition is re-executed to correct the initial recognition result and avoid misjudgment caused by blurred / incomplete digits.
[0058] The system integrates the recognition results of each single digit according to its place value (ones, tens, hundreds, etc.), outputs a complete and accurate reading on the LCD digital instrument, and marks the recognition confidence level (a secondary detection is triggered when the confidence level is less than 90%).
[0059] The above-described implementation can supplement the blurred and clear areas by grayscale enhancement and grayscale feature completion, thereby improving the reliability of liquid crystal digital recognition.
[0060] Step S130: Convert the RGB color space of the red and green indicator light area to the HSV color space; determine the average hue, average saturation, and average brightness of the red and green indicator light area based on the HSV color space; determine color information based on the average hue and average saturation; determine illumination information based on the average brightness and brightness threshold; determine the status information corresponding to the red and green indicator lights based on the color information and illumination information.
[0061] A lightweight approach combining HSV (Hue, Saturation, Value) color space with brightness-based dual discrimination can be adopted. First, the RGB (Red, Green, Blue) color space of the acquired image is converted to the HSV color space. Color features of the red and green indicator light areas are extracted using the HSV color space to distinguish between red and green. Then, based on a set brightness threshold, the on / off state of the indicator light is determined, ultimately outputting four states: "Red light on," "Red light off," "Green light on," and "Green light off." Furthermore, it can automatically adapt to changes in ambient light by dynamically adjusting the brightness threshold, avoiding misjudgments caused by light fluctuations due to ambient light and robot movement. The algorithm also boasts a fast response time, adapting to the rapid inspection needs of robots. The specific process is shown below:
[0062] Based on the threshold segmentation results of image preprocessing, the detection area of the red and green indicator lights is defined. The effective area of each red and green indicator light is extracted by the contour detection algorithm, and background interference such as indicator light base and panel text is automatically removed. The effective area of multiple red and green indicator lights can be detected at the same time.
[0063] The image of the effective area of the indicator light is converted from the RGB color space to the HSV color space (Hue, Saturation, Value) to avoid the problems of RGB color space being easily affected by brightness and color component coupling. This enables the separation and extraction of color features and brightness features, providing a basis for subsequent color discrimination and brightness determination.
[0064] Based on the color characteristics of industrial standard red and green indicator lights, preset HSV threshold ranges for red and green are defined. For example, these can be calibrated according to the field equipment: Red H: 0-10° / 160-180°, S: 120-255, V: 80-255; Green H: 40-70°, S: 120-255, V: 80-255. The average hue value (H channel average) and average saturation value (S channel average) of the effective area of the indicator light are compared with the preset threshold ranges: if they fall within the red range, it is determined to be a red feature; if they fall within the green range, it is determined to be a green feature; if neither falls within the red nor green range, it is determined to have no color feature.
[0065] Extract the average brightness of the effective area of the indicator light (i.e., the average value of the V channel) and compare it with the initial threshold. If the average brightness is greater than or equal to the brightness threshold, it is determined to be in a "lit" state; if the average brightness is less than the brightness threshold, it is determined to be in a "off" state. The brightness threshold is preset to 80 (0-255 grayscale range), which is the basic judgment standard.
[0066] Combining the color feature discrimination results and the final brightness judgment results, the system outputs the specific status of each indicator light (red light on / red light off / green light on / green light off). If an indicator light exhibits "abnormal color features" (such as simultaneous appearance of red and green features or no color features), it is marked as "indicator light malfunction," triggering an abnormality alert.
[0067] Optionally, before determining the lighting information based on the average brightness and the brightness threshold, the method further includes:
[0068] The average ambient brightness around the control panel of the rectifier and filter equipment is collected in real time; the brightness threshold is adjusted based on the average ambient brightness.
[0069] The system collects the average ambient light intensity around the control panel of the rectifier and filter equipment in real time. This can be obtained through the camera's brightness detection function or the average V-value of the overall image. If the ambient light intensity increases, the brightness judgment threshold is automatically raised. If the ambient light intensity decreases, the brightness judgment threshold is automatically lowered to avoid misjudging the on / off state due to strong or dim light (e.g., an indicator light that is off in strong light is easily misjudged as on, and an indicator light that is on in dim light is easily misjudged as off). Based on the adjusted brightness threshold, the on / off state of the indicator lights is re-judged to correct the initial results.
[0070] The above implementation method can dynamically adjust the brightness threshold according to the ambient brightness to improve the reliability of red and green indicator light on / off recognition.
[0071] Step S140: Determine the effective area of the switch based on the switch area; identify the outline edge of the switch body and the outline edge of the switch base based on the effective area of the switch body; determine the relative position of the switch body and the base based on the outline edge of the switch body and the outline edge of the switch base; match the relative position with the preset switch posture template to determine the switch posture recognition result.
[0072] A lightweight approach combining contour pose recognition and gate position determination can be used to determine the gate's pose recognition result. Contour localization: An edge extraction algorithm identifies the contour of the gate's metal body and its relative position to the base. Pose determination: The gate is pre-set to be in the standard "closed" (gate body upward) and "open" (gate body downward) positions. The image of the gate area is matched with the pre-set gate pose template, and the gate's position ("up" or "down") is determined by calculating the vertical coordinate offset of the gate body's center.
[0073] Optionally, determining the effective area of the switch based on the switch area can be implemented as follows:
[0074] Taking each pixel within the effective area of the switch as the center point, traverse the neighboring pixels of the center point and calculate the gray-level difference between the center pixel and the neighboring pixels to obtain a gray-level difference image; perform gray-level enhancement on the boundaries in the gray-level difference image, and perform gray-level smoothing on the panel background and uniform areas in the gray-level difference image to obtain a gray-level difference enhancement image; perform area filtering, shape filtering, and connected component analysis based on the gray-level difference enhancement image to obtain the effective area of the switch.
[0075] Based on the threshold segmentation results after image preprocessing, the effective area of the knife switch is automatically locked and selected, eliminating interference from the LCD instrument and indicator light areas. Within the effective area of the knife switch, two steps of processing are performed: grayscale difference enhancement and interference area filtering. The specific implementation is as follows:
[0076] 1) The grayscale difference algorithm enhances the grayscale difference between the blade body and the base.
[0077] Taking each pixel within the effective area of the guillotine as the center, the grayscale difference between the center pixel and its neighboring pixels is calculated to obtain a grayscale difference image. At the junction of the metal blade and the plastic base, the pixel grayscale value changes abruptly, and the grayscale difference result increases significantly, forming a high response value edge. For the panel background and uniform areas, the grayscale change is gradual, and the grayscale difference result approaches zero, which is suppressed and weakened.
[0078] By using a grayscale difference algorithm, the contrast between the blade and the plastic base is improved, highlighting the edge features of the blade outline. This solves the problems of blurred blade outline and insufficient contrast caused by industrial camera tilt shooting, uneven ambient lighting, and strong electromagnetic interference, making subsequent edge detection more stable.
[0079] 2) Automatic filtering of multi-dimensional interference areas
[0080] For the image enhanced by grayscale difference, invalid interference areas are eliminated through a three-tiered system of area filtering, shape filtering, and connected component analysis. Area filtering: A reasonable area threshold is preset to retain connected components whose area conforms to the characteristics of the blade body and base, while removing stains, dust, scratches that are too small, and uniformly reflective areas that are too large. Shape filtering: Based on the geometric characteristics (aspect ratio, compactness, and rectangularity) of the blade body and base, non-target shape interference such as circles and irregular shapes is filtered out. Connected component analysis: Effective areas connected to the blade body are retained, while isolated, disconnected noise points and false edges are disconnected.
[0081] After the above processing, irrelevant interferences such as panel stains, scratches, local reflections, dust, and strong electromagnetic interference noise are completely eliminated, leaving only a clean, complete, and feature-rich effective detection area for the switch, providing a high-quality image foundation for subsequent Canny edge detection and contour extraction.
[0082] The above-described embodiments can accurately identify the knife body and knife base in the knife switch area based on grayscale difference images, thereby obtaining the effective area of the knife switch and improving the accuracy of knife switch identification.
[0083] Optionally, identifying the outline edge of the switch body and the outline edge of the switch base based on the effective area of the switch can be implemented as follows:
[0084] Edge detection is performed based on the effective area of the switch to obtain the initial switch body contour edge and the initial switch base contour edge.
[0085] Morphological opening and closing operations are performed on the initial guillotine body contour edge and the initial guillotine base contour edge to obtain the guillotine body contour edge and the guillotine base contour edge.
[0086] Within the effective area of the positioned guillotine, a three-level processing method—edge detection, morphological optimization, and contour filtering—is performed to accurately extract the reference contours of the metal guillotine body and the base. The specific implementation is as follows:
[0087] 1) Edge detection: The Canny edge detection operator is used to achieve high-precision edge extraction.
[0088] First, Gaussian filtering is applied to the image of the switch region to smooth it, suppressing image noise and preventing noise points from being misidentified as edges.
[0089] Then, the Canny edge detection operator is used to extract edges using the following steps: calculating the magnitude and direction of the image gradient, identifying locations of abrupt pixel value changes, and locating potential edge points on the blade and base. Non-maximum suppression is performed, retaining only edge points with local maximum values along the gradient direction, refining coarse edges into single-pixel wide edges to avoid excessively wide or blurred edges. A dual-threshold hysteresis judgment is used to distinguish between strong and weak edges, retaining true strong edges belonging to the blade and base, and removing weak edges caused by noise, ultimately resulting in a continuous, clear, and interference-free set of edge pixels.
[0090] The Canny operator described above can stably extract the contour edges of the metal blade and the base fixing structure edges, providing a foundation for subsequent contour optimization.
[0091] 2) Morphological optimization: Opening and closing operations are combined to achieve contour restoration and denoising. Morphological opening and closing operations are sequentially performed on the edge image obtained by Canny detection to achieve edge optimization. The specific implementation method is as follows:
[0092] (1) Morphological opening operation: Erosion followed by dilation. Implementation method: Using structuring elements of preset size, erosion is performed on the edge image first, and then dilation is performed. It can remove isolated noise, small burrs, and tiny protrusions on the edge, while not changing the main shape and position of the blade and base contours, and eliminating false edges caused by panel stains, reflections, and electromagnetic interference.
[0093] (2) Morphological closing operation: dilation followed by erosion. Implementation method: using the same structuring element, dilation is performed on the edge image first, and then erosion is performed. It can fill in small gaps, breaks, and tiny holes in the edges, making the originally discontinuous blade edges connected into a complete, closed, and smooth contour, avoiding discontinuity of the contour caused by image jitter or distortion caused by tilting of industrial cameras.
[0094] After a combination of opening operation denoising and closing operation segmentation, the final result is a complete, closed, interference-free, and distortion-free outline of the metal blade body, as well as the base fixing reference outline (base edge line, mounting hole outline, and shaft outline).
[0095] 3) Contour filtering and positioning
[0096] Based on the area, aspect ratio, and compactness characteristics of the contour, the true blade contour and base contour are selected from the optimized edges, interfering contours are eliminated, and the relative positional relationship between the blade and the base is determined, providing a stable benchmark for subsequent contour posture matching and vertical position determination.
[0097] The above implementation method can achieve accurate identification of the knife switch body and the knife switch base through Canny edge detection.
[0098] Optionally, the gate attitude recognition result can be determined by matching the relative position with a preset gate attitude template, which can be implemented as follows:
[0099] The initial posture is determined by matching the relative position with the preset switch posture template;
[0100] The coordinate threshold is corrected based on the vertical offset between the center coordinates of the blade body and the far point of the base reference contour;
[0101] The initial posture is verified by checking the vertical position of the blade center coordinates under different postures and the coordinate threshold, and the blade posture recognition result is obtained.
[0102] A standard contour posture template library was constructed in advance through on-site calibration and image acquisition, representing preset knife switch posture templates in both closed (upward) and open (downward) states. These preset knife switch posture templates include core features such as the relative position and contour shape of the knife body and base, and have undergone normalization processing to adapt to tilted shooting angles and slight imaging distortion. The extracted knife body contour was matched and similarity calculated with the two types of preset knife switch posture templates. Based on the matching score, the current knife switch was preliminarily determined to be in a closed or open state, achieving rapid initial posture judgment.
[0103] Using the fixed reference contour of the switch base as the origin, a vertical pixel coordinate system is established to extract the coordinates (X0, Y0) of the center pixel of the metal switch body. Preset vertical coordinate thresholds Y1 for closing and Y2 for opening. Based on field equipment calibration: in the closed state, the Y-coordinate of the switch body center is less than or equal to Y1; in the open state, the Y-coordinate of the switch body center is greater than or equal to Y2, and Y1 is less than or equal to Y2. By comparing the Y-coordinate of the switch body center with the thresholds, the preliminary attitude recognition results are verified, and the position determination result is confirmed.
[0104] Considering the slight positional deviation of the mobile inspection robot during docking and the influence of the tilted shooting angle, a vertical coordinate offset calibration mechanism is activated: the vertical offset between the center coordinates of the tool body and the origin of the base reference contour is calculated in real time. If the offset is within the preset error range (±5 pixels), the coordinate threshold is automatically slightly corrected to eliminate the judgment error caused by the shooting deviation. If the offset exceeds the error range, it is marked as "robot docking deviation" and a robot fine-tuning reminder is triggered.
[0105] Combining the contour posture recognition results, vertical position determination results, and coordinate calibration results, the final output of the on / off status (closed / open) of the knife switch is obtained, along with the coordinate data of the knife body center, providing a basis for subsequent equipment status analysis.
[0106] The above-described embodiments can accurately identify the attitude of the guillotine based on the center coordinates of the guillotine body and the established coordinate system, thereby improving the accuracy of guillotine attitude identification.
[0107] Step S150: Output the LCD digital recognition result, the status information corresponding to the red and green indicator lights, and the switch posture recognition result.
[0108] The data can be fed back to the robot control system via a signal interface, and the robot control system will then upload the detection results to the back-end management platform to achieve centralized management of inspection data.
[0109] The multi-state integrated visual inspection method for the control panel of a rectifier and filter equipment provided in this invention can segment the acquired image of the control panel to obtain an LCD digital instrument area, a red / green indicator light area, and a knife switch area. For the LCD digital instrument area, a single-digit grayscale recognition method is used to accurately identify each LCD digit. After integrating the individual LCD digits, the LCD digit recognition result is obtained, achieving automated identification of the LCD digits. For the red / green indicator light area, after color space conversion, the hue and saturation of the HSV color space of the red / green indicator light area are used to determine whether it is a red or green light; the average brightness of the HSV color space of the red / green indicator light area is used to determine whether it is lit; the color and lighting status of the red / green indicator lights are automated. For the knife switch area, the posture of the knife switch can be identified based on the identified knife body contour edge and knife base contour edge, thereby determining whether the knife switch is open or closed, achieving automated identification of the knife switch posture. Compared to manual inspection, the multi-state integrated visual inspection method for the control panel of the rectifier and filter equipment provided in this embodiment of the invention can automatically identify the LCD digital content, the color and illumination status of the red and green indicator lights, and the opening and closing status of the switch on the control panel of the rectifier and filter equipment, eliminating the need for manual inspection and improving the inspection efficiency and safety of the rectifier and filter equipment.
[0110] Figure 2 This is a schematic diagram of a multi-state integrated visual inspection device for a rectifier and filter equipment control panel provided in an embodiment of the present invention. This embodiment is applicable to the automated inspection of the control panel of a rectifier and filter equipment. This device can be executed by a multi-state integrated visual inspection device for the rectifier and filter equipment control panel, which can be implemented in hardware and / or software. This multi-state integrated visual inspection device for the rectifier and filter equipment control panel can be configured in electronic devices such as personal computers and servers. Figure 2 As shown, the device includes: an image segmentation module 21, a liquid crystal digital recognition module 22, an indicator light status recognition module 23, a switch status recognition module 24, and an output module 25.
[0111] Image segmentation module 21 is used to segment images based on images acquired from the control panel of the rectifier filter equipment to obtain the LCD digital instrument area, the red and green indicator light area, and the knife switch area;
[0112] The LCD digit recognition module 22 is used to acquire a single digit sub-region in the LCD digital instrument area, determine multiple candidate digits based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates, determine a single digit recognition result based on the grayscale features of the grayscale image and the grayscale features of the multiple candidate digits, and integrate the single digit recognition results to obtain the LCD digit recognition result.
[0113] The indicator light status recognition module 23 is used to convert the RGB color space of the red and green indicator light area to the HSV color space, determine the average hue, average saturation, and average brightness of the red and green indicator light area according to the HSV color space, determine color information according to the average hue and average saturation, determine lighting information according to the average brightness and brightness threshold, and determine the status information corresponding to the red and green indicator lights according to the color information and lighting information.
[0114] The switch status recognition module 24 is used to determine the effective area of the switch based on the switch switch area, identify the outline edge of the switch body and the outline edge of the switch base based on the effective area of the switch body, determine the relative position of the switch body and the base based on the outline edge of the switch body and the outline edge of the switch base, and match the relative position with a preset switch posture template to determine the switch posture recognition result.
[0115] The output module 25 is used to output the LCD digital recognition result, the status information corresponding to the red and green indicator lights, and the switch posture recognition result.
[0116] Based on the above embodiments, optionally, the liquid crystal digit recognition module 22 is used to determine multiple candidate digits based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates, including:
[0117] The grayscale image of the single digit sub-region is subjected to normalized cross-correlation matching with multiple preset single digit templates to obtain the matching degree; the multiple single digits with the highest matching degree are selected as candidate digits.
[0118] Correspondingly, the liquid crystal digit recognition module 22 is used to determine the recognition result of a single digit based on the grayscale features of the grayscale image and the grayscale features of the plurality of candidate digits, including:
[0119] The grayscale features of the grayscale image are obtained, including: the number of connected components of the strokes, the position of grayscale transition points, or the aspect ratio of the strokes; the recognition result of a single digit is determined based on the candidate digit whose grayscale features are most similar to those of the grayscale image among the multiple candidate digits.
[0120] Based on the above embodiments, optionally, the liquid crystal digit recognition module 22 is further configured to: after determining the recognition result of a single digit based on the candidate digit whose grayscale features are most similar to those of the grayscale image among the grayscale features of the plurality of candidate digits, if there is a blurred area in the grayscale image of the single digit sub-region with a grayscale value lower than a preset grayscale value threshold range, then perform adaptive grayscale enhancement on the blurred area to improve the contrast between the strokes of the single digit and the background; or, if there is a missing area with a clear grayscale value in the grayscale image of the single digit sub-region, then complete the grayscale features of the missing area.
[0121] Multiple candidate digits are re-determined based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates.
[0122] Based on the above implementation, optionally, the indicator light status recognition module 23 is also used to collect the average ambient brightness around the control panel of the rectifier filter device in real time before determining the lighting information based on the average brightness and the brightness threshold.
[0123] The brightness threshold is adjusted based on the average ambient brightness.
[0124] Based on the above implementation, optionally, the switch status identification module 24 is used to determine the effective area of the switch based on the switch switch area, including:
[0125] Taking each pixel within the knife switch area as the center point, traverse the neighboring pixels of the center point, calculate the grayscale difference between the center pixel and the neighboring pixels, and obtain a grayscale difference image; perform grayscale enhancement on the boundary areas in the grayscale difference image, and perform grayscale smoothing on the panel background and uniform areas in the grayscale difference image to obtain a grayscale difference enhancement image.
[0126] Based on the grayscale difference enhanced image, area filtering, shape filtering, and connected component analysis are performed to obtain the effective area of the switch.
[0127] Based on the above embodiments, optionally, the switch state recognition module 24 is used to recognize the outline edge of the switch body and the outline edge of the switch base according to the effective area of the switch, including:
[0128] Edge detection is performed based on the effective area of the switch to obtain the initial switch body contour edge and the initial switch base contour edge.
[0129] Morphological opening and closing operations are performed on the initial guillotine body contour edge and the initial guillotine base contour edge to obtain the guillotine body contour edge and the guillotine base contour edge.
[0130] Based on the above implementation, optionally, the switch state recognition module 24 is used to match the relative position with a preset switch posture template to determine the switch posture recognition result, including:
[0131] The initial posture is determined by matching the relative position with the preset switch posture template;
[0132] The coordinate threshold is corrected based on the vertical offset between the center coordinates of the blade body and the far point of the base reference contour;
[0133] The initial posture is verified by checking the vertical position of the blade center coordinates under different postures and the coordinate threshold, and the blade posture recognition result is obtained.
[0134] The multi-state integrated visual inspection device for the rectifier and filter equipment control panel provided in this embodiment of the invention includes an image segmentation module 21 that can segment the acquired image of the rectifier and filter equipment control panel to obtain an LCD digital instrument area, a red / green indicator light area, and a knife switch area. An LCD digital instrument recognition module 22, for the LCD digital instrument area, uses a single-digit grayscale recognition method to accurately identify each LCD digit. After integrating the individual LCD digits, it obtains the LCD digit recognition result, achieving automated identification of the LCD digits. An indicator light status recognition module 23, for the red / green indicator light area, after color space conversion, determines whether it is a red or green light based on the hue and saturation of the HSV color space of the red / green indicator light area; it also determines whether it is lit based on the average brightness of the HSV color space of the red / green indicator light area; thus automating the identification of the color and lighting status of the red / green indicator lights. A knife switch status recognition module 24, for the knife switch area, can identify the knife switch's posture based on the identified knife switch body outline edge and knife switch base outline edge, thereby determining whether the knife switch is open or closed, achieving automated identification of the knife switch posture. Compared to manual inspection, the multi-state integrated visual inspection device for the rectifier and filter control panel provided in this embodiment of the invention can automatically identify the LCD digital content, the color and illumination status of the red and green indicator lights, and the opening and closing status of the switch on the rectifier and filter control panel, eliminating the need for manual inspection and improving the inspection efficiency and safety of the rectifier and filter equipment.
[0135] The integrated visual inspection device for multi-state rectifier and filter control panel provided in this embodiment of the invention can execute the integrated visual inspection method for multi-state rectifier and filter control panel provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0136] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0137] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0138] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the multi-state integrated visual inspection method for a rectifier filter device control panel.
[0139] In some embodiments, the multi-state integrated visual inspection method for a rectifier filter control panel can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the multi-state integrated visual inspection method for a rectifier filter control panel described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the multi-state integrated visual inspection method for a rectifier filter control panel by any other suitable means (e.g., by means of firmware).
[0140] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0141] The computer program for implementing the multi-state integrated visual inspection method for the control panel of the rectifier filter device of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer program causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer program can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0142] The invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute a multi-state integrated visual inspection method for a rectifier filter control panel, characterized in that it includes:
[0143] Image segmentation is performed based on the images acquired from the control panel of the rectifier and filter equipment to obtain the LCD digital instrument area, the red and green indicator light area, and the knife switch area;
[0144] A single digit sub-region in the LCD digital instrument area is obtained; multiple candidate digits are determined based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates; a single digit recognition result is determined based on the grayscale features of the grayscale image and the grayscale features of the multiple candidate digits; the single digit recognition result is integrated to obtain the LCD digit recognition result.
[0145] The RGB color space of the red and green indicator light area is converted to the HSV color space. The average hue, average saturation, and average brightness of the red and green indicator light area are determined based on the HSV color space. Color information is determined based on the average hue and average saturation. Illumination information is determined based on the average brightness and brightness threshold. Status information corresponding to the red and green indicator lights is determined based on the color information and illumination information.
[0146] The effective area of the switch is determined based on the switch area. The outline edges of the switch body and the base are identified based on the effective area. The relative position of the switch body and the base is determined based on the outline edges of the switch body and the base. The relative position is matched with a preset switch posture template to determine the switch posture recognition result.
[0147] Output the LCD digital recognition result, the status information corresponding to the red and green indicator lights, and the switch posture recognition result.
[0148] Based on the above implementation, optionally, multiple candidate digits are determined according to the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates, including:
[0149] The grayscale image of the single digit sub-region is subjected to normalized cross-correlation matching with multiple preset single digit templates to obtain the matching degree; the multiple single digits with the highest matching degree are selected as candidate digits.
[0150] Accordingly, determining the recognition result of a single digit based on the grayscale features of the grayscale image and the grayscale features of the plurality of candidate digits includes:
[0151] The grayscale features of the grayscale image are obtained, including: the number of connected components of the strokes, the position of grayscale transition points, or the aspect ratio of the strokes; the recognition result of a single digit is determined based on the candidate digit whose grayscale features are most similar to those of the grayscale image among the multiple candidate digits.
[0152] Based on the above implementation, optionally, after determining the recognition result of a single digit based on the candidate digit whose grayscale features are most similar to those of the grayscale image among the plurality of candidate digits, the method further includes:
[0153] If there is a blurred area in the grayscale image of the single digit sub-region where the grayscale value is lower than the preset grayscale value threshold range, then the blurred area is subjected to adaptive grayscale enhancement to improve the contrast between the single digit stroke and the background; or, if there is a missing area in the grayscale image of the single digit sub-region where the grayscale value is not clear, then the grayscale features of the missing area are completed.
[0154] Multiple candidate digits are re-determined based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates.
[0155] Based on the above implementation method, optionally, before determining the lighting information according to the average brightness value and the brightness threshold, the method further includes:
[0156] Real-time acquisition of the average ambient brightness around the control panel of the rectifier and filter equipment;
[0157] The brightness threshold is adjusted based on the average ambient brightness.
[0158] Based on the above embodiments, optionally, the effective area of the switch is determined according to the switch area, including:
[0159] Taking each pixel within the knife switch area as the center point, traverse the neighboring pixels of the center point, calculate the grayscale difference between the center pixel and the neighboring pixels, and obtain a grayscale difference image; perform grayscale enhancement on the boundary areas in the grayscale difference image, and perform grayscale smoothing on the panel background and uniform areas in the grayscale difference image to obtain a grayscale difference enhancement image.
[0160] Based on the grayscale difference enhanced image, area filtering, shape filtering, and connected component analysis are performed to obtain the effective area of the switch.
[0161] Based on the above embodiments, optionally, identifying the outline edge of the switch body and the outline edge of the switch base according to the effective area of the switch includes:
[0162] Edge detection is performed based on the effective area of the switch to obtain the initial switch body contour edge and the initial switch base contour edge.
[0163] Morphological opening and closing operations are performed on the initial guillotine body contour edge and the initial guillotine base contour edge to obtain the guillotine body contour edge and the guillotine base contour edge.
[0164] Based on the above implementation method, optionally, the switch posture recognition result is determined by matching the relative position with a preset switch posture template, including:
[0165] The initial posture is determined by matching the relative position with the preset switch posture template;
[0166] The coordinate threshold is corrected based on the vertical offset between the center coordinates of the blade body and the far point of the base reference contour;
[0167] The initial posture is verified by checking the vertical position of the blade center coordinates under different postures and the coordinate threshold, and the blade posture recognition result is obtained.
[0168] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0169] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0170] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0171] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0172] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0173] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A multi-state integrated visual inspection method for the control panel of a rectifier filter device, characterized in that, include: Image segmentation is performed based on the images acquired from the control panel of the rectifier and filter equipment to obtain the LCD digital instrument area, the red and green indicator light area, and the knife switch area; A single digital sub-region in the LCD digital instrument area is obtained, and multiple candidate digits are determined based on the matching degree between the grayscale image of the single digital sub-region and multiple preset single digit templates; A single digit recognition result is determined based on the grayscale features of the grayscale image and the grayscale features of the multiple candidate digits; the single digit recognition results are then integrated to obtain the liquid crystal digit recognition result. The RGB color space of the red and green indicator light area is converted to the HSV color space. The average hue, average saturation, and average brightness of the red and green indicator light area are determined based on the HSV color space. Color information is determined based on the average hue and average saturation. Illumination information is determined based on the average brightness and brightness threshold. Status information corresponding to the red and green indicator lights is determined based on the color information and illumination information. The effective area of the switch is determined based on the switch area, and the edge of the switch body and the edge of the switch base are identified based on the effective area. The relative position of the knife body and the base is determined based on the outline edge of the knife body and the outline edge of the knife base; the relative position is matched with a preset knife posture template to determine the knife posture recognition result. Output the LCD digital recognition result, the status information corresponding to the red and green indicator lights, and the switch posture recognition result.
2. The method according to claim 1, characterized in that, Multiple candidate digits are determined based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates, including: The grayscale image of the single digit sub-region is subjected to normalized cross-correlation matching with multiple preset single digit templates to obtain the matching degree; the multiple single digits with the highest matching degree are selected as candidate digits. Accordingly, determining the recognition result of a single digit based on the grayscale features of the grayscale image and the grayscale features of the plurality of candidate digits includes: The grayscale features of the grayscale image are obtained, including: the number of connected components of the strokes, the position of grayscale transition points, or the aspect ratio of the strokes; the recognition result of a single digit is determined based on the candidate digit whose grayscale features are most similar to those of the grayscale image among the multiple candidate digits.
3. The method according to claim 2, characterized in that, After determining the single digit recognition result based on the candidate digit whose grayscale features are most similar to those of the grayscale image among the plurality of candidate digits, the method further includes: If there is a blurred area in the grayscale image of the single digit sub-region where the grayscale value is lower than the preset grayscale value threshold range, then the blurred area is subjected to adaptive grayscale enhancement to improve the contrast between the single digit stroke and the background; or, if there is a missing area in the grayscale image of the single digit sub-region where the grayscale value is not clear, then the grayscale features of the missing area are completed. Multiple candidate digits are re-determined based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates.
4. The method according to claim 1, characterized in that, Before determining the lighting information based on the average brightness and the brightness threshold, the method further includes: Real-time acquisition of the average ambient brightness around the control panel of the rectifier and filter equipment; The brightness threshold is adjusted based on the average ambient brightness.
5. The method according to claim 1, characterized in that, The effective area of the switch is determined based on the switch area, including: Taking each pixel within the knife switch area as the center point, traverse the neighboring pixels of the center point, calculate the grayscale difference between the center pixel and the neighboring pixels, and obtain a grayscale difference image; perform grayscale enhancement on the boundary areas in the grayscale difference image, and perform grayscale smoothing on the panel background and uniform areas in the grayscale difference image to obtain a grayscale difference enhancement image. Based on the grayscale difference enhanced image, area filtering, shape filtering, and connected component analysis are performed to obtain the effective area of the switch.
6. The method according to claim 5, characterized in that, Identifying the outline edges of the switch body and the base based on the effective area of the switch includes: Edge detection is performed based on the effective area of the switch to obtain the initial switch body contour edge and the initial switch base contour edge. Morphological opening and closing operations are performed on the initial guillotine body contour edge and the initial guillotine base contour edge to obtain the guillotine body contour edge and the guillotine base contour edge.
7. The method according to claim 6, characterized in that, The relative position is matched with a preset switch posture template to determine the switch posture recognition result, including: The initial posture is determined by matching the relative position with the preset switch posture template; The coordinate threshold is corrected based on the vertical offset between the center coordinates of the blade body and the far point of the base reference contour; The initial posture is verified by checking the vertical position of the blade center coordinates under different postures and the coordinate threshold, and the blade posture recognition result is obtained.
8. A multi-state integrated visual inspection device for a rectifier and filter equipment control panel, characterized in that, include: The image segmentation module is used to segment the image based on the image acquired by the control panel of the rectifier and filter equipment to obtain the LCD digital instrument area, the red and green indicator light area, and the knife switch area; The LCD digit recognition module is used to acquire a single digit sub-region in the LCD digital instrument area, and determine multiple candidate digits based on the matching degree between the grayscale image of the single digit sub-region and multiple preset single digit templates; A single digit recognition result is determined based on the grayscale features of the grayscale image and the grayscale features of the multiple candidate digits; the single digit recognition results are then integrated to obtain the liquid crystal digit recognition result. The indicator light status recognition module is used to convert the RGB color space of the red and green indicator light area to the HSV color space, determine the average hue, average saturation, and average brightness of the red and green indicator light area according to the HSV color space, determine color information according to the average hue and average saturation, determine lighting information according to the average brightness and brightness threshold, and determine the status information corresponding to the red and green indicator lights according to the color information and lighting information. The switch status recognition module is used to determine the effective area of the switch based on the switch switch area, and to identify the edge of the switch body and the edge of the switch base based on the effective area of the switch. The relative position of the knife body and the base is determined based on the outline edge of the knife body and the outline edge of the knife base; the relative position is matched with a preset knife posture template to determine the knife posture recognition result. The output module is used to output the LCD digital recognition result, the status information corresponding to the red and green indicator lights, and the switch posture recognition result.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the multi-state integrated visual inspection method for the control panel of the rectifier filter equipment as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the multi-state integrated visual inspection method for the control panel of the rectifier filter equipment as described in any one of claims 1-7.
