Background technology
As south jiangxi specialty industries, cultivated area occupies first of the world navel orange, and picking fruit is an onerous toil.WithAging of population, rural labor population constantly reduce, and realize that navel orange automation picking is to improve agricultural automation, solve labourInsufficient inevitable development trend.To space fruit, accurate, real-time position successfully is picked in navel orange automates picking processIt is crucial.
There is binocular vision technology perception information amount to enrich, it is of overall importance it is good, precision is high, non-contact measurement etc. can not be substitutedAdvantage, be widely used to robot navigation, commercial measurement etc..For the picking robot worked under natural environmentTarget identification and positioning are the heat subjects of Recent study.
Picking robot is a high real-time clock, wherein identification positioning is the key that influence picking robot real-time ringSection.The real-time and accuracy of vision positioning system are improved, and then it is current to improve picking robot performance, improve operating efficiencyPicking robot application major issue urgently to be resolved hurrily.
Application publication number is that the application for a patent for invention of CN105144992A discloses " a kind of strawberry picks collection device ", shouldDevice includes pedestal and the picking mechanism on pedestal, which includes the second sliding rail being vertical on pedestal, theTwo sliding rails are equipped with the second motor, and the second motor is connected with the second screw, which is equipped with the second screw;Second screwUpper horizontal equipped with third sliding rail, third sliding rail is equipped with third motor, and third motor is connected with third screw, on the third screwEquipped with third nut seat;Third nut seat is equipped with Picker arm, and the end of Picker arm is equipped with cutter, in the case where Picker arm is fixed a cutting toolSide is equipped with Picking basket.The invention can be by way of controlling multiple sliding rails to carry out right angle movement by the Picking basket of Picker arm leading portionOperation cuts off fruit to the underface of the fruit, and by cutter, and fruit passes under the effect of gravity along the fruit of Picking basket lower endDefeated cylinder deceleration slips into collecting box, completes the picking of a strawberry, has stability high, at low cost, picking precision is high, not easy damagedFruit appearance, picking efficiency is high, but it can not realize the identification and positioning of ripening fruits without machine vision positioning technology.
" a kind of kiwifruit fruit picking robot and picking method, application number CN201310719150.3 " disclose one to patentKind of kiwifruit fruit picking robot and picking method, including mechanical execution system and control system, by fruit and barrierImage Acquisition and feature extraction, the intelligent mobile of telescopic slide platform, the obstacle of five degree of freedom picking mechanical arm and fruit are determinedThe crawl of position and two finger formula end effectors is integrated, and realizes mechanization, the automation of kiwifruit fruit picking, but itsImage identifies and location algorithm is more complicated, can not realize the quick of fruit and in real time identification and positioning.
Specific embodiment
Below in conjunction with the accompanying drawings and specific embodiment the present invention is carried out in further detail with complete explanation.It is appreciated thatIt is that specific embodiment described herein is only used for explaining the present invention rather than limitation of the invention.
With reference to Fig. 1, a kind of robot of view-based access control model of the invention quickly identifies and three-dimensional visual positioning method, the sideMethod includes:
S1 carries out Image Acquisition to fruit;
This method carries out Image Acquisition using binocular camera to fruit, for post-treatment operations.
S2 carries out image segmentation and regional characteristics analysis to fruit image;
S21, color characteristic analysis are divided with image;
Apparent difference feature is had according to fruit color and background color, image point is carried out by color component characteristic relationIt cuts.Image sampling is carried out to the fruit that grows naturally under different illumination conditions, RGB color analysis target and background R,G, B component value relationship.It can be obtained by each color channel values of image line sampled pixel, objective fruit is with background in Model for chromatic aberration 2R-Grey-scale contrast is larger under G-B, and 2R-G-B Model for chromatic aberration grey level histograms have the characteristics that it is apparent bimodal, therefore can given thresholdTarget is detached.In order to have better adaptability to different illumination intensity using normalization aberration (2R-G-B)/(2R+G+B)<TThreshold segmentation.Global threshold T=0.29 is taken to be split, the image after being divided filters out noise by medium filtering, conversionInto bianry image, such as Fig. 2.
For part fruit, there are adhesion situations, and fruit region after Threshold segmentation is carried out colour switching and asks for gray-scale mapPicture, then extract using Gauss-Laplace operator the borderline region of fruit, such as Fig. 3.Again by Fig. 3 and binary image, that is, scheme2, progress or operation can preferably separate adhesion fruit, such as Fig. 4.Finally by the morphological erosion of 33 × 3 templates and swollenNoise and small holes in image are removed in swollen processing, obtain connection fruit region, such as Fig. 5.
S22, regional characteristics analysis;
Since picking process is to win fruit one by one, optimal picking target strategy to be used to choose preferential picking pairAs.Multiple target connected regions are presented in image after segmentation, and regional analysis is typically that longer link is taken in image procossing.OftenRegional analysis has seed fill algorithm and two step scanning methods etc., is all analyzed by basic unit of pixel, meterIt is poor to calculate cost height, real-time.Run- Length Coding method is using the distance of swimming as basic operation unit, and connected component analysis basic unit is by Pixel-levelDistance of swimming grade is gone to, improves regional analysis efficiency.The present invention carries out the fruit connected region detected using Run- Length Coding methodAnalysis only needs a scanning that zone marker and shape feature calculating can be completed, is as follows:
1st step initializes distance of swimming Array for structural body, from left to right progressive scanning picture, the distance of swimming in coding record a lineNumber RLEi, row coordinate Ri, start-stop position Xi、YiAnd by pointer QiAdding in abutted father's distance of swimming, (current run lastrow is swumJourney) pointed by the root distance of swimming (first father's distance of swimming) chained list.The distance of swimming for belonging to the same root distance of swimming forms a section object.
2nd step judges the syntople of current run and father's distance of swimming, and by four neighborhood walking direction overlapping regions, (K represents weightFold-over prime number), such as Fig. 6, there are three types of situations:If 1. do not abut (such as RLE with the lastrow distance of swimming0), then create the new root distance of swimmingIndicator linking, and add in root distance of swimming chained list;If 2. abut (such as RLE with lastrow list1With RLE0It is adjacent), then by the distance of swimming pointerAdd in the root distance of swimming pointer chained list of father's distance of swimming;3. if (such as RLE is abutted again with the multiple distances of swimming of lastrow3With RLE1、RLE2Multiple neighbourConnect), then member's update in the corresponding distance of swimming chained list of father's distance of swimming abutted is merged into wherein number least root distance of swimming chainIn table, and current run pointer is added in into the root distance of swimming chained list after merging.
3rd step, the area S of statistical regions, perimeter L, regional center coordinateWait characteristic parameters.Toward root distance of swimming chainDistance of swimming RLE is added in tablei+1The following formula of time zone characteristic of field (1)~formula (4):
Si+1=Si+Yi+1-Xi+1+1 (1)
Li+1=Li+2(Yi+1-Xi+1+1)+2-2K (2)
Usual small area region is noise jamming, distance is remote and the fruit image not in the range of picking, all row scanningsAfter complete, these small area regions are first removed, then region roundness measurement is carried out by formula (5).
Wherein, SiIt is the area (area pixel sum) in region, LiPerimeter (zone boundary number of pixels) for region.CiIt is to represent region shape closer to round closer to 1 for the circularity in region.By border circular areas mark of the area in preset rangeRemember and add in storehouse.Since close-in target is bigger than distant object imaging, the unobstructed fruit circularity in outside is preferable.With low coveragePrinciple from the picking of, outside target priority selects relative importance value function such as formula (6).
Wherein γ is proportionality coefficient.Preferential angle value P is pressed to storehouse inner region after scanning whole regioniIt is ranked up, selectsThe highest region of relative importance value for picking target, extract zone boundary, using random ring method fitting ask for target central coordinate of circle andRadius parameter.
S3 schemes left and right to carry out Stereo matching;
Stereo matching process finds left figure specified point corresponding point in right figure.Traditional matching process has based on regionMatching and feature based matching.It is to carry out differentiating image to journey of coincideing with the similitude of intensity profile in window based on Region MatchingDegree, matching primitives amount is big, and real-time is poor;Feature-based matching is carried out according to features such as clarification of objective point, edge shapesMatching has matching speed fast, and matching precision is high, but characteristic matching is likely that there are multiple times when finding Corresponding matching pointReconnaissance or match point are not present, and are susceptible to error hiding, such as Fig. 7.
The matching algorithm that the present invention is combined using centroid feature point with neighborhood gray scale cross correlation, by by slightly to smart realExisting object matching.It is subject to epipolar-line constraint and disparity range constraint in centroid feature point matching process.Point in left image is on the right sideIt is only searched in corresponding polar curve height in image, it is contemplated that search range in vertical direction is limited to correspondence by distortion errorIn three pixel coverages up and down of polar curve height.Search is limited to robot manipulating task space and corresponds to effective parallax in the horizontal directionRange X-DmaxIn~X.Target's center's point in region of search is candidate matches point, has more candidate for region of searchMatch, be susceptible to the situation of error hiding, use neighborhood area grayscale correlation as unique constraint.The present invention is fitted using intensity of illuminationThe preferable normalized cross-correlation coefficients R (x, y) of answering property, such as formula (7).
Wherein, P (x, y) is target's center's point gray scale in left figure, and Q (x ', y ') corresponds to candidate matches point gray scale, 2M for right figure+ 1,2N+1 are height, the width of template.
Matching step is as follows:
Step (1) chooses picking target in left figure, 9 × 9 template windows, the centre of form is established with the target dot center P (x, y)Matching is subject to epipolar-line constraint disparity constraint, determines candidate matches point Q (x ', y ').
Step (2) chooses a candidate matches point, the moving die plate in its 15 × 15 neighborhood windows, search and left figureTemplate gray is distributed correlation R (x, y) highest match point.
Step (3), judges whether the highest match point of similitude meets matching requirement, | R (x, y) |>L is considered correctMatch, receive the matching double points;Otherwise, it fails to match, goes to step (2), and next candidate matches point is matched.
Step (4) records last matching double points coordinate and participates in disparity computation, if institute's candidate matches are unsatisfactory for, matchesTarget is not present, and goes to step (1) and carries out next object matching.
S4 obtains the three-dimensional coordinate information of fruit;
Camera model uses the linear model of pinhole imaging system, and binocular camera main shaft is arranged in parallel, binocular model such as Fig. 8It is shown.
Wherein f is the focal length of video camera, and b is the base length of two video cameras.P1(x1,y1) and P2(x2,y2) exist for target point PImaging point coordinates in two imaging planes.The three dimensional space coordinate point P (x, y, z) of objective fruit can be obtained by principle of triangulationCoordinate such as formula (10):
Target information is obtained by CMOS binocular cameras in real time, extracts the pixel coordinate of objective fruit;Pass through video cameraDemarcate the intrinsic parameters of the camera external parameter obtained.Fruit is calculated according to image-forming principle to sit in the three dimensions of camera coordinate systemMark.
The foregoing is merely the preferred embodiment of the present invention, are not intended to restrict the invention, for those skilled in the artFor, the present invention can have various modifications and changes.All any modifications made within spirit and principles of the present invention are equalReplace, improve etc., it should all be included in the protection scope of the present invention.