An elevator door state recognition method, device, terminal and storage medium

By combining line detection, gray-level co-occurrence matrix, and brightness mean-variance index to identify elevator door status, the problem of low accuracy and reliability in existing technologies is solved, achieving efficient and accurate judgment of elevator door status and improving the safety of elevator operation.

CN117163789BActive Publication Date: 2026-07-10TP-LINK

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TP-LINK
Filing Date
2023-08-31
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In existing technologies, the accuracy and reliability of identifying elevator door status by adding external Hall sensors or image recognition of single feature information are low, and the installation and maintenance costs are increased.

Method used

The elevator door status is detected by combining three indicators: straight line detection, gray-level co-occurrence matrix, and brightness mean variance. This multi-indicator detection improves detection accuracy and avoids the need for additional equipment installation.

Benefits of technology

It improves the accuracy and reliability of elevator door status judgment, avoids construction difficulties and increased costs caused by additional equipment installation, and enhances the overall safety of elevator operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117163789B_ABST
    Figure CN117163789B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of elevator monitoring, and discloses an elevator door state recognition method and device, a terminal and a storage medium, which comprise the following steps: acquiring a gray-scale image of an elevator door area, and calculating a first probability, a second probability and a third probability of the elevator door being in an open door state according to a straight line detection result of the gray-scale image, a gray-scale co-occurrence matrix and a brightness mean variance, respectively; further, determining the elevator door state according to the first probability, the second probability and the third probability. Thus, without additionally installing an elevator door state information detection device, the gray-scale image of the elevator door area is acquired, three different indexes, i.e., a straight line detection index, a gray-scale co-occurrence matrix index and a brightness mean variance index, are combined to calculate and analyze the gray-scale image, and then the elevator door state is determined, the recognition accuracy is improved, accidents such as the elevator being in an open door state for a long time and the elevator trapping people are avoided, and thus the overall safety of the elevator operation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of elevator monitoring technology, and in particular relates to a method, device, terminal and storage medium for identifying the status of elevator doors. Background Technology

[0002] In high-rise buildings, elevators are essential for people to go up and down the stairs. Monitoring the status of elevator doors is an important means of ensuring the safe use of elevators.

[0003] One feasible way to monitor elevator door status is to use external Hall effect sensors or accelerometers to collect relevant information and determine the current door status. If the elevator door is found to be open or malfunctioning, maintenance personnel can be notified promptly to ensure passenger safety. However, installing additional sensing equipment near the elevator door is difficult and time-consuming, and also increases construction and maintenance costs.

[0004] Another feasible approach is to capture elevator door images using image acquisition equipment, then employ image recognition technology to extract feature information (e.g., average brightness) from these images, and determine the elevator door's status by analyzing the trends in these feature information. However, this method often extracts only a single feature; obviously, determining the elevator door's status solely through trend analysis of a single feature has low accuracy and reliability.

[0005] Therefore, how to accurately identify the status of elevator doors and improve the overall reliability and safety of elevators is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] The purpose of this application is to provide a method, device, terminal and storage medium for identifying the status of elevator doors, so as to accurately identify the status of elevator doors and improve the overall reliability and safety of elevators.

[0007] In a first aspect, embodiments of this application provide a method for identifying the state of an elevator door, including:

[0008] Obtain the grayscale image of the elevator door area;

[0009] The first probability that the elevator door is open is calculated based on the line detection results of the grayscale image;

[0010] Calculate the second probability that the elevator door is open based on the gray-level co-occurrence matrix of the gray-level image;

[0011] The third probability that the elevator door is open is calculated based on the mean and variance of the brightness of the grayscale image.

[0012] The elevator door status is determined based on the first probability, the second probability, and the third probability.

[0013] Therefore, there is no need to install additional elevator door status detection equipment. Grayscale images of the elevator door area are directly acquired, and three different indicators—line detection, grayscale co-occurrence matrix, and brightness mean-variance—are combined to calculate and analyze the grayscale image, thereby determining the elevator door status. This improves accuracy and prevents accidents such as elevators remaining open for extended periods or people becoming trapped. Furthermore, evaluating the elevator door status based on multiple indicators avoids misjudgments caused by single-indicator assessments, such as those involving lines from a user's arm or other objects within the door area. It also avoids misjudgments due to environmental factors like scene overexposure, thus improving accuracy and overall elevator safety.

[0014] In one possible implementation of the first aspect, determining the elevator door state based on the first probability, the second probability, and the third probability includes:

[0015] The first entropy value under the line detection index is obtained by calculating multiple first probabilities;

[0016] The second entropy value under the gray-level co-occurrence matrix index is obtained by calculating multiple second probabilities;

[0017] The third entropy value under the brightness mean variance index is obtained by calculating multiple third probabilities;

