Crane trolley positioning method and system based on machine vision
By using machine vision technology on crane trucks, combined with deep learning and Hough transformation, high-precision positioning of trucks in complex port environments is achieved, the problems of GPS signal loss or interference are solved, and the results of automated operations are ensured.
Patent Information
- Application Number
- CN202210604210.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-05-30
AI Technical Summary
In complex port operation environments, traditional GPS positioning methods have signal loss or interference problems, resulting in failure of crane positioning function or reduced accuracy, which cannot meet the high-precision needs of automated operations.
The position positioning method of crane truck based on machine vision is adopted, and the ground image with the marker is collected through the camera, and the deep learning method is used for coarse positioning. Combined with the Hough transform to extract the outline of the target marker, the offset between the current position of the truck and the center line of the container bench position is calculated to achieve accurate positioning.
It realizes high-precision positioning of large trucks in complex port environments, avoids the problems of GPS signal loss or interference, and ensures the automated operation effect of large trucks of large trucks.
Smart Images

Figure CN115082556B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of port automation, and in particular relates to a crane trolley position positioning method and system based on machine vision. Background Art
[0002] At present, automation has become a development trend in all walks of life, and ports are important hubs for my country's foreign trade, and the demand for efficient and automated operations in ports is becoming increasingly strong. In the field of port automation technology, when various types of rail-mounted gantry cranes are operating, or when tire-mounted gantry cranes are operating, they all need to move their large vehicles to designated locations in the yard, so how to accurately obtain the location of the large vehicles has become a difficult problem for their automated operations.
[0003] As a rapidly developing comprehensive technology, machine vision has been applied in all walks of life. The image acquisition device of the machine vision system obtains the image signal of the target and uses a specific digital image processing method to obtain various information such as the position and shape of the target, thereby controlling the operation of various equipment on site according to the results. The present invention combines traditional machine vision methods with more popular deep learning methods to provide a method for precise positioning of a crane trolley.
[0004] Most of the commonly used methods for locating large vehicles today are based on the GPS system. However, in complex port operating environments, when satellite signals are blocked by containers or other reasons, the positioning signals may be lost or interfered with, resulting in failure of the large vehicle positioning function. In addition, the positioning accuracy of GPS is generally low, and it cannot meet the high-precision requirements of large vehicle automation operations, and the positioning accuracy of large vehicles directly affects the effectiveness of their automation operations. There are also methods for locating large vehicles based on QR codes, but this method relies on the on-site environment and the QR code cannot be placed on the ground, otherwise it will easily become dirty and damaged. Summary of the invention
[0005] In view of this, the present invention proposes a crane trolley positioning method and system based on machine vision, which is used to solve the problem that the traditional GPS positioning function fails or the accuracy is reduced in the complex port operation environment.
[0006] In a first aspect, the present invention discloses a method for locating a crane trolley based on machine vision, the method comprising:
[0007] The crane trolley uses a camera to collect ground images with markers while driving;
[0008] Use deep learning methods to roughly locate the target marker area in the ground image with markers;
[0009] The contour of the target marker is extracted using Hough transform, and the geometric center of the contour of the target marker is used as the feature point of the target marker;
[0010] Calculate the offset between the current position of the crane trolley and the center line of the container bay according to the characteristic points of the target marker;
[0011] Positioning is performed based on the offset between the crane trolley's current position and the container bay centerline.
[0012] On the basis of the above technical solution, preferably, the camera is arranged on the side of the crane trolley, the marker is arranged along the outer side of the crane trolley runway, and the marker is ensured to be in the camera field of view, and in the running direction of the trolley, the marker is arranged on the center line of the container bay; the marker includes a spike, a sticker or spray paint.
[0013] On the basis of the above technical solution, preferably, before collecting the ground image with the marker by the camera, the method further includes:
[0014] The camera is pointed toward the ground with markers, and the Zhang Zhengyou camera calibration method is used to obtain the camera's intrinsic parameter matrix, distortion coefficient, and posture information in a fixed state, and a mapping relationship between the two-dimensional coordinate points in the camera image and the coordinate points in the world coordinate system is constructed.
[0015] On the basis of the above technical solution, preferably, the use of Hough transform to detect the contour of the target marker specifically includes:
[0016] For circular markers, Hough transform detection is used to obtain the radius and center of the marker to obtain the initial contour. Hough transform is further used around the initial contour, and only contour points within a preset distance range along the first contour are used to perform Hough transform voting to obtain the contour of the target marker;
[0017] For non-circular markers, the generalized Hough transform is used to extract the contour of the target marker.
[0018] On the basis of the above technical solution, preferably, the calculation of the offset between the current position of the crane trolley and the center line of the container bay according to the characteristic points of the target marker specifically includes:
[0019] The mapping relationship obtained by camera calibration is used to calculate the world coordinates of the marker and the reference point respectively, and the offset of the marker relative to the reference point is calculated based on the world coordinates of the marker and the reference point. The offset of the marker relative to the reference point is used as the offset between the current position of the crane trolley and the center line of the container bay; the reference point is the geometric center of the target marker detected when the crane trolley is located at the center of the bay.
[0020] On the basis of the above technical solution, preferably, the method further comprises:
[0021] Obtain the ambient light intensity through the light intensity sensor;
[0022] When the ambient light is lower than the preset threshold at night, the target marker area is illuminated by the fill light;
[0023] Under the complex sunlight conditions during the day, a two-step exposure time adjustment strategy is used to adjust the camera to a reliable exposure time under outdoor conditions to ensure that the target markers are clearly presented in the image.
[0024] On the basis of the above technical solution, preferably, the two-step exposure time adjustment strategy is specifically implemented as follows:
[0025] Determine whether the target marker detection in the previous frame is successful. If successful, continue with the following steps:
[0026] A rectangular area is selected outside the target marker range, and the mean of the rectangular area image is calculated; if the mean is less than the first prior threshold range, it is considered that the target marker area is in an under-exposed state, and the camera exposure time is gradually increased; otherwise, the camera exposure time is gradually reduced until the camera exposure time is at a stable value, and the mean of the rectangular area image is within the first prior threshold range at the stable value;
[0027] Select an area containing a target marker, calculate the gradient amplitude of the coordinates on the center line of the area image containing the target marker in the x direction, determine whether the gradient amplitudes on both sides of the marker reach a second priori threshold range, and if not, gradually increase or decrease the exposure time of the camera until the gradient amplitudes on both sides of the marker are within the second priori threshold range;
[0028] If the target marker detection fails for several consecutive frames, the limit range of the camera exposure time is set according to the current ambient light lumen value, and the camera exposure time is searched cyclically from small to large until the target marker is stably detected and the local mean of the target marker is within the first prior threshold range.
[0029] In a second aspect, the present invention discloses a crane trolley position positioning system based on machine vision, the system comprising:
[0030] Markers: set along the outside of the crane trolley runway, in the direction of the trolley running, and set on the center line of the container bay;
[0031] Camera: It is installed on the side of the crane trolley and faces the ground with markers. It is used to collect images of the ground with markers when the crane trolley is moving.
[0032] Fill light: used to fill light to the target marker area when the light intensity is lower than the preset threshold at night;
[0033] Illuminance sensor: used to obtain ambient light illumination. In the case of complex sunlight during the day, a two-step exposure time adjustment strategy is used to adjust the camera to a reliable exposure time under outdoor conditions to ensure that the target marker is clearly presented in the image.
[0034] Feature extraction module: used to roughly locate the target marker area in the ground image with markers using deep learning methods; use Hough transform to extract the contour of the target marker, and use the geometric center of the contour of the target marker as the feature point of the target marker;
[0035] Trolley positioning module: used to calculate the offset between the current position of the crane trolley and the center line of the container bay according to the characteristic points of the target marker; and to perform positioning according to the offset between the current position of the crane trolley and the center line of the container bay.
[0036] In a third aspect of the present invention, an electronic device is disclosed, comprising: at least one processor, at least one memory, a communication interface and a bus;
[0037] Wherein, the processor, memory, and communication interface communicate with each other via the bus;
[0038] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the method according to the first aspect of the present invention.
[0039] According to a fourth aspect of the present invention, a computer-readable storage medium is disclosed, wherein the computer-readable storage medium stores computer instructions, and the computer instructions enable a computer to implement the method described in the first aspect of the present invention.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] 1) The present invention realizes the crane trolley positioning function by a non-contact, long-distance machine vision method, and can simultaneously calculate the offset of the crane trolley running direction and the trolley running direction, ensuring that the crane trolley accurately reaches the specified position, and can also correct the deviation on both sides during the trolley operation;
[0042] 2) Aiming at the characteristics of the outdoor working environment of the crane, the present invention designs a two-step exposure time adjustment strategy, which can adaptively search the camera exposure time, ensure that the marker has a clear edge in the image, eliminate the influence of abnormal ambient brightness, enable the algorithm to stably and accurately detect the marker, and ensure that the crane trolley accurately reaches the designated yard location;
[0043] 3) The system of the present invention can be integrated on a variety of mobile operating equipment and is suitable for a variety of operating environments. In particular, for tire cranes that do not have fixed operating tracks, it can quickly solve the positioning problem of the operating equipment and is simple and reliable to install. The algorithm is stable and effective and can accurately calculate the offset of the trolley relative to the reference point, providing basic guarantees for the automated operation process of the crane trolley. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 It is a flow chart of the crane trolley position positioning method based on machine vision of the present invention;
[0046] Figure 2 It is a structural schematic diagram of a crane trolley position positioning system based on machine vision of the present invention;
[0047] Figure 3 This is a schematic diagram of the installation position of the marker position of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] See also Figure 1 The present invention discloses a method for locating a crane trolley based on machine vision, the method comprising:
[0050] S1. A camera is installed on the side of the crane trolley and multiple markers are installed along the outer side of the crane trolley runway.
[0051] The marker should be in the camera's field of view, in the direction of the trolley's movement, and set on the center line of the container's bay.
[0052] like Figure 2 As shown, a camera 2 is installed on the side of the crane trolley 1. The camera 2 is vertically downward and facing the ground with a marker 3 installed by installing a bracket, and should be kept vertical to the ground as much as possible, which can reduce the impact of calibration errors.
[0053] like Figure 3 As shown, the marker is set outside the running track 7 of the large vehicle to ensure that the marker 3 is in the field of view of the camera 2, and try to ensure that the marker 3 will not be crushed during the operation of the large vehicle to avoid damage and subsequent positioning failure. In the running direction of the small vehicle, the marker 3 is set at the position of the center line 8 of each container.
[0054] Generally, there are dozens of bays in the yard, so a marker needs to be installed at each bay. When the trolley runs to the middle of two bays, the marker may not exist in the camera field of view, so the present invention implements a non-continuous positioning system, and the positioning result only ensures that the trolley runs to the center of the specified bay. Among them, the positioning markers are generally selected from circular spikes at the work site, because they will not damage the on-site working environment and are easier to be detected. The markers of the present invention are not limited to circular spikes, and can also be replaced with any markers that meet the requirements of on-site installation, such as square spikes, and the form can be replaced by stickers or spray paint. When the marker is placed on the ground, the present invention can simultaneously locate the trolley running direction (X) and the trolley running direction (Y); at the same time, the present invention can be used on both sides of the trolley at the same time, and can realize the deviation correction function of the crane trolley during operation.
[0055] S2. Install fill lights and light sensors on the side of the crane trolley. Obtain ambient light intensity through the light sensor. When the ambient light intensity is lower than the preset threshold at night, use fill lights to fill in the target marker area. In the daytime when the sunlight is complex, use a two-step exposure time adjustment strategy to adjust the camera to a reliable exposure time under outdoor conditions to ensure that the target marker is clearly presented in the image.
[0056] Since crane trolleys are usually located in outdoor environments, when the ambient light is poor at night, simply increasing the camera exposure time cannot make the brightness of the marker in the image within the normal range. Therefore, a fill light 5 can be installed on the side of the crane trolley, such as Figure 2 As shown, in a darker environment, fill light is applied to the target marker area to ensure that the camera can clearly acquire an image containing the marker, thereby stably detecting the outline of the target marker.
[0057] like Figure 2 As shown, a light intensity sensor 4 is installed on the side of the crane trolley. The function of the light intensity sensor 4 is to detect the ambient brightness. Its installation position should exclude the influence of light sources other than natural light as much as possible. It is generally placed above the fill light 5 to ensure that the fill light 5 will not affect its detection results.
[0058] When the area containing the marker in the image appears brighter or darker than the surrounding area, using a two-step exposure time adjustment strategy can ensure that the outline of the marker is clearer and the positioning result is more stable.
[0059] This two-step exposure time adjustment strategy is mainly aimed at the premise that the sunlight is relatively complex during the day; at night, the ambient light is relatively stable, and you only need to turn on the fill light and set a fixed exposure value for the camera.
[0060] First, the two states of day and night are judged by combining the local information of the image with the detection results of the sensor. A smaller area is selected from the corners of the collected image that are not illuminated by the fill light, and the average is calculated. At the same time, combined with the results of the light sensor 4, if the image average is less than the prior threshold and the ambient light lumen value is less than the threshold, it can be judged that the state has entered the night state, and the fill light is controlled to be turned on; otherwise, it can be judged that the state has entered the day state.
[0061] The specific implementation of the two-step exposure time adjustment strategy is as follows:
[0062] In the case of complex sunlight during the day, determine whether the target marker detection in the previous frame is successful. If successful, continue with the following steps:
[0063] a. Select a rectangular area outside the target marker range and calculate the mean of the rectangular area image; if the mean is less than the first prior threshold range, it is considered that the target marker area is in an under-exposed state, and the camera exposure time is gradually increased; otherwise, the camera exposure time is gradually reduced until the camera exposure time is at a stable value, and the mean of the rectangular area image is within the first prior threshold range under the stable value;
[0064] b. Select an area containing the target marker, calculate the gradient amplitude of the coordinates on the center line of the x-direction of the area image containing the target marker, and determine whether the gradient amplitude on both sides of the marker reaches the second prior threshold range. If not, gradually increase or decrease the camera exposure time until the gradient amplitude on both sides of the marker is within the second prior threshold range.
[0065] If the target marker detection fails for several consecutive frames, the limit range of the camera exposure time is set according to the current ambient light lumen value, and the camera exposure time is searched cyclically from small to large until the target marker is stably detected and the local mean of the target marker is within the first prior threshold range.
[0066] S3. Perform camera calibration using Zhang Zhengyou’s camera calibration method.
[0067] Zhang Zhengyou's camera calibration method can obtain the intrinsic parameter matrix, distortion coefficient and posture information of the camera in a fixed state, and construct the mapping relationship between the coordinate points of the two-dimensional coordinate system in the camera image and the world coordinate system.
[0068] When calibrating the camera's intrinsic parameters, the chessboard should cover the entire image captured by the camera. Suppose the coordinates of point P in the real world are [X, Y, Z], the coordinates of point P' in the image are [X', Y', Z'], the focal length of the camera is f, the pixel coordinate system is O'-uv, and the pixel coordinates are scaled by α times on the u axis and β times on the v axis. At the same time, the origin of the pixel coordinate system is translated by [u 0 ,v 0 ] T The camera internal parameters can be obtained by Zhang Zhengyou's camera calibration method. And the distortion coefficient K = [k 1 k 2 k 3 k 4 k 5 ], where f x =αf, f y =βf. The horizontal axis of the chessboard is placed in the direction of the vehicle's movement and located at the center of the camera's field of view. The camera's internal parameters can be calculated, including the rotation matrix and the translation matrix T = [t 1 t 2 t 3 ], after the pixel coordinate point is distorted according to the distortion coefficient, the corresponding coordinate point in the world coordinate system is obtained by the following mapping relationship: where [u,v] T is the plane coordinate of the imaging point in the pixel coordinate system, s is the scale factor from the world coordinate system to the two-dimensional coordinate system of the image, and it can be obtained by setting Z = 0. After the pixel coordinate point is distorted according to the distortion coefficient, the corresponding coordinate point in the world coordinate system is obtained according to the mapping relationship obtained by the above parameters. During the calibration process, it should be ensured that the image screen will not be blocked, and the height of the chessboard should be consistent with the actual detection height.
[0069] S4. When the crane trolley is traveling, the ground image with marking objects is collected through the camera.
[0070] After completing the camera calibration, the camera is used to collect ground images with markers during the travel of the crane trolley for subsequent crane trolley positioning.
[0071] S5. Use deep learning methods to roughly locate the area of the target marker in the ground image with the marker.
[0072] Set ROI for the collected ground image with target markers, where the selection of image ROI should try to ensure that the marker is in the vertical center of the image to prevent the target marker from appearing outside the ROI area.
[0073] After setting the ROI, downsampling the image can greatly reduce the amount of data processed by the algorithm.
[0074] Then, a deep learning method is used to roughly locate the target marker area and eliminate the influence of other similar targets.
[0075] Taking the YOLO model as an example, a pre-trained YOLO model is used. After collecting enough marker image data, the images are annotated and sent to the YOLO model for training. Finally, the trained YOLO model is used to identify the downsampled ground image to obtain the area containing the target marker. In addition to the YOLO target detection method, other deep learning detection methods with higher inference efficiency can also be used to ensure the frame rate of the algorithm.
[0076] The purpose of using deep learning methods for coarse positioning is to filter out most areas that do not contain landmarks. If the on-site ground environment is relatively simple, this process is not necessary.
[0077] S6. Use Hough transform to extract the contour of the target marker, and use the geometric center of the contour of the target marker as the feature point of the target marker.
[0078] For circular markers, Hough transform detection is used to obtain the radius and center of the marker to obtain the initial contour. Hough transform is further used around the initial contour. Only contour points within a preset distance range along the first contour are used to vote for the Hough transform to obtain the contour of the target marker. This can increase the resolution of the calculation and make the detection boundary more accurate and stable.
[0079] For non-circular markers, the generalized Hough transform is used to extract the contour of the target marker, or semantic segmentation methods based on deep learning can be used.
[0080] S7. Calculate the offset between the current position of the crane trolley and the center line of the container bay according to the characteristic points of the target marker.
[0081] The mapping relationship obtained by camera calibration is used to calculate the world coordinates of the marker and the reference point respectively. The world coordinates of the marker and the reference point are calculated to obtain the offset of the marker relative to the reference point. The offset of the marker relative to the reference point is used as the offset between the current position of the truck and the center line of the container bay; the reference point is the geometric center of the target marker detected when the truck is located at the center of the bay.
[0082] In addition to using camera parameters and other methods to calculate world coordinates, the actual offset of the crane trolley relative to the marker can also be calculated using the pixel equivalent after image correction distortion.
[0083] S8. Positioning is performed based on the offset between the current position of the crane trolley and the center line of the container bay.
[0084] Figure 2 The middle distance d is the actual offset of the crane trolley relative to the marker, and the crane trolley is commanded to move to the center of the specified position based on the actual offset.
[0085] Corresponding to the above method embodiment, the present invention also proposes a crane trolley position positioning system based on machine vision, please refer to Figures 2-3 , the system comprising:
[0086] Marker 3: It is set along the outer side of the crane trolley runway 7. In the running direction of the trolley, the marker 3 is set on the center line 8 of the container bay;
[0087] Camera 2: is arranged on the side of the crane trolley 1 and faces the ground with the marker 3, and is used to collect the ground image with the marker 3 during the driving process of the crane trolley;
[0088] Fill light 5: used to fill light to the target marker area when the light intensity is lower than the preset threshold at night;
[0089] Illuminance sensor 4: used to obtain ambient light illumination. In the case of complex sunlight during the day, a two-step exposure time adjustment strategy is used to adjust the camera 2 to a reliable exposure time under outdoor conditions to ensure that the target marker is clearly presented in the image.
[0090] Feature extraction module: used to roughly locate the target marker area in the ground image with markers using deep learning methods; use Hough transform to extract the contour of the target marker, and use the geometric center of the contour of the target marker as the feature point of the target marker;
[0091] Trolley positioning module: used to calculate the offset between the current position of the crane trolley and the center line of the container bay according to the characteristic points of the target marker; and to perform positioning according to the offset between the current position of the crane trolley and the center line of the container bay.
[0092] The above system embodiments and method embodiments correspond one to one, and for a brief description of the system embodiments, please refer to the method embodiments.
[0093] The present invention also discloses an electronic device, comprising: at least one processor, at least one memory, a communication interface and a bus; wherein the processor, memory, and communication interface communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the aforementioned method of the present invention.
[0094] The present invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to implement all or part of the steps of the method described in the embodiment of the present invention. The storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk, and other media that can store program codes.
[0095] The system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be distributed to multiple network units. A person skilled in the art may select some or all of the modules according to actual needs to achieve the purpose of the solution of this embodiment without creative effort.
[0096] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A crane trolley positioning method based on machine vision, It is characterized in that The method comprises: When the crane trolley is traveling, the camera is used to collect ground images with markers; Use deep learning methods to roughly locate the target marker area in the ground image with markers; The contour of the target marker is detected using Hough transform, and the geometric center of the contour of the target marker is used as the feature point of the target marker; Calculate the offset between the current position of the crane trolley and the center line of the container bay according to the characteristic points of the target marker; Positioning is performed based on the offset between the current position of the crane trolley and the center line of the container bay; The camera is arranged on the side of the crane trolley, and the marker is arranged along the outer side of the crane trolley runway, and the marker is ensured to be in the camera field of view. In the running direction of the trolley, the marker is arranged on the center line of the container bay; the marker includes a spike, a sticker or spray paint; Before collecting ground images with markers through cameras, the following steps are also included: Point the camera toward the ground with markers, and use Zhang Zhengyou's camera calibration method to obtain the camera's intrinsic parameter matrix, distortion coefficient, and posture information in a fixed state, and construct a mapping relationship between the two-dimensional coordinate points in the camera image and the coordinate points in the world coordinate system. The use of Hough transform to detect the contour of the target marker specifically includes: For circular markers, Hough transform detection is used to obtain the radius and center of the marker to obtain the initial contour. Hough transform is further used around the initial contour, and only contour points within a preset distance range along the first contour are used to perform Hough transform voting to obtain the contour of the target marker; For non-circular markers, the generalized Hough transform is used to extract the contour of the target marker; The calculation of the offset between the current position of the crane trolley and the center line of the container bay according to the characteristic points of the target marker specifically includes: The world coordinates of the marker and the reference point are calculated using the mapping relationship obtained by camera calibration, and the offset of the marker relative to the reference point is calculated based on the world coordinates of the marker and the reference point. The offset of the marker relative to the reference point is used as the offset between the current position of the crane trolley and the center line of the container bay; the reference point is the geometric center of the target marker detected when the crane trolley is located at the center of the bay; The method further comprises: Obtain the ambient light intensity through the light intensity sensor; When the ambient light is lower than the preset threshold at night, the target marker area is illuminated by the fill light; Under the complex sunlight conditions during the day, a two-step exposure time adjustment strategy is used to adjust the camera to a reliable exposure time under outdoor conditions to ensure that the target markers are clearly presented in the image; The two-step exposure time adjustment strategy is specifically implemented as follows: Determine whether the target marker detection in the previous frame is successful. If successful, continue with the following steps: A rectangular area is selected outside the target marker range, and the mean of the rectangular area image is calculated; if the mean is less than the first prior threshold range, it is considered that the target marker area is in an under-exposed state, and the camera exposure time is gradually increased; otherwise, the camera exposure time is gradually reduced until the camera exposure time is at a stable value, and the mean of the rectangular area image is within the first prior threshold range at the stable value; Select an area containing a target marker, calculate the gradient amplitude of the coordinates on the center line of the area image containing the target marker in the x direction, determine whether the gradient amplitudes on both sides of the marker reach a second priori threshold range, and if not, gradually increase or decrease the exposure time of the camera until the gradient amplitudes on both sides of the marker are within the second priori threshold range; If the target marker detection fails for several consecutive frames, the limit range of the camera exposure time is set according to the current ambient light lumen value, and the camera exposure time is searched cyclically from small to large until the target marker is stably detected and the local mean of the target marker is within the first prior threshold range.
2. A crane trolley position positioning system based on machine vision, which uses the crane trolley position positioning method based on machine vision according to claim 1, It is characterized in that The system comprises: Markers: set along the outside of the crane trolley runway, in the direction of the trolley running, and set on the center line of the container bay; Camera: It is installed on the side of the crane trolley and faces the ground with markers. It is used to collect images of the ground with markers when the crane trolley is moving. Fill light: used to fill light to the target marker area when the light intensity is lower than the preset threshold at night; Illuminance sensor: used to obtain ambient light illumination. In the case of complex sunlight during the day, a two-step exposure time adjustment strategy is used to adjust the camera to a reliable exposure time under outdoor conditions to ensure that the target marker is clearly presented in the image. Feature extraction module: used to roughly locate the target marker area in the ground image with markers using deep learning methods; use Hough transform to extract the contour of the target marker, and use the geometric center of the contour of the target marker as the feature point of the target marker; Trolley positioning module: used to calculate the offset between the current position of the crane trolley and the center line of the container bay according to the characteristic points of the target marker; and to perform positioning according to the offset between the current position of the crane trolley and the center line of the container bay.
3. An electronic device, It is characterized in that include: at least one processor, at least one memory, a communication interface, and a bus; Wherein, the processor, memory, and communication interface communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the method according to claim 1.
4. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions cause a computer to implement the method of claim 1.
Citation Information
Patent Citations
Accurate crane cart direction positioning system and method based on machine vision
CN107150954A