An image recognition method for an airport luggage cart robot

By collecting and processing ground images on an airport baggage cart robot, constructing a gradient vector field, filtering and statistically analyzing grid line information, and generating rotation control quantities, the problems of unstable positioning and false detection/missed detection in existing technologies are solved. This achieves high-precision positioning and path alignment, adapts to different lighting conditions and ground materials, and improves operational reliability and accuracy.

CN121747066BActive Publication Date: 2026-06-09PUTIAN RAIL TRANSIT TECH (SHANGHAI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PUTIAN RAIL TRANSIT TECH (SHANGHAI) CO LTD
Filing Date
2026-03-02
Publication Date
2026-06-09

Smart Images

  • Figure CN121747066B_ABST
    Figure CN121747066B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent mobile robot vision positioning and navigation control, and discloses an image recognition method for an airport luggage cart robot. A front ground image is collected, only the lower edge ground area is intercepted, and analysis pixels are obtained through preprocessing; a gradient vector field is constructed through horizontal and vertical gray scale difference in the area, effective gradient pixels are adaptively screened and directions are analyzed, a ground grid main direction is obtained; grid line pixels are extracted from the effective gradient pixels, density is adaptively calculated and block geometric centers are determined, a grid intersection set is formed, an intersection close to the front end of the robot is used to restore a current orientation angle, and the orientation angle is compared with the grid main direction to obtain an orientation error and a rotation control amount. Through the above processing, passenger and background interference is inhibited under complex illumination and tile conditions, ground grid structure is stably extracted, reliable orientation and rotation instructions are output, and the posture estimation and driving correction accuracy of the cart robot are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual positioning and navigation control technology for intelligent mobile robots, specifically an image recognition method for airport baggage cart robots. Background Technology

[0002] Airport tarmac waiting areas or baggage handling areas typically have regular grid lines or guide lines marked on the ground for baggage cart queue organization and traffic control. With the increasing demand for automation in airport baggage handling operations, baggage cart robots need to continuously identify the ground grid and complete planar positioning and driving direction alignment in open, highly reflective environments with dynamic pedestrian and vehicle traffic to ensure neat cart queues, prevent crossing lines, and improve scheduling efficiency. However, existing technologies still have insufficient adaptability in such scenarios.

[0003] Existing solutions for mobile device positioning and alignment mainly include: absolute positioning solutions based on satellite navigation or differential positioning, area positioning solutions based on radio beacons or RFID tags (such as UWB, RFID, Bluetooth beacons, etc.), SLAM solutions based on lidar or visual odometry, and visual positioning solutions based on artificial markers (such as QR codes, April Tags, reflective posts, etc.). Among these, satellite navigation is susceptible to obstruction, multipath reflection, and local electromagnetic environment around the tarmac, making it difficult to stably provide high-precision lateral deviation that meets the requirements of queue alignment; radio positioning requires additional infrastructure deployment and maintenance, and is affected by reflections from metal equipment and personnel obstruction, making it difficult to guarantee positioning accuracy and consistency; SLAM-like methods typically rely on rich and stable environmental features, and are prone to drift accumulation when large areas of ground texture are simple, markings are worn or obstructed, and they also consume a lot of computational resources, making it difficult to operate stably for a long time on lightweight trolley platforms; while artificial marker schemes can improve recognition certainty, they require additional modifications and deployments to the tarmac or waiting area, and are prone to degradation under high-frequency cleaning, rain and snow cover, tire tracks and oil pollution, leading to increased maintenance costs. Furthermore, existing visual recognition solutions for ground markings often employ threshold segmentation, edge detection, and line fitting. However, under conditions of alternating strong light and shadow, ground reflection glare, color differences in markings, and local damage, problems such as false detection, missed detection, or unstable main direction often occur. When it is necessary to recover the robot's pose from the grid lines and output angles and planar deviations that can be directly used for driving alignment, existing solutions often lack a deterministic computational link from pixel gradients to orientation statistics and then to grid intersection inference. This makes it difficult to maintain consistency in positioning results under different airport paving materials and different construction line widths, thereby affecting the reliability of cart queue organization and path alignment.

[0004] Therefore, this case aims to propose an image recognition method for airport baggage cart robots. First, an image of the ground in front of the robot is captured, and the image quality is improved through grayscale preprocessing and noise suppression. Then, a gradient vector field is constructed based on grayscale difference, and effective gradient pixels are quantitatively screened and directional partition statistics are performed to extract the main direction information. Next, local grid line pixels are extracted based on the main direction, the ground is divided into blocks for statistical analysis, and the geometric center of each block is estimated, ultimately forming a set of intersection points. Finally, the current orientation is calculated through sorting and geometric relationships, and rotation control variables are generated. Summary of the Invention

[0005] This invention provides an image recognition method for airport baggage cart robots, which helps to solve the problems mentioned in the background art above.

[0006] This invention provides the following technical solution: an image recognition method for airport baggage cart robots, comprising:

[0007] Acquire ground images from the front, establish a two-dimensional pixel coordinate system, crop the ground analysis area from the lower edge of the image, perform grayscale conversion and noise suppression on the pixels in the area, and form a set of pixels in the ground analysis area.

[0008] In the pixel set of the ground analysis area, the gradient magnitude and gradient direction angle are obtained based on the gray-level difference in the horizontal and vertical directions to construct the pixel gradient vector field.

[0009] Within the pixel gradient vector field, effective gradient pixels are selected based on the average gradient magnitude threshold. Their gradient direction angles are normalized and divided into direction intervals. The number of effective gradient pixels in each interval is counted.

[0010] Select the directional interval with the largest number of effective gradient pixels, determine the main directional angle of the ground grid, set the directional allowable bandwidth near the main directional angle, and obtain the set of allowable directional angles;

[0011] Filter out grid line pixels whose orientation angles belong to the set of permissible orientation angles from the effective gradient pixels, divide the rectangular block region according to the block step size and calculate the grid line pixel density of each block.

[0012] The effective set of ground blocks is obtained based on the grid line pixel density, the geometric center of the grid line pixels of each effective block is calculated, and the set of grid intersection points is formed.

[0013] Sort the set of grid intersections according to the vertical coordinate, select multiple grid intersections close to the front of the luggage cart robot, and obtain the current orientation angle based on the geometric relationship between adjacent grid intersections;

[0014] The current orientation angle is compared with the main orientation angle of the ground grid to obtain the orientation error angle, and the plane rotation direction and rotation arc length are generated accordingly, which serve as the rotation control quantity for orientation correction.

[0015] Optionally, the step of acquiring a ground image in front, establishing a two-dimensional pixel coordinate system, cropping a ground analysis region at the lower edge of the image, and performing grayscale conversion and noise suppression on the region pixels to form a set of ground analysis region pixels specifically includes:

[0016] An image acquisition device is set at the front end of the luggage cart robot, and a resolution configuration is set that is determined by the total number of pixels in the horizontal direction and the total number of pixels in the vertical direction of the image, and image frames containing the ground area are continuously acquired.

[0017] A two-dimensional pixel coordinate system is established on each frame of the image. The pixel at the top left corner of the image is set as the origin of the coordinate system. The horizontal coordinate is set to increase in the horizontal direction of the image, and the vertical coordinate is set to increase in the vertical direction of the image, so that each pixel has a unique horizontal and vertical coordinate in the two-dimensional pixel coordinate system.

[0018] In each frame of the image, a unique two-dimensional index is assigned to each pixel based on the horizontal and vertical coordinates. A gray-level matrix is ​​constructed that corresponds one-to-one with the two-dimensional index. Each element in the gray-level matrix records the gray value of the corresponding pixel, forming a complete gray-level representation of the image.

[0019] A preset vertical scaling parameter for the ground analysis region is set, and the height of the ground analysis region in the vertical direction is set to half the height of the entire image. In each frame of the image, a region located at the lower edge of the image that meets the height requirement of half the height of the entire image is selected. The two-dimensional index and grayscale value of all pixels in the region located at the lower edge of the image that meets the height requirement of half the height of the entire image are used to form the pixel set of the ground analysis region.

[0020] Optionally, the step of obtaining the gradient magnitude and gradient direction angle based on the gray-level difference in the horizontal and vertical directions within the pixel set of the ground analysis area, and constructing a pixel gradient vector field, specifically includes:

[0021] In the pixel set of the ground analysis area, for pixels located inside the ground analysis area and having adjacent pixels on the left and right, and on the top and bottom in both the horizontal and vertical directions, the grayscale difference of the current pixel in the horizontal direction is calculated as the grayscale value of the right adjacent pixel minus the grayscale value of the left adjacent pixel, and the grayscale difference in the vertical direction is calculated as the grayscale value of the bottom adjacent pixel minus the grayscale value of the top adjacent pixel.

[0022] For edge pixels in the ground analysis area that do not simultaneously have left-right and top-bottom adjacent pixels, set all horizontal and vertical grayscale differences of the edge pixels to zero.

[0023] For all pixels within the ground analysis area, square the horizontal and vertical gray-level differences respectively, sum them up, and then perform a square root operation on the sum to obtain the gradient magnitude of each pixel.

[0024] For all pixels within the ground analysis area, the basic gradient direction angle is calculated using the arctangent function based on the ratio of the gray-level difference in the vertical direction to the gray-level difference in the horizontal direction. The basic gradient direction angle is then corrected according to the quadrant relationship to obtain the gradient direction angle within the range of 0 degrees to 180 degrees, thereby constructing the pixel gradient vector field.

[0025] Optionally, the step of selecting effective gradient pixels within the pixel gradient vector field based on the average gradient magnitude threshold, normalizing their gradient direction angles, dividing them into direction intervals, and counting the number of effective gradient pixels in each interval specifically includes:

[0026] The gradient magnitude of all pixels in the pixel set of the ground analysis area is counted. The average gradient magnitude is obtained by summing the gradient magnitudes of each pixel and dividing by the number of pixels in the pixel set of the ground analysis area.

[0027] In the pixel set of the ground analysis area, construct an effective gradient pixel set. When the average gradient magnitude is greater than zero, include pixels with gradient magnitudes not less than the average gradient magnitude in the effective gradient pixel set. When the average gradient magnitude is equal to zero, include pixels with gradient magnitudes greater than zero in the effective gradient pixel set.

[0028] For each pixel in the set of valid gradient pixels, normalization is performed on the gradient direction angle to map all gradient direction angles to the range of 0 degrees to 180 degrees.

[0029] The preset number of direction intervals is eighteen. The direction angle range from 0 degrees to 180 degrees is divided into eighteen adjacent non-overlapping direction intervals with equal angular spans, forming a direction interval sequence.

[0030] For each directional interval, count the number of effective gradient pixels entering the corresponding directional interval from the normalized directional corner, and construct a directional density counting sequence.

[0031] Optionally, the step of selecting the directional interval with the largest number of effective gradient pixels, determining the main directional angle of the ground grid, and setting the directional allowable bandwidth near the main directional angle to obtain the set of allowable directional angles specifically includes:

[0032] Find the direction interval with the largest number of effective gradient pixels in the direction density counting sequence, and record the direction interval number corresponding to the direction interval with the largest number of effective gradient pixels as the main direction interval number.

[0033] Calculate the main direction angle of the ground grid based on the main direction interval number and the angle span of a single direction interval, so that the main direction angle of the ground grid is located at the angle center of the main direction interval;

[0034] The allowable bandwidth of a direction is set according to the angle span of a single direction interval, so that the allowable bandwidth of the direction is not greater than half of the angle span of a single direction interval;

[0035] Establish an angular distance judgment rule: when the difference between two angles is less than or equal to half a circle, the absolute value of the difference is taken as the angular distance; when the difference between two angles is greater than half a circle, the absolute value of half a circle minus the difference is taken as the angular distance.

[0036] Each direction angle in the range of 0 degrees to 180 degrees is used as a candidate direction angle for traversal. For each candidate direction angle, the angular distance between the candidate direction angle and the main direction angle of the ground grid is calculated according to the angular distance judgment rule. When the angular distance is not greater than the allowable directional bandwidth, the candidate direction angle is added to the allowable direction angle set to form the allowable direction angle set.

[0037] Optionally, the step of filtering out gridline pixels whose orientation angles belong to the set of permissible orientation angles from the effective gradient pixels, dividing the rectangular block region according to the block step size, and calculating the gridline pixel density of each block specifically includes:

[0038] In the effective gradient pixel set, pixels whose gradient direction angle belongs to the allowable direction angle set are selected to form the grid line pixel set, so that the gradient direction angle in the grid line pixel set maintains a limited deviation from the main direction angle of the ground grid.

[0039] The number of pixels in the ground analysis area is obtained in the horizontal and vertical directions. When the number of pixels in the horizontal direction is less than the number of pixels in the vertical direction, the number of pixels in the horizontal direction is used as the reference number. When the number of pixels in the horizontal direction is greater than or equal to the number of pixels in the vertical direction, the number of pixels in the vertical direction is used as the reference number. An integer division operation with 25 as the divisor is performed on the reference number of pixels, and the remainder is ignored to obtain the intermediate value of the block step size. When the intermediate value of the block step size is greater than or equal to one pixel, the intermediate value of the block step size is used as the block step size. When the intermediate value of the block step size is equal to zero pixels, the block step size is set to one pixel.

[0040] Based on the block step size and the number of pixels in the ground analysis area in the horizontal and vertical directions, the number of blocks in the horizontal direction and the number of blocks in the vertical direction are calculated respectively. The calculation method is to add the value of the block step size minus one to the number of pixels in the corresponding direction and perform an integer division operation to obtain the number of blocks in the corresponding direction.

[0041] For each pair of horizontal and vertical block numbers, a rectangular block area is defined in the ground analysis area according to the block step size. Each rectangular block area starts from the starting position of the corresponding block number in the horizontal direction and extends by one block step size or to the boundary of the ground analysis area. The same method is used in the vertical direction to form a multi-group two-dimensional index set covering the ground analysis area.

[0042] For each block of two-dimensional index set:

[0043] The number of pixels belonging to the pixel set of the ground analysis area within the statistical set is used as the number of ground pixels in the corresponding block;

[0044] The number of pixels belonging to the grid line pixel set within the count set is calculated. When the number of ground pixels in the corresponding block is greater than zero, the number of grid line pixels is divided by the number of ground pixels in the corresponding block to obtain the grid line pixel density of the corresponding block. When the number of ground pixels in the corresponding block is equal to zero, the grid line pixel density of the corresponding block is set to zero.

[0045] Optionally, the step of obtaining the effective ground block set based on grid line pixel density, calculating the geometric center of each effective block grid line pixel, and forming a grid intersection point set of intersection points specifically includes:

[0046] Traverse all blocks, determine whether the corresponding block contains a grid structure based on the grid line pixel density of each block, and when the grid line pixel density is greater than zero, record the corresponding block as a valid ground block and count the number of valid ground blocks.

[0047] When the number of effective ground blocks is greater than zero, for all blocks with grid line pixel density greater than zero, the grid line pixel density of each block is added together and then divided by the number of effective ground blocks to obtain the average grid line pixel density; when the number of effective ground blocks is equal to zero, the average grid line pixel density is set to zero.

[0048] For each block, select gridline pixels belonging to the two-dimensional index set of the corresponding block from the gridline pixel set to form a gridline pixel subset for the corresponding block;

[0049] For each block, when the grid line pixel density of the corresponding block is not less than the average grid line pixel density and the grid line pixel subset contains at least one pixel, the horizontal coordinates of all pixels in the grid line pixel subset of the corresponding block are summed and divided by the number of pixels in the subset to obtain the horizontal geometric center coordinates of the candidate intersection point, and the vertical coordinates are summed and divided by the number of pixels in the subset to obtain the vertical geometric center coordinates of the candidate intersection point.

[0050] The geometric center coordinates of all candidate intersection points that meet the density condition and have completed the geometric center calculation are combined into a grid intersection set. The number of elements in the grid intersection set is counted to obtain the number of grid intersection points. The number of grid intersection points is used as the quantitative parameter for the subsequent calculation of the current orientation angle and orientation error of the luggage cart robot.

[0051] Optionally, the step of sorting the set of grid intersections by vertical coordinate, selecting multiple grid intersections close to the front end of the luggage cart robot, and obtaining the current orientation angle based on the geometric relationship between adjacent grid intersections specifically includes:

[0052] In the set of grid intersections, when the number of grid intersections is greater than or equal to one, all grid intersections are sorted according to their vertical coordinates from smallest to largest. When there are grid intersections with the same vertical coordinate, they are then sorted according to their horizontal coordinates from smallest to largest to obtain an ordered sequence of grid intersections.

[0053] When the number of grid intersections is greater than or equal to one, each grid intersection in the sorted ordered grid intersection sequence is assigned a sequential index, and the horizontal and vertical coordinates of each grid intersection are recorded to form grid intersection data with sequential information.

[0054] When the number of grid intersections is greater than or equal to three, the first, second, and third grid intersections are selected from the ordered grid intersection sequence as the set of grid intersections for the current frame to participate in the orientation calculation; when the number of grid intersections is less than three, the orientation angle calculation of the luggage cart robot is not performed, and no rotation control quantity is generated.

[0055] When the number of grid intersections is greater than or equal to three, take the first grid intersection as the starting point and the third grid intersection as the ending point, calculate the horizontal coordinate of the ending point minus the horizontal coordinate of the starting point to obtain the horizontal component of the composite direction, and calculate the vertical coordinate of the ending point minus the vertical coordinate of the starting point to obtain the vertical component of the composite direction.

[0056] When the number of grid intersections is greater than or equal to three, the basic orientation angle is calculated by using the arctangent function based on the ratio of the longitudinal component to the transverse component of the composite direction, and the basic orientation angle is corrected according to the quadrant relationship to obtain the current orientation angle of the luggage cart robot.

[0057] Optionally, the step of comparing the current orientation angle with the principal orientation angle of the ground grid to obtain the orientation error angle, and generating the planar rotation direction and rotation arc length accordingly as the rotation control quantity for orientation correction, specifically includes:

[0058] When the number of grid intersections is three or more, calculate the original orientation difference between the current orientation angle of the luggage cart robot and the main orientation angle of the ground grid; when the number of grid intersections is less than three, set the original orientation difference to zero.

[0059] When the number of grid intersections is greater than or equal to three, the original orientation difference is added to the half-circle angle, and an integer division operation is performed using the whole circle angle as the divisor, ignoring the remainder of the division, to obtain the orientation normalized integer variable;

[0060] When the number of grid intersections is greater than or equal to three, the product of the integer angle and the orientation normalized integer variable is subtracted from the original orientation difference to obtain the intermediate angle difference within a range of an integer angle.

[0061] When the number of grid intersections is three or more, the orientation error angle for rotation correction is obtained based on the magnitude of the intermediate angle difference: when the intermediate angle difference is greater than half of the half-circle angle, the orientation error angle is obtained by subtracting half of the half-circle angle from the intermediate angle difference; when the intermediate angle difference is less than half of the negative half-circle angle, the orientation error angle is obtained by adding half of the half-circle angle to the intermediate angle difference; when the absolute value of the intermediate angle difference is not greater than half of the half-circle angle, the intermediate angle difference is directly used as the orientation error angle; when the number of grid intersections is less than three, the orientation error angle is set to zero.

[0062] When the number of grid intersections is greater than or equal to three, the rotation arc length required to eliminate the orientation error is calculated based on the absolute value of the orientation error angle and the equivalent rotation radius of the luggage cart robot. When the number of grid intersections is less than three, the rotation arc length is set to zero.

[0063] When the number of grid intersections is three or more, the rotation direction is set to left when the orientation error angle is positive; the rotation direction is set to right when the orientation error angle is negative; no rotation is performed when the orientation error angle is zero; and no rotation is performed when the number of grid intersections is less than three.

[0064] Based on the total number of pixels in the horizontal direction and the total number of pixels in the vertical direction of the image, the horizontal coordinate of the reference pixel is calculated by adding one to the total number of pixels in the horizontal direction and dividing by two. The vertical coordinate of the reference pixel is calculated by adding one to the total number of pixels in the vertical direction of the image. The coordinates of the reference pixel are used as the reference position for the pose evaluation of the luggage cart robot.

[0065] When the number of grid intersections is greater than or equal to one, traverse the set of grid intersections, calculate the squared Euclidean distance between each grid intersection and the reference pixel, and take the grid intersection with the smallest squared distance as the nearest grid intersection.

[0066] When the number of grid intersections is greater than or equal to one, the horizontal position deviation is obtained by subtracting the horizontal coordinate of the nearest grid intersection from the horizontal coordinate of the reference pixel, and the vertical position deviation is obtained by subtracting the vertical coordinate of the nearest grid intersection from the vertical coordinate of the reference pixel; when the number of grid intersections is zero, both the horizontal and vertical position deviations are set to zero.

[0067] The present invention has the following beneficial effects:

[0068] 1. First, a camera is fixed at the robot's front end, and a unified two-dimensional pixel coordinate system is established on the entire image. Only the lower half of the image, near the bottom edge, is cropped as the ground analysis region. Directly cropping the lower half excludes non-ground targets at the image source, allowing subsequent calculations to focus on the truly navigation-related ground area and reducing the false detection rate. By binding each pixel to a unified horizontal and vertical index and constructing a grayscale matrix, a unified index space is provided for subsequent gradient calculations, block statistics, and intersection localization, ensuring a one-to-one correspondence between geometric relationships and pixel relationships, reducing coordinate transformation errors. Using a fixed-ratio cropping method instead of relying on scene distance estimation avoids the instability in region selection caused by changes in camera mounting height or terrain undulations, simplifying system calibration.

[0069] 2. Within the ground analysis area, this scheme calculates the gray-level difference in the horizontal and vertical directions for each internal pixel, thereby obtaining the gradient magnitude and gradient direction angle of that pixel. Boundary pixels have their gradients uniformly set to zero to avoid out-of-bounds access and the influence of pseudo-gradients. Compared to directly finding grid lines based on color or brightness thresholds, the gradient method specifically amplifies locations with significant gray-level changes, enabling it to more sensitively capture fine line structures such as brick seams and joints in the ground grid. It has lower requirements for illumination uniformity and is more adaptable to changes in ground material. By simultaneously considering gray-level changes in both the horizontal and vertical directions and combining them into gradient magnitude and direction angle, both the intensity and direction of change information are obtained, providing a rich statistical basis for subsequent main direction identification and direction selection.

[0070] 3. This scheme first averages all gradient magnitudes across the entire ground analysis area to obtain an adaptive intensity benchmark. Then, it dynamically selects the set of effective gradient pixels based on this average value. When the average value is greater than zero, pixels with magnitudes not less than the average value are retained; when the average value is zero, only pixels with magnitudes greater than zero are retained. This adaptive threshold mechanism based on overall statistics avoids the common problem of difficulty in balancing different lighting conditions and different tile materials when manually setting a fixed threshold. Subsequently, the orientation angles of the effective gradient pixels are normalized, mapping the orientations to the same angular interval, and then dividing the interval into several directional intervals at equal angles. The number of effective gradient pixels in each interval is counted to form a directional density distribution. This scheme reduces the number of pixels involved in the statistics and lowers the computational load by first selecting representative gradients and then performing directional discrete statistics. The statistical results are more focused on the true grid line directions, enhancing the suppression of noise edges and local textures, thus laying a reliable data foundation for the robust determination of the subsequent main direction.

[0071] 4. This scheme selects the directional interval with the largest number of effective gradient pixels from the directional density distribution as the main directional interval, and calculates the center angle of this interval as the main directional angle of the ground grid. Then, based on the angular span of the directional interval, a directional allowable bandwidth not exceeding half of that span is set, and a judgment rule based on periodic angular distance is constructed. The entire angular space is considered as a circle with its ends connected. For each candidate directional angle, the shortest arc distance to the main directional angle is calculated. As long as this distance does not exceed the allowable bandwidth, the directional angle is included in the allowable direction set. Here, the circumferential angular distance uniformly considers the angle overflow problem, avoiding situations where the same physical direction has a large numerical difference near zero degrees and near whole circumferences, making the main direction recognition truly reflect the periodic nature of the direction. By setting a reasonable allowable bandwidth, this scheme allows the main direction to be not only reflected in a single angle, but also extended to a set of directions, compatible with slightly deflected grid lines and ground conditions with slight paving errors, improving the algorithm's adaptability to construction errors, camera attitude deviations, and slight terrain changes.

[0072] 5. Among the effective gradient pixels, pixels whose gradient directions belong to the set of permissible orientation angles are further selected to form the grid line pixel set, i.e., those pixels that are truly distributed along the grid line direction. Then, based on the size of the ground analysis area, the block step size is adaptively calculated, dividing the ground analysis area into several rectangular blocks. In each block, the number of ground pixels and the number of grid line pixels are counted to obtain the block-level grid line pixel density. An adaptive block step size related to the image size is used to ensure that the blocks are not too large and lose local information on high-resolution images, while avoiding excessive subdivision leading to sparse samples at low resolutions, making the algorithm highly versatile across different camera configurations. Using grid line pixel density rather than absolute pixel count as the criterion eliminates the influence of changes in line segment length caused by local illumination, ground reflection, or partial occlusion on block evaluation, focusing more on the geometric essence of whether the grid structure is obvious. Compared to the traditional method of directly searching for long straight lines or intersections on the entire image, this approach first performs block density evaluation, which can effectively shield strong gradient interference caused by non-grid lines such as local stains, reflections, and water stains. Geometric center estimation is only performed in areas with higher density, thus concentrating computational resources on candidate intersection areas rich in structural information.

[0073] 6. This scheme first calculates the pixel density of each grid line in the previous stage, counts the number of all blocks with a density greater than zero, and averages the density of these blocks to form a reference density value representing the overall grid clarity. Then, within each block, a subset of grid line pixels is constructed, and only for those blocks whose density is not lower than the average density and whose subset contains a non-zero number of pixels, the average horizontal and vertical coordinates of their grid line pixels are calculated as the geometric center of the candidate intersection point for that block. Finally, all geometric centers that meet the conditions are combined into a grid intersection point set, and the number of grid intersection points is counted to provide geometric anchor points for subsequent orientation and error calculations. This scheme, by utilizing block statistics and density thresholds, compresses the area requiring geometric center calculation, focusing attention on local areas with stable and clear grid line distribution, naturally weakening the influence of isolated line segments, broken brick joints, and noisy edges. Meanwhile, defining the intersection point as the average of the pixel coordinates of the grid lines within the block, rather than a single edge point, allows for more robust intersection point estimation under conditions of local wear and occlusion. This improves the temporal stability and spatial geometric consistency of the intersection point set, thereby enhancing the reliability of robot pose estimation.

[0074] 7. The current orientation angle calculation first sorts the set of intersection points based on their vertical coordinates. If the vertical coordinates are the same, they are then sorted horizontally, thus constructing an ordered sequence of intersection points that considers the front-to-back positional relationships. Subsequently, to ensure that the orientation estimation primarily reflects the geometry near the robot's forward direction, only the three intersection points closest to the robot are selected when the number of intersection points is sufficient. A composite direction is constructed based on the geometric relationship between these three intersection points, and the robot's current orientation angle is calculated based on the horizontal and vertical components of this composite direction. Using only a small number of intersection points near the robot's front avoids orientation deviations caused by perspective distortion and depth errors at distant intersection points, resulting in a more accurate representation of the robot's actual driving direction. By sorting and selecting a fixed number of intersection points, rather than arbitrarily choosing three, the orientation estimation becomes repeatable and stable, reducing uncertainty caused by variations in the number of intersection points. Compared to the traditional method of calculating heading based on accumulated wheel speed and turning angle, this scheme re-estimates the orientation each frame using the ground grid geometry, without relying on historical integrals. This effectively suppresses the divergence of small errors over time, improving heading accuracy during long-term operation.

[0075] 8. In the final stage of orientation error and control quantity generation, this scheme first calculates the difference between the current orientation angle and the main direction angle of the ground grid to obtain the original difference angle. Then, it maps this difference to a minimum directional angle range with a period of integer revolutions using a periodic normalization method, ensuring that the error angle always represents the shortest rotation from the current orientation to the target direction. Based on this, the final orientation error angle used for correction is constructed, and combined with the robot's equivalent rotation radius, the required rotation arc length to eliminate the error is calculated. Simultaneously, the left or right rotation direction is determined based on the sign of the error angle. If the number of grid intersections is insufficient, the error angle and arc length are automatically cleared to zero to avoid generating erroneous control commands when there is a lack of geometric basis. Furthermore, this scheme defines a fixed reference pixel position in the image and finds the grid intersection closest to the reference pixel in the intersection point set. The difference between their horizontal and vertical coordinates is used as the planar position deviation, which is equivalent to providing the robot with an estimate of the horizontal and vertical offset relative to the ground grid intersection. Compared to traditional solutions that adjust the turning angle based solely on heading error while ignoring lateral and longitudinal positional deviations, this solution simultaneously addresses both orientation and positional errors. This not only ensures the robot's final orientation aligns with the grid but also gradually pulls the robot back to the vicinity of the grid intersections, reducing accumulated lateral drift and longitudinal docking errors. Consequently, in scenarios like airports where neat parking and strict safety distances are required, this solution improves the docking accuracy and path repeatability of baggage carts. Attached Figure Description

[0076] Figure 1 This is a schematic diagram of the process of the present invention.

[0077] Figure 2 This is a schematic diagram of the two-dimensional pixel coordinate system structure of the present invention. Detailed Implementation

[0078] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0079] Example, refer to Figure 1 An image recognition method for an airport baggage cart robot includes:

