WO2023000528A1 - Map positioning method and apparatus, computer-readable storage medium and terminal device - Google Patents

Map positioning method and apparatus, computer-readable storage medium and terminal device Download PDF

Info

Publication number
WO2023000528A1
WO2023000528A1 PCT/CN2021/126719 CN2021126719W WO2023000528A1 WO 2023000528 A1 WO2023000528 A1 WO 2023000528A1 CN 2021126719 W CN2021126719 W CN 2021126719W WO 2023000528 A1 WO2023000528 A1 WO 2023000528A1
Authority
WO
WIPO (PCT)
Prior art keywords
map
identification code
image
target moving
camera
Prior art date
Application number
PCT/CN2021/126719
Other languages
French (fr)
Chinese (zh)
Inventor
林灿然
程骏
张惊涛
郭渺辰
庞建新
Original Assignee
深圳市优必选科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市优必选科技股份有限公司 filed Critical 深圳市优必选科技股份有限公司
Publication of WO2023000528A1 publication Critical patent/WO2023000528A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Definitions

  • the present application belongs to the technical field of positioning, and in particular relates to a map positioning method, device, computer-readable storage medium and terminal equipment.
  • moving devices such as cars can be controlled to walk along the black lines on the white ground through the technical scheme of infrared line inspection.
  • the car When the car is moving, it continuously emits infrared light to the ground.
  • the infrared light meets the white ground, diffuse reflection occurs, and the reflected light is received by the receiving tube on the car; if it encounters a black line, the infrared light will be absorbed.
  • the receiving tube cannot receive infrared light.
  • the single-chip microcomputer system on the trolley determines the position of the black line and the walking route of the trolley based on whether it receives the reflected infrared light or not.
  • the embodiment of the present application provides a map positioning method, device, computer-readable storage medium, and terminal equipment to solve the problem that the existing technology cannot effectively locate the position of the trolley, and the trolley can only be positioned along a pre-set The fixed route travels, the problem of extremely poor flexibility.
  • the first aspect of the embodiments of the present application provides a map positioning method, which may include:
  • the determining the corner position of the outline of the map in the global image may include:
  • the determining the scale of the global image according to the corner position and the preset actual map size may include:
  • the mean value of the width ratio and the height ratio is determined as the scale of the global image.
  • the determination is based on the center point of the identification code of the target moving device, the corner position of the outline of the map, the height of the camera device from the map, and the scale
  • the actual location of the target mobile device in the map may include:
  • An actual position of the target mobile device in the map is determined based on a second position of the target mobile device in the map and the scale.
  • the first position is corrected according to the height of the camera device from the map and the preset height of the target mobile device to obtain the target mobile device at The second location in the map may include:
  • the first position is corrected according to the following formula:
  • (x * , y * ) is the coordinate of the first position
  • h m is the height of the camera device from the map
  • h c is the preset height of the target moving device
  • (x, y) is the coordinates of the second location.
  • the determining the actual position of the target mobile device in the map according to the second position of the target mobile device in the map and the scale may include:
  • the actual position of the target mobile device in the map is calculated according to the following formula:
  • (x, y) is the coordinate of the second position
  • s is the scale
  • W is the width of the actual map size
  • H is the height of the actual map size
  • (x m , y m ) is The coordinates of the actual location.
  • the acquisition of the global image of the target moving device traveling on the map through the preset camera device may include:
  • a map positioning device which may include:
  • the image acquisition module is used to obtain the global image of the target moving device traveling on the map through the preset camera device; the camera device is located at the top of the map; the target moving device and the map are provided with corresponding identification code;
  • a map identification code detection module configured to detect the identification code of the map in the global image, and determine the height of the camera device from the map according to the detection result of the identification code of the map;
  • a corner position determining module configured to determine the corner position of the outline of the map in the global image
  • a scale determination module configured to determine the scale of the global image according to the corner position and the preset actual map size
  • a device identification code detection module configured to detect the identification code of the target moving device in the global image, and determine the center point of the identification code of the target moving device according to the detection result of the identification code of the target moving device;
  • a position determination module configured to determine the position of the target mobile device at the target mobile device according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height of the camera device from the map, and the scale actual location on the map.
  • the corner position determining module may include:
  • a grayscale unit configured to perform grayscale processing on the global image to obtain a grayscale image
  • a Gaussian blur unit configured to perform Gaussian blur processing on the grayscale image to obtain a Gaussian blurred image
  • an expansion unit configured to perform expansion processing on the Gaussian blurred image to obtain an expanded image
  • an edge detection unit configured to perform edge detection on the dilated image to obtain an edge of the map
  • a contour detection unit configured to perform contour detection on the edge of the map to obtain the contour of the map
  • the corner positioning unit is configured to perform corner positioning on the outline of the map to obtain corner positions of the outline of the map.
  • the scale determination module may include:
  • a pixel size determining unit configured to determine the pixel size of the map in the global image according to the corner position
  • a width ratio calculation unit configured to calculate a width ratio between the actual map size and the pixel size
  • a height ratio calculation unit configured to calculate the height ratio between the actual map size and the pixel size
  • a scale determining unit configured to determine an average value of the width ratio and the height ratio as the scale of the global image.
  • the position determination module may include:
  • a first position determining unit configured to determine a first position of the target mobile device in the map according to the center point of the identification code of the target mobile device and the corner position of the outline of the map;
  • the second position determination unit is configured to correct the first position according to the height of the camera device from the map and the preset height of the target mobile device, to obtain the position of the target mobile device in the map second position;
  • An actual position determining unit configured to determine the actual position of the target mobile device in the map according to the second position of the target mobile device in the map and the scale.
  • the second position determining unit is specifically configured to correct the first position according to the following formula:
  • (x * , y * ) is the coordinate of the first position
  • h m is the height of the camera device from the map
  • h c is the preset height of the target moving device
  • (x, y) is the coordinates of the second location.
  • the actual position determination unit is specifically configured to calculate the actual position of the target mobile device in the map according to the following formula:
  • (x, y) is the coordinate of the second position
  • s is the scale
  • W is the width of the actual map size
  • H is the height of the actual map size
  • (x m , y m ) is The coordinates of the actual location.
  • the image acquisition module may include:
  • a camera calibration unit configured to perform camera calibration on the camera device to obtain camera internal parameters and distortion coefficients of the camera device
  • an original image acquisition unit configured to acquire a global original image of the target moving device traveling on the map through the camera device
  • a de-distortion unit configured to perform de-distortion processing on the global original image according to the internal camera parameters and the distortion coefficients, to obtain the global image.
  • a third aspect of the embodiments of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the above-mentioned map positioning methods are implemented.
  • the fourth aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and operable on the processor, when the processor executes the computer program Steps for implementing any one of the above-mentioned map positioning methods.
  • a fifth aspect of the embodiments of the present application provides a computer program product, which, when the computer program product is run on a terminal device, causes the terminal device to execute the steps of any one of the above map positioning methods.
  • the embodiment of the present application has the beneficial effect that the embodiment of the present application pre-sets the camera device on the top of the map on which the target moving device travels, and sets corresponding identification codes on both the target moving device and the map Obtain the global image of the target moving device on the map through the camera; detect the identification code of the map in the global image, and determine the height of the camera from the map according to the detection result of the identification code of the map; determine the map in the global image The corner position of the outline, and determine the scale of the global image according to the corner position and the preset actual map size; detect the identification code of the target mobile device in the global image, and determine it according to the detection result of the identification code of the target mobile device The center point of the identification code of the target mobile device; determine the actual position of the target mobile device in the map according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height and the scale of the camera from the map, so as to realize the Precise positioning of target motion devices
  • Fig. 1 is a flow chart of an embodiment of a map positioning method in the embodiment of the present application
  • Fig. 2 is the schematic flowchart of obtaining the global image of the target moving device moving on the map through the preset camera device;
  • Fig. 3 is an example diagram of the identification code of the map
  • Fig. 4 is a schematic flowchart of determining the corner position of the outline of the map in the global image
  • Fig. 5 is a schematic flowchart of determining the scale of the global image according to the corner position and the preset actual map size
  • Fig. 6 is a schematic flowchart of determining the actual position of the target mobile device in the map
  • Fig. 7 is a schematic diagram of the relationship between trigonometric functions for position correction
  • FIG. 8 is a structural diagram of an embodiment of a map positioning device in the embodiment of the present application.
  • FIG. 9 is a schematic block diagram of a terminal device in an embodiment of the present application.
  • the term “if” may be construed as “when” or “once” or “in response to determining” or “in response to detecting” depending on the context .
  • the phrases “if determined” or “if [the described condition or event is detected]” may be construed, depending on the context, to mean “once determined” or “in response to the determination” or “once detected [the described condition or event] ]” or “in response to detection of [described condition or event]”.
  • an embodiment of a map positioning method in the embodiment of the present application may include:
  • Step S101 acquiring a global image of the target moving device traveling on the map through a preset camera device.
  • the target motion device may be various motion devices such as a car, a drone, or a robot.
  • the map refers to the ground area where the target mobile device travels.
  • a square sand table can be constructed in advance, and the target mobile device travels on the sand table and performs various specified tasks, then the sand table is a map.
  • the camera device is located on the top of the map.
  • the camera device can be installed on the ceiling of the room where the map is located, so that the camera device can overlook the entire map from top to bottom and collect a complete image of the map.
  • Corresponding identification codes are provided on the target moving device and the map to facilitate its identification and positioning.
  • the identification code can be any code pattern that can be identified and located in the prior art.
  • a two-dimensional code as an identification code.
  • step S101 may specifically include the process shown in Figure 2:
  • Step S1011 perform camera calibration on the camera device, and obtain camera intrinsic parameters and distortion coefficients of the camera device.
  • the specific camera calibration method used can be set according to the actual situation.
  • the checkerboard calibration method of Zhang Zhengyou can be preferably used to obtain the internal camera reference (denoted as mtx) and distortion coefficient (denoted as dist) of the camera device.
  • Step S1012 acquire the global original image of the target moving device traveling on the map through the camera device.
  • the global original image is the original image directly collected by the camera device without past distortion processing.
  • each frame of image in the video stream is a global original image.
  • Step S1013 performing de-distortion processing on the global original image according to the internal camera parameters and distortion coefficients to obtain a global image.
  • the embodiment of the present application may perform de-distortion processing on each frame of the global original image.
  • UndistortImage the main functions used for distortion correction of distorted images in OpenCV are the UndistortImage function, and the initUndistortRectifyMap combined with the remap function.
  • UndistortImage is a simple combination of initUndistortRectifyMap and remap, the effect is the same.
  • the distortion coordinate mapping matrices mapx and mapy only need to be calculated once, repeated calls to UndistortImage will repeatedly calculate mapx and mapy, which seriously affects the processing efficiency.
  • initUndistortRectifyMap can be used only once to obtain the distortion coordinate mapping matrices mapx and mapy as the input of the remap function, and then repeatedly call the remap function for each frame of image in the video stream to perform distortion correction.
  • Step S102 Detect the identification code of the map in the global image, and determine the height of the camera device from the map according to the detection result of the identification code of the map.
  • an identification code may be pasted on the upper left corner of the map in advance.
  • the two-dimensional code as an example, its various parameters such as the number of grids, the side length of the two-dimensional code and the label (marked as id) can be set according to the actual situation.
  • Figure 3 shows the 4 ⁇ 4 grid, the side length of the two-dimensional code A QR code with a size of 100mm and an id of 1.
  • the aruco library of OpenCV can be used to detect the QR code of the map in the global image.
  • the coordinates and id of the four corners of the two-dimensional code can be obtained, which represents the current two-dimensional code, and then the coordinates of the four corners are input to OpenCV's aruco.
  • the estimatePoseSingleMarkers function solves the equation by PnP (Perspective-n-Point) to obtain the rotation matrix (denoted as rvec) and translation matrix (denoted as tvec) of the two-dimensional code.
  • the third parameter of tvec is the translation amount of the z-axis. Represents the height of the camera from the map (marked as map_h).
  • Step S103 determine the corner position of the outline of the map in the global image, and determine the scale of the global image according to the corner position and the preset actual map size.
  • the corner position of the outline of the map can be determined through the process shown in Figure 4:
  • Step S1031 performing grayscale processing on the global image to obtain a grayscale image.
  • the cvtColor function of OpenCV can be used to perform color space conversion (BGR, HSV, GRAY and other color spaces) on the global image, and the parameters are converted to grayscale using COLOR_BGR2GRAY.
  • Step S1032 performing Gaussian blur processing on the grayscale image to obtain a Gaussian blurred image.
  • Gaussian blur is a low-pass filter for images, which can make the image blurred and smooth, and is usually used to reduce image noise and reduce the level of detail.
  • the Gaussian Blur method of OpenCV can be used to perform Gaussian blur processing on the image.
  • Step S1033 performing dilation processing on the Gaussian blurred image to obtain the dilated image.
  • the dilate function of OpenCV can be used to dilate the image. Because the map is a square, the edge may lose pixels after de-distortion, resulting in blurring. Therefore, the edge of the map is expanded by expansion, and the edge of the map target or the smaller holes inside are filled in, so that the edge of the map is slightly changed. Large (to prevent disconnection) effect, which is beneficial to subsequent edge detection.
  • Step S1034 performing edge detection on the dilated image to obtain the edge of the map.
  • the Canny function of OpenCV can be used to perform edge detection on the image, and finally an output binary image is obtained, which contains the edges existing in the image, from which the map edges can be obtained.
  • Step S1035 performing contour detection on the edge of the map to obtain the contour of the map.
  • the findContours function of OpenCV can be used to find the contour
  • the parameter cv2.RETR_EXTERNAL indicates that only the outer contour is detected, that is, the outer circle contour of the map required by the embodiment of the present application.
  • the contour (denoted as contour) is represented by a series of points, but not all points on the contour are stored, only the number of points that can describe the contour with a straight line is stored. For a map, only 4 points are needed to describe its outline, and these 4 points are the corner points of the outline of the map.
  • the outline of the map is the largest among them, so by sorting the outlines, the largest outline is found to be the outline of the map.
  • the outline of the map can be approximated by the arcLength function and approxPolyDP function of OpenCV, and the outline drawing operation can be performed using drawCountors.
  • the arcLength function is used to calculate the perimeter of the closed contour or the length of the curve
  • aprroxPolyDP(cnt, epsilon, True) is used to obtain the approximate value of the contour, where cnt is the input contour value; epsilon is the threshold T, usually using the circumference of the contour Long as the threshold; True means the contour is closed.
  • Step S1036, perform corner location on the outline of the map to obtain the corner position of the outline of the map.
  • corner positioning is to arrange the positions of the four corner points, generally in the clockwise direction of upper left, upper right, lower right and lower left.
  • the sum of the abscissa and ordinate of the four corner points can be calculated separately, with the smallest sum being the upper left corner, and the largest sum being the lower right corner, as shown in the following formula:
  • i represents the calculation number of the corner point
  • x i is the abscissa of the i-th corner point
  • y i is the ordinate of the i-th corner point
  • S i is the sum of the abscissa and ordinate of the i-th corner point
  • argmax represents the maximum value
  • argmin represents the minimum value
  • id is the order of the corner points sorted in order
  • D i is the absolute value of the difference between the abscissa and ordinate of the i-th corner point.
  • determining the scale of the global image according to the corner position and the actual map size may specifically include the following steps:
  • Step S1037 Determine the pixel size of the map in the global image according to the corner position.
  • the length of the uppermost side of the map in the global image (denoted as w1, the unit is pixel) can be obtained through the upper left and upper right corner points, and the maximum length of the map can be obtained through the lower left and right corner points.
  • the length of the following side in the global image (denoted as w2, the unit is pixel), take the mean value w of both w1 and w2 as the width of the map in the global image.
  • the length of the leftmost side of the map in the global image can be obtained through the upper left and lower left corners (denoted as h1, and the unit is pixel), and the rightmost side of the map can be found in the global image through the upper right and lower right corners.
  • the length in the image (denoted as h2, the unit is pixel), take the mean value h of both h1 and h2 as the height of the map in the global image.
  • Step S1038 calculate the width ratio between the actual map size and the pixel size, and calculate the height ratio between the actual map size and the pixel size, as shown in the following formula:
  • W and H are the width and height of the actual map, respectively, sw is the width ratio of the actual map size to the pixel size, and sh is the height ratio of the actual map size to the pixel size.
  • Step S1039 determining the mean value of the width ratio and the height ratio as the scale of the global image.
  • the step of map detection is completed. At this time, the four corner points of the outline of the map are obtained, and the actual distance of the map and its scale in the global image are obtained.
  • Step S104 Detect the identification code of the target mobile device in the global image, and determine the center point of the identification code of the target mobile device according to the detection result of the identification code of the target mobile device.
  • the identification code of the target mobile device may be pasted on the upper surface of the target mobile device to facilitate the camera device to capture, and the identification code may be used to represent the position of the target mobile device.
  • the process of detecting the identification code of the target moving device is similar to the process of detecting the identification code of the map in step S102.
  • the coordinates and id of the four corner points are mainly obtained through the aruco.detectMarkers function of OpenCV, but OpenCV is not required at this time
  • the aruco.estimatePoseSingleMarkers function solves PnP to obtain the rotation matrix rvec and the translation matrix tvec, but directly calculates the coordinates of the center point of the identification code of the target moving device through the coordinates of the four corner points. For example, the upper left corner point and Calculate the mean value of the coordinates of the corner point on the lower right, and the mean value is the coordinate of the center point of the identification code of the target moving device.
  • Step S105 Determine the actual position of the target mobile device on the map according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height of the camera device from the map, and the scale.
  • step S105 may specifically include the process shown in Figure 6:
  • Step S1051. Determine the first position of the target mobile device in the map according to the center point of the identification code of the target mobile device and the corner position of the outline of the map.
  • the intersection point of the two sides of the map can be used as the origin of the map coordinate system.
  • the intersection point of the two sides on the upper side and the left side of the map can be used as the origin of the map coordinate system.
  • the positive direction of the x-axis is from left to right, and the positive direction of the y-axis is from top to bottom along the left side.
  • T l (y 0 -y 3 )*x c +(x 3 -x 0 )*y c +(x 0 *y 3 )-(x 3 *y 0 )
  • T t (y 0 -y 3 )*x c +(x 3 -x 0 )*y c +(x 0 *y 3 )-(x 3 *y 0 )
  • x c is the abscissa of the central point of the identification code of the target mobile device
  • y c is the vertical coordinate of the central point of the identification code of the target mobile device.
  • the distances of the target motion device from the two edges can be calculated separately.
  • the distance can be calculated from the center point of the identification code of the target moving device and two points on the side, and the distance from a point to a straight line can be converted into the height of a triangle, and the height of a triangle can be calculated by vector cross product
  • the specific calculation of the area is shown in the following formula:
  • d np.abs(np.cross(vec 1 ,vec 2 ))/np.linalg.norm(P 1 -P 2 )
  • P 1 represents the first point of the side
  • P 2 represents the second point of the side
  • P m represents the center point of the identification code of the target motion device
  • vec 1 represents the vector from P m to P 1
  • vec 2 Represents the vector from P m to P 2
  • np.abs is the function to find the absolute value
  • np.cross is the function to find the vector cross product
  • np.linalg.norm is the function to find the norm
  • d is the target movement device and the left The distance from the edge of the side.
  • the first position of the target mobile device in the map can be determined.
  • Step S1052 correcting the first position according to the height of the camera device from the map and the preset height of the target mobile device to obtain a second position of the target mobile device on the map.
  • the position correction can be performed according to the trigonometric function relationship in Figure 7, and the specific calculation formula is as follows:
  • (x * , y * ) is the coordinate of the first position
  • h m is the height of the camera device from the map
  • h c is the preset height of the target mobile device, that is, the distance from the center point of the identification code of the target mobile device to the map Height
  • (x,y) is the coordinate of the second position.
  • Step S1053. Determine the actual position of the target mobile device on the map according to the second position of the target mobile device on the map and the scale.
  • the actual position of the target mobile device in the map can be calculated according to the following formula:
  • (x m , y m ) are the coordinates of the actual position of the target moving device in the map coordinate system. So far, the map detection, the construction of the map coordinate system, and the calculation of the actual position of the target moving device on the map coordinate system have all been completed. For each frame of image, the actual position of the target moving device in the map coordinate system can be obtained in real time. On this basis, the target motion device can be controlled to complete various complex tasks, instead of simply performing simple line inspection tasks along a preset fixed route, which has extremely high flexibility.
  • a camera device is set in advance on the top of the map where the target mobile device travels, and corresponding identification codes are set on both the target mobile device and the map;
  • the global image of progress; the identification code of the map is detected in the global image, and the height of the camera device from the map is determined according to the detection result of the identification code of the map; the corner position of the contour of the map is determined in the global image, and according to the corner point
  • the position and the preset actual map size determine the scale of the global image; detect the identification code of the target mobile device in the global image, and determine the center point of the identification code of the target mobile device according to the detection result of the target mobile device; according to the target
  • the center point of the identification code of the moving device, the corner position of the outline of the map, the height and the scale of the camera device from the map determine the actual position of the target moving device in the map, so that the precise positioning of the target moving device can be realized.
  • the target motion device can be controlled to complete various complex tasks
  • FIG. 8 shows a structural diagram of an embodiment of a map positioning device provided in the embodiment of the present application.
  • a map positioning device may include:
  • the image acquisition module 801 is used to obtain a global image of the target moving device traveling on the map through a preset camera device; the camera device is located at the top of the map; the target moving device and the map are provided with corresponding the identification code;
  • a map identification code detection module 802 configured to detect the identification code of the map in the global image, and determine the height of the camera device from the map according to the detection result of the identification code of the map;
  • a corner position determination module 803, configured to determine the corner position of the outline of the map in the global image
  • a scale determination module 804 configured to determine the scale of the global image according to the corner position and the preset actual map size
  • a device identification code detection module 805, configured to detect the identification code of the target moving device in the global image, and determine the center point of the identification code of the target moving device according to the detection result of the identification code of the target moving device ;
  • a position determination module 806, configured to determine the location of the target mobile device according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height of the camera device from the map, and the scale. The actual location on the map.
  • the corner position determination module may include:
  • a grayscale unit configured to perform grayscale processing on the global image to obtain a grayscale image
  • a Gaussian blur unit configured to perform Gaussian blur processing on the grayscale image to obtain a Gaussian blurred image
  • an expansion unit configured to perform expansion processing on the Gaussian blurred image to obtain an expanded image
  • an edge detection unit configured to perform edge detection on the dilated image to obtain an edge of the map
  • a contour detection unit configured to perform contour detection on the edge of the map to obtain the contour of the map
  • the corner positioning unit is configured to perform corner positioning on the outline of the map to obtain corner positions of the outline of the map.
  • the scale determination module may include:
  • a pixel size determining unit configured to determine the pixel size of the map in the global image according to the corner position
  • a width ratio calculation unit configured to calculate a width ratio between the actual map size and the pixel size
  • a height ratio calculation unit configured to calculate the height ratio between the actual map size and the pixel size
  • a scale determining unit configured to determine an average value of the width ratio and the height ratio as the scale of the global image.
  • the location determination module may include:
  • a first position determining unit configured to determine a first position of the target mobile device in the map according to the center point of the identification code of the target mobile device and the corner position of the outline of the map;
  • the second position determination unit is configured to correct the first position according to the height of the camera device from the map and the preset height of the target mobile device, to obtain the position of the target mobile device in the map second position;
  • An actual position determining unit configured to determine the actual position of the target mobile device in the map according to the second position of the target mobile device in the map and the scale.
  • the second position determining unit is specifically configured to correct the first position according to the following formula:
  • (x * , y * ) is the coordinate of the first position
  • h m is the height of the camera device from the map
  • h c is the preset height of the target moving device
  • (x, y) is the coordinates of the second location.
  • the actual position determining unit is specifically configured to calculate the actual position of the target moving device in the map according to the following formula:
  • (x, y) is the coordinate of the second position
  • s is the scale
  • W is the width of the actual map size
  • H is the height of the actual map size
  • (x m , y m ) is The coordinates of the actual location.
  • the image acquisition module may include:
  • a camera calibration unit configured to perform camera calibration on the camera device to obtain camera internal parameters and distortion coefficients of the camera device
  • an original image acquisition unit configured to acquire a global original image of the target moving device traveling on the map through the camera device
  • a de-distortion unit configured to perform de-distortion processing on the global original image according to the internal camera parameters and the distortion coefficients, to obtain the global image.
  • FIG. 9 shows a schematic block diagram of a terminal device provided by an embodiment of the present application. For ease of description, only parts related to the embodiment of the present application are shown.
  • the terminal device 9 of this embodiment includes: a processor 90 , a memory 91 , and a computer program 92 stored in the memory 91 and operable on the processor 90 .
  • the processor 90 executes the computer program 92, it realizes the steps in the above embodiments of the map positioning method, for example, steps S101 to S105 shown in FIG. 1 .
  • the processor 90 executes the computer program 92, the functions of the modules/units in the above-mentioned device embodiments are realized, for example, the functions of the modules 801 to 806 shown in FIG. 8 .
  • the computer program 92 can be divided into one or more modules/units, and the one or more modules/units are stored in the memory 91 and executed by the processor 90 to complete this application.
  • the one or more modules/units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program 92 in the terminal device 9 .
  • the terminal device 9 may be a computing device such as a mobile phone, a tablet computer, a desktop computer, a notebook, a palmtop computer, and a robot.
  • FIG. 9 is only an example of the terminal device 9, and does not constitute a limitation to the terminal device 9. It may include more or less components than those shown in the figure, or combine certain components, or different components.
  • the terminal device 9 may also include an input and output device, a network access device, a bus, and the like.
  • the processor 90 can be a central processing unit (Central Processing Unit, CPU), and can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the storage 91 may be an internal storage unit of the terminal device 9 , such as a hard disk or memory of the terminal device 9 .
  • the memory 91 can also be an external storage device of the terminal device 9, such as a plug-in hard disk equipped on the terminal device 9, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 91 may also include both an internal storage unit of the terminal device 9 and an external storage device.
  • the memory 91 is used to store the computer program and other programs and data required by the terminal device 9 .
  • the memory 91 can also be used to temporarily store data that has been output or will be output.
  • the disclosed apparatus/terminal device and method may be implemented in other ways.
  • the device/terminal device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated module/unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments in the present application can also be completed by instructing related hardware through computer programs.
  • the computer programs can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps in the above-mentioned various method embodiments can be realized.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) ), Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signal telecommunication signal
  • software distribution medium etc.
  • the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
  • computer-readable Storage media excludes electrical carrier signals and telecommunication signals.