[0018] Calculate the first weight corresponding to the first probability based on the first entropy value;

[0019] Calculate the second weight corresponding to the second probability based on the second entropy value;

[0020] Calculate the third weight corresponding to the third probability based on the third entropy value;

[0021] The probability that the elevator door is open is calculated using the first probability, the second probability, the third probability, the first weight, the second weight, and the third weight to determine the elevator door state.

[0022] As can be seen, the technical solution provided in this application calculates the entropy values ​​under the line detection index, gray-scale co-occurrence matrix index, and brightness mean variance index according to the first probability, the second probability, and the third probability, respectively, and determines the weights corresponding to different indices based on different entropy values, that is, determines the weights corresponding to the first probability, the second probability, and the third probability, respectively. Thus, the elevator door state is determined based on the weights and probabilities of different indices. Therefore, compared with the prior art that uses one index to judge the elevator door state, the elevator door state is determined based on multiple different indices and the weights corresponding to the different indices, which improves the accuracy and reliability of the judgment.

[0023] In one possible implementation of the first aspect, calculating the first probability that the elevator door is open based on the line detection result of the grayscale image includes:

[0024] A grayscale foreground image is obtained by performing background subtraction on two consecutive grayscale images within a preset time period;

[0025] Line detection is performed on the grayscale foreground image to obtain line detection coordinates; wherein, the line detection coordinates refer to the midpoint coordinates of each line segment in the grayscale image;

[0026] Determine the motion trend within the preset time period; wherein, the motion trend is constituted by the positional changes of each of the line detection coordinates within the preset time period;

[0027] The first probability is calculated based on the stated movement trend.

[0028] In one possible implementation of the first aspect, calculating the first probability based on the motion trend includes:

[0029] Obtain the farthest distance between two line segments perpendicular to the direction of elevator door movement within the elevator door area;

[0030] Calculate the shortest distance from the detected line coordinates to the target endpoint; wherein, the target endpoint refers to a point on the line segment within the grayscale image that is perpendicular to the direction of elevator door movement;

[0031] Calculate a first predicted value for the elevator door to be in the open state based on the farthest distance and the shortest distance;

[0032] The first parameter is obtained by normalizing the first sample to be evaluated, which consists of multiple first predicted values.

[0033] The first probability is obtained by calculating the proportion of the first target parameter to the sum of all the first parameters; wherein, the first target parameter is one of the first parameters within the preset time period.

[0034] Therefore, line detection is performed on the grayscale image of the elevator door area to obtain the line detection result, and the first probability of the elevator door being open is obtained based on the line detection result, thus providing data support and foundation for judging the elevator door status by combining multiple indicators.

[0035] In one possible implementation of the first aspect, calculating the second probability that the elevator door is open based on the gray-level co-occurrence matrix of the gray-level image includes:

[0036] Refinement metrics are extracted from the gray-level co-occurrence matrix; wherein, the refinement metrics include energy metrics, contrast metrics, correlation metrics, and uniformity metrics;

[0037] The average of each of the detailed indicators is used as the second predicted value;

[0038] The second parameter is obtained by normalizing the second sample to be evaluated, which consists of multiple second predicted values.

[0039] The second probability is obtained by calculating the proportion of the second objective parameter to the sum of all the second parameters; wherein the second objective parameter is one of the second parameters.

[0040] Therefore, a refinement index is extracted from the gray-level co-occurrence matrix of the gray-level image, and each refinement index is used as a second prediction value, thereby further improving the accuracy of elevator door judgment.

[0041] In one possible implementation of the first aspect, calculating the third probability that the elevator door is open based on the mean and variance of the brightness of the grayscale image includes:

[0042] The grayscale image is divided into multiple grids of equal area;

[0043] Calculate the average brightness within each of the grid cells;

[0044] Calculate the mean variance of the brightness based on each of the mean brightness values;

[0045] The third probability is calculated using the mean variance of the brightness.

[0046] In one possible implementation of the first aspect, calculating the third probability using the mean variance of the brightness includes:

[0047] The third parameter is obtained by normalizing the third sample to be evaluated, which consists of multiple mean variances of brightness.

[0048] The third probability is obtained by calculating the proportion of the third target parameter to the sum of all the third parameters; wherein the third target parameter is one of the third parameters.

[0049] Therefore, by combining three different indicators—the straight line detection index, the gray-level co-occurrence matrix index, and the brightness mean variance index—to analyze and judge the elevator door status, the accuracy of elevator door status judgment is improved, thereby enhancing the safety of elevator operation.

[0050] Secondly, embodiments of this application provide an elevator door status identification device, comprising:

[0051] The image acquisition module is used to acquire grayscale images of the elevator door area;

[0052] The first calculation module is used to calculate the first probability that the elevator door is in an open state based on the line detection results of the grayscale image;

