Elevator shaft sample line identification method, device, equipment and storage medium
By calculating the geometric difference between the sample lines and the object in the image, accurately identifying the position of the sample lines of the elevator shaft, the difficulty in identification in traditional methods is solved, and the accurate reference determination of the elevator automatic installation is achieved.
Patent Information
- Application Number
- CN202310405574.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2043-04-14
AI Technical Summary
During the elevator automation installation process, it is difficult for traditional methods to accurately identify the location of the elevator shaft sample line. It is affected by factors such as insufficient ambient light and small sample line materials, which leads to difficulty in determining the benchmark.
By obtaining the image to be identified, the object is extracted, and the length of the sample line in the vertical direction in the image, the angle between the pin and the object relative to the elevator shaft ground direction, and the difference between the width of the sample line in the image along the elevator shaft ground direction and the width of the object in the image, the object corresponding to the sample line is determined based on these differences.
By screening objects from multiple dimensions, the position of the sample line in the shaft is accurately determined, which facilitates the correct automatic installation of the elevator.
Smart Images

Figure CN116486241B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of elevator installation, and in particular to an elevator shaft sample line recognition method, device, equipment and storage medium. Background Art
[0002] During the process of elevator automation installation, image vision technology can be used to identify the position of the sample line in the shaft, and use this as a benchmark to determine the installation position. However, due to factors such as insufficient ambient light and thin sample line material, traditional methods cannot accurately identify the position of the elevator shaft sample line, which is not conducive to determining the benchmark and thus creates difficulties for elevator installation. Summary of the invention
[0003] Based on this, it is necessary to provide an elevator shaft sample line recognition method, device, computer equipment and storage medium to address the above technical problems.
[0004] The present application provides a method for identifying an elevator shaft sample line, the method comprising:
[0005] Acquire an image to be identified; the image to be identified is obtained by shooting a beam of light from the side of the camera shooting direction toward an object in the elevator shaft, and the beam is shot by a camera;
[0006] Extract several objects from the image to be identified;
[0007] The difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction is taken as the first difference;
[0008] The difference between the plumb degree of the sample line and the angle of the object relative to the floor direction of the elevator shaft is taken as the second difference;
[0009] The difference between the width of the sample line in the image along the direction of the elevator shaft floor and the width of the object in the image to be identified along the direction of the elevator shaft floor is taken as the third difference;
[0010] An object corresponding to the sample line is determined from among the plurality of objects according to the first difference, the second difference and the third difference.
[0011] In one embodiment, extracting a plurality of objects from an image to be identified includes: extracting objects contained in the image to be identified; and determining a plurality of objects from the extracted objects according to the contour prominence of the objects.
[0012] In one embodiment, before taking the difference between the width of the sample line in the image along the direction of the elevator shaft ground and the width of the object in the image to be identified along the direction of the elevator shaft ground as the third difference step, the method also includes: obtaining an initial contour of the object; expanding the initial contour of the object based on pixels of approximate colors in the neighborhood of the object to obtain an expanded contour of the object; and determining the width of the object in the image to be identified along the direction of the elevator shaft ground according to the number of pixels occupied by the expanded contour of the object in the image to be identified along the direction of the elevator shaft ground.
[0013] In one embodiment, before the step of determining the width of the object in the image to be identified along the direction of the elevator shaft ground according to the number of pixels occupied by the expanded outline of the object in the image to be identified along the direction of the elevator shaft ground, the method further includes: obtaining the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtaining the relative relationship between one of the coordinate axes and the direction of the elevator shaft ground; and determining the number of pixels occupied by the expanded outline of the object in the image to be identified along the direction of the elevator shaft ground according to the obtained relative relationship.
[0014] In one embodiment, before the step of taking the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction as the first difference, the method further includes: obtaining the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtaining the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; and determining the length of the object in the image to be identified along the vertical direction based on the obtained relative relationship.
[0015] In one embodiment, before taking the difference between the plumb degree of the sample line and the angle of the object relative to the ground direction of the elevator shaft as the second difference, the method also includes: obtaining the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtaining the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; and determining the angle of the object relative to the ground direction of the elevator shaft based on the obtained relative relationship.
[0016] In one embodiment, before taking the difference between the width of the sample line in the image along the direction of the elevator shaft ground and the width of the object in the image to be identified along the direction of the elevator shaft ground as the third difference, the method further includes: obtaining the width of the reference object in the image along the direction of the elevator shaft ground, and the actual width of the reference object; determining the width of the sample line in the image along the direction of the elevator shaft ground according to the ratio between the actual width of the sample line and the actual width of the reference object, and the width of the reference object in the image along the direction of the elevator shaft ground.
[0017] The present application provides an elevator shaft sample line recognition device, the device comprising:
[0018] The image acquisition module is used to acquire the image to be recognized; the image to be recognized is obtained by shooting a beam of light from the side of the camera shooting direction toward an object in the elevator shaft, and the beam is shot by the camera;
[0019] An object extraction module is used to extract a number of objects from the image to be identified;
[0020] A length difference acquisition module, used for taking the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction as the first difference;
[0021] An angle difference acquisition module, used for taking the difference between the plumb degree of the sample line and the angle of the object relative to the ground direction of the elevator shaft as the second difference;
[0022] A width difference acquisition module, used to take the difference between the width of the sample line in the image along the direction of the elevator shaft ground and the width of the object in the image to be identified along the direction of the elevator shaft ground as the third difference;
[0023] The sample line determination module is used to determine an object corresponding to the sample line among a plurality of objects according to the first difference, the second difference and the third difference.
[0024] The present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program and the processor executes the above method.
[0025] The present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to execute the above method.
[0026] The present application provides a computer program product, on which a computer program is stored, and the computer program is executed by a processor to perform the above method.
[0027] The above-mentioned elevator shaft sample line recognition method, device, computer equipment, storage medium and computer program product obtain an image to be recognized; the image to be recognized is obtained by shooting a camera by projecting a light beam from the side of the camera shooting direction to an object in the elevator shaft; extracting several objects from the image to be recognized; taking the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be recognized along the vertical direction as the first difference; taking the difference between the plumb of the sample line and the angle of the object relative to the elevator shaft ground direction as the second difference; taking the difference between the width of the sample line in the image along the elevator shaft ground direction and the width of the object in the image to be recognized along the elevator shaft ground direction as the third difference; according to the first difference, the second difference and the third difference, determining the object corresponding to the sample line from several objects. Through the above-mentioned method, several objects extracted from the image to be recognized are screened from the three dimensions of the length, angle and width of the object, and the object corresponding to the sample line is accurately determined, so as to facilitate the correct automatic installation of the elevator based on the determined position of the sample line in the shaft. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 1 is a flow chart of a method for identifying a sample line of an elevator shaft in one embodiment;
[0029] Figure 2 is an image to be recognized in one embodiment;
[0030] Figure 3 are several objects extracted from the image to be identified in one embodiment;
[0031] Figure 4 is an initial outline of an object in one embodiment;
[0032] Figure 5 is an expanded outline of an object in one embodiment;
[0033] Figure 6 is an image after a plurality of objects are screened according to the first difference in one embodiment;
[0034] Figure 7 is an image after a plurality of objects are screened according to the second difference in one embodiment;
[0035] Figure 8 is an image after a plurality of objects are screened according to the third difference in one embodiment;
[0036] Fig. 9 is the center pixel coordinate of the object corresponding to the sample line in the image to be evaluated determined in one embodiment;
[0037] Fig.10is a structural block diagram of an elevator shaft sample line recognition device in one embodiment;
[0038] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0040] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0041] In one embodiment, Figure 1 As shown, a method for identifying an elevator shaft sample line is provided, comprising the following steps:
[0042] Step S101, obtaining an image to be recognized; the image to be recognized is obtained by shooting a camera with incident light from the side of the camera shooting direction toward an object in the elevator shaft.
[0043] Specifically, due to the lack of ambient light in the elevator shaft, when photographing objects in the elevator shaft, it is necessary to emit a beam of light from the side of the camera shooting direction to the objects in the elevator shaft, and the beam of light can illuminate the range of the measured objects in the shaft, so that the camera can capture the features of the objects in the shaft. It should be understood that in order to clarify the spatial position of the objects in the shaft, the number of images to be identified by photographing the objects inside the shaft is at least two.
[0044] Step S102: extracting a number of objects from the image to be identified.
[0045] Specifically, several objects including sample lines in the image to be identified can be extracted from the image to be identified based on the contours of the objects using an edge detection algorithm.
[0046] Step S103: taking the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction as the first difference.
[0047] Specifically, the image and the image to be identified are taken by the camera at the same position and the same shooting angle. Since the sample line has continuity, the length of the sample line in the image along the vertical direction should occupy the length of the image along the vertical direction. Therefore, the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction is taken as the first difference. According to the length difference represented by the first difference, several objects can be screened.
[0048] Step S104: taking the difference between the plumb degree of the sample line and the angle of the object relative to the ground direction of the elevator shaft as the second difference.
[0049] Specifically, since the sample line is placed from high to low in the elevator shaft, the sample line is usually perpendicular to the elevator shaft ground, that is, the plumb degree of the sample line is 90 degrees. The difference between the plumb degree of the sample line and the angle of the object relative to the elevator shaft ground direction is taken as the second difference. According to the angle difference represented by the second difference, several objects can be screened. In some examples, when the angle of the object relative to the elevator shaft ground direction falls within [88°, 92°], it can be considered that the angle is not much different from the plumb degree of the sample line.
[0050] Step S105: The difference between the width of the sample line in the image along the direction of the elevator shaft floor and the width of the object in the image to be identified along the direction of the elevator shaft floor is taken as the third difference.
[0051] Specifically, since the objects contained in the elevator shaft may not differ much in length and angle, several objects are further screened according to the width difference. The difference between the width of the sample line along the elevator shaft ground direction in the image and the width of the object along the elevator shaft ground direction in the image to be identified is taken as the third difference. According to the width difference represented by the third difference, several objects can be screened.
[0052] Step S106: determining an object corresponding to the sample line from among the plurality of objects according to the first difference, the second difference and the third difference.
[0053] Specifically, according to the length difference represented by the first difference, the angle difference represented by the second difference, and the width difference represented by the third difference, several objects are screened from three dimensions of length, angle, and width, and the object corresponding to the sample line is determined among the several objects.
[0054] The above-mentioned elevator shaft sample line recognition method obtains an image to be recognized; the image to be recognized is obtained by shooting a camera by projecting a light beam from the side of the camera shooting direction to an object in the elevator shaft; a number of objects are extracted from the image to be recognized; the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be recognized along the vertical direction is taken as the first difference; the difference between the plumb of the sample line and the angle of the object relative to the elevator shaft ground direction is taken as the second difference; the difference between the width of the sample line in the image along the elevator shaft ground direction and the width of the object in the image to be recognized along the elevator shaft ground direction is taken as the third difference; according to the first difference, the second difference and the third difference, the object corresponding to the sample line is determined from a number of objects. Through the above-mentioned method, a number of objects extracted from the image to be recognized are screened from the three dimensions of the length, angle and width of the object, and the object corresponding to the sample line is accurately determined, so as to facilitate the correct automatic installation of the elevator based on the determined position of the sample line in the shaft.
[0055] In one embodiment, a plurality of objects are extracted from the image to be identified, including:
[0056] Extract objects contained in the image to be identified; and determine a number of objects from the extracted objects based on the contour prominence of the objects.
[0057] Specifically, the image to be identified contains multiple objects. In order to reduce the amount of subsequent data processing, several objects are determined from the extracted objects according to the object's contour visibility, thereby extracting objects with obvious contours. Exemplarily, the objects contained in the image to be identified are extracted by edge detection, and several objects with obvious contours are determined from the extracted objects by adjusting the edge color difference threshold. Among them, when extracting objects from the image to be identified according to the object contour using the edge detection algorithm, a higher color difference threshold can be set to extract objects with more obvious contours. The edge color difference threshold should be able to encompass the color difference of objects under lighting.
[0058] In this embodiment, by identifying several objects with obvious outlines among the extracted objects, the amount of data in subsequent screening can be reduced, and the accuracy of the elevator shaft sample line recognition method of the present application can be further improved.
[0059] In one embodiment, before the step of taking the difference between the width of the sample line in the image along the direction of the elevator shaft floor and the width of the object in the image to be identified along the direction of the elevator shaft floor as the third difference, the method further comprises:
[0060] The initial contour of the object is obtained; based on the pixel points of similar colors in the neighborhood of the object, the initial contour of the object is expanded to obtain the expanded contour of the object; according to the number of pixels occupied by the expanded contour of the object in the direction of the elevator shaft ground in the image to be identified, the width of the object in the direction of the elevator shaft ground in the image to be identified is determined.
[0061] Specifically, in order to accurately obtain the contour of the object, the initial contour of the object is further expanded before screening based on the width difference. Based on the pixels of similar colors in the neighborhood of the object, the initial contour of the object is expanded to obtain the expanded contour of the object; according to the number of pixels occupied by the expanded contour of the object in the direction of the elevator shaft ground in the image to be identified, the width of the object in the direction of the elevator shaft ground in the image to be identified is determined.
[0062] In this embodiment, the contour of the object is expanded, so that the contour of the object can be obtained more accurately, and then the actual width of the object can be accurately determined, thereby improving the accuracy of the elevator shaft sample line recognition method of the present application.
[0063] In one embodiment, before the step of determining the width of the object in the image to be identified along the direction of the elevator shaft ground surface according to the number of pixels occupied by the expanded contour of the object in the image to be identified along the direction of the elevator shaft ground surface, the method further includes:
[0064] Obtain the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtain the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; and determine the number of pixels occupied by the expanded contour of the object in the image to be identified along the ground direction of the elevator shaft based on the obtained relative relationship.
[0065] Specifically, since the shooting angle of the image to be identified obtained by the camera cannot be determined, if the difference between the shooting angle horizontal line and the elevator shaft ground direction is too large, it will affect the accuracy of the acquired object contour width feature. Therefore, the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified is obtained; the relative relationship between one of the coordinate axes and the elevator shaft ground direction is obtained; and according to the obtained relative relationship, the number of pixels occupied by the expanded contour of the object in the image to be identified along the elevator shaft ground direction is determined.
[0066] In this embodiment, by determining the relative relationship between the object and one of the coordinate axes of the image coordinate system and the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft, the difference in contour width characteristics caused by an incorrect shooting angle can be avoided, and the number of pixels occupied by the object contour in the image to be identified along the ground direction of the elevator shaft can be accurately determined, thereby improving the accuracy of the elevator shaft sample line recognition method of the present application.
[0067] In one embodiment, before the step of taking the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction as the first difference, the method further comprises:
[0068] Obtain the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtain the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; and determine the length of the object along the vertical direction in the image to be identified based on the obtained relative relationship.
[0069] Specifically, since the shooting angle of the image to be identified obtained by the camera cannot be determined, if the angle between the horizontal line and the vertical direction of the shooting angle differs too much from the right angle, it will affect the accuracy of the length feature of the contour of the acquired object. Therefore, the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified is obtained; the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft is obtained; according to the obtained relative relationship, the number of pixels occupied by the object in the image to be identified along the vertical direction is determined, and based on the number of pixels occupied, the length of the object in the image to be identified along the vertical direction is obtained.
[0070] In this embodiment, by determining the relative relationship between the object and one of the coordinate axes of the image coordinate system and the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft, the difference in contour length characteristics caused by an incorrect shooting angle can be avoided, and the length of the object along the vertical direction in the image to be identified can be accurately determined, thereby improving the accuracy of the elevator shaft sample line recognition method of the present application.
[0071] In one embodiment, before the step of taking the difference between the plumb degree of the sample line and the angle of the object relative to the floor direction of the elevator shaft as the second difference, the method further comprises:
[0072] Obtain the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtain the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; and determine the angle of the object relative to the ground direction of the elevator shaft based on the obtained relative relationship.
[0073] Specifically, since the shooting angle of the image to be identified obtained by the camera cannot be determined, if the difference between the shooting angle horizontal line and the elevator shaft ground direction is too large, it will affect the accuracy of the angle feature of the acquired object's contour. Therefore, the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified is obtained; the relative relationship between one of the coordinate axes and the elevator shaft ground direction is obtained; and the angle of the object relative to the elevator shaft ground direction is determined based on the obtained relative relationship.
[0074] In this embodiment, by determining the relative relationship between the object and one of the coordinate axes of the image coordinate system and the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft, the contour caused by an incorrect shooting angle can be avoided, and the angle of the object relative to the ground direction of the elevator shaft can be accurately determined, thereby improving the accuracy of the elevator shaft sample line recognition method of the present application.
[0075] In one embodiment, before taking the difference between the width of the sample line in the image along the direction of the elevator shaft floor and the width of the object in the image to be identified along the direction of the elevator shaft floor as the third difference, the method further comprises:
[0076] The width of the reference object in the image along the ground direction of the elevator shaft and the actual width of the reference object are obtained; the width of the sample line in the image along the ground direction of the elevator shaft is determined according to the ratio between the actual width of the sample line and the actual width of the reference object and the width of the reference object in the image along the ground direction of the elevator shaft.
[0077] Specifically, the diameter of the sample line is known, but if the shooting distance between the camera and the sample line is different, the width of the sample line in the image along the elevator shaft ground direction is also different. Therefore, the acquired sample line width can be prevented from being affected by the shooting distance by setting a reference object of known width. The width of the reference object in the image along the elevator shaft ground direction and the actual width of the reference object are obtained; according to the ratio between the actual width of the sample line and the actual width of the reference object, and the width of the reference object in the image along the elevator shaft ground direction, the width of the sample line in the image along the elevator shaft ground direction is determined.
[0078] In this embodiment, by setting a reference object to determine the width of the sample line in the image along the ground direction of the elevator shaft, the width of the reference object can be accurately obtained, thereby improving the accuracy of the elevator shaft sample line recognition method of this application.
[0079] In order to better understand the above method, the following Figure 2 to Figure 9 , an application example of the elevator shaft sample line identification method of the present application is elaborated in detail.
[0080] First, a beam of incident light is emitted from the side of the camera shooting direction toward the object in the elevator shaft, and at least two images to be identified are obtained by shooting at two angles 90 degrees apart through the camera. The images to be identified are as follows: Figure 2 As shown. Extract the objects contained in the image to be identified; according to the object's contour visibility, determine a number of objects from the extracted objects, and the extracted objects are as follows Figure 3 shown.
[0081] Secondly, first, obtain the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtain the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; determine the length of the object in the image to be identified along the vertical direction according to the obtained relative relationship. The difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction is taken as the first difference.
[0082] Second, obtain the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtain the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; determine the angle of the object relative to the ground direction of the elevator shaft based on the obtained relative relationship. The difference between the plumb degree of the sample line and the angle of the object relative to the ground direction of the elevator shaft is taken as the second difference.
[0083] Third, obtain the initial contour of the object; expand the initial contour of the object based on the pixels of similar colors in the neighborhood of the object to obtain the expanded contour of the object; determine the width of the object in the direction of the elevator shaft ground in the image to be identified according to the number of pixels occupied by the expanded contour of the object in the direction of the elevator shaft ground in the image to be identified. Figure 4 As shown in Figure 5 shown.
[0084] Obtain the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtain the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; and determine the number of pixels occupied by the expanded contour of the object in the image to be identified along the ground direction of the elevator shaft based on the obtained relative relationship.
[0085] The width of the reference object in the image along the ground direction of the elevator shaft and the actual width of the reference object are obtained; the width of the sample line in the image along the ground direction of the elevator shaft is determined according to the ratio between the actual width of the sample line and the actual width of the reference object, and the width of the reference object in the image along the ground direction of the elevator shaft. For example, if the actual width of the sample line, that is, the sample line diameter, is 0.5 mm, and the actual width of the reference object is 5 mm, that is, the actual width of the sample line is one tenth of the actual width of the reference object. Then, if the width of the reference object in the image along the ground direction of the elevator shaft is 1 mm, the width of the sample line in the image along the ground direction of the elevator shaft is one tenth of the width of the reference object in the image along the ground direction of the elevator shaft, that is, 0.1 mm.
[0086] The difference between the width of the sample line in the image along the direction of the elevator shaft ground and the width of the object in the image to be identified along the direction of the elevator shaft ground is taken as the third difference. Further, the width of the sample object in the image along the direction of the elevator shaft ground can be represented by the number of pixels of the object in the image, that is, the difference between the number of pixels of the sample line in the image along the direction of the elevator shaft ground and the number of pixels of the object in the image to be identified along the direction of the elevator shaft ground is taken as the third difference. Exemplarily, the resolution value of the camera is 3072, that is, the number of pixels in the horizontal direction is 3072, and the actual width represented by the image width in the horizontal direction is 135.9 mm. The ratio of the sample line diameter to the image width is multiplied by the number of pixels, and the number of pixels of the sample line in the image along the direction of the elevator shaft ground is about 11. By comparing the number of pixels of the sample line in the image along the direction of the elevator shaft ground and the number of pixels of the object in the image to be identified along the direction of the elevator shaft ground, it can be determined whether the object is the object corresponding to the sample line.
[0087] Finally, according to the first difference, the second difference and the third difference, the object corresponding to the sample line is determined among the multiple objects. Specifically, if the first difference, the second difference and the third difference of the object are all less than the preset threshold value, the object is determined to be the object corresponding to the sample line. Exemplarily, the threshold value of the second difference is 2°, that is, if the difference between the plumb angle of the sample line and the angle of the object relative to the ground direction of the elevator shaft is greater than 2°, it is determined that the object is not the object corresponding to the sample line.
[0088] In this embodiment, an image to be identified is obtained by shooting a camera with a light beam from the side of the camera shooting direction to an object in the elevator shaft; a number of objects are extracted from the image to be identified; the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction is taken as the first difference; the difference between the plumb of the sample line and the angle of the object relative to the ground direction of the elevator shaft is taken as the second difference; the difference between the width of the sample line in the image along the ground direction of the elevator shaft and the width of the object in the image to be identified along the ground direction of the elevator shaft is taken as the third difference; according to the first difference, the second difference and the third difference, the object corresponding to the sample line is determined from the number of objects. Through the above method, the number of objects extracted from the image to be identified are screened from the three dimensions of the length, angle and width of the object, and the object corresponding to the sample line is accurately determined, so that the automatic installation of the elevator can be correctly performed based on the position of the determined sample line in the shaft.
[0089] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0090] In one embodiment, Fig.10 As shown, a device for identifying a sample line of an elevator shaft is provided, comprising:
[0091] The image acquisition module 1002 is used to acquire the image to be recognized; the image to be recognized is obtained by shooting a beam of light from the side of the camera shooting direction toward an object in the elevator shaft through the camera;
[0092] The object extraction module 1004 is used to extract a number of objects from the image to be identified;
[0093] The length difference acquisition module 1005 is used to take the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction as the first difference;
[0094] An angle difference acquisition module 1006, used to take the difference between the plumb degree of the sample line and the angle of the object relative to the ground direction of the elevator shaft as the second difference;
[0095] The width difference acquisition module 1007 is used to take the difference between the width of the sample line in the image along the direction of the elevator shaft ground and the width of the object in the image to be identified along the direction of the elevator shaft ground as the third difference;
[0096] The sample line determination module 1008 is used to determine an object corresponding to the sample line from among the plurality of objects according to the first difference, the second difference and the third difference.
[0097] In one embodiment, the object extraction module 1004 is further used to extract objects contained in the image to be identified; and to determine a number of objects from the extracted objects according to the contour prominence of the objects.
[0098] In one embodiment, the device also includes a contour expansion module, which is used to obtain the initial contour of the object; based on the pixel points of approximate colors in the neighborhood of the object, the initial contour of the object is expanded to obtain the expanded contour of the object; according to the number of pixels occupied by the expanded contour of the object in the direction of the elevator shaft ground in the image to be identified, the width of the object in the direction of the elevator shaft ground in the image to be identified is determined.
[0099] In one embodiment, the device also includes a pixel point number determination module, which is used to obtain the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtain the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; based on the obtained relative relationship, determine the number of pixels occupied by the expanded outline of the object in the image to be identified along the ground direction of the elevator shaft.
[0100] In one embodiment, the device also includes a length threshold determination module, which is used to obtain the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtain the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; and determine the length of the object along the vertical direction in the image to be identified based on the obtained relative relationship.
[0101] In one embodiment, the device also includes an angle threshold determination module, which is used to obtain the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; obtain the relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; and determine the angle of the object relative to the ground direction of the elevator shaft based on the obtained relative relationship.
[0102] In one embodiment, the device also includes an object reference module, which is used to obtain the width of the reference object in the image along the ground direction of the elevator shaft, and the actual width of the reference object; according to the ratio between the actual width of the sample line and the actual width of the reference object, and the width of the reference object in the image along the ground direction of the elevator shaft, the width of the sample line in the image along the ground direction of the elevator shaft is determined.
[0103] The specific definition of the elevator shaft sample line identification device can refer to the definition of the elevator shaft sample line identification method above, which will not be repeated here. Each module in the above-mentioned elevator shaft sample line identification device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0104] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer device also includes an input and output interface, which is a connection circuit for exchanging information between the processor and the external device. They are connected to the processor through a bus, referred to as an I / O interface. When the computer program is executed by the processor, a method for identifying an elevator shaft sample line is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0105] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0106] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned various method embodiments when executing the computer program.
[0107] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0108] In one embodiment, a computer program product is provided, on which a computer program is stored, and the computer program is used by a processor to execute the steps in the above-mentioned various method embodiments.
[0109] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0110] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0111] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0112] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for identifying elevator shaft sample lines, characterized in that: The method comprises: Acquire an image to be identified; the image to be identified is obtained by shooting a beam of light from the side of the camera shooting direction toward an object in the elevator shaft; extract objects contained in the image to be identified; determine the contour conspicuity of the object based on adjusting the color difference threshold; and determine a number of objects from the extracted objects according to the contour conspicuity; taking the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction as the first difference; The difference between the plumb degree of the sample line and the angle of the object relative to the floor direction of the elevator shaft is taken as the second difference; The difference between the width of the sample line in the image along the direction of the elevator shaft ground and the width of the object in the image to be identified along the direction of the elevator shaft ground is taken as the third difference; According to the first difference, the second difference and the third difference, an object corresponding to the sample line is determined among the plurality of objects; the object corresponding to the sample line is used to provide a reference for elevator automation installation.
2. The method according to claim 1, characterized in that Before the step of taking the difference between the width of the sample line in the image along the direction of the elevator shaft floor and the width of the object in the image to be identified along the direction of the elevator shaft floor as the third difference, the method further comprises: Get the initial outline of the object; Expanding the initial contour of the object based on pixels of similar colors in the neighborhood of the object to obtain an expanded contour of the object; The width of the object in the image to be identified along the direction of the elevator shaft ground is determined according to the number of pixels occupied by the expanded outline of the object in the image to be identified along the direction of the elevator shaft ground.
3. The method according to claim 2, characterized in that Before the step of determining the width of the object in the image to be identified along the direction of the elevator shaft ground surface according to the number of pixels occupied by the expanded contour of the object in the image to be identified along the direction of the elevator shaft ground surface, the method further includes: Acquire the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; Obtaining a relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; According to the obtained relative relationship, the number of pixel points occupied by the expanded contour of the object in the image to be identified along the floor direction of the elevator shaft is determined.
4. The method according to claim 1, characterized in that Before the step of taking the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction as the first difference, the method further comprises: Acquire a relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; Obtaining a relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; According to the obtained relative relationship, the length of the object along the vertical direction in the image to be identified is determined.
5. The method according to claim 1, characterized in that Before the step of taking the difference between the plumb degree of the sample line and the angle of the object relative to the floor direction of the elevator shaft as the second difference, the method further comprises: Acquire the relative relationship between the object and one of the coordinate axes of the image coordinate system of the image to be identified; Obtaining a relative relationship between one of the coordinate axes and the ground direction of the elevator shaft; Based on the obtained relative relationship, the angle of the object relative to the ground direction of the elevator shaft is determined.
6. The method according to claim 1, characterized in that Before taking the difference between the width of the sample line in the image along the direction of the elevator shaft floor and the width of the object in the image to be identified along the direction of the elevator shaft floor as the third difference, the method further includes: Acquire the width of the reference object in the image along the floor direction of the elevator shaft, and the actual width of the reference object; The width of the sample line along the elevator shaft ground direction in the image is determined according to the ratio between the actual width of the sample line and the actual width of the reference object and the width of the reference object along the elevator shaft ground direction in the image.
7. The method according to any one of claims 1 to 6, characterized in that: Determining an object corresponding to the sample line from among the plurality of objects according to the first difference, the second difference, and the third difference includes: When the first difference, the second difference and the third difference are all smaller than a preset threshold, an object corresponding to the sample line is determined from among the plurality of objects.
8. An elevator shaft sample line recognition device, characterized in that: The device comprises: An image acquisition module is used to acquire an image to be recognized; the image to be recognized is obtained by shooting a beam of light from the side of the camera shooting direction toward an object in the elevator shaft, through the camera; An object extraction module is used to extract objects contained in the image to be identified; determine the contour conspicuity of the object based on adjusting the color difference threshold; and determine a number of objects from the extracted objects according to the contour conspicuity; A length difference acquisition module, used for taking the difference between the length of the sample line in the image along the vertical direction and the length of the object in the image to be identified along the vertical direction as the first difference; An angle difference acquisition module, used for taking the difference between the plumb degree of the sample line and the angle of the object relative to the ground direction of the elevator shaft as the second difference; A width difference acquisition module, used to take the difference between the width of the sample line in the image along the direction of the elevator shaft ground and the width of the object in the image to be identified along the direction of the elevator shaft ground as the third difference; The sample line determination module determines an object corresponding to the sample line from the plurality of objects according to the first difference, the second difference and the third difference; the object corresponding to the sample line is used to provide a reference for elevator automation installation.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Workpiece model identification method and device, equipment, storage medium and computer program
CN113642470A
Wire rope inspection device
JP2011107056A
Monitoring system within elevator hoistway
JP2015113182A