Abstract

The present application belongs to the field of positioning technology, and in particular relates to a map positioning method and apparatus, a computer-readable storage medium and a terminal device. The method comprises: by means of a camera apparatus, acquiring a global image of a target moving apparatus traveling on a map; detecting an identification code of the map in the global image, and determining the height of the camera apparatus from the map according to the detection result of the identification code of the map; determining the positions of corner points of the contour of the map in the global image, and determining the scale of the global image according to the positions of the corner points and a preset actual map size; detecting an identification code of the target moving apparatus in the global image, and determining the center point of the identification code of the target moving apparatus according to the detection result of the identification code of the target moving apparatus; and determining the actual position of the target moving apparatus in the map according to the center point of the identification code of the target moving apparatus, the positions of the corner points of the contour of the map, and the height and scale of the camera apparatus from the map.

Description

地图定位方法、装置、计算机可读存储介质及终端设备Map positioning method, device, computer readable storage medium and terminal equipment
本申请要求于2021年07月23日在中国专利局提交的、申请号为202110837305.8的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 202110837305.8 filed at the China Patent Office on July 23, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于定位技术领域,尤其涉及一种地图定位方法、装置、计算机可读存储介质及终端设备。The present application belongs to the technical field of positioning, and in particular relates to a map positioning method, device, computer-readable storage medium and terminal equipment.
背景技术Background technique
在现有技术中,可以通过红外巡线的技术方案控制小车等运动装置在白色地面上循着黑线行走。小车行进过程中,不断向地面发射红外光,当红外光遇到白色的地面时发生漫反射,反射光被小车上的接收管接收;如果遇到黑线则红外光会被吸收,小车上的接收管则接收不到红外光。小车上的单片机系统根据是否接受到反射回来的红外光为依据,来确定黑线的位置和小车的行走路线。这种方式虽然比较简单,但是无法对小车的位置进行有效地定位,小车只能沿着预先设置好的固定路线行进,灵活性极差。In the prior art, moving devices such as cars can be controlled to walk along the black lines on the white ground through the technical scheme of infrared line inspection. When the car is moving, it continuously emits infrared light to the ground. When the infrared light meets the white ground, diffuse reflection occurs, and the reflected light is received by the receiving tube on the car; if it encounters a black line, the infrared light will be absorbed. The receiving tube cannot receive infrared light. The single-chip microcomputer system on the trolley determines the position of the black line and the walking route of the trolley based on whether it receives the reflected infrared light or not. Although this method is relatively simple, it cannot effectively locate the position of the trolley, and the trolley can only travel along a preset fixed route, with extremely poor flexibility.
技术问题technical problem
有鉴于此,本申请实施例提供了一种地图定位方法、装置、计算机可读存储介质及终端设备,以解决现有技术无法对小车的位置进行有效地定位,小车只能沿着预先设置好的固定路线行进,灵活性极差的问题。In view of this, the embodiment of the present application provides a map positioning method, device, computer-readable storage medium, and terminal equipment to solve the problem that the existing technology cannot effectively locate the position of the trolley, and the trolley can only be positioned along a pre-set The fixed route travels, the problem of extremely poor flexibility.
技术解决方案technical solution
本申请实施例的第一方面提供了一种地图定位方法,可以包括:The first aspect of the embodiments of the present application provides a map positioning method, which may include:
通过预设的摄像装置获取目标运动装置在地图上行进的全局图像;所述摄像装置位于所述地图的顶部;所述目标运动装置和所述地图上均设置有对应的标识码;Obtain a global image of the target moving device traveling on the map through a preset camera; the camera is located at the top of the map; the target moving device and the map are provided with corresponding identification codes;
在所述全局图像中对所述地图的标识码进行检测,并根据所述地图的标识码检测结果确定所述摄像装置距离所述地图的高度;Detecting the identification code of the map in the global image, and determining the height of the camera device from the map according to the detection result of the identification code of the map;
在所述全局图像中确定所述地图的轮廓的角点位置,并根据所述角点位置和预设的实际地图尺寸确定所述全局图像的比例尺;determining the corner position of the outline of the map in the global image, and determining the scale of the global image according to the corner position and a preset actual map size;
在所述全局图像中对所述目标运动装置的标识码进行检测,并根据所述目标运动装置的标识码检测结果确定所述目标运动装置的标识码中心点;Detecting the identification code of the target moving device in the global image, and determining the center point of the identification code of the target moving device according to the detection result of the identification code of the target moving device;
根据所述目标运动装置的标识码中心点、所述地图的轮廓的角点位置、所述摄像装置距离所述地图的高度和所述比例尺确定所述目标运动装置在所述地图中的实际位置。Determine the actual position of the target mobile device in the map according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height of the camera device from the map, and the scale .
在第一方面的一种具体实现中,所述在所述全局图像中确定所述地图的轮廓的角点位置,可以包括:In a specific implementation of the first aspect, the determining the corner position of the outline of the map in the global image may include:
对所述全局图像进行灰度化处理,得到灰度图像;performing grayscale processing on the global image to obtain a grayscale image;
对所述灰度图像进行高斯模糊处理,得到高斯模糊图像;Performing Gaussian blur processing on the grayscale image to obtain a Gaussian blurred image;
对所述高斯模糊图像进行膨胀处理,得到膨胀图像;performing expansion processing on the Gaussian blurred image to obtain an expanded image;
对所述膨胀图像进行边缘检测,得到所述地图的边线;performing edge detection on the expanded image to obtain the edge of the map;
对所述地图的边线进行轮廓检测,得到所述地图的轮廓;performing contour detection on the edge of the map to obtain the contour of the map;
对所述地图的轮廓进行角点定位,得到所述地图的轮廓的角点位置。Perform corner location on the outline of the map to obtain the corner position of the outline of the map.
在第一方面的一种具体实现中,所述根据所述角点位置和预设的实际地图尺寸确定所述全局图像的比例尺,可以包括:In a specific implementation of the first aspect, the determining the scale of the global image according to the corner position and the preset actual map size may include:
根据所述角点位置确定所述地图在所述全局图像中的像素尺寸;determining the pixel size of the map in the global image according to the corner position;
计算所述实际地图尺寸与所述像素尺寸的宽度比;calculating the width ratio of the actual map size to the pixel size;
计算所述实际地图尺寸与所述像素尺寸的高度比;calculating the height ratio of the actual map size to the pixel size;
将所述宽度比和所述高度比的均值确定为所述全局图像的比例尺。The mean value of the width ratio and the height ratio is determined as the scale of the global image.
在第一方面的一种具体实现中,所述根据所述目标运动装置的标识码中心点、所述地图的轮廓的角点位置、所述摄像装置距离所述地图的高度和所述比例尺确定所述目标运动装置在所述地图中的实际位置,可以包括:In a specific implementation of the first aspect, the determination is based on the center point of the identification code of the target moving device, the corner position of the outline of the map, the height of the camera device from the map, and the scale The actual location of the target mobile device in the map may include:
根据所述目标运动装置的标识码中心点和所述地图的轮廓的角点位置确定所述目标运动装置在所述地图中的第一位置;determining a first position of the target mobile device in the map according to the center point of the identification code of the target mobile device and the corner position of the outline of the map;
根据所述摄像装置距离所述地图的高度和所述目标运动装置的预设高度对所述第一位置进行修正,得到所述目标运动装置在所述地图中的第二位置;correcting the first position according to the height of the camera from the map and the preset height of the target moving device to obtain a second position of the target moving device in the map;
根据所述目标运动装置在所述地图中的第二位置和所述比例尺确定所述目标运动装置在所述地图中的实际位置。An actual position of the target mobile device in the map is determined based on a second position of the target mobile device in the map and the scale.
在第一方面的一种具体实现中,所述根据所述摄像装置距离所述地图的高度和所述目标运动装置的预设高度对所述第一位置进行修正,得到所述目标运动装置在所述地图中的第二位置,可以包括:In a specific implementation of the first aspect, the first position is corrected according to the height of the camera device from the map and the preset height of the target mobile device to obtain the target mobile device at The second location in the map may include:
根据下式对所述第一位置进行修正:The first position is corrected according to the following formula:
Figure PCTCN2021126719-appb-000001
Figure PCTCN2021126719-appb-000001
Figure PCTCN2021126719-appb-000002
Figure PCTCN2021126719-appb-000002
其中,(x *,y *)为所述第一位置的坐标,h m为所述摄像装置距离所述地图的高度,h c为所述目标运动装置的预设高度,(x,y)为所述第二位置的坐标。 Wherein, (x * , y * ) is the coordinate of the first position, h m is the height of the camera device from the map, h c is the preset height of the target moving device, (x, y) is the coordinates of the second location.
在第一方面的一种具体实现中,所述根据所述目标运动装置在所述地图中的第二位置和所述比例尺确定所述目标运动装置在所述地图中的实际位置,可以包括:In a specific implementation of the first aspect, the determining the actual position of the target mobile device in the map according to the second position of the target mobile device in the map and the scale may include:
根据下式计算所述目标运动装置在所述地图中的实际位置:The actual position of the target mobile device in the map is calculated according to the following formula:
Figure PCTCN2021126719-appb-000003
Figure PCTCN2021126719-appb-000003
Figure PCTCN2021126719-appb-000004
Figure PCTCN2021126719-appb-000004
其中,(x,y)为所述第二位置的坐标,s为所述比例尺,W为所述实际地图尺寸的宽度,H为所述实际地图尺寸的高度,(x m,y m)为所述实际位置的坐标。 Wherein, (x, y) is the coordinate of the second position, s is the scale, W is the width of the actual map size, H is the height of the actual map size, (x m , y m ) is The coordinates of the actual location.
在第一方面的一种具体实现中,所述通过预设的摄像装置获取目标运动装置在地图上行进的全局图像,可以包括:In a specific implementation of the first aspect, the acquisition of the global image of the target moving device traveling on the map through the preset camera device may include:
对所述摄像装置进行相机标定,得到所述摄像装置的相机内参和畸变系数;Carrying out camera calibration on the camera device to obtain camera internal parameters and distortion coefficients of the camera device;
通过所述摄像装置获取所述目标运动装置在所述地图上行进的全局原始图像;Obtaining a global original image of the target moving device traveling on the map through the camera device;
根据所述相机内参和所述畸变系数对所述全局原始图像进行去畸变处理,得到所述全局图像。De-distorting the global original image according to the internal camera parameters and the distortion coefficient to obtain the global image.
本申请实施例的第二方面提供了一种地图定位装置,可以包括:The second aspect of the embodiments of the present application provides a map positioning device, which may include:
图像获取模块,用于通过预设的摄像装置获取目标运动装置在地图上行进的全局图像;所述摄像装置位于所述地图的顶部;所述目标运动装置和所述地图上均设置有对应的标识码;The image acquisition module is used to obtain the global image of the target moving device traveling on the map through the preset camera device; the camera device is located at the top of the map; the target moving device and the map are provided with corresponding identification code;
地图标识码检测模块,用于在所述全局图像中对所述地图的标识码进行检测,并根据所述地图的标识码检测结果确定所述摄像装置距离所述地图的高度;A map identification code detection module, configured to detect the identification code of the map in the global image, and determine the height of the camera device from the map according to the detection result of the identification code of the map;
角点位置确定模块,用于在所述全局图像中确定所述地图的轮廓的角点位置;a corner position determining module, configured to determine the corner position of the outline of the map in the global image;
比例尺确定模块,用于根据所述角点位置和预设的实际地图尺寸确定所述全局图像的 比例尺;A scale determination module, configured to determine the scale of the global image according to the corner position and the preset actual map size;
装置标识码检测模块,用于在所述全局图像中对所述目标运动装置的标识码进行检测,并根据所述目标运动装置的标识码检测结果确定所述目标运动装置的标识码中心点;A device identification code detection module, configured to detect the identification code of the target moving device in the global image, and determine the center point of the identification code of the target moving device according to the detection result of the identification code of the target moving device;
位置确定模块,用于根据所述目标运动装置的标识码中心点、所述地图的轮廓的角点位置、所述摄像装置距离所述地图的高度和所述比例尺确定所述目标运动装置在所述地图中的实际位置。A position determination module, configured to determine the position of the target mobile device at the target mobile device according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height of the camera device from the map, and the scale actual location on the map.
在第二方面的一种具体实现中,所述角点位置确定模块可以包括:In a specific implementation of the second aspect, the corner position determining module may include:
灰度化单元,用于对所述全局图像进行灰度化处理,得到灰度图像;a grayscale unit, configured to perform grayscale processing on the global image to obtain a grayscale image;
高斯模糊单元,用于对所述灰度图像进行高斯模糊处理,得到高斯模糊图像;a Gaussian blur unit, configured to perform Gaussian blur processing on the grayscale image to obtain a Gaussian blurred image;
膨胀单元,用于对所述高斯模糊图像进行膨胀处理,得到膨胀图像;an expansion unit, configured to perform expansion processing on the Gaussian blurred image to obtain an expanded image;
边缘检测单元,用于对所述膨胀图像进行边缘检测,得到所述地图的边线;an edge detection unit, configured to perform edge detection on the dilated image to obtain an edge of the map;
轮廓检测单元,用于对所述地图的边线进行轮廓检测,得到所述地图的轮廓;a contour detection unit, configured to perform contour detection on the edge of the map to obtain the contour of the map;
角点定位单元,用于对所述地图的轮廓进行角点定位,得到所述地图的轮廓的角点位置。The corner positioning unit is configured to perform corner positioning on the outline of the map to obtain corner positions of the outline of the map.
在第二方面的一种具体实现中,所述比例尺确定模块可以包括:In a specific implementation of the second aspect, the scale determination module may include:
像素尺寸确定单元,用于根据所述角点位置确定所述地图在所述全局图像中的像素尺寸;a pixel size determining unit, configured to determine the pixel size of the map in the global image according to the corner position;
宽度比计算单元,用于计算所述实际地图尺寸与所述像素尺寸的宽度比;a width ratio calculation unit, configured to calculate a width ratio between the actual map size and the pixel size;
高度比计算单元,用于计算所述实际地图尺寸与所述像素尺寸的高度比;a height ratio calculation unit, configured to calculate the height ratio between the actual map size and the pixel size;
比例尺确定单元,用于将所述宽度比和所述高度比的均值确定为所述全局图像的比例尺。A scale determining unit, configured to determine an average value of the width ratio and the height ratio as the scale of the global image.
在第二方面的一种具体实现中,所述位置确定模块可以包括:In a specific implementation of the second aspect, the position determination module may include:
第一位置确定单元,用于根据所述目标运动装置的标识码中心点和所述地图的轮廓的角点位置确定所述目标运动装置在所述地图中的第一位置;A first position determining unit, configured to determine a first position of the target mobile device in the map according to the center point of the identification code of the target mobile device and the corner position of the outline of the map;
第二位置确定单元,用于根据所述摄像装置距离所述地图的高度和所述目标运动装置的预设高度对所述第一位置进行修正,得到所述目标运动装置在所述地图中的第二位置;The second position determination unit is configured to correct the first position according to the height of the camera device from the map and the preset height of the target mobile device, to obtain the position of the target mobile device in the map second position;
实际位置确定单元,用于根据所述目标运动装置在所述地图中的第二位置和所述比例尺确定所述目标运动装置在所述地图中的实际位置。An actual position determining unit, configured to determine the actual position of the target mobile device in the map according to the second position of the target mobile device in the map and the scale.
在第二方面的一种具体实现中,所述第二位置确定单元具体用于根据下式对所述第一位置进行修正:In a specific implementation of the second aspect, the second position determining unit is specifically configured to correct the first position according to the following formula:
Figure PCTCN2021126719-appb-000005
Figure PCTCN2021126719-appb-000005
Figure PCTCN2021126719-appb-000006
Figure PCTCN2021126719-appb-000006
其中,(x *,y *)为所述第一位置的坐标,h m为所述摄像装置距离所述地图的高度,h c为所述目标运动装置的预设高度,(x,y)为所述第二位置的坐标。 Wherein, (x * , y * ) is the coordinate of the first position, h m is the height of the camera device from the map, h c is the preset height of the target moving device, (x, y) is the coordinates of the second location.
在第二方面的一种具体实现中,所述实际位置确定单元具体用于根据下式计算所述目标运动装置在所述地图中的实际位置:In a specific implementation of the second aspect, the actual position determination unit is specifically configured to calculate the actual position of the target mobile device in the map according to the following formula:
Figure PCTCN2021126719-appb-000007
Figure PCTCN2021126719-appb-000007
Figure PCTCN2021126719-appb-000008
Figure PCTCN2021126719-appb-000008
其中,(x,y)为所述第二位置的坐标,s为所述比例尺,W为所述实际地图尺寸的宽度, H为所述实际地图尺寸的高度,(x m,y m)为所述实际位置的坐标。 Wherein, (x, y) is the coordinate of the second position, s is the scale, W is the width of the actual map size, H is the height of the actual map size, (x m , y m ) is The coordinates of the actual location.
在第二方面的一种具体实现中,所述图像获取模块可以包括:In a specific implementation of the second aspect, the image acquisition module may include:
相机标定单元,用于对所述摄像装置进行相机标定,得到所述摄像装置的相机内参和畸变系数;A camera calibration unit, configured to perform camera calibration on the camera device to obtain camera internal parameters and distortion coefficients of the camera device;
原始图像获取单元,用于通过所述摄像装置获取所述目标运动装置在所述地图上行进的全局原始图像;an original image acquisition unit, configured to acquire a global original image of the target moving device traveling on the map through the camera device;
去畸变单元,用于根据所述相机内参和所述畸变系数对所述全局原始图像进行去畸变处理,得到所述全局图像。A de-distortion unit, configured to perform de-distortion processing on the global original image according to the internal camera parameters and the distortion coefficients, to obtain the global image.
本申请实施例的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种地图定位方法的步骤。A third aspect of the embodiments of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the above-mentioned map positioning methods are implemented.
本申请实施例的第四方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述任一种地图定位方法的步骤。The fourth aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and operable on the processor, when the processor executes the computer program Steps for implementing any one of the above-mentioned map positioning methods.
本申请实施例的第五方面提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行上述任一种地图定位方法的步骤。A fifth aspect of the embodiments of the present application provides a computer program product, which, when the computer program product is run on a terminal device, causes the terminal device to execute the steps of any one of the above map positioning methods.
有益效果Beneficial effect
本申请实施例与现有技术相比存在的有益效果是:本申请实施例预先在目标运动装置所行进的地图顶部设置了摄像装置,并在目标运动装置和地图上均设置了对应的标识码;通过摄像装置获取目标运动装置在地图上行进的全局图像;在全局图像中对地图的标识码进行检测,并根据地图的标识码检测结果确定摄像装置距离地图的高度;在全局图像中确定地图的轮廓的角点位置,并根据角点位置和预设的实际地图尺寸确定全局图像的比例尺;在全局图像中对目标运动装置的标识码进行检测,并根据目标运动装置的标识码检测结果确定目标运动装置的标识码中心点;根据目标运动装置的标识码中心点、地图的轮廓的角点位置、摄像装置距离地图的高度和比例尺确定目标运动装置在地图中的实际位置,从而可以实现对目标运动装置的精确定位。在此基础上可以控制目标运动装置完成各种复杂任务,而非仅仅沿着预先设置好的固定路线进行简单的巡线任务,具有极高的灵活性。Compared with the prior art, the embodiment of the present application has the beneficial effect that the embodiment of the present application pre-sets the camera device on the top of the map on which the target moving device travels, and sets corresponding identification codes on both the target moving device and the map Obtain the global image of the target moving device on the map through the camera; detect the identification code of the map in the global image, and determine the height of the camera from the map according to the detection result of the identification code of the map; determine the map in the global image The corner position of the outline, and determine the scale of the global image according to the corner position and the preset actual map size; detect the identification code of the target mobile device in the global image, and determine it according to the detection result of the identification code of the target mobile device The center point of the identification code of the target mobile device; determine the actual position of the target mobile device in the map according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height and the scale of the camera from the map, so as to realize the Precise positioning of target motion devices. On this basis, the target motion device can be controlled to complete various complex tasks, instead of simply performing simple line inspection tasks along a preset fixed route, which has extremely high flexibility.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the accompanying drawings that need to be used in the descriptions of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are only for the present application For some embodiments, those skilled in the art can also obtain other drawings based on these drawings without creative efforts.
图1为本申请实施例中一种地图定位方法的一个实施例流程图;Fig. 1 is a flow chart of an embodiment of a map positioning method in the embodiment of the present application;
图2为通过预设的摄像装置获取目标运动装置在地图上行进的全局图像的示意流程图;Fig. 2 is the schematic flowchart of obtaining the global image of the target moving device moving on the map through the preset camera device;
图3为地图的标识码的示例图;Fig. 3 is an example diagram of the identification code of the map;
图4为在全局图像中确定地图的轮廓的角点位置的示意流程图;Fig. 4 is a schematic flowchart of determining the corner position of the outline of the map in the global image;
图5为根据角点位置和预设的实际地图尺寸确定全局图像的比例尺的示意流程图;Fig. 5 is a schematic flowchart of determining the scale of the global image according to the corner position and the preset actual map size;
图6为确定目标运动装置在地图中的实际位置的示意流程图;Fig. 6 is a schematic flowchart of determining the actual position of the target mobile device in the map;
图7为进行位置修正的三角函数关系示意图;Fig. 7 is a schematic diagram of the relationship between trigonometric functions for position correction;
图8为本申请实施例中一种地图定位装置的一个实施例结构图;FIG. 8 is a structural diagram of an embodiment of a map positioning device in the embodiment of the present application;
图9为本申请实施例中一种终端设备的示意框图。FIG. 9 is a schematic block diagram of a terminal device in an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
为使得本申请的发明目的、特征、优点能够更加的明显和易懂,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本申请一部分实施例,而非全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保 护的范围。In order to make the purpose, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the following The described embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and/or components, but does not exclude one or more other features. , whole, step, operation, element, component and/or the presence or addition of a collection thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terminology used in the specification of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural referents unless the context clearly dictates otherwise.
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be further understood that the term "and/or" used in the description of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations .
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be construed as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context . Similarly, the phrases "if determined" or "if [the described condition or event is detected]" may be construed, depending on the context, to mean "once determined" or "in response to the determination" or "once detected [the described condition or event] ]” or “in response to detection of [described condition or event]”.
另外,在本申请的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the present application, terms such as "first", "second", and "third" are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.
请参阅图1,本申请实施例中一种地图定位方法的一个实施例可以包括:Referring to Fig. 1, an embodiment of a map positioning method in the embodiment of the present application may include:
步骤S101、通过预设的摄像装置获取目标运动装置在地图上行进的全局图像。Step S101 , acquiring a global image of the target moving device traveling on the map through a preset camera device.
在本申请实施例中,目标运动装置可以为小车、无人机或机器人等各种运动装置。地图是指目标运动装置所行进的地面区域,例如,可以预先构建一个方形沙盘,目标运动装置在该沙盘上行进并执行各项指定任务,则该沙盘即为地图。摄像装置位于地图的顶部,例如,可以将摄像装置安装在地图所在房间的天花板上,使得摄像装置可以从上往下俯瞰整个地图,采集地图的完整图像。目标运动装置和地图上均设置有对应的标识码,便于对其进行识别和定位,该标识码可以为现有技术中任意一种可以进行识别和定位的码型,优选地,可以使用二维码作为标识码。In the embodiment of the present application, the target motion device may be various motion devices such as a car, a drone, or a robot. The map refers to the ground area where the target mobile device travels. For example, a square sand table can be constructed in advance, and the target mobile device travels on the sand table and performs various specified tasks, then the sand table is a map. The camera device is located on the top of the map. For example, the camera device can be installed on the ceiling of the room where the map is located, so that the camera device can overlook the entire map from top to bottom and collect a complete image of the map. Corresponding identification codes are provided on the target moving device and the map to facilitate its identification and positioning. The identification code can be any code pattern that can be identified and located in the prior art. Preferably, a two-dimensional code as an identification code.
在本申请实施例的一种具体实现中,步骤S101具体可以包括如图2所示的过程:In a specific implementation of the embodiment of the present application, step S101 may specifically include the process shown in Figure 2:
步骤S1011、对摄像装置进行相机标定,得到摄像装置的相机内参和畸变系数。Step S1011 , perform camera calibration on the camera device, and obtain camera intrinsic parameters and distortion coefficients of the camera device.
具体采用的相机标定方法可以根据实际情况进行设置,在本申请实施例中,可以优选采用张正友棋盘格标定法,得到摄像装置的相机内参(记为mtx)和畸变系数(记为dist)。The specific camera calibration method used can be set according to the actual situation. In the embodiment of the present application, the checkerboard calibration method of Zhang Zhengyou can be preferably used to obtain the internal camera reference (denoted as mtx) and distortion coefficient (denoted as dist) of the camera device.
步骤S1012、通过摄像装置获取目标运动装置在地图上行进的全局原始图像。Step S1012, acquire the global original image of the target moving device traveling on the map through the camera device.
其中,全局原始图像即为摄像装置直接采集到的,未经过去畸变处理的原始图像。摄像装置在进行实时视频流采集时,视频流中的每一帧图像均为全局原始图像。Wherein, the global original image is the original image directly collected by the camera device without past distortion processing. When the camera device is collecting real-time video streams, each frame of image in the video stream is a global original image.
步骤S1013、根据相机内参和畸变系数对全局原始图像进行去畸变处理,得到全局图像。Step S1013, performing de-distortion processing on the global original image according to the internal camera parameters and distortion coefficients to obtain a global image.
为了避免图像畸变影响后续二维码检测和地图检测的效果,本申请实施例可以对每一帧全局原始图像均进行去畸变处理。In order to prevent image distortion from affecting the effect of subsequent two-dimensional code detection and map detection, the embodiment of the present application may perform de-distortion processing on each frame of the global original image.
需要注意的是,OpenCV中对畸变图像进行畸变校正主要用的函数有UndistortImage函数,以及initUndistortRectifyMap结合remap函数。而UndistortImage就是initUndistortRectifyMap和remap的简单组合,效果是一样的。但是由于畸变坐标映射矩阵mapx和mapy只需要计算一次就够了,而重复调用UndistortImage会重复计算mapx和mapy,严重影响处理效率。因此对于摄像装置输入的实时视频流,可以仅使用一次initUndistortRectifyMap,获取畸变坐标映射矩阵mapx和mapy后,作为remap函数的输入,此后对视频流中的每一帧图像重复调用remap函数进行畸变校正即可。It should be noted that the main functions used for distortion correction of distorted images in OpenCV are the UndistortImage function, and the initUndistortRectifyMap combined with the remap function. And UndistortImage is a simple combination of initUndistortRectifyMap and remap, the effect is the same. However, since the distortion coordinate mapping matrices mapx and mapy only need to be calculated once, repeated calls to UndistortImage will repeatedly calculate mapx and mapy, which seriously affects the processing efficiency. Therefore, for the real-time video stream input by the camera device, initUndistortRectifyMap can be used only once to obtain the distortion coordinate mapping matrices mapx and mapy as the input of the remap function, and then repeatedly call the remap function for each frame of image in the video stream to perform distortion correction. Can.
步骤S102、在全局图像中对地图的标识码进行检测,并根据地图的标识码检测结果确定摄像装置距离地图的高度。Step S102: Detect the identification code of the map in the global image, and determine the height of the camera device from the map according to the detection result of the identification code of the map.
在本申请实施例中,可以预先在地图的左上角处贴一个标识码。以二维码为例,其各 种参数如格子数目、二维码边长和标号(记为id)可以根据实际情况进行设置,图3所示即为4×4格子、二维码边长为100mm以及id为1的二维码。In this embodiment of the application, an identification code may be pasted on the upper left corner of the map in advance. Taking the two-dimensional code as an example, its various parameters such as the number of grids, the side length of the two-dimensional code and the label (marked as id) can be set according to the actual situation. Figure 3 shows the 4×4 grid, the side length of the two-dimensional code A QR code with a size of 100mm and an id of 1.
在本申请实施例中,可以使用OpenCV的aruco库在全局图像中对地图的二维码进行检测。具体地,通过OpenCV的aruco.detectMarkers函数,可以得到二维码的4个角点的坐标以及id,即代表了当前是哪个二维码,之后将4个角点的坐标输入到OpenCV的aruco.estimatePoseSingleMarkers函数,通过PnP(Perspective-n-Point)求解方程,可以得到二维码的旋转矩阵(记为rvec)和平移矩阵(记为tvec),tvec的第三个参数就是z轴的平移量,代表了摄像装置距离地图的高度(记为map_h)。In the embodiment of this application, the aruco library of OpenCV can be used to detect the QR code of the map in the global image. Specifically, through the aruco.detectMarkers function of OpenCV, the coordinates and id of the four corners of the two-dimensional code can be obtained, which represents the current two-dimensional code, and then the coordinates of the four corners are input to OpenCV's aruco. The estimatePoseSingleMarkers function solves the equation by PnP (Perspective-n-Point) to obtain the rotation matrix (denoted as rvec) and translation matrix (denoted as tvec) of the two-dimensional code. The third parameter of tvec is the translation amount of the z-axis. Represents the height of the camera from the map (marked as map_h).
步骤S103、在全局图像中确定地图的轮廓的角点位置,并根据角点位置和预设的实际地图尺寸确定全局图像的比例尺。Step S103, determine the corner position of the outline of the map in the global image, and determine the scale of the global image according to the corner position and the preset actual map size.
在本申请实施例的一种具体实现中,可以通过如图4所示的过程确定地图的轮廓的角点位置:In a specific implementation of the embodiment of the present application, the corner position of the outline of the map can be determined through the process shown in Figure 4:
步骤S1031、对全局图像进行灰度化处理,得到灰度图像。Step S1031 , performing grayscale processing on the global image to obtain a grayscale image.
灰度图像相较于原始的RGB图像处理起来速度更快,灰度化之后矩阵维数下降,运算速度大幅度提高,而且仍然保留重要的梯度信息。在本申请实施例中,可以使用OpenCV的cvtColor函数对全局图像进行颜色空间转换(BGR、HSV、GRAY等颜色空间),参数使用COLOR_BGR2GRAY表示转换为灰度。Compared with the original RGB image, grayscale images are processed faster. After grayscale, the matrix dimension decreases, the operation speed is greatly improved, and important gradient information is still retained. In the embodiment of this application, the cvtColor function of OpenCV can be used to perform color space conversion (BGR, HSV, GRAY and other color spaces) on the global image, and the parameters are converted to grayscale using COLOR_BGR2GRAY.
步骤S1032、对灰度图像进行高斯模糊处理,得到高斯模糊图像。Step S1032 , performing Gaussian blur processing on the grayscale image to obtain a Gaussian blurred image.
高斯模糊对于图像来说就是一个低通滤波器,可以使得图像变得模糊且平滑,通常用来减少图像噪声以及降低细节层次。在本申请实施例中,可以使用OpenCV的GaussianBlur方法对图像进行高斯模糊处理。Gaussian blur is a low-pass filter for images, which can make the image blurred and smooth, and is usually used to reduce image noise and reduce the level of detail. In the embodiment of the present application, the Gaussian Blur method of OpenCV can be used to perform Gaussian blur processing on the image.
步骤S1033、对高斯模糊图像进行膨胀处理,得到膨胀图像。Step S1033 , performing dilation processing on the Gaussian blurred image to obtain the dilated image.
在本申请实施例中,可以使用OpenCV的dilate函数对图像进行膨胀处理。因为地图是一个方形,在去畸变后边线可能会丢失像素导致模糊,因此通过膨胀将地图的边缘扩大一些,将地图目标的边缘或者是内部的较小的孔洞填掉,从而实现地图边线稍微变大(防止断开)的效果,有利于后续的边线检测。In the embodiment of the present application, the dilate function of OpenCV can be used to dilate the image. Because the map is a square, the edge may lose pixels after de-distortion, resulting in blurring. Therefore, the edge of the map is expanded by expansion, and the edge of the map target or the smaller holes inside are filled in, so that the edge of the map is slightly changed. Large (to prevent disconnection) effect, which is beneficial to subsequent edge detection.
步骤S1034、对膨胀图像进行边缘检测,得到地图的边线。Step S1034, performing edge detection on the dilated image to obtain the edge of the map.
在本申请实施例中,可以使用OpenCV的Canny函数对图像进行边缘检测,最终得到一个输出二值图像,其中包含图像中存在的边线,从中即可得到地图边线。In the embodiment of this application, the Canny function of OpenCV can be used to perform edge detection on the image, and finally an output binary image is obtained, which contains the edges existing in the image, from which the map edges can be obtained.
步骤S1035、对地图的边线进行轮廓检测,得到地图的轮廓。Step S1035, performing contour detection on the edge of the map to obtain the contour of the map.
在本申请实施例中,可以使用OpenCV的findContours函数进行轮廓寻找,其中的参数cv2.RETR_EXTERNAL表示只检测外轮廓,即本申请实施例需要的地图外圈轮廓。轮廓(记为contour)由一系列点表示,但并不是存储轮廓上所有的点,只存储可以用直线描述轮廓的点的个数。对于地图而言,只需4个点即可描述其轮廓,这4个点即为地图的轮廓的角点。In the embodiment of the present application, the findContours function of OpenCV can be used to find the contour, and the parameter cv2.RETR_EXTERNAL indicates that only the outer contour is detected, that is, the outer circle contour of the map required by the embodiment of the present application. The contour (denoted as contour) is represented by a series of points, but not all points on the contour are stored, only the number of points that can describe the contour with a straight line is stored. For a map, only 4 points are needed to describe its outline, and these 4 points are the corner points of the outline of the map.
得到轮廓后,因为图像中可能存在不止地图一个轮廓,还有可能有其它图形,但可以确定的是地图轮廓在其中是最大的,因此通过轮廓排序,找到最大的轮廓即为地图的轮廓。After obtaining the outline, because there may be more than one outline of the map in the image, there may be other graphics, but it is certain that the outline of the map is the largest among them, so by sorting the outlines, the largest outline is found to be the outline of the map.
找到地图的轮廓后,可以通过OpenCV的arcLength函数和approxPolyDP函数来近似地图的轮廓,并使用drawCountors进行轮廓绘制操作。arcLength函数用于计算封闭轮廓的周长或曲线的长度,而aprroxPolyDP(cnt,epsilon,True)用于获得轮廓的近似值,其中,cnt为输入的轮廓值;epsilon为阈值T,通常使用轮廓的周长作为阈值;True表示的是轮廓是闭合的。After finding the outline of the map, the outline of the map can be approximated by the arcLength function and approxPolyDP function of OpenCV, and the outline drawing operation can be performed using drawCountors. The arcLength function is used to calculate the perimeter of the closed contour or the length of the curve, and aprroxPolyDP(cnt, epsilon, True) is used to obtain the approximate value of the contour, where cnt is the input contour value; epsilon is the threshold T, usually using the circumference of the contour Long as the threshold; True means the contour is closed.
步骤S1036、对地图的轮廓进行角点定位,得到地图的轮廓的角点位置。Step S1036, perform corner location on the outline of the map to obtain the corner position of the outline of the map.
角点定位的目的是对4个角点进行位置排列,一般是左上、右上、右下和左下即顺时钟的方向。The purpose of corner positioning is to arrange the positions of the four corner points, generally in the clockwise direction of upper left, upper right, lower right and lower left.
具体地,可以分别计算4个角点的横坐标和纵坐标之和,以最小的和为左上的角点, 最大的和为右下的角点,如下式所示:Specifically, the sum of the abscissa and ordinate of the four corner points can be calculated separately, with the smallest sum being the upper left corner, and the largest sum being the lower right corner, as shown in the following formula:
S i=x i+y i S i =x i +y i
Figure PCTCN2021126719-appb-000009
Figure PCTCN2021126719-appb-000009
其中,i代表角点的计算序号,x i为第i个角点的横坐标,y i为第i个角点的纵坐标,S i为第i个角点的横坐标和纵坐标之和,argmax代表取最大值,argmin代表取最小值,id是按顺序钟排序好的角点的顺序,id=0代表左上的角点,id=1代表右上的角点,id=2代表右下的角点,id=3代表左下的角点。 Among them, i represents the calculation number of the corner point, x i is the abscissa of the i-th corner point, y i is the ordinate of the i-th corner point, S i is the sum of the abscissa and ordinate of the i-th corner point , argmax represents the maximum value, argmin represents the minimum value, id is the order of the corner points sorted in order, id=0 represents the upper left corner point, id=1 represents the upper right corner point, id=2 represents the lower right corner point The corner point of , id=3 represents the bottom left corner point.
接着,继续对剩余的两个角点进行排序,分别计算两个角点的横坐标和纵坐标之差的绝对值,取值小的为右上的角点,取值大的为左下的角点,如下式所示:Next, continue to sort the remaining two corner points, respectively calculate the absolute value of the difference between the abscissa and ordinate of the two corner points, the smaller value is the upper right corner, and the larger value is the lower left corner , as shown in the following formula:
D i=|x i-y i| D i =| xi -y i |
Figure PCTCN2021126719-appb-000010
Figure PCTCN2021126719-appb-000010
其中,D i为第i个角点的横坐标和纵坐标之差的绝对值。 Among them, D i is the absolute value of the difference between the abscissa and ordinate of the i-th corner point.
完成以上计算后,即可得到按照顺时钟排序好(id从0到3排序)的地图的轮廓的角点位置。After the above calculations are completed, the corner positions of the outlines of the maps sorted clockwise (ids are sorted from 0 to 3) can be obtained.
在全局图像中确定地图的轮廓的角点位置之后,即可根据角点位置和实际地图尺寸确定全局图像的比例尺,这样在后续图像计算得到的像素坐标可以通过比例尺换算成实际地图上的距离,例如,比例尺s=2时表明图像中的1个像素(pixel)代表地图中的2mm实际距离。After determining the corner position of the outline of the map in the global image, the scale of the global image can be determined according to the corner position and the actual map size, so that the pixel coordinates calculated in the subsequent image can be converted into the distance on the actual map through the scale. For example, a scale of s=2 indicates that 1 pixel in the image represents an actual distance of 2 mm in the map.
如图5所示,根据角点位置和实际地图尺寸确定全局图像的比例尺具体可以包括如下步骤:As shown in Figure 5, determining the scale of the global image according to the corner position and the actual map size may specifically include the following steps:
步骤S1037、根据角点位置确定地图在全局图像中的像素尺寸。Step S1037. Determine the pixel size of the map in the global image according to the corner position.
在本申请实施例中,可以通过左上、右上的角点可以求地图最上面的边在全局图像中的长度(记为w1,单位是像素),通过左下、右下的角点可以求地图最下面的边在全局图像中的长度(记为w2,单位是像素),取w1和w2两者的均值w作为地图在全局图像中的宽。同理,通过左上、左下的角点可以求地图最左边的边在全局图像中的长度(记为h1,单位是像素),通过右上、右下的角点可以求地图最右边的边在全局图像中的长度(记为h2,单位是像素),取h1和h2两者的均值h作为地图在全局图像中的高。当地图是方形时,w和h是比较接近的。In the embodiment of this application, the length of the uppermost side of the map in the global image (denoted as w1, the unit is pixel) can be obtained through the upper left and upper right corner points, and the maximum length of the map can be obtained through the lower left and right corner points. The length of the following side in the global image (denoted as w2, the unit is pixel), take the mean value w of both w1 and w2 as the width of the map in the global image. In the same way, the length of the leftmost side of the map in the global image can be obtained through the upper left and lower left corners (denoted as h1, and the unit is pixel), and the rightmost side of the map can be found in the global image through the upper right and lower right corners. The length in the image (denoted as h2, the unit is pixel), take the mean value h of both h1 and h2 as the height of the map in the global image. When the map is square, w and h are relatively close.
步骤S1038、计算实际地图尺寸与像素尺寸的宽度比,并计算实际地图尺寸与像素尺寸的高度比,如下式所示:Step S1038, calculate the width ratio between the actual map size and the pixel size, and calculate the height ratio between the actual map size and the pixel size, as shown in the following formula:
Figure PCTCN2021126719-appb-000011
Figure PCTCN2021126719-appb-000011
Figure PCTCN2021126719-appb-000012
Figure PCTCN2021126719-appb-000012
其中,W和H分别是实际地图中的宽和高,s w为实际地图尺寸与像素尺寸的宽度比,s h为实际地图尺寸与像素尺寸的高度比。 Among them, W and H are the width and height of the actual map, respectively, sw is the width ratio of the actual map size to the pixel size, and sh is the height ratio of the actual map size to the pixel size.
步骤S1039、将宽度比和高度比的均值确定为全局图像的比例尺。Step S1039, determining the mean value of the width ratio and the height ratio as the scale of the global image.
当地图是方形时,s w和s h也是比较接近的,可以将两者的均值确定为全局图像的比例尺(记为s)。 When the map is square, s w and s h are relatively close, and the mean value of the two can be determined as the scale of the global image (denoted as s).
至此,完成地图检测的步骤,此时得到地图的轮廓的4个角点,并得到地图实际距离与其在全局图像中的比例尺。So far, the step of map detection is completed. At this time, the four corner points of the outline of the map are obtained, and the actual distance of the map and its scale in the global image are obtained.
步骤S104、在全局图像中对目标运动装置的标识码进行检测,并根据目标运动装置的标识码检测结果确定目标运动装置的标识码中心点。Step S104: Detect the identification code of the target mobile device in the global image, and determine the center point of the identification code of the target mobile device according to the detection result of the identification code of the target mobile device.
在本申请实施例中,目标运动装置的标识码可以贴在目标运动装置的上表面,便于摄像装置进行捕捉,该识别码可以用来代表目标运动装置的位置。In the embodiment of the present application, the identification code of the target mobile device may be pasted on the upper surface of the target mobile device to facilitate the camera device to capture, and the identification code may be used to represent the position of the target mobile device.
对目标运动装置的标识码进行检测的过程与步骤S102中对地图的标识码进行检测的过程类似,主要通过OpenCV的aruco.detectMarkers函数得到4个角点的坐标以及id,但此时不需要OpenCV的aruco.estimatePoseSingleMarkers函数求解PnP,来得到旋转矩阵rvec和平移矩阵tvec,而是直接通过4个角点的坐标来计算目标运动装置的标识码中心点的坐标,例如,可以对左上的角点和右下的角点求坐标均值,该均值即为目标运动装置的标识码中心点的坐标。The process of detecting the identification code of the target moving device is similar to the process of detecting the identification code of the map in step S102. The coordinates and id of the four corner points are mainly obtained through the aruco.detectMarkers function of OpenCV, but OpenCV is not required at this time The aruco.estimatePoseSingleMarkers function solves PnP to obtain the rotation matrix rvec and the translation matrix tvec, but directly calculates the coordinates of the center point of the identification code of the target moving device through the coordinates of the four corner points. For example, the upper left corner point and Calculate the mean value of the coordinates of the corner point on the lower right, and the mean value is the coordinate of the center point of the identification code of the target moving device.
步骤S105、根据目标运动装置的标识码中心点、地图的轮廓的角点位置、摄像装置距离地图的高度和比例尺确定目标运动装置在地图中的实际位置。Step S105: Determine the actual position of the target mobile device on the map according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height of the camera device from the map, and the scale.
在本申请实施例的一种具体实现中,步骤S105具体可以包括如图6所示的过程:In a specific implementation of the embodiment of the present application, step S105 may specifically include the process shown in Figure 6:
步骤S1051、根据目标运动装置的标识码中心点和地图的轮廓的角点位置确定目标运动装置在地图中的第一位置。Step S1051. Determine the first position of the target mobile device in the map according to the center point of the identification code of the target mobile device and the corner position of the outline of the map.
在本申请实施例中,可以将地图两条边的交点作为地图坐标系的原点,例如,可以将地图的上侧和左侧的两条边的交点作为地图坐标系的原点,沿上侧的边从左到右为x轴正方向,沿左侧的边从上到下为y轴正方向。分别计算目标运动装置与这两条边的距离,就可以将目标运动装置在全局图像中的位置转换到相对于地图的位置,即在地图坐标系中的位置。In this embodiment of the application, the intersection point of the two sides of the map can be used as the origin of the map coordinate system. For example, the intersection point of the two sides on the upper side and the left side of the map can be used as the origin of the map coordinate system. The positive direction of the x-axis is from left to right, and the positive direction of the y-axis is from top to bottom along the left side. By calculating the distances between the target mobile device and the two sides, the position of the target mobile device in the global image can be converted to a position relative to the map, that is, a position in the map coordinate system.
首先,需要判断目标运动装置是位于地图左侧的边的左侧还是右侧,以及目标运动装置是位于地图上侧的边的上侧还是下侧。计算公式如下所示:First, it is necessary to determine whether the target mobile device is located on the left side or the right side of the left side of the map, and whether the target mobile device is located on the upper side or the lower side of the upper side side of the map. The calculation formula is as follows:
T l=(y 0-y 3)*x c+(x 3-x 0)*y c+(x 0*y 3)-(x 3*y 0) T l =(y 0 -y 3 )*x c +(x 3 -x 0 )*y c +(x 0 *y 3 )-(x 3 *y 0 )
T t=(y 0-y 3)*x c+(x 3-x 0)*y c+(x 0*y 3)-(x 3*y 0) T t =(y 0 -y 3 )*x c +(x 3 -x 0 )*y c +(x 0 *y 3 )-(x 3 *y 0 )
其中,x c为目标运动装置的标识码中心点的横坐标,y c为目标运动装置的标识码中心点的纵坐标。若T l大于0,则目标运动装置位于地图左侧的边的左侧,否则,目标运动装置位于地图左侧的边的右侧;若T t大于0,则目标运动装置位于地图上侧的边的上侧,否则,目标运动装置位于地图上侧的边的下侧。 Wherein, x c is the abscissa of the central point of the identification code of the target mobile device, and y c is the vertical coordinate of the central point of the identification code of the target mobile device. If T l is greater than 0, the target mobile device is located on the left side of the left side of the map, otherwise, the target mobile device is located on the right side of the left side of the map; if T t is greater than 0, then the target mobile device is located on the upper side of the map The upper side of the edge, otherwise, the target mobile device is located on the lower side of the edge on the upper side of the map.
然后,可以分别计算目标运动装置与这两条边的距离。以左侧的边为例,可以通过目标运动装置的标识码中心点与该边的两点来计算距离,求点到直线的距离可以转换为求三角形的高,通过向量叉积求出三角形的面积,具体计算如下式所示:Then, the distances of the target motion device from the two edges can be calculated separately. Taking the side on the left as an example, the distance can be calculated from the center point of the identification code of the target moving device and two points on the side, and the distance from a point to a straight line can be converted into the height of a triangle, and the height of a triangle can be calculated by vector cross product The specific calculation of the area is shown in the following formula:
vec 1=P 1-P m vec 1 =P 1 -P m
vec 2=P 2-P m vec 2 =P 2 -P m
d=np.abs(np.cross(vec 1,vec 2))/np.linalg.norm(P 1-P 2) d=np.abs(np.cross(vec 1 ,vec 2 ))/np.linalg.norm(P 1 -P 2 )
其中,P 1代表该边的第一个点,P 2代表该边的第二个点,P m代表目标运动装置的标识码中心点,vec 1代表由P m到P 1的向量,vec 2代表由P m到P 2的向量,np.abs为求绝对值的函数,np.cross为求向量叉积的函数,np.linalg.norm为求范数的函数,d为目标运动装置与左侧的边的距离。 Among them, P 1 represents the first point of the side, P 2 represents the second point of the side, P m represents the center point of the identification code of the target motion device, vec 1 represents the vector from P m to P 1 , vec 2 Represents the vector from P m to P 2 , np.abs is the function to find the absolute value, np.cross is the function to find the vector cross product, np.linalg.norm is the function to find the norm, d is the target movement device and the left The distance from the edge of the side.
目标运动装置与上侧的边的距离的计算过程与之类似,可参照上述内容,此处不再赘述。The calculation process of the distance between the target moving device and the upper side is similar, and reference may be made to the above content, which will not be repeated here.
在确定目标运动装置是位于地图左侧的边的左侧还是右侧,目标运动装置是位于地图上侧的边的上侧还是下侧,目标运动装置与左侧的边的距离,以及目标运动装置与上侧的边的距离之后,则目标运动装置在地图中的第一位置即可确定下来。In determining whether the target mobile device is to the left or right of the edge on the left side of the map, whether the target mobile device is above or below the edge on the upper side of the map, the distance of the target mobile device from the left edge, and the target motion After determining the distance between the device and the upper side, the first position of the target mobile device in the map can be determined.
步骤S1052、根据摄像装置距离地图的高度和目标运动装置的预设高度对第一位置进行修正,得到目标运动装置在地图中的第二位置。Step S1052 , correcting the first position according to the height of the camera device from the map and the preset height of the target mobile device to obtain a second position of the target mobile device on the map.
如图7所示,由于目标运动装置距离地面有一定的高度差,光线投影存在一个偏差, 其中,O 1为摄像装置的光心位置,O 3为从O 1向地图做垂线的交点,p 1为第二位置,即目标运动装置在地图中的实际位置,但是由于高度差和光线传播的原因,在图像中成像是p 3,也即第一位置,p 2为从p 1向地图做垂线的交点,p 1和p 2的横纵坐标是一样的,O 2为从p 1向线段O 1O 3做垂线的交点,O 1、O 2和O 3的横纵坐标是一样的。 As shown in Figure 7, since the target moving device has a certain height difference from the ground, there is a deviation in the light projection, where O 1 is the optical center position of the camera device, O 3 is the intersection point of the vertical line from O 1 to the map, p 1 is the second position, that is, the actual position of the target moving device in the map, but due to the height difference and light propagation, the imaging in the image is p 3 , which is the first position, and p 2 is from p 1 to the map Make the intersection point of the vertical line, the horizontal and vertical coordinates of p 1 and p 2 are the same, O 2 is the intersection point of the vertical line from p 1 to the line segment O 1 O 3 , the horizontal and vertical coordinates of O 1 , O 2 and O 3 are the same.
在本申请实施例中,可以根据图7中的三角函数关系进行位置修正,具体的计算公式如下所示:In the embodiment of the present application, the position correction can be performed according to the trigonometric function relationship in Figure 7, and the specific calculation formula is as follows:
Figure PCTCN2021126719-appb-000013
Figure PCTCN2021126719-appb-000013
Figure PCTCN2021126719-appb-000014
Figure PCTCN2021126719-appb-000014
其中,(x *,y *)为第一位置的坐标,h m为摄像装置距离地图的高度,h c为目标运动装置的预设高度,也即目标运动装置的标识码中心点距离地图的高度,(x,y)为第二位置的坐标。 Among them, (x * , y * ) is the coordinate of the first position, h m is the height of the camera device from the map, h c is the preset height of the target mobile device, that is, the distance from the center point of the identification code of the target mobile device to the map Height, (x,y) is the coordinate of the second position.
步骤S1053、根据目标运动装置在地图中的第二位置和比例尺确定目标运动装置在地图中的实际位置。Step S1053. Determine the actual position of the target mobile device on the map according to the second position of the target mobile device on the map and the scale.
具体地,可以根据下式计算目标运动装置在地图中的实际位置:Specifically, the actual position of the target mobile device in the map can be calculated according to the following formula:
Figure PCTCN2021126719-appb-000015
Figure PCTCN2021126719-appb-000015
Figure PCTCN2021126719-appb-000016
Figure PCTCN2021126719-appb-000016
其中,(x m,y m)即为目标运动装置在地图坐标系中的实际位置的坐标。至此,地图检测、地图坐标系构建、目标运动装置在地图坐标系上的实际位置的计算均已完成,对于每一帧图像,均可实时得到目标运动装置在地图坐标系中的实际位置。在此基础上可以控制目标运动装置完成各种复杂任务,而非仅仅沿着预先设置好的固定路线进行简单的巡线任务,具有极高的灵活性。 Wherein, (x m , y m ) are the coordinates of the actual position of the target moving device in the map coordinate system. So far, the map detection, the construction of the map coordinate system, and the calculation of the actual position of the target moving device on the map coordinate system have all been completed. For each frame of image, the actual position of the target moving device in the map coordinate system can be obtained in real time. On this basis, the target motion device can be controlled to complete various complex tasks, instead of simply performing simple line inspection tasks along a preset fixed route, which has extremely high flexibility.
综上所述,本申请实施例预先在目标运动装置所行进的地图顶部设置了摄像装置,并在目标运动装置和地图上均设置了对应的标识码;通过摄像装置获取目标运动装置在地图上行进的全局图像;在全局图像中对地图的标识码进行检测,并根据地图的标识码检测结果确定摄像装置距离地图的高度;在全局图像中确定地图的轮廓的角点位置,并根据角点位置和预设的实际地图尺寸确定全局图像的比例尺;在全局图像中对目标运动装置的标识码进行检测,并根据目标运动装置的标识码检测结果确定目标运动装置的标识码中心点;根据目标运动装置的标识码中心点、地图的轮廓的角点位置、摄像装置距离地图的高度和比例尺确定目标运动装置在地图中的实际位置,从而可以实现对目标运动装置的精确定位。在此基础上可以控制目标运动装置完成各种复杂任务,而非仅仅沿着预先设置好的固定路线进行简单的巡线任务,具有极高的灵活性。To sum up, in the embodiment of the present application, a camera device is set in advance on the top of the map where the target mobile device travels, and corresponding identification codes are set on both the target mobile device and the map; The global image of progress; the identification code of the map is detected in the global image, and the height of the camera device from the map is determined according to the detection result of the identification code of the map; the corner position of the contour of the map is determined in the global image, and according to the corner point The position and the preset actual map size determine the scale of the global image; detect the identification code of the target mobile device in the global image, and determine the center point of the identification code of the target mobile device according to the detection result of the target mobile device; according to the target The center point of the identification code of the moving device, the corner position of the outline of the map, the height and the scale of the camera device from the map determine the actual position of the target moving device in the map, so that the precise positioning of the target moving device can be realized. On this basis, the target motion device can be controlled to complete various complex tasks, instead of simply performing simple line inspection tasks along a preset fixed route, which has extremely high flexibility.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
对应于上文实施例所述的一种地图定位方法,图8示出了本申请实施例提供的一种地图定位装置的一个实施例结构图。Corresponding to the map positioning method described in the above embodiments, FIG. 8 shows a structural diagram of an embodiment of a map positioning device provided in the embodiment of the present application.
本实施例中,一种地图定位装置可以包括:In this embodiment, a map positioning device may include:
图像获取模块801,用于通过预设的摄像装置获取目标运动装置在地图上行进的全局图像;所述摄像装置位于所述地图的顶部;所述目标运动装置和所述地图上均设置有对应的标识码;The image acquisition module 801 is used to obtain a global image of the target moving device traveling on the map through a preset camera device; the camera device is located at the top of the map; the target moving device and the map are provided with corresponding the identification code;
地图标识码检测模块802,用于在所述全局图像中对所述地图的标识码进行检测,并根据所述地图的标识码检测结果确定所述摄像装置距离所述地图的高度;A map identification code detection module 802, configured to detect the identification code of the map in the global image, and determine the height of the camera device from the map according to the detection result of the identification code of the map;
角点位置确定模块803,用于在所述全局图像中确定所述地图的轮廓的角点位置;A corner position determination module 803, configured to determine the corner position of the outline of the map in the global image;
比例尺确定模块804,用于根据所述角点位置和预设的实际地图尺寸确定所述全局图像的比例尺;A scale determination module 804, configured to determine the scale of the global image according to the corner position and the preset actual map size;
装置标识码检测模块805,用于在所述全局图像中对所述目标运动装置的标识码进行检测,并根据所述目标运动装置的标识码检测结果确定所述目标运动装置的标识码中心点;A device identification code detection module 805, configured to detect the identification code of the target moving device in the global image, and determine the center point of the identification code of the target moving device according to the detection result of the identification code of the target moving device ;
位置确定模块806,用于根据所述目标运动装置的标识码中心点、所述地图的轮廓的角点位置、所述摄像装置距离所述地图的高度和所述比例尺确定所述目标运动装置在所述地图中的实际位置。A position determination module 806, configured to determine the location of the target mobile device according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height of the camera device from the map, and the scale. The actual location on the map.
在本申请实施例的一种具体实现中,所述角点位置确定模块可以包括:In a specific implementation of the embodiment of the present application, the corner position determination module may include:
灰度化单元,用于对所述全局图像进行灰度化处理,得到灰度图像;a grayscale unit, configured to perform grayscale processing on the global image to obtain a grayscale image;
高斯模糊单元,用于对所述灰度图像进行高斯模糊处理,得到高斯模糊图像;a Gaussian blur unit, configured to perform Gaussian blur processing on the grayscale image to obtain a Gaussian blurred image;
膨胀单元,用于对所述高斯模糊图像进行膨胀处理,得到膨胀图像;an expansion unit, configured to perform expansion processing on the Gaussian blurred image to obtain an expanded image;
边缘检测单元,用于对所述膨胀图像进行边缘检测,得到所述地图的边线;an edge detection unit, configured to perform edge detection on the dilated image to obtain an edge of the map;
轮廓检测单元,用于对所述地图的边线进行轮廓检测,得到所述地图的轮廓;a contour detection unit, configured to perform contour detection on the edge of the map to obtain the contour of the map;
角点定位单元,用于对所述地图的轮廓进行角点定位,得到所述地图的轮廓的角点位置。The corner positioning unit is configured to perform corner positioning on the outline of the map to obtain corner positions of the outline of the map.
在本申请实施例的一种具体实现中,所述比例尺确定模块可以包括:In a specific implementation of the embodiment of the present application, the scale determination module may include:
像素尺寸确定单元,用于根据所述角点位置确定所述地图在所述全局图像中的像素尺寸;a pixel size determining unit, configured to determine the pixel size of the map in the global image according to the corner position;
宽度比计算单元,用于计算所述实际地图尺寸与所述像素尺寸的宽度比;a width ratio calculation unit, configured to calculate a width ratio between the actual map size and the pixel size;
高度比计算单元,用于计算所述实际地图尺寸与所述像素尺寸的高度比;a height ratio calculation unit, configured to calculate the height ratio between the actual map size and the pixel size;
比例尺确定单元,用于将所述宽度比和所述高度比的均值确定为所述全局图像的比例尺。A scale determining unit, configured to determine an average value of the width ratio and the height ratio as the scale of the global image.
在本申请实施例的一种具体实现中,所述位置确定模块可以包括:In a specific implementation of the embodiment of the present application, the location determination module may include:
第一位置确定单元,用于根据所述目标运动装置的标识码中心点和所述地图的轮廓的角点位置确定所述目标运动装置在所述地图中的第一位置;A first position determining unit, configured to determine a first position of the target mobile device in the map according to the center point of the identification code of the target mobile device and the corner position of the outline of the map;
第二位置确定单元,用于根据所述摄像装置距离所述地图的高度和所述目标运动装置的预设高度对所述第一位置进行修正,得到所述目标运动装置在所述地图中的第二位置;The second position determination unit is configured to correct the first position according to the height of the camera device from the map and the preset height of the target mobile device, to obtain the position of the target mobile device in the map second position;
实际位置确定单元,用于根据所述目标运动装置在所述地图中的第二位置和所述比例尺确定所述目标运动装置在所述地图中的实际位置。An actual position determining unit, configured to determine the actual position of the target mobile device in the map according to the second position of the target mobile device in the map and the scale.
在本申请实施例的一种具体实现中,所述第二位置确定单元具体用于根据下式对所述第一位置进行修正:In a specific implementation of the embodiment of the present application, the second position determining unit is specifically configured to correct the first position according to the following formula:
Figure PCTCN2021126719-appb-000017
Figure PCTCN2021126719-appb-000017
Figure PCTCN2021126719-appb-000018
Figure PCTCN2021126719-appb-000018
其中,(x *,y *)为所述第一位置的坐标,h m为所述摄像装置距离所述地图的高度,h c为所述目标运动装置的预设高度,(x,y)为所述第二位置的坐标。 Wherein, (x * , y * ) is the coordinate of the first position, h m is the height of the camera device from the map, h c is the preset height of the target moving device, (x, y) is the coordinates of the second location.
在本申请实施例的一种具体实现中,所述实际位置确定单元具体用于根据下式计算所述目标运动装置在所述地图中的实际位置:In a specific implementation of the embodiment of the present application, the actual position determining unit is specifically configured to calculate the actual position of the target moving device in the map according to the following formula:
Figure PCTCN2021126719-appb-000019
Figure PCTCN2021126719-appb-000019
Figure PCTCN2021126719-appb-000020
Figure PCTCN2021126719-appb-000020
其中,(x,y)为所述第二位置的坐标,s为所述比例尺,W为所述实际地图尺寸的宽度,H为所述实际地图尺寸的高度,(x m,y m)为所述实际位置的坐标。 Wherein, (x, y) is the coordinate of the second position, s is the scale, W is the width of the actual map size, H is the height of the actual map size, (x m , y m ) is The coordinates of the actual location.
在本申请实施例的一种具体实现中,所述图像获取模块可以包括:In a specific implementation of the embodiment of the present application, the image acquisition module may include:
相机标定单元,用于对所述摄像装置进行相机标定,得到所述摄像装置的相机内参和畸变系数;A camera calibration unit, configured to perform camera calibration on the camera device to obtain camera internal parameters and distortion coefficients of the camera device;
原始图像获取单元,用于通过所述摄像装置获取所述目标运动装置在所述地图上行进的全局原始图像;an original image acquisition unit, configured to acquire a global original image of the target moving device traveling on the map through the camera device;
去畸变单元,用于根据所述相机内参和所述畸变系数对所述全局原始图像进行去畸变处理,得到所述全局图像。A de-distortion unit, configured to perform de-distortion processing on the global original image according to the internal camera parameters and the distortion coefficients, to obtain the global image.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置,模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described devices, modules and units can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases, and for parts that are not detailed or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.
图9示出了本申请实施例提供的一种终端设备的示意框图,为了便于说明,仅示出了与本申请实施例相关的部分。FIG. 9 shows a schematic block diagram of a terminal device provided by an embodiment of the present application. For ease of description, only parts related to the embodiment of the present application are shown.
如图9所示,该实施例的终端设备9包括:处理器90、存储器91以及存储在所述存储器91中并可在所述处理器90上运行的计算机程序92。所述处理器90执行所述计算机程序92时实现上述各个地图定位方法实施例中的步骤,例如图1所示的步骤S101至步骤S105。或者,所述处理器90执行所述计算机程序92时实现上述各装置实施例中各模块/单元的功能,例如图8所示模块801至模块806的功能。As shown in FIG. 9 , the terminal device 9 of this embodiment includes: a processor 90 , a memory 91 , and a computer program 92 stored in the memory 91 and operable on the processor 90 . When the processor 90 executes the computer program 92, it realizes the steps in the above embodiments of the map positioning method, for example, steps S101 to S105 shown in FIG. 1 . Alternatively, when the processor 90 executes the computer program 92, the functions of the modules/units in the above-mentioned device embodiments are realized, for example, the functions of the modules 801 to 806 shown in FIG. 8 .
示例性的,所述计算机程序92可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器91中,并由所述处理器90执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序92在所述终端设备9中的执行过程。Exemplarily, the computer program 92 can be divided into one or more modules/units, and the one or more modules/units are stored in the memory 91 and executed by the processor 90 to complete this application. The one or more modules/units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program 92 in the terminal device 9 .
所述终端设备9可以是手机、平板电脑、桌上型计算机、笔记本、掌上电脑及机器人等计算设备。本领域技术人员可以理解,图9仅仅是终端设备9的示例,并不构成对终端设备9的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备9还可以包括输入输出设备、网络接入设备、总线等。The terminal device 9 may be a computing device such as a mobile phone, a tablet computer, a desktop computer, a notebook, a palmtop computer, and a robot. Those skilled in the art can understand that FIG. 9 is only an example of the terminal device 9, and does not constitute a limitation to the terminal device 9. It may include more or less components than those shown in the figure, or combine certain components, or different components. For example, the terminal device 9 may also include an input and output device, a network access device, a bus, and the like.
所述处理器90可以是中央处理单元(Central Processing Unit,CPU),还可以是其它通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 90 can be a central processing unit (Central Processing Unit, CPU), and can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
所述存储器91可以是所述终端设备9的内部存储单元,例如终端设备9的硬盘或内存。所述存储器91也可以是所述终端设备9的外部存储设备,例如所述终端设备9上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器91还可以既包括所述终端设备9的内部存储单元也包括外部存储设备。所述存储器91用于存储所述计算机程序以及所述终端设备9所需的其它程序和数据。所述存储器91还可以用于暂时地存储已经输出或者将要输出的数据。The storage 91 may be an internal storage unit of the terminal device 9 , such as a hard disk or memory of the terminal device 9 . The memory 91 can also be an external storage device of the terminal device 9, such as a plug-in hard disk equipped on the terminal device 9, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 91 may also include both an internal storage unit of the terminal device 9 and an external storage device. The memory 91 is used to store the computer program and other programs and data required by the terminal device 9 . The memory 91 can also be used to temporarily store data that has been output or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used for illustration. In practical applications, the above-mentioned functions can be assigned to different functional units, Completion of modules means that the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit, and the above-mentioned integrated units may adopt hardware It can also be implemented in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the above system, reference may be made to the corresponding process in the foregoing method embodiments, and details will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases, and for parts that are not detailed or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the device/terminal device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读存储介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读存储介质不包括电载波信号和电信信号。If the integrated module/unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments in the present application can also be completed by instructing related hardware through computer programs. The computer programs can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps in the above-mentioned various method embodiments can be realized. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) ), Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable Storage media excludes electrical carrier signals and telecommunication signals.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still implement the foregoing embodiments Modifications to the technical solutions described in the examples, or equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the application, and should be included in the Within the protection scope of this application.