[0080] Acquire ground images from the front, establish a two-dimensional pixel coordinate system, crop the ground analysis area from the lower edge of the image, perform grayscale conversion and noise suppression on the pixels in the area, and form a set of pixels in the ground analysis area.

[0081] In the pixel set of the ground analysis area, the gradient magnitude and gradient direction angle are obtained based on the gray-level difference in the horizontal and vertical directions to construct the pixel gradient vector field.

[0082] Within the pixel gradient vector field, effective gradient pixels are selected based on the average gradient magnitude threshold. Their gradient direction angles are normalized and divided into direction intervals. The number of effective gradient pixels in each interval is counted.

[0083] Select the directional interval with the largest number of effective gradient pixels, determine the main directional angle of the ground grid, set the directional allowable bandwidth near the main directional angle, and obtain the set of allowable directional angles;

[0084] Filter out grid line pixels whose orientation angles belong to the set of permissible orientation angles from the effective gradient pixels, divide the rectangular block region according to the block step size and calculate the grid line pixel density of each block.

[0085] The effective set of ground blocks is obtained based on the grid line pixel density, the geometric center of the grid line pixels of each effective block is calculated, and the set of grid intersection points is formed.

[0086] Sort the set of grid intersections according to the vertical coordinate, select multiple grid intersections close to the front of the luggage cart robot, and obtain the current orientation angle based on the geometric relationship between adjacent grid intersections;

