An automatic detection method for linear switch status in distribution room based on visual recognition
Through visual recognition technology, combined with normal shooting and infrared shooting, image fusion and feature area recognition are performed, which solves the problems of switch coverage and light and shadow effects in large areas of power distribution stations, and achieves efficient automatic detection and detection of linear switches in power distribution rooms. Accurate status judgment.
Patent Information
- Application Number
- CN202410734191.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-07
AI Technical Summary
When the power distribution station is large in area, taking one picture cannot cover all the switches, so multiple pictures need to be taken. However, because the switch positions are unclear, it is difficult to integrate and judge, which affects efficiency, and the change of switch shape is affected by light, making conventional image recognition easy. leading to misjudgment.
Using a method based on visual recognition, the image of the linear switch in the distribution room is obtained through the camera, and a combination of normal shooting and infrared shooting is used to fuse the images, record the characteristic area and coordinates, and form a preset position summary image and an infrared summary image to avoid duplication Judge and use infrared to identify the switch status.
It achieves accurate summary of all switch positions, avoids repeated judgments, and accurately identifies switch status through infrared recognition, reducing misjudgments caused by the influence of light and shadow.
Smart Images

Figure CN118314528B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision and image processing, and in particular to a method for automatically detecting the linear switch state of a power distribution room based on visual recognition. Background Art
[0002] The distribution station is an important part of the power system, responsible for the distribution and transmission of electric energy. In order to ensure the safe and stable operation of the power supply system, the distribution station needs to carry out continuous switch monitoring. The traditional switch monitoring method mainly relies on manual inspection, which not only requires a lot of manpower, but also is prone to monitoring blind spots and human errors.
[0003] With the rapid development of computer vision and image recognition technology, it is possible to realize automatic switch monitoring using image processing and machine learning algorithms. In recent years, some switch status monitoring methods based on image recognition have emerged, but there are still some challenges and limitations.
[0004] When the area of the distribution station is large, taking only one picture cannot cover all switches, and multiple pictures are needed. However, due to the unclear positional relationship of the switches in different pictures, it is difficult to merge all switches into the same picture for status judgment. As a result, when making judgments, the overlapping switch positions in multiple pictures are repeatedly judged, affecting the efficiency of judgment. At the same time, the shape changes of switches are affected by light, and the use of conventional image recognition is prone to misjudgment. Summary of the invention
[0005] In order to solve the above technical problems, a method for automatic detection of the status of linear switches in a distribution room based on visual recognition is provided. This technical solution solves the problem mentioned in the above background technology that when the area of the distribution station is large, only one picture cannot cover all switches, and multiple pictures need to be taken. However, due to the unclear positional relationship of the switches in different pictures, it is difficult to merge all switches into the same picture for status judgment, resulting in repeated judgment of the overlapping switch positions in multiple pictures during judgment, affecting the efficiency of judgment. At the same time, the change of switch shape is affected by light, and the use of conventional image recognition is prone to misjudgment.
[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0007] A method for automatically detecting the linear switch state of a power distribution room based on visual recognition, comprising:
[0008] Use a camera to obtain images of the linear switches in the power distribution room. The camera's shooting modes include normal shooting and infrared shooting.
[0009] The dome camera of the camera is set to shoot, and at least one shooting angle is obtained, and at least one shooting angle is numbered according to the angle size;
[0010] Switch testing is divided into the test preparation stage and the actual test stage;
[0011] During the detection preparation stage, the linear switches in the power distribution room are all set to the disconnected state, the camera rotates the ball camera to the shooting angle, and normal shooting is used to capture images to obtain preset position images, and at least one preset position image is fused to obtain a preset position summary image;
[0012] Record the overlapping parts of the preset position images with adjacent numbers when they are fused as the feature area, and make the numbers of the preset position images with adjacent numbers to be fused correspond to the feature area;
[0013] Obtaining the position coordinates of the switch in the preset position summary image as feature coordinates;
[0014] The camera rotates the ball machine to the shooting angle, uses infrared shooting to capture images, obtains infrared preliminary images, and fuses them to obtain infrared preliminary summary images;
[0015] During the actual detection phase, the linear switch status of the power distribution room is set by the operator, the camera rotates the ball camera to the shooting angle, infrared shooting is used to capture the image, and the infrared actual image is obtained. At least one infrared actual image is fused to obtain an infrared actual summary image;
[0016] Obtain the contour area of a single switch as the area to be detected;
[0017] A reference area is formed at at least one characteristic coordinate of the preliminary infrared summary image;
[0018] At least one characteristic coordinate of the infrared actual summary image, a measured area is formed;
[0019] Compare the measured area with the reference area with the same coordinates as its center;
[0020] The switch number of the infrared actual summary image is given, and the switch status of the infrared actual summary image is warned.
[0021] Preferably, the step of setting the dome camera of the camera to obtain at least one shooting angle comprises the following steps:
[0022] Use equally spaced vertical lines to divide the distribution room to obtain at least one divided area;
[0023] At least one shooting angle is obtained according to at least one segmented area. At each shooting angle, the shooting picture of the camera covers one of the at least one segmented area. At different shooting angles, the shooting picture of the camera covers different segmented areas.
[0024] Preferably, the step of fusing at least one preset position image to obtain a preset position summary image comprises the following steps:
[0025] Numbering the preset position images, wherein the numbers of the preset position images are consistent with the numbers corresponding to the shooting angles, wherein the preset position images include some linear switches in the power distribution room;
[0026] Perform switch recognition in the preset position image to obtain the coordinates of the switch in the preset position image;
[0027] Among the preset position images with adjacent numbers, the one with a smaller number is recorded as a first preset position image, and among the preset position images with adjacent numbers, the one with a larger number is recorded as a second preset position image;
[0028] During fusion, the top edges of the preset position images with adjacent numbers are located on the same horizontal line, and the first preset position image is on the left side of the second preset position image;
[0029] Acquire the coordinates of a switch at the right edge of the first preset position image as reference coordinates;
[0030] Acquire, in the second preset position image, the coordinates of at least one switch having the same ordinate as the reference coordinates as the change coordinates;
[0031] During fusion, the switches at the reference coordinates in the first preset position image and the switches at the change coordinates in the second preset position image are respectively made to coincide with each other, so as to obtain at least one pre-fused image;
[0032] Acquire a switch in an overlapping portion of the first preset position image and the pre-fused image as a first switch;
[0033] Acquire a switch in an overlapping portion of the second preset position image and the pre-fused image as a second switch;
[0034] In the pre-fusion image, pairing the first switch with the second switch closest to it;
[0035] Calculate and accumulate the distances between all paired first switches and second switches to obtain a judgment distance of the pre-fusion image;
[0036] Selecting the pre-fused image with the smallest judgment distance as the actual fused image when the first preset position image and the second preset position image are fused;
[0037] When the first preset position image and the second preset position image traverse all preset position images with adjacent numbers, a preset position summary image is obtained, wherein the preset position summary image includes all linear switches in the power distribution room.
[0038] Preferably, the fusion to obtain the infrared preliminary summary image comprises the following steps:
[0039] Numbering the infrared preliminary images, wherein the numbers of the infrared preliminary images are consistent with the numbers corresponding to the shooting angles;
[0040] fusing at least one infrared preliminary image, wherein during the fusion, the overlapping parts of the infrared preliminary images with adjacent numbers are equal to the feature areas corresponding to the numbers, and the infrared preliminary image with a smaller number is on the left side of the infrared preliminary image with a larger number;
[0041] The top edges of the infrared preparatory images all lie on the same horizontal line;
[0042] The shape of the overlapping parts of the infrared preliminary images with adjacent numbers is consistent with the shape of the characteristic regions corresponding to the numbers.
[0043] Preferably, the step of fusing at least one infrared actual image to obtain an infrared actual summary image comprises the following steps:
[0044] The infrared actual image is numbered, and the number of the infrared actual image is consistent with the number corresponding to the shooting angle;
[0045] When fusion is performed, the overlapping parts of the infrared actual images with adjacent numbers are equal to the feature areas corresponding to their numbers, and the infrared actual image with a smaller number is on the left side of the infrared actual image with a larger number;
[0046] The top edges of the actual infrared images are all located on the same horizontal line;
[0047] The shape of the overlapping parts of the infrared actual images with adjacent numbers is consistent with the shape of the feature areas corresponding to the numbers.
[0048] Preferably, forming a reference area at at least one characteristic coordinate of the preliminary infrared summary image comprises the following steps:
[0049] The center of the area to be detected is obtained, and the center of the area to be detected is moved to the characteristic coordinates of the infrared preliminary summary image to form a reference area, which has the same shape as the area to be detected and is centered on the characteristic coordinates.
[0050] Preferably, forming a measured area at at least one characteristic coordinate of the infrared actual summary image comprises the following steps:
[0051] The center of the area to be detected is obtained, and the center of the area to be detected is moved to the characteristic coordinates of the actual infrared summary image to form a measured area, which has the same shape as the area to be detected and is centered on the characteristic coordinates.
[0052] Preferably, comparing the measured area with a reference area having the same coordinates as its center comprises the following steps:
[0053] The absolute values of the differences between the pixel values of the pixel points at the same position in the measured area and the reference area are accumulated to obtain a comprehensive judgment value;
[0054] When the comprehensive judgment value is greater than the preset value, the measured area is inconsistent with the reference area; when the comprehensive judgment value does not exceed the preset value, the measured area is consistent with the reference area;
[0055] When the measured area is consistent with the reference area, the switch in the measured area is in an open state, and when the measured area is inconsistent with the reference area, the switch in the measured area is in a closed state.
[0056] Preferably, the switch numbering of the infrared actual summary image and the early warning of the switch state of the infrared actual summary image include the following steps:
[0057] Sort the switches of infrared actual summary images;
[0058] When sorting, the horizontal coordinates of the centers of the measured areas where the two switches are located are compared, and the switch with the larger horizontal coordinate is sorted after the switch with the smaller horizontal coordinate;
[0059] When the horizontal coordinates of the centers of the measured areas where the two switches are located are consistent, the vertical coordinates of the centers of the measured areas where the two switches are located are compared, and the switch with the larger vertical coordinate is arranged after the switch with the smaller vertical coordinate;
[0060] Obtain the preset switch status of each numbered switch by the operator, and compare the switch status of the switch with the same number in the actual infrared summary image with the switch status preset by the operator. If there is any inconsistency, an alarm will be issued to remind the staff to go to the distribution room for inspection.
[0061] An electronic device includes a memory, a processor, and a computer-readable program stored in the memory and executable on the processor. When the processor executes the computer-readable program, the method for automatically detecting the linear switch status of a distribution room based on visual recognition is implemented.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] The preset position summary image is obtained by fusion, and the infrared preliminary summary image and the infrared actual summary image are obtained according to the feature area. All switch positions are summarized in the preset position summary image, the infrared preliminary summary image and the infrared actual summary image, and there is no duplication of switches. When judging the switch state, repeated judgment can be avoided. At the same time, infrared is used for identification. According to the different temperatures generated by the current flowing through when the switch is closed and opened, the state of the switch can be accurately identified, avoiding misjudgment of the switch shape due to the influence of light and shadow. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1It is a flow chart of a method for automatically detecting the linear switch status of a power distribution room based on visual recognition according to the present invention;
[0065] Figure 2 A schematic diagram of a process of setting up a dome camera of the present invention to shoot and obtain at least one shooting angle of view;
[0066] Figure 3 A schematic diagram of the process of fusing at least one preset position image to obtain a preset position summary image according to the present invention;
[0067] Figure 4 A schematic diagram of the process of obtaining infrared preliminary summary images by fusion according to the present invention;
[0068] Figure 5 A schematic diagram of the process of fusing at least one infrared actual image to obtain an infrared actual summary image according to the present invention;
[0069] Figure 6 It is a schematic diagram of a flow chart of comparing a measured area with a reference area having the same coordinates as its center according to the present invention;
[0070] Figure 7 The present invention is a schematic diagram of the switch numbering of the infrared actual summary image and the early warning process of the switch state of the infrared actual summary image. DETAILED DESCRIPTION
[0071] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.
[0072] Reference Figure 1 As shown, a method for automatically detecting the linear switch state of a power distribution room based on visual recognition comprises:
[0073] Use a camera to obtain images of the linear switches in the power distribution room. The camera's shooting modes include normal shooting and infrared shooting.
[0074] The dome camera of the camera is set to shoot, and at least one shooting angle is obtained, and at least one shooting angle is numbered according to the angle size;
[0075] Switch testing is divided into the test preparation stage and the actual test stage;
[0076] During the detection preparation stage, the linear switches in the power distribution room are all set to the disconnected state, the camera rotates the ball camera to the shooting angle, and normal shooting is used to capture images to obtain preset position images, and at least one preset position image is fused to obtain a preset position summary image;
[0077] Record the overlapping parts of the preset position images with adjacent numbers when they are fused as the feature area, and make the numbers of the preset position images with adjacent numbers to be fused correspond to the feature area;
[0078] Obtaining the position coordinates of the switch in the preset position summary image as feature coordinates;
[0079] The camera rotates the ball machine to the shooting angle, uses infrared shooting to capture images, obtains infrared preliminary images, and fuses them to obtain infrared preliminary summary images;
[0080] During the actual detection phase, the linear switch status of the power distribution room is set by the operator, the camera rotates the ball camera to the shooting angle, infrared shooting is used to capture the image, and the infrared actual image is obtained. At least one infrared actual image is fused to obtain an infrared actual summary image;
[0081] Obtain the contour area of a single switch as the area to be detected;
[0082] A reference area is formed at at least one characteristic coordinate of the preliminary infrared summary image;
[0083] At least one characteristic coordinate of the infrared actual summary image, a measured area is formed;
[0084] Compare the measured area with the reference area with the same coordinates as its center;
[0085] Number the switch of the infrared actual summary image and issue an early warning on the switch status of the infrared actual summary image;
[0086] In this solution, when fusion is performed, the switch shape is difficult to determine under infrared conditions. Therefore, normal shooting is used to identify the switch and determine the subsequent fusion rules. Because the camera's shooting angle is fixed, the relative position of the switch in the image is fixed;
[0087] The preset position images are images taken normally. When the preset position images are fused, the key is to determine the size of the fused portion of adjacent preset position images. Because the top edges of the preset position images are located on the same horizontal line during fusion, only the horizontal movement distance needs to be considered. The correct fused portion of adjacent preset position images must be the case where the switch positions in the overlapping portion are consistent. Therefore, this is used as the basis for judgment.
[0088] Due to the fusion process of the preset position images, the overlapping parts of the adjacent preset position images are determined as the feature areas, and since the shooting angles of at least one infrared preliminary image and at least one infrared actual image are fixed in advance and are consistent with the preset position images, the shape of the overlapping parts of the preset position images can be used as the basis for the fusion of at least one infrared preliminary image and at least one infrared actual image, so that the infrared preliminary summary image and the infrared actual summary image can be obtained;
[0089] The position of the switch in the infrared preliminary summary image and the infrared actual summary image is consistent with the position of the switch in the preset position summary image. Therefore, the position coordinates of the switch in the preset position summary image are obtained through conventional recognition as feature coordinates, and then the feature coordinates can also be used as the coordinates of the switch in the infrared preliminary summary image and the infrared actual summary image. The reason why the switch recognition is not performed in the infrared preliminary summary image and the infrared actual summary image is that the switch is not easy to recognize in the infrared image;
[0090] The reference area and the measured area are formed according to the contour area of a single switch in the infrared preliminary summary image and the infrared actual summary image respectively. Since the infrared preliminary summary image is obtained when the switch is disconnected, the reference area of the infrared preliminary summary image represents the infrared image of the switch being disconnected. When the images of the reference area and the corresponding measured area are inconsistent, it means that the measured area is in the opposite state of being disconnected, that is, a closed state.
[0091] Reference Figure 2 As shown, setting the camera's ball camera to shoot and obtaining at least one shooting angle includes the following steps:
[0092] Use equally spaced vertical lines to divide the distribution room to obtain at least one divided area;
[0093] At least one shooting angle is obtained according to the at least one segmented area, and at each shooting angle, the shooting picture of the camera covers one of the at least one segmented area, and at different shooting angles, the shooting picture of the camera covers different segmented areas;
[0094] The purpose of setting up the camera's dome camera to shoot is to divide the area of the distribution room so that the camera can cover all the switches in each divided area when shooting, and ensure that the angle is consistent when shooting in each divided area, so that the relative positions of the switches in the acquired pictures are consistent, and unified operations can be performed.
[0095] Reference Figure 3 As shown, fusing at least one preset position image to obtain a preset position summary image includes the following steps:
[0096] Numbering the preset position images, wherein the numbers of the preset position images are consistent with the numbers corresponding to the shooting angles, wherein the preset position images include some linear switches in the power distribution room;
[0097] Perform switch recognition in the preset position image to obtain the coordinates of the switch in the preset position image;
[0098] Among the preset position images with adjacent numbers, the one with a smaller number is recorded as a first preset position image, and among the preset position images with adjacent numbers, the one with a larger number is recorded as a second preset position image;
[0099] During fusion, the top edges of the preset position images with adjacent numbers are located on the same horizontal line, and the first preset position image is on the left side of the second preset position image;
[0100] Acquire the coordinates of a switch at the right edge of the first preset position image as reference coordinates;
[0101] Acquire, in the second preset position image, the coordinates of at least one switch having the same ordinate as the reference coordinates as the change coordinates;
[0102] During fusion, the switches at the reference coordinates in the first preset position image and the switches at the change coordinates in the second preset position image are respectively made to coincide with each other, so as to obtain at least one pre-fused image;
[0103] Acquire a switch in an overlapping portion of the first preset position image and the pre-fused image as a first switch;
[0104] Acquire a switch in an overlapping portion of the second preset position image and the pre-fused image as a second switch;
[0105] In the pre-fusion image, pairing the first switch with the second switch closest to it;
[0106] Calculate and accumulate the distances between all paired first switches and second switches to obtain a judgment distance of the pre-fusion image;
[0107] Selecting the pre-fused image with the smallest judgment distance as the actual fused image when the first preset position image and the second preset position image are fused;
[0108] When the first preset position image and the second preset position image traverse all preset position images with adjacent numbers, a preset position summary image is obtained, wherein the preset position summary image includes all linear switches in the power distribution room;
[0109] The purpose of fusing preset position images with adjacent numbers is to reduce repeated judgments in the judgment process, and by making judgments in the same image, the switches can be numbered more conveniently, and the actual state and preset state of the switches can be judged according to the numbers.
[0110] Reference Figure 4 As shown, the fusion of infrared preliminary summary images includes the following steps:
[0111] Numbering the infrared preliminary images, wherein the numbers of the infrared preliminary images are consistent with the numbers corresponding to the shooting angles;
[0112] fusing at least one infrared preliminary image, wherein during the fusion, the overlapping parts of the infrared preliminary images with adjacent numbers are equal to the feature areas corresponding to the numbers, and the infrared preliminary image with a smaller number is on the left side of the infrared preliminary image with a larger number;
[0113] The top edges of the infrared preparatory images all lie on the same horizontal line;
[0114] The shapes of the overlapping parts of the infrared preliminary images with adjacent numbers are consistent with the shapes of the feature regions corresponding to the numbers;
[0115] The fusion process of the preset position summary images limits the fusion area of the preset position images with adjacent numbers, and then when the infrared preliminary images are fused, the overlapping parts of the corresponding adjacent preset position summary images are used, so that the fusion of the infrared preliminary images can be completed.
[0116] Reference Figure 5 As shown, fusing at least one infrared actual image to obtain an infrared actual summary image includes the following steps:
[0117] The infrared actual image is numbered, and the number of the infrared actual image is consistent with the number corresponding to the shooting angle;
[0118] When fusion is performed, the overlapping parts of the infrared actual images with adjacent numbers are equal to the feature areas corresponding to their numbers, and the infrared actual image with a smaller number is on the left side of the infrared actual image with a larger number;
[0119] The top edges of the actual infrared images are all located on the same horizontal line;
[0120] The shapes of the overlapping parts of the infrared actual images with adjacent numbers are consistent with the shapes of the feature areas corresponding to their numbers;
[0121] The fusion process of the preset position summary images limits the fusion area of the preset position images with adjacent numbers, and then when the infrared actual image is fused, the overlapping part of the corresponding adjacent preset position summary images is used, so that the fusion of the infrared actual image can be completed.
[0122] Forming a reference area at at least one characteristic coordinate of the preliminary infrared summary image comprises the following steps:
[0123] The center of the area to be detected is obtained, and the center of the area to be detected is moved to the characteristic coordinates of the infrared preliminary summary image to form a reference area, which has the same shape as the area to be detected and is centered on the characteristic coordinates.
[0124] Forming a measured area at at least one characteristic coordinate of the infrared actual summary image comprises the following steps:
[0125] Obtain the center of the area to be detected, move the center of the area to be detected to the characteristic coordinates of the actual infrared summary image, and form a measured area, the measured area has the same shape as the area to be detected, and the measured area takes the characteristic coordinates as the center;
[0126] The characteristic coordinates are the position coordinates of the switch, but not the occupied area of the switch. During identification, the occupied area of the switch needs to be identified, thus forming a measured area and a reference area.
[0127] Reference Figure 6 As shown, comparing the measured area with the reference area having the same coordinates as its center includes the following steps:
[0128] The absolute values of the differences between the pixel values of the pixel points at the same position in the measured area and the reference area are accumulated to obtain a comprehensive judgment value;
[0129] When the comprehensive judgment value is greater than the preset value, the measured area is inconsistent with the reference area; when the comprehensive judgment value does not exceed the preset value, the measured area is consistent with the reference area;
[0130] When the measured area is consistent with the reference area, the switch in the measured area is in an open state, and when the measured area is inconsistent with the reference area, the switch in the measured area is in a closed state.
[0131] Reference Figure 7 As shown, the switch number of the infrared actual summary image and the early warning of the switch state of the infrared actual summary image include the following steps:
[0132] Sort the switches of infrared actual summary images;
[0133] When sorting, the horizontal coordinates of the centers of the measured areas where the two switches are located are compared, and the switch with the larger horizontal coordinate is sorted after the switch with the smaller horizontal coordinate;
[0134] When the horizontal coordinates of the centers of the measured areas where the two switches are located are consistent, the vertical coordinates of the centers of the measured areas where the two switches are located are compared, and the switch with the larger vertical coordinate is arranged after the switch with the smaller vertical coordinate;
[0135] Obtain the preset switch status of each numbered switch by the operator, and compare the switch status of the switch with the same number in the actual infrared summary image with the switch status preset by the operator. If there is any inconsistency, an alarm will be issued to remind the staff to go to the distribution room for inspection.
[0136] Furthermore, the present solution also proposes an electronic device, comprising a memory, a processor, and a computer-readable program stored in the memory and executable on the processor, wherein when the processor executes the computer-readable program, the above-mentioned method for automatic detection of the linear switch status in a distribution room based on visual recognition is implemented.
[0137] It is understandable that the storage medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; an optical medium, such as a DVD; or a semiconductor medium, such as a solid state drive (SSD).
[0138] To sum up, the advantages of the present invention are: a preset position summary image is obtained by fusion, and an infrared preliminary summary image and an infrared actual summary image are obtained according to the feature area. In the preset position summary image, the infrared preliminary summary image and the infrared actual summary image, all switch positions are summarized, and there is no duplication of switches. When judging the switch state, repeated judgment can be avoided. At the same time, infrared is used for identification. According to the different temperatures generated by the current flowing through the switch when the switch is closed and opened, the state of the switch can be accurately identified, avoiding misjudgment of the switch shape due to the influence of light and shadow.
[0139] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for automatic detection of linear switch status in a power distribution room based on visual recognition, characterized in that: include: Use a camera to obtain images of the linear switches in the power distribution room. The camera's shooting modes include normal shooting and infrared shooting. The dome camera of the camera is set to shoot, and at least one shooting angle is obtained, and at least one shooting angle is numbered according to the angle size; Switch testing is divided into the test preparation stage and the actual test stage; During the detection preparation stage, the linear switches in the power distribution room are all set to the disconnected state, the camera rotates the ball camera to the shooting angle, and normal shooting is used to capture images to obtain preset position images, and at least one preset position image is fused to obtain a preset position summary image; Record the overlapping parts of the preset position images with adjacent numbers when they are fused as the feature area, and make the numbers of the preset position images with adjacent numbers to be fused correspond to the feature area; Obtaining the position coordinates of the switch in the preset position summary image as feature coordinates; The camera rotates the ball machine to the shooting angle, uses infrared shooting to capture images, obtains infrared preliminary images, and fuses them to obtain infrared preliminary summary images; During the actual detection phase, the linear switch status of the power distribution room is set by the operator, the camera rotates the ball camera to the shooting angle, infrared shooting is used to capture the image, and the infrared actual image is obtained. At least one infrared actual image is fused to obtain an infrared actual summary image; Obtain the contour area of a single switch as the area to be detected; A reference area is formed at at least one characteristic coordinate of the preliminary infrared summary image; At least one characteristic coordinate of the infrared actual summary image, a measured area is formed; Compare the measured area with the reference area with the same coordinates as its center; The switch number of the infrared actual summary image is given, and the switch status of the infrared actual summary image is warned.
2. According to the method of automatic detection of linear switch status in a power distribution room based on visual recognition according to claim 1, it is characterized in that: The step of setting the dome camera of the camera to obtain at least one shooting angle comprises the following steps: Use equally spaced vertical lines to divide the distribution room to obtain at least one divided area; At least one shooting angle is obtained according to at least one segmented area. At each shooting angle, the shooting picture of the camera covers one of the at least one segmented area. At different shooting angles, the shooting picture of the camera covers different segmented areas.
3. According to claim 2, a method for automatic detection of linear switch status in a power distribution room based on visual recognition is characterized in that: The fusing of at least one preset position image to obtain a preset position summary image comprises the following steps: Numbering the preset position images, wherein the numbers of the preset position images are consistent with the numbers corresponding to the shooting angles, wherein the preset position images include some linear switches in the power distribution room; Perform switch recognition in the preset position image to obtain the coordinates of the switch in the preset position image; Among the preset position images with adjacent numbers, the one with a smaller number is recorded as a first preset position image, and among the preset position images with adjacent numbers, the one with a larger number is recorded as a second preset position image; During fusion, the top edges of the preset position images with adjacent numbers are located on the same horizontal line, and the first preset position image is on the left side of the second preset position image; Acquire the coordinates of a switch at the right edge of the first preset position image as reference coordinates; Acquire, in the second preset position image, the coordinates of at least one switch having the same ordinate as the reference coordinates as the change coordinates; During fusion, the switches at the reference coordinates in the first preset position image and the switches at the variable coordinates in the second preset position image are respectively made to coincide with each other, so as to obtain at least one pre-fused image; Acquire a switch in an overlapping portion of the first preset position image and the pre-fused image as a first switch; Acquire a switch in an overlapping portion of the second preset position image and the pre-fused image as a second switch; In the pre-fusion image, pairing the first switch with the second switch closest to it; Calculate and accumulate the distances between all paired first switches and second switches to obtain a judgment distance of the pre-fusion image; Selecting the pre-fused image with the smallest judgment distance as the actual fused image when the first preset position image and the second preset position image are fused; When the first preset position image and the second preset position image traverse all preset position images with adjacent numbers, a preset position summary image is obtained, wherein the preset position summary image includes all linear switches in the power distribution room.
4. According to the method of automatic detection of linear switch status in a power distribution room based on visual recognition according to claim 3, it is characterized in that: The fusion to obtain the infrared preliminary summary image comprises the following steps: Numbering the infrared preliminary images, wherein the numbers of the infrared preliminary images are consistent with the numbers corresponding to the shooting angles; fusing at least one infrared preliminary image, wherein during the fusion, the overlapping parts of the infrared preliminary images with adjacent numbers are equal to the feature areas corresponding to the numbers, and the infrared preliminary image with a smaller number is on the left side of the infrared preliminary image with a larger number; The top edges of the infrared preparatory images all lie on the same horizontal line; The shape of the overlapping parts of the infrared preliminary images with adjacent numbers is consistent with the shape of the characteristic regions corresponding to the numbers.
5. The method for automatic detection of linear switch status in a power distribution room based on visual recognition according to claim 4 is characterized in that: The fusing of at least one infrared actual image to obtain an infrared actual summary image comprises the following steps: The infrared actual image is numbered, and the number of the infrared actual image is consistent with the number corresponding to the shooting angle; When fusion is performed, the overlapping parts of the infrared actual images with adjacent numbers are equal to the feature areas corresponding to their numbers, and the infrared actual image with a smaller number is on the left side of the infrared actual image with a larger number; The top edges of the actual infrared images are all located on the same horizontal line; The shape of the overlapping parts of the infrared actual images with adjacent numbers is consistent with the shape of the feature areas corresponding to the numbers.
6. The method for automatic detection of linear switch status in a power distribution room based on visual recognition according to claim 5 is characterized in that: The step of forming a reference area at at least one characteristic coordinate of the preliminary infrared summary image comprises the following steps: The center of the area to be detected is obtained, and the center of the area to be detected is moved to the characteristic coordinates of the infrared preliminary summary image to form a reference area, which has the same shape as the area to be detected and is centered on the characteristic coordinates.
7. The method for automatic detection of linear switch status in a power distribution room based on visual recognition according to claim 6 is characterized in that: The forming of a measured area at at least one characteristic coordinate of the infrared actual summary image comprises the following steps: The center of the area to be detected is obtained, and the center of the area to be detected is moved to the characteristic coordinates of the actual infrared summary image to form a measured area, which has the same shape as the area to be detected and is centered on the characteristic coordinates.
8. The method for automatic detection of linear switch status in a power distribution room based on visual recognition according to claim 7 is characterized in that: The step of comparing the measured area with the reference area having the same coordinates as its center comprises the following steps: The absolute values of the differences between the pixel values of the pixel points at the same position in the measured area and the reference area are accumulated to obtain a comprehensive judgment value; When the comprehensive judgment value is greater than the preset value, the measured area is inconsistent with the reference area; when the comprehensive judgment value does not exceed the preset value, the measured area is consistent with the reference area; When the measured area is consistent with the reference area, the switch in the measured area is in an open state, and when the measured area is inconsistent with the reference area, the switch in the measured area is in a closed state.
9. The method for automatic detection of linear switch status in a power distribution room based on visual recognition according to claim 8 is characterized in that: The switch numbering of the infrared actual summary image and the early warning of the switch state of the infrared actual summary image include the following steps: Sort the switches of infrared actual summary images; When sorting, the horizontal coordinates of the centers of the measured areas where the two switches are located are compared, and the switch with the larger horizontal coordinate is sorted after the switch with the smaller horizontal coordinate; When the horizontal coordinates of the centers of the measured areas where the two switches are located are consistent, the vertical coordinates of the centers of the measured areas where the two switches are located are compared, and the switch with the larger vertical coordinate is arranged after the switch with the smaller vertical coordinate; Obtain the preset switch status of each numbered switch by the operator, and compare the switch status of the switch with the same number in the actual infrared summary image with the switch status preset by the operator. If there is any inconsistency, an alarm will be issued to remind the staff to go to the distribution room for inspection.
10. An electronic device comprising a memory, a processor, and a computer-readable program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable program, the method for automatically detecting the linear switch status of a distribution room based on visual recognition as described in any one of claims 1 to 9 is implemented.