Claims (10)

  1. 一种地图定位方法,其特征在于,包括:A map positioning method, characterized in that, comprising:
    通过预设的摄像装置获取目标运动装置在地图上行进的全局图像;所述摄像装置位于所述地图的顶部;所述目标运动装置和所述地图上均设置有对应的标识码;Obtain a global image of the target moving device traveling on the map through a preset camera; the camera is located at the top of the map; the target moving device and the map are provided with corresponding identification codes;
    在所述全局图像中对所述地图的标识码进行检测,并根据所述地图的标识码检测结果确定所述摄像装置距离所述地图的高度;Detecting the identification code of the map in the global image, and determining the height of the camera device from the map according to the detection result of the identification code of the map;
    在所述全局图像中确定所述地图的轮廓的角点位置,并根据所述角点位置和预设的实际地图尺寸确定所述全局图像的比例尺;determining the corner position of the outline of the map in the global image, and determining the scale of the global image according to the corner position and a preset actual map size;
    在所述全局图像中对所述目标运动装置的标识码进行检测,并根据所述目标运动装置的标识码检测结果确定所述目标运动装置的标识码中心点;Detecting the identification code of the target moving device in the global image, and determining the center point of the identification code of the target moving device according to the detection result of the identification code of the target moving device;
    根据所述目标运动装置的标识码中心点、所述地图的轮廓的角点位置、所述摄像装置距离所述地图的高度和所述比例尺确定所述目标运动装置在所述地图中的实际位置。Determine the actual position of the target mobile device in the map according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height of the camera device from the map, and the scale .
  2. 根据权利要求1所述的地图定位方法,其特征在于,所述在所述全局图像中确定所述地图的轮廓的角点位置,包括:The map positioning method according to claim 1, wherein the determining the corner position of the outline of the map in the global image comprises:
    对所述全局图像进行灰度化处理,得到灰度图像;performing grayscale processing on the global image to obtain a grayscale image;
    对所述灰度图像进行高斯模糊处理,得到高斯模糊图像;Performing Gaussian blur processing on the grayscale image to obtain a Gaussian blurred image;
    对所述高斯模糊图像进行膨胀处理,得到膨胀图像;performing expansion processing on the Gaussian blurred image to obtain an expanded image;
    对所述膨胀图像进行边缘检测,得到所述地图的边线;performing edge detection on the expanded image to obtain the edge of the map;
    对所述地图的边线进行轮廓检测,得到所述地图的轮廓;performing contour detection on the edge of the map to obtain the contour of the map;
    对所述地图的轮廓进行角点定位,得到所述地图的轮廓的角点位置。Perform corner location on the outline of the map to obtain the corner position of the outline of the map.
  3. 根据权利要求1所述的地图定位方法,其特征在于,所述根据所述角点位置和预设的实际地图尺寸确定所述全局图像的比例尺,包括:The map positioning method according to claim 1, wherein the determining the scale of the global image according to the corner position and the preset actual map size includes:
    根据所述角点位置确定所述地图在所述全局图像中的像素尺寸;determining the pixel size of the map in the global image according to the corner position;
    计算所述实际地图尺寸与所述像素尺寸的宽度比;calculating the width ratio of the actual map size to the pixel size;
    计算所述实际地图尺寸与所述像素尺寸的高度比;calculating the height ratio of the actual map size to the pixel size;
    将所述宽度比和所述高度比的均值确定为所述全局图像的比例尺。The mean value of the width ratio and the height ratio is determined as the scale of the global image.
  4. 根据权利要求1所述的地图定位方法,其特征在于,所述根据所述目标运动装置的标识码中心点、所述地图的轮廓的角点位置、所述摄像装置距离所述地图的高度和所述比例尺确定所述目标运动装置在所述地图中的实际位置,包括:The map positioning method according to claim 1, wherein the center point of the identification code according to the target moving device, the corner position of the outline of the map, the height of the camera device from the map, and The scale determines the actual location of the target mobile device on the map, including:
    根据所述目标运动装置的标识码中心点和所述地图的轮廓的角点位置确定所述目标运动装置在所述地图中的第一位置;determining a first position of the target mobile device in the map according to the center point of the identification code of the target mobile device and the corner position of the outline of the map;
    根据所述摄像装置距离所述地图的高度和所述目标运动装置的预设高度对所述第一位置进行修正,得到所述目标运动装置在所述地图中的第二位置;correcting the first position according to the height of the camera from the map and the preset height of the target moving device to obtain a second position of the target moving device in the map;
    根据所述目标运动装置在所述地图中的第二位置和所述比例尺确定所述目标运动装置在所述地图中的实际位置。An actual position of the target mobile device in the map is determined based on a second position of the target mobile device in the map and the scale.
  5. 根据权利要求4所述的地图定位方法,其特征在于,所述根据所述摄像装置距离所述地图的高度和所述目标运动装置的预设高度对所述第一位置进行修正,得到所述目标运动装置在所述地图中的第二位置,包括:The map positioning method according to claim 4, wherein the first position is corrected according to the height of the camera device from the map and the preset height of the target moving device to obtain the A second location of the target mobile device in said map, comprising:
    根据下式对所述第一位置进行修正:The first position is corrected according to the following formula:
    Figure PCTCN2021126719-appb-100001
    Figure PCTCN2021126719-appb-100001
    Figure PCTCN2021126719-appb-100002
    Figure PCTCN2021126719-appb-100002
    其中,(x *,y *)为所述第一位置的坐标,h m为所述摄像装置距离所述地图的高度,h c为所述目标运动装置的预设高度,(x,y)为所述第二位置的坐标。 Wherein, (x * , y * ) is the coordinate of the first position, h m is the height of the camera device from the map, h c is the preset height of the target moving device, (x, y) is the coordinates of the second location.
  6. 根据权利要求4所述的地图定位方法,其特征在于,所述根据所述目标运动装置在所述地图中的第二位置和所述比例尺确定所述目标运动装置在所述地图中的实际位置,包括:The map positioning method according to claim 4, wherein the actual position of the target moving device in the map is determined according to the second position of the target moving device in the map and the scale ,include:
    根据下式计算所述目标运动装置在所述地图中的实际位置:The actual position of the target mobile device in the map is calculated according to the following formula:
    Figure PCTCN2021126719-appb-100003
    Figure PCTCN2021126719-appb-100003
    Figure PCTCN2021126719-appb-100004
    Figure PCTCN2021126719-appb-100004
    其中,(x,y)为所述第二位置的坐标,s为所述比例尺,W为所述实际地图尺寸的宽度,H为所述实际地图尺寸的高度,(x m,y m)为所述实际位置的坐标。 Wherein, (x, y) is the coordinate of the second position, s is the scale, W is the width of the actual map size, H is the height of the actual map size, (x m , y m ) is The coordinates of the actual location.
  7. 根据权利要求1至6中任一项所述的地图定位方法,其特征在于,所述通过预设的摄像装置获取目标运动装置在地图上行进的全局图像,包括:The map positioning method according to any one of claims 1 to 6, wherein the acquisition of a global image of the target moving device traveling on the map through a preset camera device includes:
    对所述摄像装置进行相机标定,得到所述摄像装置的相机内参和畸变系数;Carrying out camera calibration on the camera device to obtain camera internal parameters and distortion coefficients of the camera device;
    通过所述摄像装置获取所述目标运动装置在所述地图上行进的全局原始图像;Obtaining a global original image of the target moving device traveling on the map through the camera device;
    根据所述相机内参和所述畸变系数对所述全局原始图像进行去畸变处理,得到所述全局图像。De-distorting the global original image according to the internal camera parameters and the distortion coefficient to obtain the global image.
  8. 一种地图定位装置,其特征在于,包括:A map positioning device is characterized in that it comprises:
    图像获取模块,用于通过预设的摄像装置获取目标运动装置在地图上行进的全局图像;所述摄像装置位于所述地图的顶部;所述目标运动装置和所述地图上均设置有对应的标识码;The image acquisition module is used to obtain the global image of the target moving device traveling on the map through the preset camera device; the camera device is located at the top of the map; the target moving device and the map are provided with corresponding identification code;
    地图标识码检测模块,用于在所述全局图像中对所述地图的标识码进行检测,并根据所述地图的标识码检测结果确定所述摄像装置距离所述地图的高度;A map identification code detection module, configured to detect the identification code of the map in the global image, and determine the height of the camera device from the map according to the detection result of the identification code of the map;
    角点位置确定模块,用于在所述全局图像中确定所述地图的轮廓的角点位置;a corner position determining module, configured to determine the corner position of the outline of the map in the global image;
    比例尺确定模块,用于根据所述角点位置和预设的实际地图尺寸确定所述全局图像的比例尺;A scale determination module, configured to determine the scale of the global image according to the corner position and the preset actual map size;
    装置标识码检测模块,用于在所述全局图像中对所述目标运动装置的标识码进行检测,并根据所述目标运动装置的标识码检测结果确定所述目标运动装置的标识码中心点;A device identification code detection module, configured to detect the identification code of the target moving device in the global image, and determine the center point of the identification code of the target moving device according to the detection result of the identification code of the target moving device;
    位置确定模块,用于根据所述目标运动装置的标识码中心点、所述地图的轮廓的角点位置、所述摄像装置距离所述地图的高度和所述比例尺确定所述目标运动装置在所述地图中的实际位置。A position determination module, configured to determine the position of the target mobile device at the target mobile device according to the center point of the identification code of the target mobile device, the corner position of the outline of the map, the height of the camera device from the map, and the scale actual location on the map.
  9. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的地图定位方法的步骤。A computer-readable storage medium, the computer-readable storage medium stores a computer program, characterized in that, when the computer program is executed by a processor, the map positioning method according to any one of claims 1 to 7 is implemented A step of.
  10. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7中任一项所述的地图定位方法的步骤。A terminal device, comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, characterized in that, when the processor executes the computer program, the following claims 1 to 1 are implemented. 7. The steps of any one of the map positioning methods.