[0087] The current orientation angle is compared with the main orientation angle of the ground grid to obtain the orientation error angle, and the plane rotation direction and rotation arc length are generated accordingly, which serve as the rotation control quantity for orientation correction.

[0088] By cropping the ground analysis region at the lower edge of the image and performing grayscale conversion and noise suppression, interference from irrelevant information such as passengers and background structures is avoided, allowing subsequent gradient calculations to focus on the real grid texture and improving recognition robustness from the source. Within this region, a pixel gradient vector field is constructed using grayscale differences in the horizontal and vertical directions. This preserves the distinct features of the grid lines in grayscale space and provides grid line direction information, offering rich and accurate basic data for direction statistics. Compared to existing methods that rely solely on edge detection or Hough transform, the gradient vector field method is more adaptable to ambient lighting and less susceptible to interference from shadows or reflections. Effective gradient pixels are adaptively selected using a global gradient magnitude average threshold, and their direction angles are normalized and divided into intervals. Direction density is statistically analyzed to adaptively distinguish the most representative grid directions. This innovative approach utilizes the overall gradient intensity of pixels within the region to determine the threshold, solving the problem of simple fixed thresholds failing under different tile materials or lighting conditions. The fourth step selects the direction interval with the highest density and sets the bandwidth range to form a set of permissible orientation angles. This allows the algorithm to not only capture the main direction of the grid but also take into account multiple similar grid lines caused by minor deviations, enhancing its compatibility with construction errors or minor ground tilts. Further extraction of real grid line pixels from effective gradient pixels is performed, and adaptive block division and density calculation are conducted on the ground area to mask sparse or locally noisy edges, achieving a quantitative assessment of the local grid structure. Unlike existing methods based on full-image random sampling or large-scale line detection, block density calculation reduces computational load and focuses on the most structurally significant areas. Effective ground blocks are selected based on density thresholds, and the geometric center of their grid line pixels is calculated. The coordinates of the intersection points located at the block centers are determined in an average manner that minimizes the influence of outliers, providing high-precision geometric markers for subsequent orientation recovery. By sorting all intersection points vertically and taking several points at the front, the robot's current orientation is recovered based on the geometric relationships between these points. This discards possible intersection anomalies from distant or visual edges while fully utilizing the stable and evenly distributed front-end grid intersection points, ensuring accurate orientation estimation for each frame. The current orientation is subtracted from the main direction of the grid and normalized to the shortest rotation angle. Then, the rotation direction and arc length control quantities are generated by combining the robot's equivalent rotation radius, thus realizing vision-based closed-loop orientation correction.

