Positioning device based on image recognition and positioning method thereofTechnical Field
The invention relates to the technical field of positioning fixed equipment by mobile equipment, in particular to a positioning device based on image recognition and a positioning method thereof.
Background
The intelligent mower has the advantages of being capable of automatically finishing the work of trimming the lawn, free of manual direct control and operation, low in power, low in noise, exquisite and attractive in appearance, capable of greatly reducing manual operation and the like, and is widely used. The intelligent mower has an automatic walking function, can automatically return to charge, performs safety detection and battery power detection, has certain climbing capacity, and is particularly suitable for lawn trimming and maintenance in places such as family courtyards and public greenbelts.
However, when the intelligent mower automatically returns to charge, the charging station needs to be located and moved to the charging station for automatic charging. The current positioning scheme of the intelligent mower on the charging station is that colored bar marks are arranged at certain positions on the charging station, whether images captured by an onboard camera of the automatic mower contain matched colored bars or not is analyzed, if yes, the charging station enters a visual field range, the relative position information of the mower and the charging station at the moment is calculated, and the movement control is carried out to guide the mower to enter the station; if not, the charging station is not found in the visible range, and the mower continues to run in the original mode.
The current solutions have certain drawbacks, such as the recognition of the markers being most beneficial when the camera line of sight of the mobile robot is perpendicular to the marker plane. The further the line of sight deviates from the perpendicular to the mark plane, the weaker the recognition ability of the mark. When the automatic moving equipment is positioned at the left, right and rear parts of the marking plane, the mark cannot be effectively identified.
Disclosure of Invention
Therefore, it is necessary to provide a positioning apparatus based on image recognition and a positioning method thereof to solve the problem that the mobile device cannot more accurately position the charging station.
The invention relates to a positioning device based on image recognition, which is used for positioning a charging station and comprises:
the marker is fixedly arranged on the charging station in a three-dimensional shape;
the image acquisition module is arranged on the mobile equipment and is used for acquiring the image information of the marker;
the image and position corresponding module is used for setting the corresponding relation between the image information of the marker and the position information of the charging station relative to the mobile equipment;
and the position judging module is used for comparing the image information of the marker acquired by the image acquisition module with the corresponding relation between the image information of the marker set in the image and position corresponding module and the position information of the charging station relative to the mobile equipment, and judging the position information of the charging station relative to the mobile equipment.
In one embodiment, the image-to-location correspondence module includes a distance correspondence module and an orientation correspondence module;
the distance corresponding module is used for setting the corresponding relation between the image information of the marker and the distance information of the charging station relative to the mobile equipment;
the orientation corresponding module is used for setting the corresponding relation between the image information of the marker and the orientation information of the charging station relative to the mobile equipment.
In one embodiment, the position determination module comprises a distance determination module and an orientation determination module;
the distance determination module is configured to compare the image information of the marker acquired by the image acquisition module with a correspondence between the image information of the marker in the distance correspondence module and the distance information of the charging station relative to the mobile device, and determine the distance information of the charging station relative to the mobile device;
the direction determination module is configured to compare the image information of the marker acquired by the image acquisition module with a corresponding relationship between the image information in the direction corresponding module and the direction information of the charging station relative to the mobile device, and determine the direction information of the charging station relative to the mobile device.
In one embodiment, the identifier is a cylinder, and an image identification area and an image content area are arranged on the outer surface of the identifier;
the image identification area is used for identifying and defining the image content area;
the image content area includes image information content having a correspondence with position information of the charging station relative to the mobile device.
In one embodiment, the image content area includes different characters or different color combinations corresponding to location information of the charging station relative to the mobile device.
A positioning method based on an image recognition positioning device comprises the following steps:
presetting a corresponding relation between identifier image information on a charging station and position information of the charging station relative to mobile equipment;
the mobile equipment collects image information of a marker arranged on the charging station;
and comparing the marker image information acquired by the mobile equipment with the preset corresponding relation, and judging the position information of the charging station relative to the mobile equipment.
In one embodiment, the preset correspondence includes a preset correspondence between the identifier image information and distance information of the charging station relative to the mobile device, and a preset correspondence between the identifier image information and orientation information of the charging station relative to the mobile device.
In one embodiment, when the comparing the collected marker image information with the preset corresponding relation includes comparing the collected marker image information with the corresponding relation between the marker image information and the distance information of the charging station relative to the mobile device, determining the distance information of the charging station relative to the mobile device;
and comparing the acquired identifier image information with the corresponding relationship between the identifier image information and the orientation information of the charging station relative to the mobile equipment, and determining the orientation information of the charging station relative to the mobile equipment.
In one embodiment, the identifier is a cylinder, and an image identification area and an image content area are arranged on the outer surface of the identifier;
the image identification area is used for identifying and defining the image content area;
the image content area includes image information content having a correspondence with position information of the charging station relative to the mobile device.
In one embodiment, the image content area includes different characters or different color combinations corresponding to location information of the charging station relative to the mobile device.
The positioning device based on image recognition acquires the image information of the marker arranged on the charging station through the image acquisition module, and compares the image information of the marker which is preset in the image and position corresponding module with the position relation of the charging station relative to the mobile equipment through the position judging module, so as to judge the position information of the charging station relative to the mobile equipment. The marker in the invention is in a three-dimensional shape, so that the image acquisition module can acquire the image information of the marker in 360 degrees in all directions, thereby positioning more accurately. The positioning method based on the image recognition positioning device can position the position of the charging station relative to the mobile equipment in multiple directions such as front, back, left and right directions with high accuracy.
Drawings
FIG. 1 is a functional block diagram of a positioning device based on image recognition;
FIG. 2-1 is a schematic structural diagram of an embodiment of a marker based on an image recognition positioning device according to the present invention;
2-2 are schematic structural diagrams of a marker based on an image recognition positioning device according to another embodiment of the present invention;
FIG. 3-1 is a schematic diagram of an image captured by the image capturing device when the mobile device is positioned directly in front of the marker shown in FIG. 2-1;
3-2 is a schematic view of an image captured by the image capturing device when the mobile device is positioned in front of the marker shown in FIG. 2-1;
3-3 are schematic views of images captured by the image capture device when the mobile device is positioned directly to the left of the marker shown in FIG. 2-1;
3-4 are schematic diagrams of images acquired by the image acquisition device when the mobile device is positioned at the left rear of the marker shown in FIG. 2-1;
3-5 are schematic diagrams of images acquired by the image acquisition device when the mobile device is positioned right behind the marker shown in FIG. 2-1;
3-6 are schematic views of images captured by the image capturing device when the mobile device is located behind the right side of the marker shown in FIG. 2-1;
3-7 are schematic views of images captured by the image capture device when the mobile device is positioned directly to the right of the marker shown in FIG. 2-1;
3-8 are schematic views of images captured by the image capture device when the mobile device is positioned at the front right of the marker shown in FIG. 2-1;
FIG. 4 is a flow chart of one embodiment of a positioning method for positioning a device based on image recognition;
FIG. 5 is a flow chart of yet another embodiment of a method for locating a device based on image recognition;
FIG. 6 is a flow chart of a positioning method for positioning a device based on image recognition, wherein the method is further embodiment.
Detailed Description
In order to further explain the technical means and effects of the present invention, the following description of the present invention with reference to the accompanying drawings and preferred embodiments will be made for clarity and completeness.
As shown in fig. 1, the image recognition-basedpositioning device 100 of the present invention is used for positioning a charging station, and includes: the system comprises amarker 110, animage acquisition module 120, an image and positioncorresponding module 130 and aposition determination module 140. Themarker 110 is fixed to the charging station in a three-dimensional shape. Theimage capturing module 120 is disposed on the mobile device and is configured to capture image information of theidentifier 110. The image andlocation correspondence module 130 is configured to set a correspondence between the image information of theidentifier 110 and the location information of the charging station relative to the mobile device. Thelocation determination module 140 is configured to compare the image information of themarker 110 collected by theimage collection module 120 with the correspondence between the image information of themarker 110 set in the image andlocation correspondence module 130 and the location information of the charging station relative to the mobile device, and determine the location information of the charging station relative to the mobile device.
In this embodiment, it is necessary that theidentifier 110 is disposed on the charging station at a position that the image capturingmodule 120 can capture the image information of theidentifier 110 in 360 degrees in all directions, and theidentifier 110 is located at a height as much as possible from the image capturingmodule 120, so as to ensure the accuracy of the information of theidentifier 110 captured by theimage capturing module 120, and in practice, theidentifier 110 is fixedly disposed above the charging post of the charging station. Theimage capturing module 120 is disposed on a mobile device, and may be implemented by acamera 121, such as a camera.
As shown in FIG. 1, in one embodiment, the image-to-location correspondence module 130 includes anorientation correspondence module 132 and adistance correspondence module 131. Thedistance correspondence module 131 is used to set a correspondence between the image information of theidentifier 110 and the distance information of the charging station relative to the mobile device. Theorientation correspondence module 132 is configured to set a correspondence between the image information of theidentifier 110 and the orientation information of the charging station relative to the mobile device.
In this embodiment, different image information of themarker 110 is collected according to different angles, and the distance and orientation information between the different image information and the charging station relative to the mobile device is determined, so that the mobile device can accurately position the charging station. Specifically, taking theidentifier 110 in fig. 2-1 as an example, as shown in fig. 3-1 to 3-8, the schematic diagram is an image information of theidentifier 110 in fig. 2-1 acquired by theimage acquisition module 120 on the mobile device, and the image of theidentifier 110 acquired from different directions includes a proportional relationship between blue and yellow, and corresponds to the direction information of the charging station relative to the mobile device. The size of the blue and yellow areas in the image of themarker 110 collected by different distance positions with respect to the charging station corresponds to the distance information of the charging station with respect to the mobile device. For those skilled in the art, the corresponding relationship between the proportional relationship between blue and yellow in the image and the orientation information of the charging station relative to the mobile device can be obtained through experiments by using the prior art. Similarly, through experiments, the corresponding relationship between the size and the relative distance of each color mode can be obtained.
As shown in FIG. 1, in one embodiment, thelocation determination module 140 includes adistance determination module 141 and anorientation determination module 142. Thedistance determining module 141 is configured to compare the image information of themarker 110 collected by theimage collecting module 120 with the correspondence between the image information of themarker 110 in thedistance correspondence module 131 and the distance information of the charging station relative to the mobile device, and determine the distance information of the charging station relative to the mobile device. Theorientation determining module 142 is configured to compare the image information of theidentifier 110 collected by theimage collecting module 120 with the correspondence between the image information in theorientation corresponding module 132 and the orientation information of the charging station relative to the mobile device, and determine the orientation information of the charging station relative to the mobile device.
In this embodiment, as shown in fig. 3-1 to 3-8, the image information of themarker 110 is collected by theimage collecting module 120 when the image information is directly in front of, in. The image information is analyzed to determine a color ratio, and the color ratio is compared with the orientation corresponding relationship of the charging station relative to the mobile device in theposition determination module 140, so that the relative direction between the automatic mobile device and the charging station can be located. Meanwhile, the image information is analyzed to determine the size of the color pattern, and the size is compared with the corresponding relationship between the distance of the charging station relative to the mobile device in theposition determination module 140, so that the distance information between the charging station relative to the mobile device can be located.
As shown in fig. 2-1 and 2-2, in one embodiment, themarker 110 is a cylinder, and animage recognition area 111 and animage content area 112 are provided on an outer surface of themarker 110. Theimage identification area 111 is used for identifying and defining theimage content area 112, and the content of the acquiredimage content area 112 can be further acquired and analyzed only when the image acquisition module acquires theimage identification area 111. Theimage content area 112 includes image information content having a correspondence relationship with the location information of the charging station relative to the mobile device. Theimage content area 112 includes different characters or different color combinations corresponding to the location information of the charging station relative to the mobile device.
As shown in fig. 2-1, in this embodiment, themarker 110 is a cylinder, the upper and lower red areas of the cylinder areimage recognition areas 111, and the blue area and the yellow area are disposed around the cylinder and each occupy half of the circumferential surface of the cylinder in the axial tangential direction of the cylinder. Preferably, when themarker 110 is placed on the charging station, the image of themarker 110 in fig. 3-1 is placed directly in front of the mobile device. It should be noted that the position and color design of theimage recognition area 111 on themarker 110 are not limited to those shown in fig. 2-1, and various selections can be made in the case where the recognition function is satisfied.
As shown in fig. 2-2, in this embodiment, theidentifier 110 is a cylinder, and the upper and lower portions of the cylinder areimage recognition areas 111, which can be painted with various colors or identification symbols, etc. for recognizing the content information of theimage content area 112, the content of theimage content area 112 is the characters "L" and "R".
As shown in fig. 4, a flow chart of a positioning method based on an image recognition positioning device of the present invention is shown, and the positioning method includes the following steps:
s210 presets a correspondence between the identifier image information on the charging station and the location information of the charging station relative to the mobile device.
As shown in fig. 5, this step further includes: s211 presets a correspondence relationship between the identifier image information and the distance information of the charging station with respect to the mobile device. S212 presets a correspondence between the identifier image information and the orientation information of the charging station with respect to the mobile device. Specifically, with reference to fig. 2-1 and fig. 3-1 to 3-8, for themarker 110 shown in fig. 2-1, the proportional relationship between blue and yellow contained in the images of themarker 110 collected from different orientations corresponds to the orientation information of the charging station relative to the mobile device. The size of the blue and yellow areas in the image of themarker 110 collected by different distance positions with respect to the charging station corresponds to the distance information of the charging station with respect to the mobile device.
S220 the mobile device collects image information of the identifier disposed on the charging station.
S230, comparing the marker image information collected by the mobile equipment with a preset corresponding relation, and judging the position information of the charging station relative to the mobile equipment.
As shown in fig. 6, this step further includes: s231, comparing the acquired identifier image information with the corresponding relation between the identifier image information and the distance information of the charging station relative to the mobile equipment, and determining the distance information of the charging station relative to the mobile equipment. S232 compares the acquired identifier image information with the correspondence between the identifier image information and the orientation information of the charging station relative to the mobile device, and determines the orientation information of the charging station relative to the mobile device.
In this embodiment, as shown in fig. 3-1 to 3-8, the image information of the marker is acquired at the time of the front right, front left, rear right, front right, respectively, of the charging station. The image information is analyzed to obtain a color proportion relation, and the color proportion relation is compared with the corresponding relation of the charging station relative to the direction of the mobile equipment in the position judging module, so that the relative direction of the automatic mobile equipment and the charging station can be positioned. Meanwhile, the image information is analyzed to obtain the size of the color mode, and the size is compared with the corresponding relation of the distance between the charging station and the mobile equipment in the position judgment module, so that the distance information between the charging station and the mobile equipment can be positioned.
As shown in fig. 2-1 and 2-2, in one embodiment, themarker 110 is a cylinder, and animage recognition area 111 and animage content area 112 are provided on an outer surface of themarker 110. Theimage recognition area 111 is used to identify and define theimage content area 112, and the content of the capturedimage content area 112 can be further captured and analyzed only when theimage capture module 120 captures theimage recognition area 111. Theimage content area 112 includes image information content having a correspondence relationship with the location information of the charging station relative to the mobile device. Theimage content area 112 includes different characters or different color combinations corresponding to the location information of the charging station relative to the mobile device.
As shown in fig. 2-1, in this embodiment, themarker 110 is a cylinder, the upper and lower red areas of the cylinder areimage recognition areas 111, and the blue area and the yellow area are disposed around the cylinder and each occupy half of the circumferential surface of the cylinder in the axial tangential direction of the cylinder. Preferably, when themarker 110 is placed on the charging station, the image of themarker 110 in fig. 3-1 is placed directly in front of the mobile device. It should be noted that the position and color design of theimage recognition area 111 on themarker 110 are not limited to those shown in fig. 2-1, and various selections can be made in the case where the recognition function is satisfied.
As shown in fig. 2-2, in this embodiment, theidentifier 110 is a cylinder, and the upper and lower portions of the cylinder areimage recognition areas 111, which can be painted with various colors or identification symbols, etc. for recognizing the content information of theimage content area 112, the content of theimage content area 112 is the characters "L" and "R".
Thepositioning apparatus 100 based on image recognition collects the image information of themarker 110 disposed on the charging station through theimage collecting module 120, and compares the image information of themarker 110 pre-disposed in the image andposition corresponding module 130 with the position relationship of the charging station relative to the mobile device through the position determining module, thereby determining the position information of the charging station relative to the mobile device. Themarker 110 in the present invention is three-dimensional, so that theimage acquisition module 120 can acquire the image information of themarker 110 in 360 degrees, thereby positioning more accurately. The positioning method based on the image recognition positioning device can position the position of the charging station relative to the mobile equipment in multiple directions such as front, back, left and right directions with high accuracy.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.