PCT/CN2021/126719 2021-07-23 2021-10-27 Map positioning method and apparatus, computer-readable storage medium and terminal device WO2023000528A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110837305.8A CN113628273B (en) 2021-07-23 2021-07-23 Map positioning method, map positioning device, computer readable storage medium and terminal equipment
CN202110837305.8 2021-07-23

Publications (1)

Publication Number Publication Date
WO2023000528A1 true WO2023000528A1 (en) 2023-01-26

Family

ID=78380728

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/126719 WO2023000528A1 (en) 2021-07-23 2021-10-27 Map positioning method and apparatus, computer-readable storage medium and terminal device

Country Status (2)

Country Link
CN (1) CN113628273B (en)
WO (1) WO2023000528A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140192658A1 (en) * 2013-01-04 2014-07-10 Qualcomm Incorporated Dynamic selection of positioning system and display map
CN104792312A (en) * 2014-01-20 2015-07-22 广东工业大学 Indoor automatic transport vehicle positioning system with three fixed balls as visual marker
CN106153050A (en) * 2016-08-27 2016-11-23 杭州国辰牵星科技有限公司 A kind of indoor locating system based on beacon and method
CN107689063A (en) * 2017-07-27 2018-02-13 南京理工大学北方研究院 A kind of robot indoor orientation method based on ceiling image
CN107992793A (en) * 2017-10-20 2018-05-04 深圳华侨城卡乐技术有限公司 A kind of indoor orientation method, device and storage medium
CN109784250A (en) * 2019-01-04 2019-05-21 广州广电研究院有限公司 The localization method and device of automatically guiding trolley
CN111426325A (en) * 2020-06-12 2020-07-17 北京云迹科技有限公司 Positioning method and device, robot, storage medium and positioning system
CN111968177A (en) * 2020-07-22 2020-11-20 东南大学 Mobile robot positioning method based on fixed camera vision

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6975425B1 (en) * 1998-02-26 2005-12-13 Canon Kabushiki Kaisha Information processing apparatus and information processing method
CN101726283A (en) * 2009-12-24 2010-06-09 北京测科空间信息技术有限公司 Large scale surveying, mapping and labeling method of aerophotogrammetry
CN107766855B (en) * 2017-10-25 2021-09-07 南京阿凡达机器人科技有限公司 Chessman positioning method and system based on machine vision, storage medium and robot
CN109872372B (en) * 2019-03-07 2021-04-09 山东大学 Global visual positioning method and system for small quadruped robot
CN110989687B (en) * 2019-11-08 2021-08-10 上海交通大学 Unmanned aerial vehicle landing method based on nested square visual information

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140192658A1 (en) * 2013-01-04 2014-07-10 Qualcomm Incorporated Dynamic selection of positioning system and display map
CN104792312A (en) * 2014-01-20 2015-07-22 广东工业大学 Indoor automatic transport vehicle positioning system with three fixed balls as visual marker
CN106153050A (en) * 2016-08-27 2016-11-23 杭州国辰牵星科技有限公司 A kind of indoor locating system based on beacon and method
CN107689063A (en) * 2017-07-27 2018-02-13 南京理工大学北方研究院 A kind of robot indoor orientation method based on ceiling image
CN107992793A (en) * 2017-10-20 2018-05-04 深圳华侨城卡乐技术有限公司 A kind of indoor orientation method, device and storage medium
CN109784250A (en) * 2019-01-04 2019-05-21 广州广电研究院有限公司 The localization method and device of automatically guiding trolley
CN111426325A (en) * 2020-06-12 2020-07-17 北京云迹科技有限公司 Positioning method and device, robot, storage medium and positioning system
CN111968177A (en) * 2020-07-22 2020-11-20 东南大学 Mobile robot positioning method based on fixed camera vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JI XU: "Research on Location Method of Mobile Robot Based on Monocular Vision", CHINA MASTER'S' THESES FULL-TEXT DATABASE (ELECTRONIC JOURNAL)-INFORMATION & TECHNOLOGY), TIANJIN POLYTECHNIC UNIVERSITY, CN, no. 3, 15 March 2018 (2018-03-15), CN , XP093026245, ISSN: 1674-0246 *