[0089] Reference Figure 2 The process of acquiring a ground image in front, establishing a two-dimensional pixel coordinate system, cropping a ground analysis region at the lower edge of the image, and performing grayscale conversion and noise suppression on the pixels in the region to form a set of pixels for the ground analysis region specifically includes:

[0090] An image acquisition device is set at the front end of the luggage cart robot, and a resolution configuration is set that is determined by the total number of pixels in the horizontal direction and the total number of pixels in the vertical direction of the image, and image frames containing the ground area are continuously acquired.

[0091] A two-dimensional pixel coordinate system is established on each frame of the image. The pixel at the top left corner of the image is set as the origin of the coordinate system. The horizontal coordinate is set to increase in the horizontal direction of the image, and the vertical coordinate is set to increase in the vertical direction of the image, so that each pixel has a unique horizontal and vertical coordinate in the two-dimensional pixel coordinate system.

[0092] In each frame of the image, a unique two-dimensional index is assigned to each pixel based on the horizontal and vertical coordinates. A gray-level matrix is ​​constructed that corresponds one-to-one with the two-dimensional index. Each element in the gray-level matrix records the gray value of the corresponding pixel, forming a complete gray-level representation of the image.

[0093] A preset vertical scaling parameter for the ground analysis region is set, and the height of the ground analysis region in the vertical direction is set to half the height of the entire image. In each frame of the image, a region located at the lower edge of the image that meets the height requirement of half the height of the entire image is selected. The two-dimensional index and grayscale value of all pixels in the region located at the lower edge of the image that meets the height requirement of half the height of the entire image are used to form the pixel set of the ground analysis region.