[0053] The second calculation module is used to calculate the second probability that the elevator door is in an open state based on the gray-level co-occurrence matrix of the gray-level image;

[0054] The third calculation module is used to calculate the third probability that the elevator door is in the open state based on the mean and variance of the brightness of the grayscale image.

[0055] The processing module is used to determine the elevator door status based on the first probability, the second probability, and the third probability.

[0056] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the elevator door status identification method described in any one of the first aspects above.

[0057] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the elevator door status identification method described in any one of the first aspects above.

[0058] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the elevator door status identification method described in any of the first aspects above.

[0059] It should be noted that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect above, and will not be repeated here. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 A flowchart illustrating a method for identifying the state of an elevator door provided in an embodiment of this application;

[0062] Figure 2 A flowchart illustrating a method for identifying the state of an elevator door, provided in another embodiment of this application;

[0063] Figure 3 A flowchart illustrating another method for identifying the state of an elevator door provided in another embodiment of this application;

[0064] Figure 4 A schematic diagram of a grayscale image provided in an embodiment of this application;

[0065] Figure 5 A flowchart illustrating another method for identifying the state of an elevator door provided in another embodiment of this application;

[0066] Figure 6 A schematic diagram of the structure of an elevator door status recognition device provided in an embodiment of this application;

[0067] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0068] The reference numerals in the attached figures are as follows: 70 represents the terminal device, 701 represents the processor, 702 represents the memory, and 703 represents the computer program. Detailed Implementation

[0069] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0070] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0071] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0072] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0073] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0074] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0075] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0076] Elevator accidents, such as people being trapped in elevators, are frequent. To improve elevator safety, it's often necessary to monitor the elevator door status (e.g., open and closed). One feasible approach is to use external detection equipment (e.g., accelerometers, electrical contacts, and Hall effect sensors) to collect door status information and then determine the open / closed state based on this information. However, this method requires additional detection equipment, which presents challenges in elevator environments and increases construction and maintenance costs.

[0077] Another feasible approach is to extract individual features from the elevator door area image using image recognition technology (e.g., line detection, grid brightness mean, and gray-level co-occurrence matrix), and determine the elevator door status based on the changing trends of the selected features. However, in elevator applications, the image is easily affected by factors such as the image acquisition angle, lighting, and image sharpness. Determining the elevator door status based on a single feature obviously yields low accuracy, thus affecting the overall safety of elevator operation.

[0078] To address the aforementioned technical issues and improve elevator operational safety, this application provides a method for identifying elevator door status. This method combines three indicators—line detection, gray-level co-occurrence matrix, and brightness mean variance—to detect elevator door status. By using multiple indicators, the detection accuracy is improved, while avoiding the construction difficulties and increased costs caused by installing additional detection equipment.

[0079] Figure 1This is a flowchart illustrating a method for recognizing the state of an elevator door provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes:

[0080] S10: Obtain the grayscale image of the elevator door area;

[0081] Step S10 involves acquiring a grayscale image of the elevator door area. In a specific embodiment, this can be achieved by capturing an image of the elevator door area using a camera and converting the captured image into a grayscale image. Alternatively, in some optional embodiments, the grayscale image can be acquired directly.

[0082] It is worth noting that the grayscale image is an image of the elevator door area, that is, an image that only includes the elevator door. The elevator door can be a double-door elevator door or a single-door elevator door; this application does not limit this.

[0083] S11: Calculate the first probability that the elevator door is open based on the line detection results of the grayscale image; calculate the second probability that the elevator door is open based on the grayscale co-occurrence matrix of the grayscale image; calculate the third probability that the elevator door is open based on the mean and variance of the brightness of the grayscale image.

[0084] After obtaining the grayscale image of the elevator door area in step S10, line detection is performed on the grayscale image to obtain the line detection result, and the first probability that the elevator door is open is calculated based on the line detection result. It is worth noting that when performing line detection on the grayscale image, it is necessary to obtain a continuous video sequence within a preset time period, and perform line detection based on the grayscale images of the preceding and following frames to obtain the line detection result.

[0085] In addition, the gray-level co-occurrence matrix and the mean variance of the brightness of the gray-level image are calculated, and a second probability of the elevator door being in the open state is determined based on the gray-level co-occurrence matrix of the gray-level image, and a third probability of the elevator door being in the open state is determined based on the mean variance of the brightness of the gray-level image.

[0086] It's worth noting that the gray-level co-occurrence matrix refers to the probability that another pixel with gray level j, located at a distance (dx, dy) from a pixel with gray level i, has gray level j. When calculating the mean variance of the brightness in a grayscale image, the mean brightness must first be calculated, and then the mean variance of the brightness must be calculated based on the mean brightness.