Also Published As

Publication number Publication date
CN113628273A (en) 2021-11-09
CN113628273B (en) 2023-12-15

Similar Documents

Publication Publication Date Title
US9740967B2 (en) Method and apparatus of determining air quality
CN109785291B (en) Lane line self-adaptive detection method
WO2019242416A1 (en) Video image processing method and apparatus, computer readable storage medium and electronic device
WO2021233266A1 (en) Edge detection method and apparatus, and electronic device and storage medium
WO2022237811A1 (en) Image processing method and apparatus, and device
CN111192293A (en) Moving target pose tracking method and device
WO2022062238A1 (en) Football detection method and apparatus, and computer-readable storage medium and robot
CN111612841A (en) Target positioning method and device, mobile robot and readable storage medium
WO2021147113A1 (en) Plane semantic category identification method and image data processing apparatus
CN109685827B (en) Target detection and tracking method based on DSP
CN105046278B (en) The optimization method of Adaboost detection algorithm based on Haar feature
WO2022205843A1 (en) Lip movement detection method and apparatus, terminal device, and computer readable storage medium
CN113627428A (en) Document image correction method and device, storage medium and intelligent terminal device
CN110751620A (en) Method for estimating volume and weight, electronic device, and computer-readable storage medium
CN111626295A (en) Training method and device for license plate detection model
CN112364865A (en) Method for detecting small moving target in complex scene
CN110781823A (en) Screen recording detection method and device, readable medium and electronic equipment
CN111127358A (en) Image processing method, device and storage medium
WO2023000528A1 (en) Map positioning method and apparatus, computer-readable storage medium and terminal device
CN107274477B (en) Background modeling method based on three-dimensional space surface layer
CN111008634B (en) Character recognition method and character recognition device based on instance segmentation
CN108682021A (en) Rapid hand tracking, device, terminal and storage medium
CN115908774B (en) Quality detection method and device for deformed materials based on machine vision
CN115345895B (en) Image segmentation method and device for visual detection, computer equipment and medium
WO2023109086A1 (en) Character recognition method, apparatus and device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21950766

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE