A kind of bicycle position detecting method, system, terminal and storage medium based on specified pointTechnical field
The present invention relates to vehicle electronics technical field, more particularly to a kind of bicycle position detecting method based on specified point,System, terminal and storage medium.
Background technique
The increase of car ownership promotes the development of large parking lot, and since marching toward 21st century, ours is bigType parking lot is more and more, and parking lot scale is growing, and brings a series of the problem of parking with picking up the car, atThe social concern generally faced for large- and-medium size cities each in world wide.
During autonomous parking, majority parking stall position is identified by image recognition mode and obtains at present.Know at presentThe method on other parking stall is to calculate all parking stalls shown on image to capture image.But calculate whole parking stall meetingsThe calculation amount of host-processor is caused to increase, delay time is elongated.In the interior increased situation of frame rate per second, also result inThe problem of memory overflow.In order to while the calculation amount for minimizing processor, moreover it is possible to obtain comprising client's Chosen Point mostGood parking stall, the application give a kind of bicycle position detecting method, system, terminal and storage medium based on specified point.
Summary of the invention
In order to solve above-mentioned and other potential technical problems, the present invention provides a kind of bicycles based on specified pointPosition detecting method, system, terminal and storage medium, first, in the way of user specified point, reduce at identification parking stallManage the calculation amount of device.Based on user specified point preliminary screening parking space detection area, filters the image except parking space detection area and knowThe element not obtained;The element only obtained to image recognition in parking space detection area includes that vertex response, line segment carry out vehiclePosition detection, obtains two horizontal parking stall group, vertical parking stall group detection parking stall PRELIMINARY RESULTSs respectively.Second, it is preliminary to parking stall measureAs a result horizontal parking stall group and vertical parking stall group in carry out reliability scoring respectively, and obtain detection parking stall PRELIMINARY RESULTS respectivelyConfidence level scoring.The candidate parking stall for detecting parking stall PRELIMINARY RESULTS carries out the marking of parking stall confidence level and according to candidate parking stallMarking value selects the highest candidate parking stall of confidence level as best parking stall.Third increases the choosing on strong jamming region parking stallRule is selected, is specifically exactly to confidence value approximately according to the selection rule of the parking hyte of parking stall angle classification.ExampleSuch as, in level parking hyte the highest parking stall of confidence level according to can in the score value of reliability scoring and vertical parking hyteThe highest parking stall of reliability is less than or equal to strong jamming confidence level difference according to the confidence level difference between the score value of reliability scoringWhen threshold value, best parking stall is determined according to extreme decision principle, it is corresponding that parking stall confidence level is worth size, response vertex type according to responseProperty, response point correspond to the COMPREHENSIVE CALCULATINGs confidence levels such as line direction, parking stall width, increase the accuracy of best parking stall.
A kind of bicycle position detecting method based on specified point, comprising the following steps:
S01: capture image is obtained, processing capture image obtains image-element, and obtains specified location in user;
S02: calculating parking space detection area with specified location in user, screens image-element, reserved graph with parking space detection areaAs being in the image-element of parking space detection area range in element as detection parking stall element;
S03: the detection parking stall element includes the parking stall principal direction determined and/or parking stall vertical direction, parking stall inspectionSurvey the response of the parking stall vertex response point handled in regional scope and positional relationship, the parking stall measure of response pointAll LSD line segments in regional scope, setting detection parking stall judgment rule;
S04: it is grouped according to parking stall direction to all detection parking stall PRELIMINARY RESULTSs, and at the beginning of the detection parking stall in each groupStep result is arranged successively with confidence value size, takes the highest vehicle of confidence value in the detection parking stall PRELIMINARY RESULTS in each groupDetection parking stall result of the position as the group;The confidence value of the detection parking stall result of more each group of acquisition again, if group and groupBetween detection parking stall result confidence value difference be greater than confidence level difference threshold when, then using confidence value maximum value as mostGood parking stall;If the confidence value difference of the detection parking stall result between group and group is less than confidence level difference threshold, with extremeDecision principle determines best parking stall.
Further, the image-element in the step S02 includes vertex response point, LSD line segment, specified point.
Further, in the step S02 according to specified location in user calculate parking space detection area the following steps are included:
S021: parking stall length characteristic range and width characteristics range in capture image are obtained;
S022: the up-and-down boundary of parking space detection area is determined;It is the vertex for capturing image bottom with specified point, refers to thisFixed point top is in parking space detection area apart from longer position in specified point parking stall length characteristic range or width characteristics rangeBoundary;It is the vertex for capturing image bottom with specified point, to specified point lower section apart from specified point parking stall length characteristic rangeOr longer position is parking space detection area lower boundary in width characteristics range;
S023: width of the width as parking space detection area to capture image is examined by parking space detection area coboundary, parking stallSurvey region lower boundary, parking space detection area width surround the right boundary of parking space detection area, and composition parking space detection area is extraneousRange.
Further, the step of parking stall principal direction and/or parking stall vertical direction for determining in the step S03, is: seekingAll angular errors and its corresponding number close to parallel and perpendicular lsd detection line segment arrived;According to each angle groupCumulative errors, two direction line segment item numbers are comprehensive to choose reasonable angle;Determine whether angle needs to turn according to line segment group featureIt sets.
Further, the parking stall vertex response point handled within the scope of parking space detection area in the step S03Response calculating step: according to parking stall principal direction, calculate along principal direction gradient map and vertical principal direction gradient map;It generatesShape of template calculates idx, calculates the response of each pixel opposite formwork, response screening and merging.
Further, the specific steps of detection parking stall judgment rule are set in the step S03:
S031: screening one is in the top of specified point in the parking stall vertex response point included in detection parking stall elementA candidate parking stall vertex response point, a candidate parking stall vertex response point below specified point and from judgementConfidence level maximum angle is chosen when parking stall principal direction and/or parking stall vertical direction in the group of resulting all angles direction;
S032: make the candidate parking stall vertex response point above specified point and the candidate parking stall vertex response point below specified pointLine and coordinate origin between angle be equal or approximately equal in angle direction group choose the maximum angle of confidence level;
S033: qualified two candidate parking stall response points for taking step S032 to filter out, and calculate two candidate vehiclesThe distance between position response point is then sentenced when the distance between two candidate parking stall response points meet parking stall rational width rangeThe two candidate parking stall response points of breaking are two vertex of true parking stall, then combine the main side in parking stall by the position on the two vertexTo and parking stall length, obtain four apex coordinates of true parking stall, so obtain one detection parking stall PRELIMINARY RESULTS letterBreath output.
Further, the highest vehicle of confidence value in the detection parking stall PRELIMINARY RESULTS in each group is taken in the step S04It further include when at least two vertex in detection parking stall PRELIMINARY RESULTS are rung before position is as the detection parking stall result step of the groupWhen the response that should be put is all larger than the response threshold value of vertex response point, increase to the confidence value of the detection parking stall PRELIMINARY RESULTSAdd to it is few with have in the detection parking stall PRELIMINARY RESULTS greater than the vertex response point quantity of vertex response point threshold value is identical canCertainty value;When the response of a vertex response point in detection parking stall PRELIMINARY RESULTS is all larger than the response of vertex response pointWhen threshold value, increase a confidence value to the confidence value of the detection parking stall PRELIMINARY RESULTS;It is wrapped when in detection parking stall PRELIMINARY RESULTSNo one of the vertex response point contained response is greater than vertex response point threshold value, then does not increase to detection parking stall PRELIMINARY RESULTSConfidence level.
Further, the extreme decision principle in the step S04 determines the specific steps of best parking stall are as follows:
S041: when the confidence value difference of the detection parking stall result between group and group is less than confidence level difference threshold, firstDetection parking stall PRELIMINARY RESULTS is grouped with parking stall principal direction angle, then is the detection of horizontal direction parking stall principal direction angleParking stall result and parking stall principal direction angle are that the detection parking stall result of vertical direction screens, then compares parking stall principal stresses angleDegree be that confidence value and the parking stall principal direction angle of the detection parking stall result group of horizontal direction are the detection parking stall knot of vertical directionThe confidence value of fruit group;
S042: when the confidence value and parking stall principal direction of the detection parking stall result group that parking stall principal direction angle is horizontal directionAngle is that the difference of the confidence value of the detection parking stall result group of vertical direction is less than confidence level difference threshold, then determined levelThe factor for the confidence value that whether has an impact within the scope of the detection parking stall result group in direction, the detection parking stall knot for judging vertical directionThe factor for the confidence value that whether has an impact within the scope of fruit group;
S043: if only having confidence value influence factor, compensation level within the scope of the detection parking stall result group of horizontal directionThe confidence value in direction is as credible with the detection parking stall result group of vertical direction again after new revised confidence valueAngle value compares;
If only having confidence value influence factor within the scope of the detection parking stall result group of vertical direction, vertical direction is compensatedConfidence value is as the confidence value ratio with the detection parking stall result group of horizontal direction again after new revised confidence valueCompared with;
If there is the detection parking stall of confidence value influence factor, vertical direction within the scope of the detection parking stall result group of horizontal directionAs a result organizing in range has confidence value influence factor, then is level side according to the parking stall principal direction angle obtained in step S041To detection parking stall result group combination horizontal direction characteristic feature compensation level direction confidence value;Or according to step S041In the parking stall principal direction angle that obtains be detection parking stall result group the combination vertical direction characteristic feature compensation of vertical direction verticallyThe confidence value in direction.
Preferably, the horizontal direction characteristic feature to include by the short-term section of angle point be T-type or L-type and in lengthLong line segment whether is detected between degree two angle point of direction.
Preferably, the vertical direction characteristic feature to include by the short-term section of angle point be T-type or L-type and in widthShort-term section whether is detected between degree two angle point of direction.
Preferably, when detection parking stall PRELIMINARY RESULTS being grouped with parking stall principal direction angle in the step S041, not onlyThe detection parking stall group for screening detection the parking stall result group and vertical direction of horizontal direction, can also filter out parking stall principal direction and inclineThe inclination angle degree setting decision principle parameter of rake angle group, parking stall principal direction tilt angle group can obtain.
A kind of bicycle position detecting system based on specified point, including image capture module, parking space detection area generation module,Parking stall element collection, detection parking stall judgment module, extreme determination module are detected,
For described image trapping module for obtaining capture image, processing capture image obtains image-element, and obtains userDesignated position;
The parking space detection area generation module is used to calculate parking space detection area with specified location in user;
Detection parking stall element collection is used to calculate parking space detection area with specified location in user, is sieved with parking space detection areaImage-element is selected, retains the image-element in image-element in parking space detection area range as detection parking stall element collection;
Based on the detection parking stall judgment module is used for the element to detect parking stall element concentration, sentenced according to detection parking stallThe judgment rule of disconnected module show that parking stall PRELIMINARY RESULTS is grouped, then analyzes the confidence level judgement of parking stall Preliminary detection result most preferablyParking stall;
The extreme determination module is used at the beginning of the parking stall of different principal direction angles cannot be distinguished in detection parking stall judgment moduleWhen walking result grouping, the confidence level using extreme determination module to parking stall Preliminary detection result is compensated, then with compensated credibleDegree determines best parking stall.
A kind of single parking stall measure terminal based on specified point, including processor and memory, the memory are stored with journeySequence instruction, the processor operation program instruction realize the step in above-mentioned method.
A kind of computer readable storage medium, is stored thereon with computer program, realization when which is executed by processorSuch as the step in above-mentioned method.
As described above, of the invention has the advantages that
First, in the way of user specified point, reduce the calculation amount of identification parking bit processor.It is specified based on userPoint preliminary screening parking space detection area filters the element that the image recognition except parking space detection area obtains;Only to parking stall measureThe element that image recognition obtains in region includes that vertex response, line segment carry out parking stall measure, obtains horizontal parking stall respectivelyTwo group, vertical parking stall group detection parking stall PRELIMINARY RESULTSs.Second, to the horizontal parking stall group in parking stall measure PRELIMINARY RESULTS and hang downStraight turning hyte carries out reliability scoring respectively, and obtains the confidence level scoring of detection parking stall PRELIMINARY RESULTS respectively.At the beginning of detecting parking stallThe candidate parking stall for walking result carries out the marking of parking stall confidence level and selects the highest time of confidence level according to the marking value of candidate parking stallSelect parking stall as best parking stall.Third increases the selection rule on strong jamming region parking stall, is specifically exactly to canCertainty value is approximately according to the selection rule of the parking hyte of parking stall angle classification.For example, the confidence level in level parking hyteHighest parking stall is according to the score value of reliability scoring with the highest parking stall of confidence level in vertical parking hyte according to confidence levelWhen confidence level difference between the score value of marking is less than or equal to strong jamming confidence level difference threshold, sentenced according to extreme decision principleFixed best parking stall.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodimentAttached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, rightFor those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawingsHis attached drawing.
Fig. 1 is shown as the testing result of initial dotted line.
Fig. 2 is shown pass by the dotted line testing result after step S02 screening.
Fig. 3 is shown pass by the detection parking stall PRELIMINARY RESULTS that step S03 is obtained.
Fig. 4 is shown pass by the best parking stall that step S04 is obtained.
Fig. 5 is shown as flow chart of the present invention.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specificationOther advantages and efficacy of the present invention can be easily understood for disclosed content.The present invention can also be by addition different specificEmbodiment is embodied or practiced, and the various details in this specification can also not carried on the back based on different viewpoints and applicationFrom carrying out various modifications or alterations under spirit of the invention.It should be noted that in the absence of conflict, following embodiment andFeature in embodiment can be combined with each other.
It should be clear that this specification structure depicted in this specification institute accompanying drawings, ratio, size etc., only to cooperate specification to be taken offThe content shown is not intended to limit the invention enforceable qualifications so that those skilled in the art understands and reads,Therefore not having technical essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing thisUnder the effect of invention can be generated and the purpose that can reach, it should all still fall in disclosed technology contents and obtain and can containIn the range of lid.Meanwhile cited such as "upper" in this specification, "lower", "left", "right", the use of " centre " and " one "Language is merely convenient to being illustrated for narration, rather than to limit the scope of the invention, the change of relativeness or tuneIt is whole, under the content of no substantial changes in technology, when being also considered as the enforceable scope of the present invention.
Referring to FIG. 1 to FIG. 5,
A kind of bicycle position detecting method based on specified point, comprising the following steps:
S01: capture image is obtained, processing capture image obtains image-element, and obtains specified location in user;
S02: calculating parking space detection area with specified location in user, screens image-element, reserved graph with parking space detection areaAs being in the image-element of parking space detection area range in element as detection parking stall element;
S03: the detection parking stall element includes the parking stall principal direction determined and/or parking stall vertical direction, parking stall inspectionSurvey the response of the parking stall vertex response point handled in regional scope and positional relationship, the parking stall measure of response pointAll LSD line segments in regional scope, setting detection parking stall judgment rule;
S04: it is grouped according to parking stall direction to all detection parking stall PRELIMINARY RESULTSs, and at the beginning of the detection parking stall in each groupStep result is arranged successively with confidence value size, takes the highest vehicle of confidence value in the detection parking stall PRELIMINARY RESULTS in each groupDetection parking stall result of the position as the group;The confidence value of the detection parking stall result of more each group of acquisition again, if group and groupBetween detection parking stall result confidence value difference be greater than confidence level difference threshold when, then using confidence value maximum value as mostGood parking stall;If the confidence value difference of the detection parking stall result between group and group is less than confidence level difference threshold, with extremeDecision principle determines best parking stall.
Further, the image-element in the step S02 includes vertex response point, LSD line segment, specified point.
Further, in the step S02 according to specified location in user calculate parking space detection area the following steps are included:
S021: parking stall length characteristic range and width characteristics range in capture image are obtained;
S022: the up-and-down boundary of parking space detection area is determined;It is the vertex for capturing image bottom with specified point, refers to thisFixed point top is in parking space detection area apart from longer position in specified point parking stall length characteristic range or width characteristics rangeBoundary;It is the vertex for capturing image bottom with specified point, to specified point lower section apart from specified point parking stall length characteristic rangeOr longer position is parking space detection area lower boundary in width characteristics range;
S023: width of the width as parking space detection area to capture image is examined by parking space detection area coboundary, parking stallSurvey region lower boundary, parking space detection area width surround the right boundary of parking space detection area, and composition parking space detection area is extraneousRange.
Further, the step of parking stall principal direction and/or parking stall vertical direction for determining in the step S03, is: seekingAll angular errors and its corresponding number close to parallel and perpendicular LSD detection line segment arrived;According to each angle groupCumulative errors, two direction line segment item numbers are comprehensive to choose reasonable angle;Determine whether angle needs to turn according to line segment group featureIt sets.
Further, the parking stall vertex response point handled within the scope of parking space detection area in the step S03Response calculating step: according to parking stall principal direction, calculate along principal direction gradient map and vertical principal direction gradient map;It generatesShape of template calculates idx, calculates the response of each pixel opposite formwork, response screening and merging.
Further, the specific steps of detection parking stall judgment rule are set in the step S03:
S031: screening one is in the top of specified point in the parking stall vertex response point included in detection parking stall elementA candidate parking stall vertex response point, a candidate parking stall vertex response point below specified point and from judgementConfidence level maximum angle is chosen when parking stall principal direction and/or parking stall vertical direction in the group of resulting all angles direction;
S032: make the candidate parking stall vertex response point above specified point and the candidate parking stall vertex response point below specified pointLine and coordinate origin between angle be equal or approximately equal in angle direction group choose the maximum angle of confidence level;
S033: qualified two candidate parking stall response points for taking step S032 to filter out, and calculate two candidate vehiclesThe distance between position response point is then sentenced when the distance between two candidate parking stall response points meet parking stall rational width rangeThe two candidate parking stall response points of breaking are two vertex of true parking stall, then combine the main side in parking stall by the position on the two vertexTo and parking stall length, obtain four apex coordinates of true parking stall, so obtain one detection parking stall PRELIMINARY RESULTS letterBreath output.
Further, the highest vehicle of confidence value in the detection parking stall PRELIMINARY RESULTS in each group is taken in the step S04It further include when at least two vertex in detection parking stall PRELIMINARY RESULTS are rung before position is as the detection parking stall result step of the groupWhen the response that should be put is all larger than the response threshold value of vertex response point, increase to the confidence value of the detection parking stall PRELIMINARY RESULTSAdd to it is few with have in the detection parking stall PRELIMINARY RESULTS greater than the vertex response point quantity of vertex response point threshold value is identical canCertainty value;When the response of a vertex response point in detection parking stall PRELIMINARY RESULTS is all larger than the response of vertex response pointWhen threshold value, increase a confidence value to the confidence value of the detection parking stall PRELIMINARY RESULTS;It is wrapped when in detection parking stall PRELIMINARY RESULTSNo one of the vertex response point contained response is greater than vertex response point threshold value, then does not increase to detection parking stall PRELIMINARY RESULTSConfidence level.
Further, the extreme decision principle in the step S04 determines the specific steps of best parking stall are as follows:
S041: when the confidence value difference of the detection parking stall result between group and group is less than confidence level difference threshold, firstDetection parking stall PRELIMINARY RESULTS is grouped with parking stall principal direction angle, then is the detection of horizontal direction parking stall principal direction angleParking stall result and parking stall principal direction angle are that the detection parking stall result of vertical direction screens, then compares parking stall principal stresses angleDegree be that confidence value and the parking stall principal direction angle of the detection parking stall result group of horizontal direction are the detection parking stall knot of vertical directionThe confidence value of fruit group;
S042: when the confidence value and parking stall principal direction of the detection parking stall result group that parking stall principal direction angle is horizontal directionAngle is that the difference of the confidence value of the detection parking stall result group of vertical direction is less than confidence level difference threshold, then determined levelThe factor for the confidence value that whether has an impact within the scope of the detection parking stall result group in direction, the detection parking stall knot for judging vertical directionThe factor for the confidence value that whether has an impact within the scope of fruit group;
S043: if only having confidence value influence factor, compensation level within the scope of the detection parking stall result group of horizontal directionThe confidence value in direction is as credible with the detection parking stall result group of vertical direction again after new revised confidence valueAngle value compares;
If only having confidence value influence factor within the scope of the detection parking stall result group of vertical direction, vertical direction is compensatedConfidence value is as the confidence value ratio with the detection parking stall result group of horizontal direction again after new revised confidence valueCompared with;
If there is the detection parking stall of confidence value influence factor, vertical direction within the scope of the detection parking stall result group of horizontal directionAs a result organizing in range has confidence value influence factor, then is level side according to the parking stall principal direction angle obtained in step S041To detection parking stall result group combination horizontal direction characteristic feature compensation level direction confidence value;Or according to step S041In the parking stall principal direction angle that obtains be detection parking stall result group the combination vertical direction characteristic feature compensation of vertical direction verticallyThe confidence value in direction.
Preferably, the horizontal direction characteristic feature to include by the short-term section of angle point be T-type or L-type and in lengthLong line segment whether is detected between degree two angle point of direction.
Preferably, the vertical direction characteristic feature to include by the short-term section of angle point be T-type or L-type and in widthShort-term section whether is detected between degree two angle point of direction.
Preferably, when detection parking stall PRELIMINARY RESULTS being grouped with parking stall principal direction angle in the step S041, not onlyThe detection parking stall group for screening detection the parking stall result group and vertical direction of horizontal direction, can also filter out parking stall principal direction and inclineThe inclination angle degree setting decision principle parameter of rake angle group, parking stall principal direction tilt angle group can obtain.
A kind of bicycle position detecting system based on specified point, including image capture module, parking space detection area generation module,Parking stall element collection, detection parking stall judgment module, extreme determination module are detected,
For described image trapping module for obtaining capture image, processing capture image obtains image-element, and obtains userDesignated position;
The parking space detection area generation module is used to calculate parking space detection area with specified location in user;
Detection parking stall element collection is used to calculate parking space detection area with specified location in user, is sieved with parking space detection areaImage-element is selected, retains the image-element in image-element in parking space detection area range as detection parking stall element collection;
Based on the detection parking stall judgment module is used for the element to detect parking stall element concentration, sentenced according to detection parking stallThe judgment rule of disconnected module show that parking stall PRELIMINARY RESULTS is grouped, then analyzes the confidence level judgement of parking stall Preliminary detection result most preferablyParking stall;
The extreme determination module is used at the beginning of the parking stall of different principal direction angles cannot be distinguished in detection parking stall judgment moduleWhen walking result grouping, the confidence level using extreme determination module to parking stall Preliminary detection result is compensated, then with compensated credibleDegree determines best parking stall.
A kind of single parking stall measure terminal based on specified point, including processor and memory, the memory are stored with journeySequence instruction, the processor operation program instruction realize the step in above-mentioned method.
A kind of computer readable storage medium, is stored thereon with computer program, realization when which is executed by processorSuch as the step in above-mentioned method.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripeThe personage for knowing this technology all without departing from the spirit and scope of the present invention, carries out modifications and changes to above-described embodiment.CauseThis, includes usual skill institute without departing from the spirit and technical ideas disclosed in the present invention in technical field such asAll equivalent modifications or change completed, should be covered by the claims of the present invention.