[0087] Furthermore, it should be noted that there is no specific order in which the first, second, and third probabilities are calculated for the grayscale image; they can be calculated simultaneously or in any order. However, from a data processing efficiency perspective, it is preferable to calculate the first, second, and third probabilities simultaneously.

[0088] S12: Determine the elevator door status based on the first probability, the second probability, and the third probability.

[0089] Furthermore, the first, second, and third probabilities under three different indicators—the line detection indicator, the gray-scale co-occurrence matrix indicator, and the brightness mean variance indicator—are combined to calculate the final probability that the elevator door is in the open state, thereby determining the current state of the elevator door.

[0090] In a specific embodiment, when determining the elevator door state based on the first probability, the second probability, and the third probability, it is necessary to first determine the weights corresponding to different indicators, that is, to determine the weights corresponding to different probability values, and then obtain the final probability that the elevator door is in the open state based on the sum of the products of each weight and the corresponding probability.

[0091] In some optional embodiments, the elevator door state includes an open state and a closed state. When determining the elevator door state, the state with the higher probability is taken as the current elevator door state. For example, if the probability of the elevator door being in the open state is 0.7 and the probability of it being in the closed state is 0.3, then the current elevator door state is determined to be the open state.

[0092] Therefore, there is no need to install additional elevator door status information detection equipment. The grayscale image of the elevator door area can be directly obtained, and three different indicators, namely the line detection index, the grayscale co-occurrence matrix index, and the brightness mean variance index, are combined to calculate and analyze the grayscale image, thereby determining the elevator door status, improving the accuracy of judgment, avoiding accidents such as the elevator being open for a long time or people being trapped in the elevator, and thus improving the overall safety of elevator operation.

[0093] Figure 2 A flowchart illustrating a method for recognizing the state of an elevator door, as provided in another embodiment of this application, is shown below. Figure 2 As shown, in some preferred embodiments, determining the elevator door state based on a first probability, a second probability, and a third probability includes:

[0094] S20: The first entropy value under the line detection index is obtained through multiple first probability calculations; the second entropy value under the gray-level co-occurrence matrix index is obtained through multiple second probability calculations; the third entropy value under the brightness mean variance index is obtained through multiple third probability calculations.

[0095] In a specific embodiment, m first probabilities P m1 m second probabilities P m2 And m third probabilities P m3 Construct a probability matrix P, where m is an integer greater than 1:

[0096]

[0097] Where m is the number of grayscale images within a preset time period, that is, the first probability P that can be calculated from the grayscale images. m1 The second probability P m2 And the third probability P m3 The quantity. It is important to note that the first probability P... m1 The probability is obtained by performing line detection on two consecutive grayscale images. Therefore, after performing line detection on all consecutive pairs of images within a preset time period, m-1 first probabilities are obtained. Furthermore, performing line detection on the first grayscale image and the previous grayscale image within the preset time period yields another first probability, thus obtaining m first probabilities P. m1 .

[0098] Furthermore, the entropy value of the j-th index can be calculated based on the probability matrix P:

[0099]

[0100] Where k>0, j equals 1, 2, or 3, that is, j is used to characterize the line detection index, gray-level co-occurrence matrix index, and brightness mean variance index, respectively, and the value of i is an integer from 1 to m.

[0101] Specifically, when calculating the first entropy value under the line detection index using m first probabilities, the first probability P is calculated according to the above formula (2). 11 To the first probability P m1 The first entropy value under the straight line detection index can be obtained by calculation.

[0102] Similarly, according to formula (2), the second probability P 12 up to the second probability P m2 The second entropy value under the gray-level co-occurrence matrix index can be obtained by calculation, and the third probability P can be calculated accordingly. 13 To the third probability P m3 The third entropy value under the mean variance index of brightness can be obtained by calculation.

[0103] It should be noted that the calculation of the first entropy value, the second entropy value, and the third entropy value can be performed simultaneously or in any order. Of course, considering the data processing efficiency, it is preferable to perform them simultaneously, but this application does not limit this.

[0104] S21: Calculate the first weight corresponding to the first probability based on the first entropy value; calculate the second weight corresponding to the second probability based on the second entropy value; calculate the third weight corresponding to the third probability based on the third entropy value;

[0105] After obtaining the first entropy value, the second entropy value, and the third entropy value through step S20, the degree of difference d of the j-th indicator is calculated. j :

[0106] d j =1-e j (3)

[0107] Furthermore, the weights corresponding to each probability are calculated based on the degree of difference between different indicators. Specifically, the first weight w1 corresponding to the first probability is calculated based on the degree of difference d1 of the straight line detection indicator; the second weight w2 corresponding to the first probability is calculated based on the degree of difference d2 of the gray-level co-occurrence matrix indicator; and the third weight w3 corresponding to the first probability is calculated based on the degree of difference d3 of the brightness mean variance indicator. The specific calculation formula is as follows:

[0108]

[0109] S22: Calculate the probability that the elevator door is open using the first probability, the second probability, the third probability, the first weight, the second weight, and the third weight, in order to determine the elevator door state.

[0110] Furthermore, after obtaining the first weight corresponding to the first probability, the second weight corresponding to the second probability, and the third weight corresponding to the third probability through step S21, the probability F of the elevator door being in the open state is calculated:

[0111]

[0112] After obtaining the probability F of the elevator door being in the open state, determine whether the probability F is greater than or equal to a preset threshold. If it is greater, determine that the current elevator door is in the open state; if it is less than, determine that the elevator door is in the closed state.

[0113] As can be seen, the technical solution provided in this application calculates the entropy values ​​under the line detection index, gray-scale co-occurrence matrix index, and brightness mean variance index according to the first probability, the second probability, and the third probability, respectively, and determines the weights corresponding to different indices based on different entropy values, that is, determines the weights corresponding to the first probability, the second probability, and the third probability, respectively. Thus, the elevator door state is determined based on the weights and probabilities of different indices. Therefore, compared with the prior art that uses one index to judge the elevator door state, the elevator door state is determined based on multiple different indices and the weights corresponding to the different indices, which improves the accuracy and reliability of the judgment.

[0114] Figure 3 The flowchart illustrates another method for recognizing the state of an elevator door, provided in another embodiment of this application. In a preferred embodiment, calculating the first probability that the elevator door is open based on the line detection results of the grayscale image includes:

[0115] S30: Perform background subtraction on two consecutive grayscale images within a preset time period to obtain a grayscale foreground image;

[0116] In a specific embodiment, when performing line detection on a grayscale image, a continuous video sequence within a preset time period is obtained, and a grayscale foreground image is obtained by performing background subtraction on the grayscale images of consecutive frames. In order to further improve the accuracy of elevator door status judgment, while performing background subtraction on the grayscale images of consecutive frames, morphological operations are performed on the grayscale images to remove some interference, that is, abnormal data is removed. Thus, a grayscale foreground image after interference removal can be obtained.

[0117] S31: Perform line detection on the grayscale foreground image to obtain the line detection coordinates; where the line detection coordinates refer to the coordinates of the midpoint of each line segment in the grayscale image;

[0118] Furthermore, line detection is performed on the grayscale foreground image to obtain the line detection coordinates. It should be noted that elevators include double-door elevators and single-door elevators. This application takes a double-door elevator as an example for illustration. Figure 4 This is a schematic diagram of a grayscale image provided in an embodiment of this application. In the grayscale image, the line detection coordinates refer to the coordinates of the midpoints of each line segment in the grayscale image, such as... Figure 4 As shown, the grayscale image of the elevator door area of ​​a double-door elevator includes line segments y1 to y8, where the coordinates for line detection are the coordinates of the midpoints of each line segment, for example, points A1 to A6. It is worth noting that when the elevator door is a single-door elevator, line segments y4 and y5 do not exist.

[0119] S32: Determine the motion trend within a preset time period; wherein, the motion trend is composed of the positional changes of the detection coordinates of each straight line within the preset time period;

[0120] S33: Calculate the first probability based on the movement trend.

[0121] After obtaining the coordinates of each line detection point, the motion trend within a preset time period can be obtained based on the time series. This motion trend is composed of the positional changes of each line detection coordinate within the preset time period. In other words, it can be understood that connecting the midpoint coordinates of multiple points at the same position and in the same direction yields the corresponding motion trend. Furthermore, based on the motion trend, the first probability that the elevator door is open under the line detection index can be calculated.

[0122] Figure 5 A flowchart illustrating another method for recognizing the state of an elevator door provided in another embodiment of this application is shown below. Figure 5 As shown, based on the above embodiments, calculating the first probability according to the movement trend includes:

[0123] S50: Obtain the farthest distance between two line segments perpendicular to the direction of elevator door movement within the elevator door area;

[0124] In a specific embodiment, when calculating the first probability based on the movement trend, the farthest distance between two line segments perpendicular to the direction of elevator door movement within the elevator door area is first obtained, such as... Figure 4 As shown, the elevator door moves in the horizontal direction where line segments y3 and y7 are located. The farthest distance refers to the distance b between line segments y1 and y8.

[0125] It should be noted that, to avoid inconsistent results from grayscale images taken at different angles, the acquisition angle of the image acquisition device (e.g., a camera) in the elevator door area is controlled to ensure that each acquired image is taken at a consistent angle. Figure 4 The angle shown is as indicated.