[0094] An image acquisition device is installed at the front of the luggage cart robot, and the image resolution is set to... ;in, , These represent the total number of pixels in the horizontal and vertical directions of the image, respectively.

[0095] Establish a two-dimensional coordinate system on the image Set the top left corner of the image as the origin. , The positive direction is to the right along the horizontal axis. The positive direction is when the axis points vertically downwards.

[0096] At any given moment, construct a grayscale matrix from the acquired image:

[0097] , , ;in, For pixel index is The grayscale value at the location; Horizontal numbering for pixel indices; Vertical indexing for pixels;

[0098] The longitudinal scaling constant used to extract the ground analysis area is taken as ;

[0099] Constructing the pixel set of the ground analysis region Specifically:

[0100] .

[0101] In the pixel set of the ground analysis area, the gradient magnitude and gradient direction angle are obtained based on the gray-level difference in the horizontal and vertical directions to construct a pixel gradient vector field, specifically including:

[0102] In the pixel set of the ground analysis area, for pixels located inside the ground analysis area and having adjacent pixels on the left and right, and on the top and bottom in both the horizontal and vertical directions, the grayscale difference of the current pixel in the horizontal direction is calculated as the grayscale value of the right adjacent pixel minus the grayscale value of the left adjacent pixel, and the grayscale difference in the vertical direction is calculated as the grayscale value of the bottom adjacent pixel minus the grayscale value of the top adjacent pixel.

[0103] For edge pixels in the ground analysis area that do not simultaneously have left-right and top-bottom adjacent pixels, set all horizontal and vertical grayscale differences of the edge pixels to zero.

[0104] For all pixels within the ground analysis area, square the horizontal and vertical gray-level differences respectively, sum them up, and then perform a square root operation on the sum to obtain the gradient magnitude of each pixel.

[0105] For all pixels within the ground analysis area, the basic gradient direction angle is calculated using the arctangent function based on the ratio of the gray-level difference in the vertical direction to the gray-level difference in the horizontal direction. The basic gradient direction angle is then corrected according to the quadrant relationship to obtain the gradient direction angle within the range of 0 degrees to 180 degrees, thereby constructing the pixel gradient vector field.

[0106] To satisfy , of The grayscale difference in the horizontal and vertical directions is calculated separately as follows: , ;in, , pixels Horizontal and vertical grayscale differences at the location;

[0107] For not satisfied or of Assignment:

[0108] , ;

[0109] In all Calculate the gradient magnitude Specifically:

[0110] ;

[0111] Perform steps S201 to S206 in all Calculate the gradient direction angle above:

[0112] S201, when season: ;in, For in pixels The gradient direction angle at that location;

[0113] S202, when , season:

[0114] ;

[0115] S203, when , season:

[0116] ;

[0117] S204, when , season: ;

[0118] S205, when , season: ;

[0119] S206, when , season: .

[0120] Within the pixel gradient vector field, effective gradient pixels are selected based on the average gradient magnitude threshold. Their gradient direction angles are normalized and divided into direction intervals. The number of effective gradient pixels in each interval is then counted. Specifically, this includes:

[0121] The gradient magnitude of all pixels in the pixel set of the ground analysis area is counted. The average gradient magnitude is obtained by summing the gradient magnitudes of each pixel and dividing by the number of pixels in the pixel set of the ground analysis area.

[0122] In the pixel set of the ground analysis area, construct an effective gradient pixel set. When the average gradient magnitude is greater than zero, include pixels with gradient magnitudes not less than the average gradient magnitude in the effective gradient pixel set. When the average gradient magnitude is equal to zero, include pixels with gradient magnitudes greater than zero in the effective gradient pixel set.

[0123] For each pixel in the set of valid gradient pixels, normalization is performed on the gradient direction angle to map all gradient direction angles to the range of 0 degrees to 180 degrees.

[0124] The preset number of direction intervals is eighteen. The direction angle range from 0 degrees to 180 degrees is divided into eighteen adjacent non-overlapping direction intervals with equal angular spans, forming a direction interval sequence.

[0125] For each directional interval, count the number of effective gradient pixels entering the corresponding directional interval from the normalized directional corner, and construct a directional density counting sequence.

[0126] Computational area Average gradient magnitude of all pixels within the range Specifically:

[0127] ;in, This is a base function for a set; the input is a set, and the output is the number of elements in the set.

[0128] Construct a set of effective gradient pixels Specifically

[0129] ;

[0130] For all The normalized direction angle is calculated as follows:

[0131] ;in, To be Normalization to interval Direction angle;

[0132] Set the number of direction intervals to ;

[0133] The construction direction interval is: , ;in, For the first One directional interval; Number the direction interval;

[0134] The directional density function is constructed as follows: ;in, For the first Count of effective gradient pixels within each directional interval; This is an indicator function. The input is a logical proposition. It takes the value 1 if the logical proposition is true, and 0 otherwise.

[0135] The process of selecting the directional interval with the largest number of effective gradient pixels, determining the main directional angle of the ground grid, and setting the directional allowable bandwidth near the main directional angle to obtain the set of allowable directional angles specifically includes:

[0136] Find the direction interval with the largest number of effective gradient pixels in the direction density counting sequence, and record the direction interval number corresponding to the direction interval with the largest number of effective gradient pixels as the main direction interval number.

[0137] Calculate the main direction angle of the ground grid based on the main direction interval number and the angle span of a single direction interval, so that the main direction angle of the ground grid is located at the angle center of the main direction interval;

[0138] The allowable bandwidth of a direction is set according to the angle span of a single direction interval, so that the allowable bandwidth of the direction is not greater than half of the angle span of a single direction interval;

[0139] Establish an angular distance judgment rule: when the difference between two angles is less than or equal to half a circle, the absolute value of the difference is taken as the angular distance; when the difference between two angles is greater than half a circle, the absolute value of half a circle minus the difference is taken as the angular distance.

[0140] Each direction angle in the range of 0 degrees to 180 degrees is used as a candidate direction angle for traversal. For each candidate direction angle, the angular distance between the candidate direction angle and the main direction angle of the ground grid is calculated according to the angular distance judgment rule. When the angular distance is not greater than the allowable directional bandwidth, the candidate direction angle is added to the allowable direction angle set to form the allowable direction angle set.

[0141] Acquisition The direction interval where the maximum value is obtained is numbered as follows: ;

[0142] The principal direction angle of the ground grid lines is calculated as follows: ;

[0143] Set the directional allowable bandwidth to ;

[0144] Build with Angular distance function with periodicity Specifically:

[0145] ;in, , The book inputs the angle variable;

[0146] The set of permissible orientation angles is constructed as follows: ;in, For set Element variables.

[0147] The process of filtering out gridline pixels whose orientation angles belong to the set of permissible orientation angles from the effective gradient pixels, dividing the region into rectangular blocks according to the block step size, and calculating the gridline pixel density of each block specifically includes:

[0148] In the effective gradient pixel set, pixels whose gradient direction angle belongs to the allowable direction angle set are selected to form the grid line pixel set, so that the gradient direction angle in the grid line pixel set maintains a limited deviation from the main direction angle of the ground grid.

[0149] The number of pixels in the ground analysis area is obtained in the horizontal and vertical directions. When the number of pixels in the horizontal direction is less than the number of pixels in the vertical direction, the number of pixels in the horizontal direction is used as the reference number. When the number of pixels in the horizontal direction is greater than or equal to the number of pixels in the vertical direction, the number of pixels in the vertical direction is used as the reference number. An integer division operation with 25 as the divisor is performed on the reference number of pixels, and the remainder is ignored to obtain the intermediate value of the block step size. When the intermediate value of the block step size is greater than or equal to one pixel, the intermediate value of the block step size is used as the block step size. When the intermediate value of the block step size is equal to zero pixels, the block step size is set to one pixel.

[0150] Based on the block step size and the number of pixels in the ground analysis area in the horizontal and vertical directions, the number of blocks in the horizontal direction and the number of blocks in the vertical direction are calculated respectively. The calculation method is to add the value of the block step size minus one to the number of pixels in the corresponding direction and perform an integer division operation to obtain the number of blocks in the corresponding direction.

[0151] For each pair of horizontal and vertical block numbers, a rectangular block area is defined in the ground analysis area according to the block step size. Each rectangular block area starts from the starting position of the corresponding block number in the horizontal direction and extends by one block step size or to the boundary of the ground analysis area. The same method is used in the vertical direction to form a multi-group two-dimensional index set covering the ground analysis area.

[0152] For each block of two-dimensional index set:

[0153] The number of pixels belonging to the pixel set of the ground analysis area within the statistical set is used as the number of ground pixels in the corresponding block;

