The content of the invention
It is an object of the invention to provide a kind of robot charging docking system and method based on pattern identification, so as to realNow allow heavy-duty machines people height is autonomous, is reliably achieved automatic charging.
In the embodiment of the present invention, there is provided a kind of robot charging docking system based on pattern identification, it includes machinePeople and charging pile, charging identification icon is provided with the charging pile, camera is provided with the robot and center controlsDevice, the central control unit, the image for being photographed to the camera are handled, and identify charging identification figureCase, the distance and angle of the robot and the charging pile are judged according to the charging identification icon, and control the machineDevice people moves to the charging pile.
In the embodiment of the present invention, the first charge contact part is additionally provided with the robot and is close in described first and is filledThe first optical alignment part that contact part is set, charging identification icon, the second charge contact are provided with the charging pilePart and be close in the second optical alignment part that the second charge contact part is set, the first optical alignment part withThe second optical alignment part is engaged, and realizes pair of the first charge contact part and the second charge contact partAccurate and contact.
In the embodiment of the present invention, the first optical alignment part is infrared/laser pickoff, second optical alignmentPart is infrared/laser pickoff.
In the embodiment of the present invention, the charging identification icon includes three sub-patterns, and each sub-pattern includes being arranged atThe circular contour of periphery and the character graphics being arranged in circular contour, the central control unit identify described three respectivelySub-pattern, and the length of side of the triangle formed according to the central points of three sub-patterns judges that the robot fills with describedThe distance of electric stake.
In the embodiment of the present invention, what the central control unit was further formed according to the central point of three sub-patternsThe length of side of triangle judges the angle of the robot and the charging pile.
In the embodiment of the present invention, a kind of robot charging docking calculation based on pattern identification is additionally provided, it includes:
Image capturing procedure:Revolute simultaneously shoots picture by camera;
Image recognizing step:The image that the central control unit being arranged in the robot photographs to the camera is carried outImage recognition, judge whether comprising the charging identification icon being arranged on charging pile, be then to enter robot moving step, otherwiseReturn to image capturing procedure;
Robot moving step:The central control unit is sentenced according to the size and dimension feature of the charging identification icon photographedBreak and the distance and angle of the robot and the charging pile, control the robot to be moved to the charging pile, Zhi DaosuoThe distance for stating robot and the charging pile is less than the distance more than setting.
In the embodiment of the present invention, methods described also includes:
Charge alignment procedures:When the distance of the robot and the charging pile be less than more than setting apart from when, be arranged at instituteThe the first optical alignment part stated in robot is engaged with the second optical alignment part being arranged on the charging pile,Realize that the robot docks with charging pile charging.
In the embodiment of the present invention, the charging identification icon includes three sub-patterns, and each sub-pattern includes being arranged atThe circular contour of periphery and the character graphics being arranged in circular contour, the central control unit identify described three respectivelySub-pattern, and according to the central point of three sub-patterns formed triangle the length of side come judge the robot with it is describedThe angle of the distance of charging pile and the robot and the charging pile.
In the embodiment of the present invention, the detailed process of described image identification step is as follows:
Picture pre-processes:Picture is smoothed using gaussian pyramid method;
Binaryzation:Binary conversion treatment is carried out to picture using Canny operators;
Circular contour is searched for:To the image after binaryzation, the search of circular contour is carried out using Hough gradient method;
Filtering:Some non-compliant circular contours of radius are filtered out according to the radius of the circular contour searched out;
Figure in extraction circle:Being at 255 points as seed point to the brightness value in the circular contour after binaryzation uses unrestrained water to fill outMethod is filled, the shape of figure is filled out, so as to get the character graphics in circle;
Figure is ajusted:The character graphics is surrounded with a minimum area rectangle, so as to according to minimum area rectangleIncline direction, ajusted correct position;
Binaryzation, normalization:Binaryzation is carried out to affine transformation content, and binaryzation content picture is cut to just to surround and justifiedCharacter graphics in shape profile, it then will cut binaryzation picture and normalize to uniform height;
Graphic Pattern Matching:Uniform height picture is matched with standard database, best match data storehouse is found according to matching rateSample, so as to judge whether described image is charging identification icon.
In the embodiment of the present invention, the detailed process of the robot moving step is as follows:
When judge identification icon distance exceed setting apart from when, according to robot and the relative angle of charging pile, control machineThe charging face of device people faces pattern and approached as far as possible, until the charging face of robot is almost just facing to pattern, then towards figureCase is advanced to be closing the distance, until distance is less than the distance of setting, then switches to the charging alignment procedures.
Compared with prior art, robot charging docking system and method for the invention based on pattern identification, are usedPattern identification positions to charging pile, has very strong long range positioning and an ability that furthers;In addition, charging pile identification thing is figureCase, it is safe using passive design;Pattern identification view-based access control model image recognition technology, the stability having had and anti-interferenceAbility.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and ExamplesThe present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, andIt is not used in the restriction present invention.
It is described in detail below in conjunction with realization of the specific embodiment to the present invention,
As shown in figure 1, the embodiment of the present invention provides a kind of robot charging docking system based on pattern identification, including robot10 and charging pile 20, camera 11 and central control unit 12, the first charge contact part 13 are provided with the robot 10With the first optical alignment part 14 for being close in the setting of the first charge contact part 13.The camera 11, first chargesThe optical alignment part 14 of contact component 13 and first is arranged on the charging face of the robot 10.Set on the charging pile 20There are charging identification icon 21, the second charge contact part 22 and be close in the second light that the second charge contact part 22 is setLearn aligning parts 23.
The central control unit 12, the image for being photographed to the camera 11 are handled, and are identified describedCharge identification icon 21, according to it is described charging identification icon 21 judge the robot 10 and the charging pile 20 distance andAngle, and control the robot 10 to be moved to the charging pile 20.When between the robot 10 and the charging pile 20Distance be less than setting apart from when, the first charge contact part 13 and second charging are realized by optical alignmentThe alignment positioning of contact portion part 22, i.e., by the first optical alignment part 14 and the second optical alignment part 23 toClose, realize the alignment and contact of the first charge contact part 13 and the second charge contact part 22.
The first optical alignment part 14 is that the infrared/laser for being arranged at the both sides of the first charge contact part 13 connectsDevice is received, the second optical alignment part 23 is the infrared/laser pick-off for being arranged at the both sides of the second charge contact part 22Device.
As a kind of preferable implementation, the charging identification icon 21 includes three sub-patterns, each sub-patternIncluding the character graphics for being arranged at the circular contour of periphery and being arranged in circular contour.The circular contour of periphery, is easy to identify,Along with the character graphics inside circular contour, the accuracy rate of identification can be improved.The central control unit 12 identifies respectivelyThree sub-patterns, and the length of side of the triangle formed according to the central points of three sub-patterns judges the robot10 with the distance of the charging pile 20.The center control fills 12 and put further to be formed according to the central point of three sub-patternsThe length of side of triangle judge the angle of the robot 10 and the charging pile 20.
As shown in Fig. 2 the embodiment of the present invention provides a kind of robot charging docking calculation based on pattern identification, it includesStep S1-S4.It is specifically described below.
Step S1, image capturing procedure:Revolute simultaneously shoots picture by camera.
It should be noted that being provided with charging identification icon on charging pile, the robot passes through machine when needing chargingDevice people rotates in all directions, and shoots photo, and the picture of shooting is identified in step s 2, to find charging pilePosition.
Step S2, image recognizing step:The central control unit being arranged in the robot is shot to the cameraThe image arrived carries out image recognition, judges whether comprising the charging identification icon being arranged on charging pile, is then to enter step S3,Otherwise return to step S1.
As shown in figure 3, in described image identification step, detailed process is as follows:
Picture pre-processes:In order to reduce influence of the noise to subsequent treatment in picture, picture is smoothed, picture is put downSliding processing method has a lot, a lot, gaussian pyramid method is used to picture in the present embodiment, first carries out Gauss gold word to pictureTower reduces and then is amplified to original size again;
Binaryzation:Binary conversion treatment is carried out to picture using Canny operators in the present embodiment;
Circular contour is searched for:To the image after binaryzation, the search of circular contour is carried out, Hough gradient method is used in the present embodimentPrinciple come carry out circle search;
Filtering:Come according to the radius of the circular contour searched out, because our icon sizes are fixed, soIn picture its radius size also within the specific limits, so as to filter out some incongruent circular contours of radius;
Character graphics in extraction circle:In the present embodiment, the charging identification icon includes three sub-patterns, each sub-patternAll include the character graphics for being arranged at the circular contour of periphery and being arranged in circular contour.Circular icon is by monochromatic background colourFormed with monochrome graphics in icon, and background color is dark colour.Therefore two are carried out to each circular contour region in original imageValue, circular background value can be 0, and figure is then 255 (assuming that the two-value of binaryzation is 0 and 255).After binaryzationCircular contour in brightness value used for 255 points as seed point and overflow water fill method, the shape of figure is filled out, fromAnd get the character graphics in circle;
Figure is ajusted:Because the character graphics extracted in image has different direction of rotation, it is necessary to be rotated to correctDirection to be contrasted with java standard library.Method for extraction character graphics profile, by profile with a minimum area rectangle by itsSurround, so as to the incline direction according to minimum area rectangle, ajusted correct position;
Binaryzation, normalization:Carrying out binaryzation to affine transformation content, (binaryzation uses adaptive Otsu ' s method hereinBinarization method), and the character graphics picture of binaryzation is cut to and just surrounds character graphics, it then will cut binary picturePiece normalizes to uniform height;
Images match:Uniform height picture is matched with standard database, best match data storehouse is found according to matching rateSample.
It is 32 to draft the big low height of normalized binaryzation picture, is 1 per a line maximum matching rate, therefore total matching rateBe up to 32, the threshold value of matching rate is set to 26 in the present embodiment, i.e., when a certain graphical information matching rate with java standard library is equal to orDuring higher than 26, it is considered as and is effectively matched.And the character graphics after normalizing can occur 180 ° of situation of rotation, thus matching whenThe picture of 180 ° of former normalization picture and rotation can be matched simultaneously by waiting.The present embodiment can be to the circular contour that is found in a two field pictureThe image in region carries out above-mentioned normalization and than peering, and the result that will match to returns to main program.
Step S3, robot moving step:The central control unit according to photograph charging identification icon sizeThe distance and angle of the robot and the charging pile are judged with shape facility, controls the robot to the charging pileIt is mobile, until the distance of the robot and the charging pile is less than the distance more than setting.
Specifically, the process that the central control unit controls the robot to be moved to the charging pile is as follows:
Three sub- patterns composition equilateral triangles are placed, i.e. three sub- pattern center lines are an equilateral triangle, the length of sideIt is fixed.After catching pattern and processing by camera, the length of side of form intermediate cam shape is can obtain, the distance of its length and machine is inExisting positive correlation, thus estimates the distance between charging pile and robot.Specific conversion table is as follows:
In the measurement of relative angle, when the camera of robot captures the identification pattern on charging pile, because of relative angleDifference, the length of side ratio that three sub-patterns form in camera image shows difference.Such as when facing pattern, threeThe angular two hypotenuses length of side is almost equal;When both centers tilt, then the length of the hypotenuse of triangle two, which has, significantly differsCause.It is the angle that can determine whether machine and pattern in this approach, specific conversion table is as follows:
| Drift angle | A left side is more than 45 | A left side is more than 25 | A left side is more than 15 | | The right side is more than 15 | The right side is more than 25 | The right side is more than 45 |
| Left and right side ratio P | P>=1.136 | P>=1.111 | P>=1.075 | P= 1 | P<=0.930 | P<=0.900 | P<=0.880 |
In upper table, drift angle unit is degree, and angle is the angle with charging pile plane vertical line.Left and right side ratio P is triangle left side aWith the ratio on the right, P=a/b.
When judge the distance when the robot and the charging pile be more than more than setting apart from when(Set in the present embodimentIt is set to more than 0.7 meter), according to robot and the relative angle of charging pile, control machine people makes it face pattern as far as possible and approach.For example, when judging pattern in the left front of plane where robot face pattern, first by robot flicker to and patternPlace plane is nearly parallel, a segment distance of then going ahead, then goes to the right towards pattern, so circulation, until robot is severalJust facing to pattern, then advance towards pattern to be closing the distance, until distance is less than 0.7 meter, then switches to alignment and insertEnter process.
Step S4, charge alignment procedures:When the distance of the robot and the charging pile is less than the distance more than settingWhen, the first optical alignment part for being arranged in the robot and second optical alignment being arranged on the charging pilePart is engaged, and realizes that the robot docks with charging pile charging.
Connect with it equipped with the two infrared/laser in left and right equipped with the two infrared/generating lasers in left and right, robot on charging pileReceive device.When robot is close to charging pile, infrared/laser pickoff of robot can detect that charging pile emits redOutside/laser signal, whether detect that infrared/laser signal makes it come control machine according to the infrared/laser pickoff in left and right twoIt is directed at charging pile.
If two infrared remote receivers all detect infrared/laser signal, then it represents that robot is directed at charging pile, and robot willAdvance towards charging pile;If infrared/the laser pickoff on the only left side detects infrared/laser signal, then it represents that charging pile existsThe left side of robot, robot is by flicker, until two infrared remote receivers all detect signal;If only the right is redOutside/laser pickoff detects infrared/laser signal, then it represents that charging pile on the right side of robot, robot by flicker,Until two infrared/laser pickoffs all detect signal.Robot is so followed by the simultaneously adjustment direction that so constantly advancesRing, until robot is aligned and inserts charging pile.
As described in Figure 4, robot is a with horizontal plane angle, for charging pile on the right side of it, robot only has the right side in location ASide is infrared/and laser pickoff detects to obtain, robot flicker, and it is now b with horizontal sextant angle until both sides detect,Robot marches forward.When robot advance L1 distance comes B location, robot only have right side it is infrared/laser pickoff inspectionMeasure, robot flicker, be now c with horizontal plane angle, robot marches forward until both sides detect.Work as machineWhen device people's advance L2 distance comes location of C, robot only has the infrared/laser pickoff in right side to detect to obtain, robot original placeTurn right, until both sides detect, now marched forward with plane-parallel, robot.Finally, robot advance L3 distance,And insert charging pile.
In summary, compared with prior art, it is of the invention based on pattern identification robot charging docking system andMethod, charging pile is positioned using pattern identification, there is very strong long range positioning and the ability that furthers;In addition, charging pileIdentification thing is pattern, safe using passive design;Pattern identification view-based access control model image recognition technology, the stabilization having hadProperty and antijamming capability.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present inventionAll any modification, equivalent and improvement made within refreshing and principle etc., should be included in the scope of the protection.