A method for detecting safety parameters of escalators based on machine vision technology
Through the escalator safety parameter detection method based on machine vision technology, through image processing and characteristic line position difference calculation, the problem of low accuracy in the existing technology is solved, and higher detection accuracy and anti-interference ability are achieved.
Patent Information
- Application Number
- CN202111143940.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-09-28
AI Technical Summary
The existing escalator measurement method has the problem of low accuracy, especially the contact measurement method used in combination with the roller encoder, resulting in insufficient detection accuracy.
The escalator safety parameter detection method based on machine vision technology is used to sample the grayscale image of the escalator step gap, perform image processing and project and accumulate along the horizontal direction to the vertical direction, calculate the image feature line position difference, and calculate the speed based on the time difference. value to improve detection accuracy.
The accuracy and anti-interference ability of escalator safety parameter detection are improved, the measurement error is reduced, and it meets the requirements of technical standards.
Smart Images

Figure CN113935959B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of escalator detection technology, and in particular, to a method for detecting safety parameters of an escalator based on machine vision technology. Background Art
[0002] An escalator is a fixed electric drive device composed of a special structural chain conveyor and two special structural belt conveyors with a circular moving ladder path, used to transport passengers up or down between different floors of a building. It is a continuous conveying machine for carrying people up and down. The detection of escalator safety parameters is a hot research area in the industry. The roller encoder combination adopts a contact measurement method, which has the problem of low accuracy. Summary of the invention
[0003] In view of this, an object of one or more embodiments of the present specification is to propose an escalator safety parameter detection method based on machine vision technology to solve the problem of low accuracy of existing measurement methods.
[0004] Based on the above purpose, one or more embodiments of this specification provide an escalator safety parameter detection method based on machine vision technology, including:
[0005] Sampling grayscale images of escalator step gaps at at least two moments;
[0006] Performing image processing on the grayscale image of the step gap;
[0007] Projecting the processed image from the horizontal direction to the vertical direction and accumulating it to obtain an image feature graph;
[0008] The ratio of the image feature pattern area to the vertical height is used as the detection point, and the horizontal straight line passing through the detection point is used as the key line of detection;
[0009] Calculate the difference between the positions of the image feature lines in the field of view at two different times;
[0010] According to the obtained difference and the time difference between two different moments, the speed value of the escalator within the two sampling times is calculated;
[0011] The speed is continuously measured at set intervals until the speed reaches zero and the measurement is terminated. During the braking process, the position difference of the step gap image feature in the field of view is detected at fixed time intervals until the position difference reaches zero and the calculation is terminated.
[0012] The position differences during the stopping process are accumulated to obtain the stopping distance.
[0013] Preferably, before sampling the grayscale images of the escalator step gaps at at least two moments, the method further comprises:
[0014] Collect escalator size parameters;
[0015] Build the light chamber experimental platform according to the escalator size parameters;
[0016] The optical chamber experimental platform includes a darkroom, a cold light source and an image acquisition unit. The darkroom is built outside the gap between the escalator steps. A movable profile and a cold light source for providing light source are installed inside the darkroom. The image acquisition unit is installed on the movable profile and can realize two-degree-of-freedom movement on the movable profile: up and down, left and right, and front and back.
[0017] Preferably, performing image processing on the grayscale image of the step gap includes:
[0018] The grayscale image of the step gap is binarized using the automatic threshold Otsu method;
[0019] A 3*3 convolution kernel is used for Gaussian filtering to eliminate the noise of the binarized image.
[0020] Preferably, when sampling the grayscale image of the escalator step gap, sampling is performed at intervals of every 10 frames.
[0021] Preferably, projecting the processed image from the horizontal direction to the vertical direction and accumulating the image feature graph to obtain the image feature graph includes:
[0022] Take the lower left corner of the image as the origin of the coordinate system, establish a rectangular coordinate system, take the right direction in the coordinate system as the v direction, and take the upward direction in the coordinate system as the h direction;
[0023] The processed image is projected along the v direction to the h direction and accumulated to obtain the image feature graph.
[0024] Preferably, calculating the difference between the positions of the image feature lines in the field of view at two different moments includes:
[0025] The mapping f between the image height value h of the acquisition area and the height value H of the field of view is known as f(h)=H;
[0026] Calculate the first moment t 0 The position y of the image feature point in the field of view 0 =f(x 0 / h)+H 1 ,
[0027] Among them, H 1 Indicates the distance from the lower edge of the field of view when the step gap to be tested first appears within the field of view, x 0 Indicates t 0 The value of the image feature point sampled in the h direction;
[0028] Calculate the second time t 1 The position y of the image feature point in the field of view 1 =f(x 1 / h)+H 1 ,
[0029] Among them, x 1 Indicates t 1 The value of the image feature point sampled in the h direction;
[0030] Calculate the difference between the positions of the image feature lines in the field of view at two different times as |y 1 -y 0 |.
[0031] Preferably, calculating the speed value of the escalator within two sampling times according to the obtained difference and the time difference between two different moments includes:
[0032] Calculate the speed value v of the escalator within two sampling times 0 -y 1 | / |t 1 -t 0 |.
[0033] Preferably, the method further comprises:
[0034] The consistency of the image feature characteristics obtained by projecting and accumulating the images sampled at different times is judged;
[0035] If the characteristic images are inconsistent, the positions and parameters of the cold light source and the image acquisition unit in the light room experimental platform are adjusted to improve the consistency of the characteristic images.
[0036] Preferably, the consistency judgment of the image feature characteristics obtained by projecting and accumulating the images sampled at different times includes:
[0037] In t 0 , t 1 , t 2 Real-time images of the escalator at three different positions are collected at all times; the escalator gap is identified at the upper, middle and lower positions in the image, coordinates are established, image processing is performed, and consistency analysis is performed based on the area of the feature pattern.
[0038] From the above description, it can be seen that the escalator safety parameter detection method based on machine vision technology provided by one or more embodiments of this specification samples the grayscale images of the escalator step gap at at least two moments, projects the sampled images after image processing from the horizontal direction to the vertical direction and accumulates them to obtain image feature graphics, and obtains the difference in the position of the image feature line in the field of view at two different moments based on the detection points and key lines, so as to calculate the speed value of the escalator within the two sampling times according to the obtained difference and the time difference between the two different moments. This method constructs a stable and uniform imaging system, obtains the dynamic video of the elevator, proposes a key feature detection algorithm to characterize the target area, and further proposes a displacement detection method based on the change of key features of multi-frame ordered images by studying the position mapping relationship between the key features and the imaging field of view, which can improve the accuracy and anti-interference ability of escalator safety parameter detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only one or more embodiments of the present specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A schematic diagram of a safety parameter detection method according to one or more embodiments of this specification;
[0041] Figure 2 A schematic diagram of an original image sampled according to one or more embodiments of the present specification;
[0042] Figure 3 A schematic diagram of an image processed by the Otsu method according to one or more embodiments of this specification;
[0043] Figure 4 A schematic diagram of an image after Gaussian filtering according to one or more embodiments of this specification;
[0044] Figure 5 A schematic diagram of projecting an image along the v direction to the h direction according to one or more embodiments of this specification;
[0045] Figure 6 A schematic diagram of image feature graphics obtained by projection of one or more embodiments of this specification;
[0046] Figure 7 One or more embodiments of this specification 0 Real-time images sampled at every moment;
[0047] Figure 8One or more embodiments of this specification 1 Real-time images sampled at every moment;
[0048] Fig. 9 One or more embodiments of this specification 2 Real-time images sampled at every moment;
[0049] Fig.10 One or more embodiments of this specification 0 Feature graphs and area graphs of real-time images sampled at each moment;
[0050] Fig.11 One or more embodiments of this specification 1 Feature graphs and area graphs of real-time images sampled at each moment;
[0051] Fig.12 One or more embodiments of this specification 2 Feature graphs and area graphs of real-time images sampled at each moment;
[0052] Fig.13 A schematic diagram of key lines of one or more embodiments of the present specification;
[0053] Fig.14 A schematic diagram of position and speed calculation for one or more embodiments of this specification;
[0054] Fig.15 A schematic diagram of the structure of an optical chamber experimental platform according to one or more embodiments of this specification; DETAILED DESCRIPTION
[0055] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in conjunction with specific embodiments.
[0056] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of this specification should be understood by people with ordinary skills in the field to which this disclosure belongs. The "first", "second" and similar words used in one or more embodiments of this specification do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0057] The embodiment of this specification provides a method for detecting safety parameters of an escalator based on machine vision technology, comprising the following steps:
[0058] Sampling grayscale images of escalator step gaps at at least two moments;
[0059] Performing image processing on the grayscale image of the step gap;
[0060] Projecting the processed image from the horizontal direction to the vertical direction and accumulating it to obtain an image feature graph;
[0061] The ratio of the image feature area to the vertical height is used as the detection point (slope 0), and the horizontal straight line passing through the detection point is used as the key line of detection, such as Fig.13 shown.
[0062] Calculate the difference between the positions of the image feature lines in the field of view at two different times;
[0063] According to the difference and the time difference between two different moments, the speed of the escalator within the two sampling times is calculated. The schematic diagram of position and speed calculation is shown in the figure. Fig.14 As shown in the figure, C is the vertical projection length of the detection field of view, L is the horizontal projection width of the detection field of view, both in mm, and H0 is the distance from the upper edge of the field of view before the step gap to be measured disappears in the field of view, in mm.
[0064] The speed is continuously measured at set intervals until the speed reaches zero and the measurement is terminated. During the braking process, the position difference of the step gap image feature in the field of view is detected at fixed time intervals, such as the interval between the two different moments mentioned above, until the position difference reaches zero and the calculation is terminated;
[0065] The position differences during the stopping process are accumulated to obtain the stopping distance.
[0066] The embodiment of this specification provides an escalator safety parameter detection method based on machine vision technology, which samples grayscale images of the escalator step gap at at least two moments, projects and accumulates the sampled images after image processing from the horizontal direction to the vertical direction to obtain image feature graphics, and obtains the difference in the position of the image feature line in the field of view at two different moments based on the detection points and key lines, so as to calculate the speed value of the escalator within the two sampling times according to the obtained difference and the time difference between the two different moments. This method constructs a stable and uniform imaging system to obtain elevator dynamic video, proposes a key feature detection algorithm to characterize the target area, and further proposes a displacement detection method based on the change of key features of multi-frame ordered images by studying the position mapping relationship between key features and imaging field of view, which can improve the accuracy and anti-interference ability of escalator safety parameter detection.
[0067] As an implementation mode, in order to improve the detection effect, before sampling the grayscale images of the escalator step gap at at least two moments, the method further includes:
[0068] Collect escalator size parameters;
[0069] According to the escalator size parameters, the light chamber experimental platform was built; the method flow is as follows Figure 1 shown.
[0070] The light chamber experimental platform includes a dark chamber, a cold light source and an image acquisition unit. The dark chamber is built outside the gap between the escalator steps. A movable profile 2 and a cold light source for providing light source are installed inside the dark chamber. The image acquisition unit is installed on the movable profile 2 and can realize two-degree-of-freedom movement up and down, left and right, and front and back on the movable profile 2, thereby providing a stable, uniform and adjustable light source.
[0071] For example, the darkroom is constructed with telescopic rods and formed into a rectangular frame, the edges of which are covered with a blackout cloth 1, and the image acquisition unit is an industrial camera, which is fastened to the mobile profile 2 with a clamp, such as Fig.15 shown.
[0072] After that, the light intensity of the cold light source is adjusted according to the on-site environment, the appropriate camera shooting angle is selected, real-time video is shot, and the collected video is synchronously transmitted to the host computer such as a laptop computer, and the graphics processing is performed by the debugged program.
[0073] As an implementation manner, the image processing of the grayscale image of the step gap includes:
[0074] The grayscale image of the step gap is binarized using the automatic threshold Otsu method, as shown in Figure 2 is the original image sampled, Figure 3 This is the image processed by Otsu's method.
[0075] A 3*3 convolution kernel is used to perform Gaussian filtering to eliminate the noise of the binary image. The processed image is as follows Figure 4 shown.
[0076] As an implementation mode, when sampling the grayscale image of the gap between escalator steps, the method adopts an interval of every 10 frames for sampling, and the number of the interval frames can be adjusted according to the actual situation.
[0077] As an implementation method, projecting and accumulating the processed image from the horizontal direction to the vertical direction to obtain the image feature graph includes:
[0078] Take the lower left corner of the image as the origin of the coordinate system, establish a rectangular coordinate system, take the right direction in the coordinate system as the v direction, and take the upward direction in the coordinate system as the h direction;
[0079] The processed image is projected along the v direction to the h direction and accumulated, such as Figure 5 As shown, the image feature graph is obtained, such as Figure 6 shown.
[0080] As an implementation manner, calculating the difference between the positions of the image feature lines in the field of view at two different times includes:
[0081] The mapping f between the image height value h of the acquisition area and the height value H of the field of view is known as f(h)=H;
[0082] Calculate the first moment t 0 The position y of the image feature point in the field of view 0 =f(x 0 / h)+H 1 ,
[0083] Among them, H 1 Indicates that the imaging system can detect the time when the gap between the steps to be tested first appears within the field of view.
[0084] Distance from the lower edge of the field of view, in mm, x 0 Indicates t 0 The value of the image feature point sampled in the h direction;
[0085] Calculate the second moment, that is, t after 10 frames 1 The position y of the image feature point in the field of view 1 =f(x 1 / h)+H 1 ,
[0086] Among them, x 1 Indicates t 1 The value of the image feature point sampled in the h direction;
[0087] Calculate the difference between the positions of the image feature lines in the field of view at two different times as |y 1 -y 0 |.
[0088] The subsequent calculation of the speed of the escalator within two sampling times includes:
[0089] Calculate the speed value v of the escalator within two sampling times 0 -y 1 | / |t 1 -t 0 |.
[0090] As an implementation method, the consistency of feature patterns is a key prerequisite for the smooth progress of this experiment. As shown in the figure, at t 0 , t 1 ,t 2 Real-time images of the escalator at three different locations are collected at each time, such as Figure 7-Figure 9 As shown in Figure 1, the escalator gap is identified in the upper, middle and lower positions in the image, coordinates are established, image processing is performed, and consistency analysis is performed based on the area of the feature graph. The number of feature points is 140, 238 and 400 respectively. The original image, the position of the feature point in the coordinate h direction, the feature image and area graph, and the current feature area are shown in Figure 11. Figure 10-12 shown.
[0091] The current feature areas are 7644031, 8954562 and 9431776 respectively. When the feature value is 400 and the feature value is 238, the difference in feature curve area is 5.0% at the minimum, and when the feature value is 140 and the feature value is 400, the difference in feature curve area is 23.4% at the maximum. It is concluded that the feature images are inconsistent. The main presentation is: Fig.11 As shown in Figure 2, when the escalator gap moves from entering the video acquisition area to moving away from the acquisition area, the characteristic curve area decreases as the characteristic value decreases. Analysis shows that this is caused by the camera being located right in front of the escalator, as shown in Figure 2. Fig.12 As shown, the characteristic curve presents a double peak shape of one large and one small. Analysis shows that this is caused by the uneven light source in the camera shooting environment.
[0092] Therefore, this experiment adopts a darkroom design to shield external light sources, and the camera is placed directly above the escalator to be collected to avoid distortion of the feature image, thereby improving the accuracy of escalator safety parameter detection.
[0093] Through experiments, the real-time speed measurement error of the measuring device of this method is ≤3%, the braking deceleration error of the measuring device is ≤5%, the braking distance measurement error of the measuring device is ≤3%, and the rated stopping distance error of the measuring device is ≤6%, which meets the requirements of technical standards.
[0094] During the experiment, we also conducted error analysis and correction, mainly including:
[0095] (1) Camera distortion error
[0096] The manufacturing precision of the lens and the deviation of the assembly process will introduce distortion, resulting in the distortion of the original image. The distortion of the lens is divided into two categories: radial distortion and tangential distortion. The Zhang Zhengyou calibration method can be used to correct the distortion parameters of the lens.
[0097] (2) Step width measurement error
[0098] The step width is obtained by manual measurement, and there will be a certain amount of random error in the measurement result. The measurement error of the step width can be reduced by taking the average value through repeated measurements.
[0099] (3) Environmental error
[0100] Environmental error mainly refers to the impact of external factors on the shooting of industrial cameras, such as changes in light intensity at the shooting location and ground vibrations. Light problems will have a certain impact on the color of the object being photographed, which can be reduced by adding automatic white balance settings to the image acquisition program. The ground vibration caused by the operation of the elevator will have a slight impact on the stability of the camera bracket, and artificial reinforcement is required in the experiment to reduce the interference of vibrations.
[0101] (4) Camera shooting error
[0102] In actual operation, the errors of camera shooting mainly include sampling error and timeout error. Sampling error mainly refers to the error caused by inconsistent image sampling intervals due to unstable clock frequency of industrial cameras, while timeout error is caused by device disconnection due to heartbeat timeout during Gigabit network camera debugging. For image sampling error, a high-precision timer can be selected in the image acquisition program, and the disconnection problem can be solved by increasing the heartbeat timeout.
[0103] (5) Image processing error
[0104] The factors that affect the accuracy of image processing mainly include image noise. The noise problem can be effectively improved by selecting a reasonable filtering method based on the noise characteristics of the image.
[0105] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. In line with the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present specification as described above, which are not provided in detail for the sake of simplicity.
[0106] In addition, to simplify the description and discussion, and in order not to obscure one or more embodiments of the present specification, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device may be shown in the form of a block diagram so as to avoid obscuring one or more embodiments of the present specification, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which one or more embodiments of the present specification will be implemented (i.e., these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that one or more embodiments of the present specification may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0107] One or more embodiments of this specification are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification should be included in the scope of protection of this disclosure.
Claims
1. A method for detecting safety parameters of escalators based on machine vision technology, characterized in that: include: Sampling grayscale images of escalator step gaps at at least two moments; Performing image processing on the grayscale image of the step gap; Projecting the processed image from the horizontal direction to the vertical direction and accumulating it to obtain an image feature graph; The ratio of the image feature pattern area to the vertical height is used as the detection point, and the horizontal straight line passing through the detection point is used as the key line of detection; Calculate the difference between the positions of the image feature lines in the field of view at two different times; According to the obtained difference and the time difference between two different moments, the speed value of the escalator within the two sampling times is calculated; The speed is continuously measured at set intervals until the speed reaches zero and the measurement is terminated. During the braking process, the position difference of the step gap image feature in the field of view is detected at fixed time intervals until the position difference reaches zero and the calculation is terminated. The position differences during the stopping process are accumulated to obtain the stopping distance.
2. The escalator safety parameter detection method based on machine vision technology according to claim 1 is characterized in that: Before sampling the grayscale images of the escalator step gaps at at least two moments, the method further comprises: Collect escalator size parameters; Build the light chamber experimental platform according to the escalator size parameters; The optical chamber experimental platform includes a darkroom, a cold light source and an image acquisition unit. The darkroom is built outside the gap between the escalator steps. A movable profile and a cold light source for providing light source are installed inside the darkroom. The image acquisition unit is installed on the movable profile and can realize two-degree-of-freedom movement on the movable profile: up and down, left and right, and front and back.
3. The escalator safety parameter detection method based on machine vision technology according to claim 1 is characterized in that: The image processing of the grayscale image of the step gap comprises: The grayscale image of the step gap is binarized using the automatic threshold Otsu method; A 3*3 convolution kernel is used for Gaussian filtering to eliminate the noise of the binarized image.
4. The escalator safety parameter detection method based on machine vision technology according to claim 1 is characterized in that: When sampling the grayscale image of the escalator step gap, sampling is performed at an interval of every 10 frames.
5. The escalator safety parameter detection method based on machine vision technology according to claim 1 is characterized in that: The processed image is projected horizontally to vertically and accumulated to obtain the image feature graphs including: Take the lower left corner of the image as the origin of the coordinate system, establish a rectangular coordinate system, take the right direction in the coordinate system as the v direction, and take the upward direction in the coordinate system as the h direction; The processed image is projected along the v direction to the h direction and accumulated to obtain the image feature graph.
6. The escalator safety parameter detection method based on machine vision technology according to claim 5 is characterized in that: The step of calculating the difference between the positions of the image feature lines in the field of view at two different moments includes: The mapping f between the image height value h of the acquisition area and the height value H of the field of view is known as f(h)=H; Calculate the position of the image feature point in the field of view at the first moment t0, y0=f(x0 / h)+H1, Wherein, H1 represents the distance from the lower edge of the field of view when the step gap to be detected first appears within the field of view, and x0 represents the value of the image feature point sampled at t0 in the h direction; Calculate the position of the image feature point in the field of view at the second time t1: y1 = f(x1 / h) + H1, Among them, x1 represents the value of the image feature point sampled at t1 in the h direction; Calculate the difference between the positions of the image feature lines in the field of view at two different times as |y1-y0|.
7. The escalator safety parameter detection method based on machine vision technology according to claim 6 is characterized in that: According to the difference obtained and the time difference between two different moments, the speed value of the escalator within two sampling times is calculated, including: Calculate the speed value v = |y0-y1| / |t1-t0| of the escalator within two sampling times.
8. The escalator safety parameter detection method based on machine vision technology according to claim 2 is characterized in that: The method further comprises: The consistency of the image feature characteristics obtained by projecting and accumulating the images sampled at different times is judged; If the characteristic images are inconsistent, the positions and parameters of the cold light source and the image acquisition unit in the light room experimental platform are adjusted to improve the consistency of the characteristic images.
9. The escalator safety parameter detection method based on machine vision technology according to claim 8 is characterized in that: The consistency judgment of the image feature characteristics obtained by projecting and accumulating the images sampled at different times includes: Real-time images of the escalator at three different positions are collected at t0, t1, and t2 respectively; Identify the escalator gaps at the top, middle and bottom positions in the image, establish coordinates, perform image processing, and conduct consistency analysis based on the area of the feature pattern.