[0154] The number of pixels belonging to the grid line pixel set within the count set is calculated. When the number of ground pixels in the corresponding block is greater than zero, the number of grid line pixels is divided by the number of ground pixels in the corresponding block to obtain the grid line pixel density of the corresponding block. When the number of ground pixels in the corresponding block is equal to zero, the grid line pixel density of the corresponding block is set to zero.

[0155] Extract grid line pixels that satisfy the grid's permissible orientation. Specifically:

[0156] ;

[0157] Set the block step size to an intermediate value. ;

[0158] when season ;in, This is the final block step size;

[0159] when season ;

[0160] Calculate the number of blocks in the horizontal and vertical directions respectively. and Specifically:

[0161] , ;

[0162] For each pair of integers satisfy , The corresponding block regions are constructed as follows:

[0163] ;in, For the first A set of pixel indices for each block; , The blocks are numbered horizontally and vertically, respectively.

[0164] For each pair The number of pixels within a block that belong to the ground analysis region is calculated as follows:

[0165] ;in, For block Ground analysis area The number of pixels in the intersection; This is the intersection operator;

[0166] For each pair The pixel density of the block grid lines is calculated as follows:

[0167] ;in, For the first Pixel density of grid lines in blocks.

[0168] The process of obtaining the effective ground block set based on grid line pixel density, calculating the geometric center of each effective block's grid line pixels, and forming a grid intersection point set specifically includes:

[0169] Traverse all blocks, determine whether the corresponding block contains a grid structure based on the grid line pixel density of each block, and when the grid line pixel density is greater than zero, record the corresponding block as a valid ground block and count the number of valid ground blocks.

[0170] When the number of effective ground blocks is greater than zero, for all blocks with grid line pixel density greater than zero, the grid line pixel density of each block is added together and then divided by the number of effective ground blocks to obtain the average grid line pixel density; when the number of effective ground blocks is equal to zero, the average grid line pixel density is set to zero.

[0171] For each block, select gridline pixels belonging to the two-dimensional index set of the corresponding block from the gridline pixel set to form a gridline pixel subset for the corresponding block;

[0172] For each block, when the grid line pixel density of the corresponding block is not less than the average grid line pixel density and the grid line pixel subset contains at least one pixel, the horizontal coordinates of all pixels in the grid line pixel subset of the corresponding block are summed and divided by the number of pixels in the subset to obtain the horizontal geometric center coordinates of the candidate intersection point, and the vertical coordinates are summed and divided by the number of pixels in the subset to obtain the vertical geometric center coordinates of the candidate intersection point.

[0173] The geometric center coordinates of all candidate intersection points that meet the density condition and have completed the geometric center calculation are combined into a grid intersection set. The number of elements in the grid intersection set is counted to obtain the number of grid intersection points. The number of grid intersection points is used as the quantitative parameter for the subsequent calculation of the current orientation angle and orientation error of the luggage cart robot.

[0174] Calculate the effective number of ground segments as follows ;

[0175] Calculate the average density of the effective blocks Specifically:

[0176] ;

[0177] For each pair Build blocks inner grid line pixel subset Specifically: ;

[0178] For each pair satisfy and The coordinates of the geometric center are calculated as follows: , ;in, , The first The geometric center x-coordinate and y-coordinate of the candidate intersection points of the blocks;

[0179] The set of grid intersection points is constructed as follows:

[0180] ;in, The set of grid intersections formed by the geometric centers of the candidate blocks;

[0181] Set The number of elements is .

[0182] The process of sorting the set of grid intersections by vertical coordinate, selecting multiple grid intersections near the front of the luggage cart robot, and obtaining the current orientation angle based on the geometric relationship between adjacent grid intersections specifically includes:

[0183] In the set of grid intersections, when the number of grid intersections is greater than or equal to one, all grid intersections are sorted according to their vertical coordinates from smallest to largest. When there are grid intersections with the same vertical coordinate, they are then sorted according to their horizontal coordinates from smallest to largest to obtain an ordered sequence of grid intersections.

[0184] When the number of grid intersections is greater than or equal to one, each grid intersection in the sorted ordered grid intersection sequence is assigned a sequential index, and the horizontal and vertical coordinates of each grid intersection are recorded to form grid intersection data with sequential information.

[0185] When the number of grid intersections is greater than or equal to three, the first, second, and third grid intersections are selected from the ordered grid intersection sequence as the set of grid intersections for the current frame to participate in the orientation calculation; when the number of grid intersections is less than three, the orientation angle calculation of the luggage cart robot is not performed, and no rotation control quantity is generated.

[0186] When the number of grid intersections is greater than or equal to three, take the first grid intersection as the starting point and the third grid intersection as the ending point, calculate the horizontal coordinate of the ending point minus the horizontal coordinate of the starting point to obtain the horizontal component of the composite direction, and calculate the vertical coordinate of the ending point minus the vertical coordinate of the starting point to obtain the vertical component of the composite direction.

[0187] When the number of grid intersections is greater than or equal to three, the basic orientation angle is calculated by using the arctangent function based on the ratio of the longitudinal component to the transverse component of the composite direction, and the basic orientation angle is corrected according to the quadrant relationship to obtain the current orientation angle of the luggage cart robot.

[0188] when At that time, the collection will be... Sort by vertical coordinate in ascending order; when elements have the same vertical coordinate, sort by horizontal coordinate in ascending order to obtain an ordered sequence. ;in, For the sorted number Grid intersections; Indexed by point number;

[0189] when When, for any integer satisfy ,remember: ;in, , Points The horizontal and vertical coordinates;

[0190] when At that time, take the first three points:

[0191] , , ;

[0192] when At this time, the robot's orientation angle is not calculated, and no orientation correction amount is generated;

[0193] when When the resultant direction component is calculated, it is as follows:

[0194] , ;in, , They are respectively from point to The synthetic direction is in direction, Component of direction;

[0195] when At that time, execute steps S701 to S706 to calculate the robot's current orientation angle:

[0196] S701, when season ;in, The estimated orientation angle of the robot in the current frame image;

[0197] S702, when , season ;

[0198] S703, when , season ;

[0199] S704, when , season ;

[0200] S705, when , season ;

[0201] S704, when , season .

[0202] The process of comparing the current orientation angle with the main orientation angle of the ground grid to obtain the orientation error angle, and generating the plane rotation direction and rotation arc length accordingly as the rotation control quantity for orientation correction, specifically includes:

[0203] When the number of grid intersections is three or more, calculate the original orientation difference between the current orientation angle of the luggage cart robot and the main orientation angle of the ground grid; when the number of grid intersections is less than three, set the original orientation difference to zero.

[0204] When the number of grid intersections is greater than or equal to three, the original orientation difference is added to the half-circle angle, and an integer division operation is performed using the whole circle angle as the divisor, ignoring the remainder of the division, to obtain the orientation normalized integer variable;

[0205] When the number of grid intersections is greater than or equal to three, the product of the integer angle and the orientation normalized integer variable is subtracted from the original orientation difference to obtain the intermediate angle difference within a range of an integer angle.

[0206] When the number of grid intersections is three or more, the orientation error angle for rotation correction is obtained based on the magnitude of the intermediate angle difference: when the intermediate angle difference is greater than half of the half-circle angle, the orientation error angle is obtained by subtracting half of the half-circle angle from the intermediate angle difference; when the intermediate angle difference is less than half of the negative half-circle angle, the orientation error angle is obtained by adding half of the half-circle angle to the intermediate angle difference; when the absolute value of the intermediate angle difference is not greater than half of the half-circle angle, the intermediate angle difference is directly used as the orientation error angle; when the number of grid intersections is less than three, the orientation error angle is set to zero.

[0207] When the number of grid intersections is greater than or equal to three, the rotation arc length required to eliminate the orientation error is calculated based on the absolute value of the orientation error angle and the equivalent rotation radius of the luggage cart robot. When the number of grid intersections is less than three, the rotation arc length is set to zero.

[0208] When the number of grid intersections is three or more, the rotation direction is set to left when the orientation error angle is positive; the rotation direction is set to right when the orientation error angle is negative; no rotation is performed when the orientation error angle is zero; and no rotation is performed when the number of grid intersections is less than three.

[0209] Based on the total number of pixels in the horizontal direction and the total number of pixels in the vertical direction of the image, the horizontal coordinate of the reference pixel is calculated by adding one to the total number of pixels in the horizontal direction and dividing by two. The vertical coordinate of the reference pixel is calculated by adding one to the total number of pixels in the vertical direction of the image. The coordinates of the reference pixel are used as the reference position for the pose evaluation of the luggage cart robot.

[0210] When the number of grid intersections is greater than or equal to one, traverse the set of grid intersections, calculate the squared Euclidean distance between each grid intersection and the reference pixel, and take the grid intersection with the smallest squared distance as the nearest grid intersection.

