Auxiliary acceptance inspection method for power distribution station house based on computer vision technology

Through the computer vision technology-assisted acceptance inspection, the problems of low manual acceptance efficiency and high false detection rate of power distribution station buildings are solved, efficient and accurate acceptance is achieved, and the safety and reliability of power distribution station buildings are ensured.

CN118628036APending Publication Date: 2024-09-10齐丰科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410524327.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Due to the wide variety of equipment types and high similarity in appearance during the acceptance of power distribution station buildings, the manual acceptance efficiency is low and the false detection rate is high. There is the possibility of missed detection and misjudgment, which may cause serious accidents.

Method used

An auxiliary acceptance method based on computer vision technology is used to capture real-time pictures through customized visual safety helmets to detect whether the internal environment of the power distribution room, the appearance of the power distribution cabinet and the internal wiring meet the acceptance standards, and generate a report to guide the acceptance personnel to inspect and adjust.

Benefits of technology

It improves the acceptance efficiency, reduces the manual error rate, ensures the safety and reliability of the distribution station, realizes the standardization of acceptance, and reduces the reliance on professional technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628036A
    Figure CN118628036A
Patent Text Reader

Abstract

The invention provides an auxiliary acceptance method for a power distribution station house based on a computer vision technology. According to the method, the computer vision technology is used for assisting acceptance personnel in detecting whether the internal environment of the power distribution station house meets the acceptance standard or not; detecting whether the appearance of the power distribution cabinet meets acceptance standards; detecting whether internal wiring of the power distribution cabinet meets acceptance standards; the method specifically comprises the steps of wearing a customized visual safety helmet during acceptance, and capturing videos and pictures of a power distribution room acceptance process in real time according to power distribution room acceptance procedures and control key points; analyzing the collected picture data by using a computer vision technology; judging whether the project in the power distribution cabinet acceptance process meets design and specification requirements or not, and generating a report according to a computer vision analysis result after acceptance is finished; secondary manual auditing is carried out, and acceptance personnel are guided to check, repair and adjust the deficiencies; the method can improve the acceptance efficiency and reduce the manual error rate, thereby ensuring the safety and reliability of the power distribution station house.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power distribution room acceptance equipment, and in particular to an auxiliary acceptance method for a power distribution room based on computer vision technology. Background Art

[0002] Distribution substations are commonly found in cities, industrial parks, commercial areas, residential areas and other places, and are an important part of the power system. However, due to the large number of equipment types and quantities in distribution substations, and the high similarity in appearance of equipment of the same type, current distribution substations are still all inspected and accepted manually, which requires a lot of manpower and material resources. In addition, manual inspection is affected by the subjective factors of the inspectors, and there is a possibility of missed inspections and false inspections. If some data are not correctly judged, serious accidents may occur, causing great losses. In addition, there are many types of inspection items in distribution substations, and the probability of missed inspections and false inspections is high during inspection. Therefore, the applicant designed a distribution substation based on the procedures and key points of distribution substation inspection. An auxiliary acceptance method based on computer vision technology uses computer vision technology to detect whether there is water leakage or seepage in the distribution room; detect whether there are small animals in the distribution room and protective measures; detect whether there are sundries in the distribution room; detect whether the distribution cabinet and busbar in the distribution room are installed correctly and firmly, the cabinet is reliably grounded, whether the front of the distribution cabinet is equipped with an insulating plate, and whether the various instruments and indicator lights of the distribution cabinet are correct; detect whether the wiring of the primary and secondary systems inside the distribution cabinet is correct, whether the panel cabinet paint is complete, etc.; and generate a report based on the results of computer vision analysis to guide the acceptance personnel to check, repair and adjust the deficiencies; this method can improve the acceptance efficiency and reduce the human error rate, thereby ensuring the safety and reliability of the distribution station. Summary of the invention

[0003] In order to solve the above technical problems, the present invention proposes an auxiliary acceptance method for power distribution station based on computer vision technology, which uses computer vision technology to assist acceptance personnel to detect whether the internal environment of the power distribution room meets the acceptance standards; detect whether the appearance of the power distribution cabinet meets the acceptance standards; and detect whether the internal wiring of the power distribution cabinet meets the acceptance standards. This method can improve the acceptance efficiency and reduce the manual error rate, thereby ensuring the safety and reliability of the power distribution station.

[0004] To achieve the above object, the technical solution adopted by the present invention is:

[0005] An auxiliary acceptance method for a power distribution station based on computer vision technology, characterized in that: the auxiliary acceptance method for a power distribution station based on computer vision technology uses computer vision technology to assist acceptance personnel in detecting whether the internal environment of the power distribution room meets the acceptance criteria; detecting whether the appearance of the power distribution cabinet meets the acceptance criteria; detecting whether the internal wiring of the power distribution cabinet meets the acceptance criteria; the specific steps are:

[0006] Step 1: The acceptance personnel wear customized visual safety helmets;

[0007] Step 2: After the acceptance begins, use a safety helmet to take real-time video pictures of the power distribution room;

[0008] Step 3: Use computer vision technology to analyze the collected image data;

[0009] Step 4: Check whether there is water leakage or seepage in the power distribution room;

[0010] Step 5: Check whether there are small animals in the power distribution room and take protective measures;

[0011] Step 6: Check whether there is any debris in the power distribution room;

[0012] Step 7: Check whether the power distribution cabinet and busbar in the power distribution room are installed correctly and firmly, whether the cabinet is grounded reliably, whether there is an insulating plate in front of the power distribution cabinet, and whether the various instruments and indicator lights of the power distribution cabinet are correct;

[0013] Step 8: Check whether the wiring of the primary and secondary systems inside the power distribution cabinet is correct and whether the cabinet paint is intact;

[0014] Step 9: After acceptance, generate a report based on the results of computer vision analysis;

[0015] Step 10: Conduct manual review and guide acceptance personnel to conduct inspections, repairs, and adjustments.

[0016] Furthermore, the acceptance personnel wear a customized visual safety helmet which is provided with a camera, a start button, a WiFi module, a guide speaker, a memory and a battery. The camera and the start button are arranged at the front end, and the WiFi module, the guide speaker, the memory and the battery are arranged inside.

[0017] Furthermore, the detection in steps four to eight uses qualified acceptance pictures and unqualified acceptance pictures for sample training, thereby forming a distribution room acceptance big data model, and judging whether the current acceptance extracted picture is qualified based on the big data model.

[0018] Furthermore, the specific determination of whether the wiring of the primary and secondary systems inside the power distribution cabinet is correct in step eight is as follows:

[0019] Step 1: Extract the internal wiring picture of the power distribution cabinet for preprocessing;

[0020] 1) Get the original image as RGB image matrix data and put it in Cabinet_Origin_Pic[];

[0021] 2) According to importance and other indicators, the three components are weighted and averaged with different weights; since the human eye is most sensitive to green and least sensitive to blue, therefore, weighted averaging the RGB three components according to the following formula can obtain a more reasonable grayscale image: Cabinet_Gray = Gray(x, y) = 0.11R(x, y) + 0.59G(x, y) + 0.30B(x, y), and thus calculate to obtain Cabinet_Gray_Pic[];

[0022] 3) Since the upper left or upper right, lower left or lower right corners of the actual picture usually contain some text information, to avoid the influence of text information on monitoring, assume that the abscissa of the picture is 0 < x < W1, and the ordinate of the picture is 0 < y < H1, where H1 represents the height of the picture and W1 represents the width of the picture. The abscissa of the picture is intercepted as W1 / 16 < x < 7*W1 / 16, and the ordinate of the picture is intercepted as H1 / 16 < y < 7*H1 / 16 to obtain the grayscale picture matrix Cabinet_Gray2_Pic[], and the width of the new grayscale picture is W2 and the height is H2;

[0023] 4) Calculate the gradient value of each pixel point, calculate using a 3*3 window, and in the way of average filtering,

[0024]

[0025] After calculating each pixel, obtain the new filtered pixel value for each pixel, and form the filtered grayscale picture matrix Cabinet_Gray3_Pic[];

[0026] 5) Apply the Canny edge extraction algorithm to Cabinet_Gray3_Pic[]. The Sobel operator is a commonly used discrete differential operator, which can calculate the gradient intensity and direction of each pixel point in the image; in Canny edge detection, the Sobel operator is usually used to calculate the gradients of the image in the horizontal and vertical directions; for grayscale images, we can calculate the gradient of the pixel through the following Sobel operator:

[0027] Gradient in the horizontal direction (Gx):

[0028]

[0029] Gradient in the vertical direction (Gy):

[0030]

[0031] Specific steps for calculating pixel gradients using the Sobel operator: If it is not a grayscale image, convert the image to a grayscale image; apply the Sobel operator in the horizontal direction (Gx) and the Sobel operator in the vertical direction (Gy) to the image; calculate the gradient intensity and direction of each pixel:

[0032] G = sqrt(Gx^2 + Gy^2) (gradient intensity)

[0033] θ = arctan(Gy / Gx) (gradient direction)

[0034] Use the cvCanny(pImg, pCabinetCannyImg, 50, 150, 3) function, where pImg is the input grayscale image and pCabinetCannyImg is the output image after edge extraction, which is a binary image;

[0035] 6) After calculation by the above formula, the obtained pCabinetCannyImg picture is the binary image, and the size of the picture is; W1 / 16 < x < 7*W1 / 16, H1 / 16 < y < 7*H1 / 16, that is, the width is W2 and the height is H2;

[0036] Step 2: Obtain a set of intersection points through horizontal dividing lines:

[0037] For the binary image of pCabinetCannyImg, the number of dividing lines used is div_line_num = H2 / 5 - 1, indicating that a line is drawn in the binary image every 5 pixels; the implementation method uses a horizontal scanning loop, with the loop in the height direction as for(int i = 0; i < H2 / 5; i++), and the loop in the horizontal direction as for(int j = 0; j < W2; j++); determine whether the value of the pixel Pixel(j, i*5) is a non-zero value. If it is a non-zero value, store it in the queue Cabinet_Queue_Org[], and each pixel value is a non-zero value, and the number is assumed to be n.

[0038] Step 3: Obtain a combination of intersection points using a sliding window:

[0039] 1) In a loop, use a 2*2 sliding window to check whether each pixel in Cabinet_Queue_Org[] is on the same edge line as other pixels;

[0040] 2) When multiple pixels in Cabinet_Queue_Org[] are on the same edge line, re-record this group of pixels as Cabinet_Queue_SameLine[m][], where m represents a total of m groups of such data;

[0041] 3) If a certain pixel in Cabinet_Queue_Org[] is not on the same edge line as any other pixel, then remove this pixel point;

[0042] 4) Loop through the above process to obtain all the above combinations;

[0043] Step Four: Obtain effective line segments by calculating slopes:

[0044] 1) For Cabinet_Queue_SameLine[1][], assume there are k pixel points in this group. Calculate the slopes between the 1st point and the 2nd point, the 2nd point and the 3rd point,...... the (k - 1)th point and the kth point in sequence;

[0045] 2) Calculate the average value of the slopes as Slope[i], where i represents the ith of the m effective line segments. When calculating the 1st one, i = 1; the value range of i is (1, m);

[0046] 3) Loop through the above process to finally obtain all Slope[i] values within the range of (1, m);

[0047] 4) Count the number of line segments with positive slopes as a, and count the number of line segments with negative slopes as b;

[0048] 5) When a > b, it indicates that the indicating line is in a separated state. When a < b, it indicates that the indicating line is in a connected state. If a = b, it means an exception occurs. When an exception occurs, the algorithm can be further corrected and adjusted;

[0049] 6) Complete the judgment of the connection state of the line.

[0050] The benefits brought by this application are:

[0051] 1. Promote the improvement of the intelligence level of the distribution substation;

[0052] The auxiliary acceptance method for distribution substation buildings based on computer vision technology is easy to implement and apply, and is mainly applied to the intelligent auxiliary acceptance of distribution substation buildings, which has a certain promoting effect on the development and improvement of the intelligent level of power grid distribution substation buildings

[0053] 2. Improve the acceptance efficiency and reduce the manual error rate;

[0054] The auxiliary acceptance method for distribution substation buildings based on computer vision technology can improve the acceptance efficiency and reduce the manual error rate, thus ensuring the safety and reliability of distribution substation buildings;

[0055] 3. Realize the standardization of the acceptance of the distribution room;

[0056] Through standardized acceptance steps and key point controls, the acceptance of distribution stations can be effectively guaranteed to be qualified, the high dependence of distribution station acceptance on the professional skills of professionals can be weakened, and the impact of human factors can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is a schematic diagram of the auxiliary acceptance method of the present invention;

[0058] Figure 2 This is a schematic diagram of the structure of a visual helmet according to the present invention;

[0059] Figure 3 This is a schematic diagram of the big data model training for the present invention;

[0060] Figure 4 This is a schematic diagram of the acceptance photo extraction and matching process of the present invention. DETAILED DESCRIPTION

[0061] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments:

[0062] like Figure 1-4 As shown, a computer vision-based auxiliary acceptance method for distribution substations is shown. Figure 1 As shown, the auxiliary acceptance method of the distribution station based on computer vision technology uses computer vision technology to assist the acceptance personnel to detect whether the internal environment of the distribution room meets the acceptance standards; detect whether the appearance of the distribution cabinet meets the acceptance standards; detect whether the internal wiring of the distribution cabinet meets the acceptance standards; the specific steps are:

[0063] Step 1. The acceptance personnel wear a customized visual safety helmet; the visual safety helmet is professionally customized and is equipped with a camera, a start button, a WiFi module, a guide speaker, a memory and a battery. The camera and the start button are set at the front, and the WiFi module, the guide speaker memory and the battery are set inside; after wearing it correctly, click the start button, connect the acceptance equipment APP through the WiFi module, and then follow the guidance of the guide speaker to accept the equipment and facilities in the power distribution station one by one;

[0064] Step 2: After the acceptance begins, the helmet captures the video image of the power distribution room in real time; under the guidance of the voice guidance, the acceptance personnel conduct inspections and acceptances item by item. At this time, the camera on the helmet captures and records the acceptance process in real time; when capturing, the text on the distribution facilities can be quickly extracted;

[0065] Step 3: Use computer vision technology to analyze the collected image data; Use computer vision technology to analyze the collected image data to determine whether the acceptance is qualified, and if it is unqualified, how to rectify it;

[0066] Step 4: Check whether there is water leakage or water seepage in the power distribution room; look around the floor and walls of the power distribution room, take photos, and determine whether there is water leakage or water seepage;

[0067] Step 5: Check whether there are small animals in the power distribution room and the protective measures; check the corners and entrances and exits of the power distribution room to see if there are small animals in the corners and whether protective measures are set at the entrances and exits, so as to determine whether this item is qualified;

[0068] Step 6: Check whether there is any debris in the power distribution room; check whether there is any irrelevant debris in every corner of the power distribution room that affects the safe operation of the power distribution room;

[0069] Step 7: Check whether the power distribution cabinet and busbar in the power distribution room are installed correctly and firmly, whether the cabinet is grounded reliably, whether the insulation board is installed in front of the power distribution cabinet, and whether the various instruments and indicator lights of the power distribution cabinet are correct; check each item according to the guidance voice to determine whether it is qualified

[0070] Step 8. Check whether the wiring of the primary and secondary systems inside the power distribution cabinet is correct and whether the cabinet paint is intact; check each item according to the guidance voice to determine whether it is qualified and whether the cabinet paint is intact;

[0071] like Figure 3 As shown, the inspections in steps 4 to 8 are trained with samples of qualified and unqualified images, thereby forming a big data model for the acceptance of distribution rooms; Figure 4 As shown, after extracting features from the image to be identified, the big data model is used to determine whether the current acceptance extracted image is qualified, and the image notes are completed;

[0072] Step 9: After acceptance, generate a report based on the results of computer vision analysis;

[0073] Step 10. Conduct manual review and guide the acceptance personnel to check, repair and adjust. The generated report must eventually be reviewed by the supervisor. For any deficiencies in the acceptance, guide the acceptance personnel to check, repair and adjust to ensure the qualified acceptance and safe operation of the distribution room.

[0074] The specific determination of whether the wiring of the primary and secondary systems in the power distribution cabinet is correct in step 8 is as follows:

[0075] Step 1: Extract the internal wiring picture of the power distribution cabinet for preprocessing;

[0076] 1) Get the original image as RGB image matrix data and put it in Cabinet_Origin_Pic[];

[0077] 2) According to importance and other indicators, the three components are weighted and averaged with different weights; since the human eye is most sensitive to green and least sensitive to blue, therefore, the following formula is used to perform weighted averaging on the RGB three components to obtain a more reasonable grayscale image: Cabinet_Gray = Gray(x, y) = 0.11R(x, y) + 0.59G(x, y) + 0.30B(x, y), and thus Cabinet_Gray_Pic[] is calculated;

[0078] 3) Since the upper left corner or upper right corner, lower left corner or lower right corner of the actual picture usually contains some text information, to avoid the influence of text information on monitoring, assuming that the abscissa of the picture is 0 < x < W1 and the ordinate of the picture is 0 < y < H1, where H1 represents the height of the picture and W1 represents the width of the picture, the abscissa of the picture is intercepted as W1 / 16 < x < 7*W1 / 16, and the ordinate of the picture is intercepted as H1 / 16 < y < 7*H1 / 16 to obtain the grayscale picture matrix Cabinet_Gray2_Pic[], and the width of the new grayscale picture is W2 and the height is H2;

[0079] 4) Calculate the gradient value of each pixel point, calculate using a 3*3 window, and in the way of average value filtering,

[0080]

[0081] After calculating each pixel, the new filtered pixel value of each pixel is obtained, and the filtered grayscale picture matrix Cabinet_Gray3_Pic[] is formed;

[0082] 5) Apply the Canny edge extraction algorithm to Cabinet_Gray3_Pic[]. The Sobel operator is a commonly used discrete differential operator, which can calculate the gradient intensity and direction of each pixel point in the image; in Canny edge detection, the Sobel operator is usually used to calculate the gradient of the image in the horizontal and vertical directions; for grayscale images, we can calculate the gradient of the pixel through the following Sobel operator:

[0083] Gradient in the horizontal direction (Gx):

[0084]

[0085] Gradient in the vertical direction (Gy):

[0086]

[0087] Specific steps for calculating pixel gradients using the Sobel operator: If it is not a grayscale image, convert the image to a grayscale image; apply the Sobel operator in the horizontal direction (Gx) and the Sobel operator in the vertical direction (Gy) to the image; calculate the gradient intensity and direction of each pixel:

[0088] G = sqrt(Gx^2 + Gy^2) (gradient intensity)

[0089] θ = arctan(Gy / Gx) (gradient direction)

[0090] Use the cvCanny(pImg, pCabinetCannyImg, 50, 150, 3) function, where pImg is the input grayscale image and pCabinetCannyImg is the output image after edge extraction, which is a binary image;

[0091] 6) After calculation through the above formula, the obtained pCabinetCannyImg picture is the binary image, and the size of the picture is; W1 / 16 < x < 7*W1 / 16, H1 / 16 < y < 7*H1 / 16, that is, the width is W2 and the height is H2;

[0092] Step 2: Obtain a group of intersection points through horizontal dividing lines:

[0093] For the binary image of pCabinetCannyImg, the number of dividing lines used is div_line_num = H2 / 5 - 1, indicating that a line is drawn in the binary image every 5 pixels; the implementation method uses a horizontal scanning loop, with the loop in the height direction being for(int i = 0; i < H2 / 5; i++), and the loop in the horizontal direction being for(int j = 0; j < W2; j++); determine whether the value of the pixel Pixel(j, i*5) is a non-zero value. If it is a non-zero value, store it in the queue Cabinet_Queue_Org[], and each pixel value is a non-zero value, and the number is assumed to be n.

[0094] Step 3: Obtain a combination of intersection points using a sliding window:

[0095] 1) In a loop, use a 2*2 sliding window to check whether each pixel in Cabinet_Queue_Org[] is on the same edge line as other pixels;

[0096] 2) When multiple pixels in Cabinet_Queue_Org[] are on the same edge line, re-record this group of pixels as Cabinet_Queue_SameLine[m][], where m represents a total of m groups of such data;

[0097] 3) If a certain pixel in Cabinet_Queue_Org[] is not on the same edge line as any other pixel, then remove this pixel point;

[0098] 4) Repeat the above process to obtain all the above combinations;

[0099] Step Four: Obtain effective line segments by calculating slopes:

[0100] 1) For Cabinet_Queue_SameLine[1][], assume there are k pixel points in this group. Calculate the slopes between the 1st point and the 2nd point, the 2nd point and the 3rd point,...... the (k - 1)th point and the kth point in sequence;

[0101] 2) Calculate the average value of the slopes as Slope[i], where i represents the ith of the m effective line segments. When calculating the 1st one, i = 1; the value range of i is (1, m);

[0102] 3) Repeat the above process to finally obtain all the Slope[i] values within the range of (1, m);

[0103] 4) Count the number of line segments with positive slopes as a, and count the number of line segments with negative slopes as b;

[0104] 5) When a > b, it indicates that the indication line is in a separated state. When a < b, it indicates that the indication line is in a connected state. If a = b, it means an exception occurs. When an exception occurs, the algorithm can be further modified and adjusted;

[0105] 6) Complete the judgment of the connection state of the line.

[0106] The above is only a preferred embodiment of the present invention, and it is not a limitation to the present invention in any other form. Any modification or equivalent change made according to the technical essence of the present invention still belongs to the scope protected by the present invention.

Claims

1. A computer vision-based auxiliary acceptance method for distribution substations, characterized in that: The auxiliary acceptance method of the distribution substation building based on computer vision technology uses computer vision technology to assist the acceptance personnel in detecting whether the internal environment of the distribution substation meets the acceptance standards; detecting whether the appearance of the distribution cabinet meets the acceptance standards; detecting whether the internal wiring of the distribution cabinet meets the acceptance standards; the specific steps are as follows: Step 1: The acceptance personnel wear customized visual safety helmets; Step 2: After the acceptance starts, the safety helmet captures video pictures of the distribution substation in real time; Step 3: Use computer vision technology to analyze the collected picture data; Step 4: Detect whether there is water leakage or seepage in the distribution substation; Step 5: Detect whether there are small animals and protective measures in the distribution substation; Step 6: Detect whether there are sundries in the distribution substation; Step 7: Detect whether the distribution cabinet and busbar in the distribution substation are installed correctly and firmly, the grounding of the cabinet is reliable, whether there is an insulating board in front of the distribution cabinet, and whether various meters and indicator lights of the distribution cabinet are correct; Step 8: Detect whether the internal primary and secondary system wiring of the distribution cabinet is correct and whether the paint on the panel cabinet is complete; Step 9: After the acceptance is completed, generate a report according to the results of the computer vision analysis; Step 10: Conduct manual review to guide the acceptance personnel to conduct inspections, repairs, and adjustments.

2. According to claim 1, a computer vision technology-based auxiliary acceptance method for distribution station, characterized in that: The customized visual safety helmet worn by the acceptance personnel is provided with a camera, a start button, a WiFi module, a guiding sound, a memory, and a battery. The camera and the start button are arranged at the front end, and the WiFi module, the guiding sound, the memory, and the battery are arranged inside.

3. According to claim 1, a computer vision technology-based auxiliary acceptance method for power distribution station is characterized in that: The detections in Steps 4 to 8 use qualified acceptance pictures and unqualified acceptance photos for sample training to form a big data model for the acceptance of the distribution substation, and judge whether the currently extracted pictures for acceptance are qualified according to the big data model.