[0126] S51: Calculate the shortest distance from the line detection coordinates to the target endpoint; where the target endpoint refers to a point on the line segment perpendicular to the direction of elevator door movement within the grayscale image;

[0127] Furthermore, calculate the shortest distance from the line detection coordinates to the target endpoint, such as... Figure 4 As shown, the coordinates of the straight lines are the coordinates of points A1 to A6. The target endpoint refers to the point on the line segment perpendicular to the direction of elevator door movement within the grayscale image, that is, the point on line segment y1 and line segment y8. The shortest distance from the line detection coordinates A1 and A3 to the target endpoint is half the length of line segment y2, the shortest distance from the line detection coordinates A5 and A6 to the target endpoint is half the length of line segment y6, the shortest distance from the line detection coordinate A2 to the target endpoint is the length of line segment y2, and the shortest distance from the line detection coordinate A4 to the target endpoint is the length of line segment y6.

[0128] It is worth noting that in the specific implementation, the shortest distance position can be calculated only for line segments y4 and y5. That is, only the shortest distance from point A2 to line segment y1 and the shortest distance from point A4 to line segment y8 need to be considered.

[0129] S52: Calculate the first predicted value for the elevator door to be in the open state based on the farthest distance and the shortest distance;

[0130] After obtaining the shortest distance a according to step S51, calculate the first predicted value X1 for the elevator door to be in the open state based on the farthest distance b and the shortest distance a:

[0131]

[0132] It should be noted that the first predicted value refers to the predicted value when the elevator door is open.

[0133] S53: Normalize the first sample to be evaluated, which consists of multiple first predicted values, to obtain the first parameter;

[0134] Collect m first predicted values ​​X1 to obtain the first sample to be evaluated, and normalize the first sample to obtain the first parameter X′. i1 :

[0135]

[0136] Among them, X i1 This refers to the i-th value under the first indicator (straight line detection indicator), where i is an integer from 1 to m, and m is an integer greater than 1. max X represents the maximum value among the first samples to be evaluated. min It is the minimum value among the first samples to be evaluated.

[0137] S54: Calculate the proportion of the first target parameter to the sum of all first parameters to obtain the first probability; wherein, the first target parameter is one of the first parameters within a preset time period.

[0138] Furthermore, the first probability P is obtained by calculating the proportion of the first target parameter to the sum of all first parameters. i1 The first target parameter is one of the first parameters within a preset time period, namely:

[0139]

[0140] Therefore, line detection is performed on the grayscale image of the elevator door area to obtain the line detection result, and the first probability of the elevator door being open is obtained based on the line detection result, thus providing data support and foundation for judging the elevator door status by combining multiple indicators.

[0141] In one optional embodiment, calculating the second probability that the elevator door is open based on the gray-level co-occurrence matrix of the gray-level image includes:

[0142] Refinement metrics are extracted from the gray-level co-occurrence matrix; these metrics include energy, contrast, correlation, and uniformity.

[0143] The mean of each detailed indicator is used as the second predicted value;

[0144] The second parameter is obtained by normalizing the second sample to be evaluated, which consists of multiple second predicted values.

[0145] The second probability is obtained by calculating the proportion of the second objective parameter to the sum of all the second parameters; where the second objective parameter is one of the second parameters.

[0146] In a specific embodiment, after calculating the grayscale co-occurrence matrix (GCM) of the grayscale image of the elevator door area, refinement indicators such as energy, contrast, correlation, and uniformity are extracted from the GCM, and the mean of each refinement indicator is calculated. It should be noted that in some optional embodiments, the GCM may also include refinement indicators such as sum-variance, difference-mean, and difference-variance; this application does not specifically limit the refinement indicators.

[0147] Furthermore, the mean of each refined indicator is used as the second predicted value X2. m second predicted values ​​X2 are collected to obtain the second sample to be evaluated. The second sample to be evaluated is then normalized to obtain the second parameter X′. i2 :

[0148]

[0149] Among them, X i2 X is the i-th value under the second metric (Gray-Level Co-occurrence Matrix metric), where i is an integer from 1 to m, and m is an integer greater than 1. max X is the maximum value of the second indicator. min It is the minimum value of the second indicator.

[0150] Furthermore, the proportion of the second objective parameter to the sum of all second parameters is calculated to obtain the second probability P. i2 The second target parameter is one of the second parameters within a preset time period, namely:

[0151]

[0152] Therefore, a refinement index is extracted from the gray-level co-occurrence matrix of the gray-level image, and each refinement index is used as a second prediction value, thereby further improving the accuracy of elevator door judgment.

[0153] As a preferred embodiment, calculating the third probability that the elevator door is open based on the mean and variance of the brightness of the grayscale image includes:

[0154] Divide the grayscale image into multiple grids of equal area;

[0155] Calculate the average brightness within each grid cell;

[0156] Calculate the mean variance of brightness based on the mean values ​​of each brightness value;

[0157] The third probability is calculated using the mean and variance of brightness.

[0158] In a specific embodiment, after obtaining the grayscale image of the elevator door area, the grayscale image is divided into multiple N*N grids with the same area, and the average brightness value in each grid is calculated. Then, the average brightness variance is calculated based on each average brightness value.

[0159] Furthermore, the calculation of the third probability using the mean and variance of brightness includes:

[0160] The third parameter is obtained by normalizing the third sample to be evaluated, which consists of multiple mean and variance values ​​of brightness.

[0161] The third probability is obtained by calculating the proportion of the third objective parameter to the sum of all third parameters; where the third objective parameter is one of the third parameters.

[0162] Specifically, if the mean variance of brightness is used as the third predicted value X3, then m third predicted values ​​X3 are collected to obtain the third sample to be evaluated. The third sample to be evaluated is then normalized to obtain the third parameter X′. i3 :

[0163]

[0164] Among them, X i3 X is the i-th value under the third indicator (mean and variance of brightness), where i is an integer from 1 to m, and m is an integer greater than 1. max X is the maximum value of the third indicator. min It is the minimum value of the third indicator.

[0165] Furthermore, the third probability P is obtained by calculating the proportion of the third objective parameter to the sum of all third parameters. i3 The third target parameter is one of the third parameters within the preset time period, namely:

[0166]

[0167] In fact, in a specific embodiment, after obtaining the first predicted value under the line detection index, the second predicted value under the gray-level co-occurrence matrix index, and the third predicted value under the brightness mean-variance index, m samples are collected from each index to form an index data matrix:

[0168]

[0169] Normalize the samples for each indicator:

[0170]

[0171] Where m is an integer greater than 1, X ij X is the i-th value of the j-th indicator. max X represents the maximum value of the j-th indicator. min is the minimum value of the j-th index, where j is 1, 2, or 3, and is used to characterize the line detection index, gray-level co-occurrence matrix index, and brightness mean variance index, respectively.

[0172] Furthermore, calculate the weight of the i-th sample marker value in the j-th indicator:

[0173]

[0174] Therefore, by combining three different indicators—the straight line detection index, the gray-scale co-occurrence matrix index, and the brightness mean variance index—to analyze and judge the elevator door status, the accuracy of elevator door status judgment is improved, thereby enhancing elevator operation safety.

[0175] It should be noted that the sequence number of each step in the embodiments of this application does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0176] The elevator door status identification method has been described in detail in the above embodiments. This application also provides an embodiment of an elevator door status identification device. It should be noted that this application describes the device embodiment from two perspectives: one is based on the functional module, and the other is based on the hardware structure.

[0177] Figure 6 This is a schematic diagram of the structure of an elevator door status recognition device provided in an embodiment of this application, as shown below. Figure 6 As shown, the device includes:

[0178] Image acquisition module 60 is used to acquire grayscale images of the elevator door area;

[0179] The first calculation module 61 is used to calculate the first probability that the elevator door is in an open state based on the line detection results of the grayscale image;

[0180] The second calculation module 62 is used to calculate the second probability that the elevator door is in an open state based on the gray-level co-occurrence matrix of the gray-level image;

[0181] The third calculation module 63 is used to calculate the third probability that the elevator door is in the open state based on the mean and variance of the brightness of the grayscale image.

[0182] Processing module 64 is used to determine the elevator door status based on a first probability, a second probability, and a third probability.

[0183] Since the elevator door status identification device provided in this application corresponds to the elevator door status identification method provided in the above embodiments, the beneficial effects produced are the same.

[0184] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0185] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0186] Figure 7 This is a schematic diagram of the structure of a terminal device provided in this embodiment of the application, such as... Figure 7 As shown, the terminal device 70 includes: at least one processor 701, a memory 702, and a computer program 703 stored in the memory and executable on the at least one processor. When the processor executes the computer program, it implements the steps in any of the above-described method embodiments.

[0187] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0188] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0189] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0190] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0191] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0192] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0193] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0194] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for identifying the status of an elevator door, characterized in that, include: Obtain the grayscale image of the elevator door area; The first probability that the elevator door is open is calculated based on the line detection results of the grayscale image; Based on the refinement index in the gray-level co-occurrence matrix of the gray-level image, the second probability that the elevator door is in an open state is calculated. The refinement index includes energy index, contrast index, correlation index and uniformity index. The third probability that the elevator door is open is calculated based on the mean and variance of the brightness of the grayscale image. The probability of the elevator door being in an open state is calculated based on the first probability, the second probability, and the third probability to determine the state of the elevator door. The probability of the elevator door being in an open state is positively correlated with the first probability, the second probability, and the third probability. The calculation of the first probability that the elevator door is open based on the line detection result of the grayscale image includes: A grayscale foreground image is obtained by performing background subtraction on two consecutive grayscale images within a preset time period; Line detection is performed on the grayscale foreground image to obtain line detection coordinates; wherein, the line detection coordinates refer to the midpoint coordinates of each line segment in the grayscale image; Determine the motion trend within the preset time period; wherein, the motion trend is constituted by the positional changes of each of the line detection coordinates within the preset time period; The first probability is calculated based on the stated movement trend.

2. The method for identifying the elevator door status according to claim 1, characterized in that, The step of calculating the probability that the elevator door is open based on the first probability, the second probability, and the third probability, to determine the elevator door state, includes: The first entropy value under the line detection index is obtained by calculating multiple first probabilities; The second entropy value under the gray-level co-occurrence matrix index is obtained by calculating multiple second probabilities; The third entropy value under the brightness mean variance index is obtained by calculating multiple third probabilities; Calculate the first weight corresponding to the first probability based on the first entropy value; Calculate the second weight corresponding to the second probability based on the second entropy value; Calculate the third weight corresponding to the third probability based on the third entropy value; The probability that the elevator door is open is calculated using the first probability, the second probability, the third probability, the first weight, the second weight, and the third weight to determine the elevator door state.

3. The method for identifying the elevator door status according to claim 1, characterized in that, The calculation of the first probability based on the movement trend includes: Obtain the farthest distance between two line segments perpendicular to the direction of elevator door movement within the elevator door area; Calculate the shortest distance from the detected line coordinates to the target endpoint; wherein, the target endpoint refers to a point on the line segment within the grayscale image that is perpendicular to the direction of elevator door movement; Calculate a first predicted value for the elevator door to be in the open state based on the farthest distance and the shortest distance; The first parameter is obtained by normalizing the first sample to be evaluated, which consists of multiple first predicted values. The first probability is obtained by calculating the proportion of the first target parameter to the sum of all the first parameters; wherein, the first target parameter is one of the first parameters within the preset time period.

4. The method for identifying the elevator door status according to claim 1, characterized in that, The calculation of the second probability that the elevator door is open, based on the refinement index in the gray-level co-occurrence matrix of the gray-level image, includes: Extract refinement metrics from the gray-level co-occurrence matrix; The average of each of the detailed indicators is used as the second predicted value; The second parameter is obtained by normalizing the second sample to be evaluated, which consists of multiple second predicted values. The second probability is obtained by calculating the proportion of the second objective parameter to the sum of all the second parameters; wherein the second objective parameter is one of the second parameters.

5. The method for identifying the elevator door status according to claim 1, characterized in that, The third probability of the elevator door being open, calculated based on the mean and variance of the brightness of the grayscale image, includes: The grayscale image is divided into multiple grids of equal area; Calculate the average brightness within each of the grid cells; Calculate the mean variance of the brightness based on each of the mean brightness values; The third probability is calculated using the mean variance of the brightness.

6. The method for identifying the elevator door status according to claim 5, characterized in that, The calculation of the third probability using the mean and variance of the brightness includes: The third parameter is obtained by normalizing the third sample to be evaluated, which consists of multiple mean variances of brightness. The third probability is obtained by calculating the proportion of the third target parameter to the sum of all the third parameters; wherein the third target parameter is one of the third parameters.

7. A device for recognizing the status of an elevator door, characterized in that, include: The image acquisition module is used to acquire grayscale images of the elevator door area; The first calculation module is used to calculate the first probability that the elevator door is in an open state based on the line detection results of the grayscale image; The second calculation module is used to calculate the second probability that the elevator door is in an open state based on the refinement index in the gray-level co-occurrence matrix of the gray-level image. The refinement index includes energy index, contrast index, correlation index and uniformity index. The third calculation module is used to calculate the third probability that the elevator door is in the open state based on the mean and variance of the brightness of the grayscale image. The processing module is used to calculate the probability that the elevator door is in an open state based on the first probability, the second probability and the third probability, so as to determine the state of the elevator door. The probability that the elevator door is in an open state is positively correlated with the first probability, the second probability and the third probability. The first calculation module is specifically used for: A grayscale foreground image is obtained by performing background subtraction on two consecutive grayscale images within a preset time period; Line detection is performed on the grayscale foreground image to obtain line detection coordinates; wherein, the line detection coordinates refer to the midpoint coordinates of each line segment in the grayscale image; Determine the motion trend within the preset time period; wherein, the motion trend is constituted by the positional changes of each of the line detection coordinates within the preset time period; The first probability is calculated based on the stated movement trend.

8. A terminal device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the elevator door status identification method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the elevator door status identification method as described in any one of claims 1 to 6.