[0211] When the number of grid intersections is greater than or equal to one, the horizontal position deviation is obtained by subtracting the horizontal coordinate of the nearest grid intersection from the horizontal coordinate of the reference pixel, and the vertical position deviation is obtained by subtracting the vertical coordinate of the nearest grid intersection from the vertical coordinate of the reference pixel; when the number of grid intersections is zero, both the horizontal and vertical position deviations are set to zero.

[0212] when When this happens, steps S801 to S805 are executed, specifically as follows:

[0213] S801, the original difference angle between the robot's orientation angle and the mesh's principal orientation angle is: ;

[0214] S802, Construct integer normalized variables as follows ;

[0215] S803, Calculation by The difference in the intermediate angle after period normalization ;

[0216] S804. Calculate the orientation error angle ultimately used for correction. Specifically:

[0217] ;

[0218] S805, Calculate the rotation arc length required to eliminate orientation error. ;in, This is the equivalent radius of rotation when the robot rotates in place.

[0219] when season: , , , , ;

[0220] exist When: When, the direction of rotation is left; when When, the direction of rotation is right; when At that time, no rotation is performed;

[0221] exist At that time, no rotation is performed;

[0222] The coordinates of the reference pixel are calculated as follows: , ;in, , These are the horizontal and vertical coordinate indices of the reference pixel;

[0223] when When calculating the nearest grid intersection point, the index is:

[0224] ;in, The intersection number that minimizes the squared distance from the reference pixel to the grid intersection;

[0225] when When the planar position deviation is calculated, it is as follows:

[0226] , ;in, , From the reference point to the nearest intersection point direction, Directional deviation;

[0227] when season: , .

[0228] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0229] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An image recognition method for an airport baggage cart robot, characterized in that, include: Acquire ground images from the front, establish a two-dimensional pixel coordinate system, crop the ground analysis area from the lower edge of the image, perform grayscale conversion and noise suppression on the pixels in the area, and form a set of pixels in the ground analysis area. In the pixel set of the ground analysis area, the gradient magnitude and gradient direction angle are obtained based on the gray-level difference in the horizontal and vertical directions to construct the pixel gradient vector field. Within the pixel gradient vector field, effective gradient pixels are selected based on the average gradient magnitude threshold. Their gradient direction angles are normalized and divided into direction intervals. The number of effective gradient pixels in each interval is counted. Select the directional interval with the largest number of effective gradient pixels, determine the main directional angle of the ground grid, set the directional allowable bandwidth near the main directional angle, and obtain the set of allowable directional angles; Filter out grid line pixels whose orientation angles belong to the set of permissible orientation angles from the effective gradient pixels, divide the rectangular block region according to the block step size and calculate the grid line pixel density of each block. The effective set of ground blocks is obtained based on the grid line pixel density, the geometric center of the grid line pixels of each effective block is calculated, and the set of grid intersection points is formed. Sort the set of grid intersections according to the vertical coordinate, select multiple grid intersections close to the front of the luggage cart robot, and obtain the current orientation angle based on the geometric relationship between adjacent grid intersections; The current orientation angle is compared with the main orientation angle of the ground grid to obtain the orientation error angle, and the plane rotation direction and rotation arc length are generated accordingly, which serve as the rotation control quantity for orientation correction.

2. The image recognition method for an airport baggage cart robot according to claim 1, characterized in that, The process of acquiring a ground image in front, establishing a two-dimensional pixel coordinate system, cropping a ground analysis region from the lower edge of the image, and performing grayscale conversion and noise suppression on the pixels in the region to form a set of pixels for the ground analysis region specifically includes: An image acquisition device is set at the front end of the luggage cart robot, and a resolution configuration is set that is determined by the total number of pixels in the horizontal direction and the total number of pixels in the vertical direction of the image, and image frames containing the ground area are continuously acquired. A two-dimensional pixel coordinate system is established on each frame of the image. The pixel at the top left corner of the image is set as the origin of the coordinate system. The horizontal coordinate is set to increase in the horizontal direction of the image, and the vertical coordinate is set to increase in the vertical direction of the image, so that each pixel has a unique horizontal and vertical coordinate in the two-dimensional pixel coordinate system. In each frame of the image, a unique two-dimensional index is assigned to each pixel based on the horizontal and vertical coordinates. A gray-level matrix is ​​constructed that corresponds one-to-one with the two-dimensional index. Each element in the gray-level matrix records the gray value of the corresponding pixel, forming a complete gray-level representation of the image. A preset vertical scaling parameter for the ground analysis region is set, and the height of the ground analysis region in the vertical direction is set to half the height of the entire image. In each frame of the image, a region located at the lower edge of the image that meets the height requirement of half the height of the entire image is selected. The two-dimensional index and grayscale value of all pixels in the region located at the lower edge of the image that meets the height requirement of half the height of the entire image are used to form the pixel set of the ground analysis region.

3. The image recognition method for an airport baggage cart robot according to claim 2, characterized in that, In the pixel set of the ground analysis area, the gradient magnitude and gradient direction angle are obtained based on the gray-level difference in the horizontal and vertical directions to construct a pixel gradient vector field, specifically including: In the pixel set of the ground analysis area, for pixels located inside the ground analysis area and having adjacent pixels on the left and right, and on the top and bottom in both the horizontal and vertical directions, the grayscale difference of the current pixel in the horizontal direction is calculated as the grayscale value of the right adjacent pixel minus the grayscale value of the left adjacent pixel, and the grayscale difference in the vertical direction is calculated as the grayscale value of the bottom adjacent pixel minus the grayscale value of the top adjacent pixel. For edge pixels in the ground analysis area that do not simultaneously have left-right and top-bottom adjacent pixels, set all horizontal and vertical grayscale differences of the edge pixels to zero. For all pixels within the ground analysis area, square the horizontal and vertical gray-level differences respectively, sum them up, and then perform a square root operation on the sum to obtain the gradient magnitude of each pixel. For all pixels within the ground analysis area, the basic gradient direction angle is calculated using the arctangent function based on the ratio of the gray-level difference in the vertical direction to the gray-level difference in the horizontal direction. The basic gradient direction angle is then corrected according to the quadrant relationship to obtain the gradient direction angle within the range of 0 degrees to 180 degrees, thereby constructing the pixel gradient vector field.

4. The image recognition method for an airport baggage cart robot according to claim 3, characterized in that, Within the pixel gradient vector field, effective gradient pixels are selected based on the average gradient magnitude threshold. Their gradient direction angles are normalized and divided into direction intervals. The number of effective gradient pixels in each interval is then counted. Specifically, this includes: The gradient magnitude of all pixels in the pixel set of the ground analysis area is counted. The average gradient magnitude is obtained by summing the gradient magnitudes of each pixel and dividing by the number of pixels in the pixel set of the ground analysis area. In the pixel set of the ground analysis area, construct an effective gradient pixel set. When the average gradient magnitude is greater than zero, include pixels with gradient magnitudes not less than the average gradient magnitude in the effective gradient pixel set. When the average gradient magnitude is equal to zero, include pixels with gradient magnitudes greater than zero in the effective gradient pixel set. For each pixel in the set of valid gradient pixels, normalization is performed on the gradient direction angle to map all gradient direction angles to the range of 0 degrees to 180 degrees. The preset number of direction intervals is eighteen. The direction angle range from 0 degrees to 180 degrees is divided into eighteen adjacent non-overlapping direction intervals with equal angular spans, forming a direction interval sequence. For each directional interval, count the number of effective gradient pixels entering the corresponding directional interval from the normalized directional corner, and construct a directional density counting sequence.

5. The image recognition method for an airport baggage cart robot according to claim 4, characterized in that, The process of selecting the directional interval with the largest number of effective gradient pixels, determining the main directional angle of the ground grid, and setting the directional allowable bandwidth near the main directional angle to obtain the set of allowable directional angles specifically includes: Find the direction interval with the largest number of effective gradient pixels in the direction density counting sequence, and record the direction interval number corresponding to the direction interval with the largest number of effective gradient pixels as the main direction interval number. Calculate the main direction angle of the ground grid based on the main direction interval number and the angle span of a single direction interval, so that the main direction angle of the ground grid is located at the angle center of the main direction interval; The allowable bandwidth of a direction is set according to the angle span of a single direction interval, so that the allowable bandwidth of the direction is not greater than half of the angle span of a single direction interval; Establish an angular distance judgment rule: when the difference between two angles is less than or equal to half a circle, the absolute value of the difference is taken as the angular distance; when the difference between two angles is greater than half a circle, the absolute value of half a circle minus the difference is taken as the angular distance. Each direction angle in the range of 0 degrees to 180 degrees is used as a candidate direction angle for traversal. For each candidate direction angle, the angular distance between the candidate direction angle and the main direction angle of the ground grid is calculated according to the angular distance judgment rule. When the angular distance is not greater than the allowable directional bandwidth, the candidate direction angle is added to the allowable direction angle set to form the allowable direction angle set.