4. According to claim 1, a computer vision technology-based auxiliary acceptance method for power distribution station is characterized in that: The specific determination of whether the internal primary and secondary system wiring of the distribution cabinet in Step 8 is correct is as follows: Step 1: Extract the internal wiring pictures of the distribution cabinet for preprocessing; 1) Obtain the original picture as RGB picture matrix data and place it in Cabinet_Origin_Pic[]; 2) According to importance and other indicators, perform weighted averaging on the three components with different weights; since the human eye is most sensitive to green and least sensitive to blue, the following formula is used to perform weighted averaging on the RGB three components to obtain a more reasonable grayscale image: Cabinet_Gray = Gray(x,y) = 0.11R(x,y) + 0.59G(x,y) + 0.30B(x,y), so as to calculate and obtain Cabinet_Gray_Pic[]; 3) Since there is usually some text information in the upper left corner or upper right corner, lower left corner or lower right corner of the actual picture, to avoid the influence of text information on the detection, assume that the horizontal coordinate of the picture is 0 < x < W1, and the vertical coordinate of the picture is 0 < y < H1, where H1 represents the height of the picture and W1 represents the width of the picture. Intercept the horizontal coordinate of the picture as W1 / 16 < x < 7*W1 / 16, and intercept the vertical coordinate of the picture as H1 / 16 < y < 7*H1 / 16 to obtain the grayscale picture matrix Cabinet_Gray2_Pic[], and the width of the new grayscale picture is W2 and the height is H2; 4) Calculate the gradient value of each pixel point. Use a 3*3 window for calculation and perform the calculation in the way of average filtering. After calculating each pixel, obtain the new filtered pixel value for each pixel and form the filtered grayscale image matrix Cabinet_Gray3_Pic[]. 5) Apply the Canny edge detection algorithm to Cabinet_Gray3_Pic[]. The Sobel operator is a commonly used discrete differential operator, which can calculate the gradient intensity and direction of each pixel point in the image; in Canny edge detection, the Sobel operator is usually used to calculate the gradients of the image in the horizontal and vertical directions; for grayscale images, we can calculate the gradient of pixels through the following Sobel operator: Gradient in the horizontal direction (Gx): Gradient in the vertical direction (Gy): Specific steps to calculate the pixel gradient using the Sobel operator: If it is not a grayscale image, convert the image to a grayscale image; apply the Sobel operator in the horizontal direction (Gx) and the Sobel operator in the vertical direction (Gy) to the image; calculate the gradient intensity and direction of each pixel: G = sqrt(Gx^2 + Gy^2) (gradient intensity) θ = arctan(Gy / Gx) (gradient direction) Use the cvCanny(pImg, pCabinetCannyImg, 50, 150, 3) function, where pImg is the input grayscale image and pCabinetCannyImg is the output image after edge extraction, which is a binary image. 6) After calculating through the above formula, the obtained pCabinetCannyImg image is the binary image, and the size of the image is; W1 / 16 < x < 7*W1 / 16, H1 / 16 < y < 7*H1 / 16, that is, the width is W2 and the height is H2. Step 2: Obtain the intersection point group through the horizontal dividing line: For the binary image of pCabinetCannyImg, the number of dividing lines used is div_line_num = H2 / 5 - 1, which means drawing a line in the binary image every 5 pixels. The implementation method uses the method of horizontal scanning loop. The loop in the height direction is for(int i = 0; i < H2 / 5; i++), and the loop in the horizontal direction is for(int j = 0; j < W2; j++); judge whether the value of the pixel Pixel(j, i*5) is a non-zero value. If it is a non-zero value, store it in the queue Cabinet_Queue_Org[]. Each pixel value is a non-zero value, and the number is assumed to be n. Step 3: Obtain the intersection point combination using a sliding window: 1) In a loop, use a 2*2 sliding window to check whether each pixel in Cabinet_Queue_Org[] is on the same edge line as other pixels. 2) When pixels in multiple Cabinet_Queue_Org[] are on the same edge line, re-record this group of pixels as Cabinet_Queue_SameLine[m][], where m represents there are m groups of such data; 3) If a certain pixel in Cabinet_Queue_Org[] is not on the same edge line with any other pixel, then remove this pixel point; 4) Loop through the above process to obtain all the above combinations; Step Four: Obtain effective line segments by calculating slopes: 1) For Cabinet_Queue_SameLine[1][], assume there are k pixel points in this group. Calculate the slopes between the 1st point and the 2nd point, the 2nd point and the 3rd point,...... the (k - 1)th point and the kth point in sequence; 2) Calculate the average value of the slopes as Slope[i], where i represents the ith of the m effective line segments. When calculating the 1st one, i = 1; the value range of i is (1, m); 3) Loop through the above process to finally obtain all Slope[i] values within the range of (1, m); 4) Count the number of line segments with positive slopes as a, and count the number of line segments with negative slopes as b; 5) When a > b, it indicates that the indication line is in a separated state. When a < b, it indicates that the indication line is in a connected state. If a = b, it means an abnormality occurs in the judgment. When an abnormality occurs, the algorithm can be further corrected and adjusted; 6) Complete the judgment of the connection state of the line.