6. The image recognition method for an airport baggage cart robot according to claim 5, characterized in that, The process of filtering out gridline pixels whose orientation angles belong to the set of permissible orientation angles from the effective gradient pixels, dividing the region into rectangular blocks according to the block step size, and calculating the gridline pixel density of each block specifically includes: In the effective gradient pixel set, pixels whose gradient direction angle belongs to the allowable direction angle set are selected to form the grid line pixel set, so that the gradient direction angle in the grid line pixel set maintains a limited deviation from the main direction angle of the ground grid. The number of pixels in the ground analysis area is obtained in the horizontal and vertical directions. When the number of pixels in the horizontal direction is less than the number of pixels in the vertical direction, the number of pixels in the horizontal direction is used as the reference number. When the number of pixels in the horizontal direction is greater than or equal to the number of pixels in the vertical direction, the number of pixels in the vertical direction is used as the reference number. An integer division operation with 25 as the divisor is performed on the reference number of pixels, and the remainder is ignored to obtain the intermediate value of the block step size. When the intermediate value of the block step size is greater than or equal to one pixel, the intermediate value of the block step size is used as the block step size. When the intermediate value of the block step size is equal to zero pixels, the block step size is set to one pixel. Based on the block step size and the number of pixels in the ground analysis area in the horizontal and vertical directions, the number of blocks in the horizontal direction and the number of blocks in the vertical direction are calculated respectively. The calculation method is to add the value of the block step size minus one to the number of pixels in the corresponding direction and perform an integer division operation to obtain the number of blocks in the corresponding direction. For each pair of horizontal and vertical block numbers, a rectangular block area is defined in the ground analysis area according to the block step size. Each rectangular block area starts from the starting position of the corresponding block number in the horizontal direction and extends by one block step size or to the boundary of the ground analysis area. The same method is used in the vertical direction to form a multi-group two-dimensional index set covering the ground analysis area. For each block of two-dimensional index set: The number of pixels belonging to the pixel set of the ground analysis area within the statistical set is used as the number of ground pixels in the corresponding block; The number of pixels belonging to the grid line pixel set within the count set is calculated. When the number of ground pixels in the corresponding block is greater than zero, the number of grid line pixels is divided by the number of ground pixels in the corresponding block to obtain the grid line pixel density of the corresponding block. When the number of ground pixels in the corresponding block is equal to zero, the grid line pixel density of the corresponding block is set to zero.

7. The image recognition method for an airport baggage cart robot according to claim 6, characterized in that, The process of obtaining the effective ground block set based on grid line pixel density, calculating the geometric center of each effective block's grid line pixels, and forming a grid intersection point set specifically includes: Traverse all blocks, determine whether the corresponding block contains a grid structure based on the grid line pixel density of each block, and when the grid line pixel density is greater than zero, record the corresponding block as a valid ground block and count the number of valid ground blocks. When the number of effective ground blocks is greater than zero, for all blocks with grid line pixel density greater than zero, the grid line pixel density of each block is added together and then divided by the number of effective ground blocks to obtain the average grid line pixel density; when the number of effective ground blocks is equal to zero, the average grid line pixel density is set to zero. For each block, select gridline pixels belonging to the two-dimensional index set of the corresponding block from the gridline pixel set to form a gridline pixel subset for the corresponding block; For each block, when the grid line pixel density of the corresponding block is not less than the average grid line pixel density and the grid line pixel subset contains at least one pixel, the horizontal coordinates of all pixels in the grid line pixel subset of the corresponding block are summed and divided by the number of pixels in the subset to obtain the horizontal geometric center coordinates of the candidate intersection point, and the vertical coordinates are summed and divided by the number of pixels in the subset to obtain the vertical geometric center coordinates of the candidate intersection point. The geometric center coordinates of all candidate intersection points that meet the density condition and have completed the geometric center calculation are combined into a grid intersection set. The number of elements in the grid intersection set is counted to obtain the number of grid intersection points. The number of grid intersection points is used as the quantitative parameter for the subsequent calculation of the current orientation angle and orientation error of the luggage cart robot.

8. The image recognition method for an airport baggage cart robot according to claim 7, characterized in that, The process of sorting the set of grid intersections by vertical coordinate, selecting multiple grid intersections near the front of the luggage cart robot, and obtaining the current orientation angle based on the geometric relationship between adjacent grid intersections specifically includes: In the set of grid intersections, when the number of grid intersections is greater than or equal to one, all grid intersections are sorted according to their vertical coordinates from smallest to largest. When there are grid intersections with the same vertical coordinate, they are then sorted according to their horizontal coordinates from smallest to largest to obtain an ordered sequence of grid intersections. When the number of grid intersections is greater than or equal to one, each grid intersection in the sorted ordered grid intersection sequence is assigned a sequential index, and the horizontal and vertical coordinates of each grid intersection are recorded to form grid intersection data with sequential information. When the number of grid intersections is greater than or equal to three, the first, second, and third grid intersections are selected from the ordered grid intersection sequence as the set of grid intersections for the current frame to participate in the orientation calculation; when the number of grid intersections is less than three, the orientation angle calculation of the luggage cart robot is not performed, and no rotation control quantity is generated. When the number of grid intersections is greater than or equal to three, take the first grid intersection as the starting point and the third grid intersection as the ending point, calculate the horizontal coordinate of the ending point minus the horizontal coordinate of the starting point to obtain the horizontal component of the composite direction, and calculate the vertical coordinate of the ending point minus the vertical coordinate of the starting point to obtain the vertical component of the composite direction. When the number of grid intersections is greater than or equal to three, the basic orientation angle is calculated by using the arctangent function based on the ratio of the longitudinal component to the transverse component of the composite direction, and the basic orientation angle is corrected according to the quadrant relationship to obtain the current orientation angle of the luggage cart robot.

9. The image recognition method for an airport baggage cart robot according to claim 8, characterized in that, The process of comparing the current orientation angle with the main orientation angle of the ground grid to obtain the orientation error angle, and generating the plane rotation direction and rotation arc length accordingly as the rotation control quantity for orientation correction, specifically includes: When the number of grid intersections is three or more, calculate the original orientation difference between the current orientation angle of the luggage cart robot and the main orientation angle of the ground grid; when the number of grid intersections is less than three, set the original orientation difference to zero. When the number of grid intersections is greater than or equal to three, the original orientation difference is added to the half-circle angle, and an integer division operation is performed using the whole circle angle as the divisor, ignoring the remainder of the division, to obtain the orientation normalized integer variable; When the number of grid intersections is greater than or equal to three, the product of the integer angle and the orientation normalized integer variable is subtracted from the original orientation difference to obtain the intermediate angle difference within a range of an integer angle. When the number of grid intersections is three or more, the orientation error angle for rotation correction is obtained based on the magnitude of the intermediate angle difference: when the intermediate angle difference is greater than half of the half-circle angle, the orientation error angle is obtained by subtracting half of the half-circle angle from the intermediate angle difference; when the intermediate angle difference is less than half of the negative half-circle angle, the orientation error angle is obtained by adding half of the half-circle angle to the intermediate angle difference; when the absolute value of the intermediate angle difference is not greater than half of the half-circle angle, the intermediate angle difference is directly used as the orientation error angle; when the number of grid intersections is less than three, the orientation error angle is set to zero. When the number of grid intersections is greater than or equal to three, the rotation arc length required to eliminate the orientation error is calculated based on the absolute value of the orientation error angle and the equivalent rotation radius of the luggage cart robot. When the number of grid intersections is less than three, the rotation arc length is set to zero. When the number of grid intersections is three or more, the rotation direction is set to left when the orientation error angle is positive; the rotation direction is set to right when the orientation error angle is negative; no rotation is performed when the orientation error angle is zero; and no rotation is performed when the number of grid intersections is less than three. Based on the total number of pixels in the horizontal direction and the total number of pixels in the vertical direction of the image, the horizontal coordinate of the reference pixel is calculated by adding one to the total number of pixels in the horizontal direction and dividing by two. The vertical coordinate of the reference pixel is calculated by adding one to the total number of pixels in the vertical direction of the image. The coordinates of the reference pixel are used as the reference position for the pose evaluation of the luggage cart robot. When the number of grid intersections is greater than or equal to one, traverse the set of grid intersections, calculate the squared Euclidean distance between each grid intersection and the reference pixel, and take the grid intersection with the smallest squared distance as the nearest grid intersection. When the number of grid intersections is greater than or equal to one, the horizontal position deviation is obtained by subtracting the horizontal coordinate of the nearest grid intersection from the horizontal coordinate of the reference pixel, and the vertical position deviation is obtained by subtracting the vertical coordinate of the nearest grid intersection from the vertical coordinate of the reference pixel; when the number of grid intersections is zero, both the horizontal and vertical position deviations are set to zero.