[go: up one dir, main page]

CN106201062A - A kind of X-comers localization method based on recursive algorithm - Google Patents

A kind of X-comers localization method based on recursive algorithm Download PDF

Info

Publication number
CN106201062A
CN106201062A CN201610459515.7A CN201610459515A CN106201062A CN 106201062 A CN106201062 A CN 106201062A CN 201610459515 A CN201610459515 A CN 201610459515A CN 106201062 A CN106201062 A CN 106201062A
Authority
CN
China
Prior art keywords
point
line
equation
mentioned
screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610459515.7A
Other languages
Chinese (zh)
Other versions
CN106201062B (en
Inventor
田启川
谭登峰
杜响红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing kernel Optoelectronics Technology Co., Ltd.
Original Assignee
Suzhou Canglong Electronics Science And Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Canglong Electronics Science And Technology Co Ltd filed Critical Suzhou Canglong Electronics Science And Technology Co Ltd
Priority to CN201610459515.7A priority Critical patent/CN106201062B/en
Publication of CN106201062A publication Critical patent/CN106201062A/en
Application granted granted Critical
Publication of CN106201062B publication Critical patent/CN106201062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • G06F3/0418Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20101Interactive definition of point of interest, landmark or seed

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides a kind of virtual X-comers localization method, improves accuracy and the robustness of Corner character, uses method of geometry to obtain the straight line on four borders of screen, solves the problem that four boundary angle points are difficult to position.Further, the most only project straight line, do not have the problem confusing straight line;Actively the straight line of projection is a straight border formed by black and white region rather than the straight line directly projecting certain width, it is ensured that the location accuracy of represented straight line, is also not easy marginal point and is missed by low resolution image collection;Straight line up and down is positioned, have employed 2 affine transformations determining straight line, image, to the problem being difficult to by the directly method positioning screen limit straight line of projection straight line, have employed geometrical principle and obtained by Theoretical Calculation.The present invention provides a kind of virtual X-comers localization method, improves accuracy and the robustness of Corner character, uses method of geometry to obtain the straight line on four borders of screen, then by the method calculating 25 points by 9 points, improves the degree of accuracy of location.

Description

A kind of X-comers localization method based on recursive algorithm
Technical field
The present invention relates to field of human-computer interaction, particularly relate to a kind of X-comers localization method based on recursive algorithm.
Background technology
In the image that the imageing sensor of man-machine interaction gathers, screen is carried out timing signal mainly by detection chessboard Lattice angle point carries out exercisable screen area and demarcates.
The most conventional Corner character method has, and people, by the corner location of prompting in touch screen, makes photographic head to people The position of the point of touch-control is demarcated.
But, use above-mentioned scaling method to be easily subject to the impact of local interference, cause Corner Detection failed or inclined Difference is excessive, and particularly boundary angle point is more difficult to detection.
Summary of the invention
In order to solve the problems referred to above, the present invention provides a kind of X-comers localization method based on recursive algorithm, improves The accuracy of Corner character and robustness, use method of geometry to obtain the straight line on four borders of screen, then with by 9 points The method calculating 25 points, improves the degree of accuracy of location.
A kind of X-comers localization method based on recursive algorithm, including:
S1: correct photographic head;
S2: fixing above-mentioned photographic head and the general image by above-mentioned photographic head acquisition screen;
S3: arrange above-mentioned tessellated have m row and n row;
S4: project completely black information on above-mentioned screen, obtains the 1st image by above-mentioned photographic head;
S5: the complete white information of projection on above-mentioned screen, obtains the 2nd image by above-mentioned photographic head;
S6: by from above-mentioned 1st above-mentioned 2nd image of figure image subtraction, it is thus achieved that the binary map of above-mentioned screen;
S7: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be white bottom be the information of black, The 3rd image is obtained by above-mentioned photographic head;
S8: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be black bottom be white information, The 4th image is obtained by above-mentioned photographic head;
S9: obtain the point on the first diagonal according to the 3rd image and the 4th image, is determined the first diagonal side by these points Journey;
S10: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be white bottom be the letter of black Breath, obtains the 5th image by above-mentioned photographic head;
S11: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be black bottom be white letter Breath, obtains the 6th image by above-mentioned photographic head;
S12: obtain the point on the second diagonal according to the 5th image and the 6th image, is determined the second diagonal side by these points Journey;
S13: project the rectangle that length is identical with screen length, height is i gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by above-mentioned photographic head;
S14: project the rectangle that length is identical with screen length, height is m-i gridiron pattern height on above-mentioned screen White information, lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by above-mentioned photographic head;
S15: obtain the point on the i-th row horizontal line according to direct picture and negative sense image, is determined the i-th row horizontal line side by these points Journey, 1≤i≤m-1;
S16: repeat S13-S15, until obtaining m-1 bar horizontal line equation;
S17: project the rectangle that length is identical with screen height, width is j gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by above-mentioned photographic head;
S18: project the rectangle that length is identical with screen height, width is n-j gridiron pattern width on above-mentioned screen White information, lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by above-mentioned photographic head;
S19: obtain the point on jth row vertical line according to direct picture and negative sense image, is determined jth row vertical line side by these points Journey, 1≤j≤n-1;
S20: repeat S17-S19, until obtaining n-1 bar vertical line equation;
S21: the n-1 bar vertical line that m-1 bar horizontal line and step S18 obtained by step S15 obtains forms latticed image;
S22: in above-mentioned latticed image, arbitrarily choose between the 1st row horizontal line and the 2nd row horizontal line the first tetragon and Second tetragon, each connects two points on diagonal, and obtains the first straight line through above-mentioned two point and the respectively Two linear equations;
S23: select to be positioned on above-mentioned 1st row horizontal line, and above-mentioned first straight line, above-mentioned second straight line are perpendicular with above-mentioned Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the first boundary line of above-mentioned screen;
S24: in above-mentioned latticed image, arbitrarily choose the three or four limit between m-1 row horizontal line and m-2 row horizontal line Shape and the 4th tetragon, each connect two points on diagonal, and obtain the 3rd straight line through above-mentioned two point respectively With the 4th linear equation;
S25: select to be positioned under above-mentioned i-th row horizontal line, and above-mentioned 3rd straight line, above-mentioned 4th straight line are perpendicular with above-mentioned Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the second boundary line of above-mentioned screen;
S26: in above-mentioned latticed image, arbitrarily choose between the 1st row vertical line and the 2nd row vertical line the 5th tetragon and 6th tetragon, each connects two points on diagonal, and obtains the 5th straight line through above-mentioned two point and the respectively Six linear equations;
S27: before selecting to be positioned at above-mentioned 1st row vertical line, and above-mentioned 5th straight line, above-mentioned 6th straight line and above-mentioned horizontal stroke Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the 3rd boundary line of above-mentioned screen;
S28: in above-mentioned latticed image, arbitrarily chooses the seven or four limit between the (n-1)th row vertical line and the n-th-2 row vertical line Shape and the 8th tetragon, each connect two points on diagonal, and obtain the 7th straight line through above-mentioned two point respectively With the 8th linear equation;
S29: after selecting to be positioned at above-mentioned (n-1)th row vertical line, and above-mentioned 7th straight line, above-mentioned 8th straight line are with above-mentioned Two intersection points of horizontal line, obtain the linear equation through above-mentioned two intersection point, draw the 4th boundary line of above-mentioned screen;
S30: finally draw the chessboard figure and angle point image intersected to form by m+1 bar horizontal line with n+1 bar vertical line;
S31: find out above-mentioned first boundary line intersection point with the second diagonal equation as the 1st point, above-mentioned first boundary line Make as the intersection point of the 2nd point, above-mentioned first boundary line and above-mentioned first diagonal equation with the intersection point of above-mentioned n/2 article of vertical line equation Be the 3rd point, above-mentioned the second boundary line and above-mentioned first diagonal equation intersection point as the 4th point, above-mentioned the second boundary line with upper State the intersection point of n/2 article of vertical line equation as the 5th point, above-mentioned the second boundary line and above-mentioned second diagonal equation intersection point as the The intersection point of 6 points, above-mentioned 3rd boundary line and above-mentioned m/2 article of horizontal line equation is as the 7th point, above-mentioned 4th boundary line and above-mentioned m/2 The intersection point of article horizontal line equation as the 8th point, above-mentioned first diagonal equation and above-mentioned second diagonal equation intersection point as the 9th Point;
S32: by calculating the connecting line equation of and at the 2nd at above-mentioned 7th, determines itself and above-mentioned and the 9th point at 1st The intersection point of connecting line as the 10th point;
S33: by calculating the connecting line equation of and at the 2nd at above-mentioned 8th, determines itself and above-mentioned and the 9th point at 3rd The intersection point of connecting line as the 11st point;
S34: by calculating the connecting line equation of and at the 5th at above-mentioned 8th, determines itself and above-mentioned and the 9th point at 6th The intersection point of connecting line as the 12nd point;
S35: by calculating the connecting line equation of and at the 5th at above-mentioned 7th, determines itself and above-mentioned and the 9th point at 4th The intersection point of connecting line as the 13rd point;
S36: by calculating the connecting line equation of and at the 10th at the 13rd, determine the friendship of itself and above-mentioned first boundary line O'clock make as the 15th point, its intersection point with above-mentioned the second boundary line as the 14th point, its intersection point with above-mentioned m/2 article of horizontal line equation It it is the 16th point;
S37: by calculating the connecting line equation of and at the 11st at the 12nd, determine the friendship of itself and above-mentioned first boundary line O'clock make as the 18th point, its intersection point with above-mentioned the second boundary line as the 17th point, its intersection point with above-mentioned m/2 article of horizontal line equation It it is the 19th point;
S38: by calculating the connecting line equation of and at the 10th at the 11st, determine the friendship of itself and above-mentioned 3rd boundary line O'clock make as the 21st point, its intersection point with above-mentioned 4th boundary line as the 20th point, its intersection point with above-mentioned n/2 article of vertical line equation It it is the 22nd point;
S39: by calculating the connecting line equation of and at the 12nd at the 13rd, determine the friendship of itself and above-mentioned 3rd boundary line O'clock make as the 24th point, its intersection point with above-mentioned 4th boundary line as the 23rd point, its intersection point with above-mentioned n/2 article of vertical line equation It it is the 25th point;
S40: by the 1st point, the 14th point, the 2nd point, the 20th point, the 10th point, the 21st point, the 7th point, the 10th point, the 9th group The region that becomes, by the 2nd point, the 17th point, the 3rd point, the 21st point, the 11st point, the 22nd point, the 9th point, the 18th point, the 8th form Region, by the 7th point, the 15th point, the 9th point, the 23rd point, the 13rd point, the 24th point, the 4th point, the 16th point, the 5th district formed Territory, by the 9th point, the 18th point, the 8th point, the 24th point, the 12nd point, the 25th point, the 5th point, the 19th point, the 6th region formed, Respectively by using the method identical with S32~S39 to carry out recursive calculation.
Another kind of X-comers localization method based on recursive algorithm, including:
S1: correct photographic head;
S2: fixing above-mentioned photographic head and the general image by above-mentioned photographic head acquisition screen;
S3: arrange above-mentioned tessellated have m row and n row, m and n is the even number more than or equal to 4;
S4: project completely black information on above-mentioned screen, obtains the 1st image by above-mentioned photographic head;
S5: the complete white information of projection on above-mentioned screen, obtains the 2nd image by above-mentioned photographic head;
S6: by from above-mentioned 1st above-mentioned 2nd image of figure image subtraction, it is thus achieved that the binary map of above-mentioned screen;
S7: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be white bottom be the information of black, The 3rd image is obtained by above-mentioned photographic head;
S8: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be black bottom be white information, The 4th image is obtained by above-mentioned photographic head;
S9: obtain the point on the first diagonal according to the 3rd image and the 4th image, is determined the first diagonal side by these points Journey;
S10: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be white bottom be the letter of black Breath, obtains the 5th image by above-mentioned photographic head;
S11: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be black bottom be white letter Breath, obtains the 6th image by above-mentioned photographic head;
S12: obtain the point on the second diagonal according to the 5th image and the 6th image, is determined the second diagonal side by these points Journey;
S13: project the rectangle that length is identical with screen length, height is i gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by above-mentioned photographic head;
S14: project the rectangle that length is identical with screen length, height is m-i gridiron pattern height on above-mentioned screen White information, lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by above-mentioned photographic head;
S15: obtain the point on the i-th row horizontal line according to direct picture and negative sense image, is determined the i-th row horizontal line side by these points Journey, 1≤i≤m-1;
S16: repeat S13-S15, until obtaining m-1 bar horizontal line equation;
S17: project the rectangle that length is identical with screen height, width is j gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by above-mentioned photographic head;
S18: project the rectangle that length is identical with screen height, width is n-j gridiron pattern width on above-mentioned screen White information, lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by above-mentioned photographic head;
S19: obtain the point on jth row vertical line according to direct picture and negative sense image, is determined jth row vertical line side by these points Journey, 1≤j≤n-1;
S20: repeat S17-S19, until obtaining n-1 bar vertical line equation;
S21: the n-1 bar vertical line that m-1 bar horizontal line and step S18 obtained by step S15 obtains forms latticed image;
S22: in above-mentioned latticed image, arbitrarily choose between the 1st row horizontal line and the 2nd row horizontal line the first tetragon and Second tetragon, each connects two points on diagonal, and obtains the first straight line through above-mentioned two point and the respectively Two linear equations;
S23: select to be positioned on above-mentioned 1st row horizontal line, and above-mentioned first straight line, above-mentioned second straight line are perpendicular with above-mentioned Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the first boundary line of above-mentioned screen;
S24: in above-mentioned latticed image, arbitrarily choose the three or four limit between m-1 row horizontal line and m-2 row horizontal line Shape and the 4th tetragon, each connect two points on diagonal, and obtain the 3rd straight line through above-mentioned two point respectively With the 4th linear equation;
S25: select to be positioned under above-mentioned i-th row horizontal line, and above-mentioned 3rd straight line, above-mentioned 4th straight line are perpendicular with above-mentioned Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the second boundary line of above-mentioned screen;
S26: select two intersection points that above-mentioned first boundary line is intersected respectively with above-mentioned first diagonal, the second diagonal, Select two intersection points that above-mentioned the second boundary line intersects respectively with above-mentioned first diagonal, the second diagonal;
S27: select to be positioned at two intersection points before above-mentioned 1st row vertical line in step S26, obtain and hand over through above-mentioned two The linear equation of point, draws the 3rd boundary line of above-mentioned screen;
S28: select to be positioned at two intersection points after above-mentioned n-th-2 row vertical line in step S26, obtain through above-mentioned two The linear equation of intersection point, draws the 4th boundary line of above-mentioned screen;
S29: until drawing the chessboard figure and angle point image intersected to form by m+1 bar horizontal line with n+1 bar vertical line;
S30: find out above-mentioned first boundary line intersection point with the second diagonal equation as the 1st point, above-mentioned first boundary line Make as the intersection point of the 2nd point, above-mentioned first boundary line and above-mentioned first diagonal equation with the intersection point of above-mentioned n/2 article of vertical line equation Be the 3rd point, above-mentioned the second boundary line and above-mentioned first diagonal equation intersection point as the 4th point, above-mentioned the second boundary line with upper State the intersection point intersection point conduct as the 5th point, above-mentioned the second boundary line and above-mentioned second diagonal equation of n/2 article of vertical line equation The intersection point of the 6th point, above-mentioned 3rd boundary line and above-mentioned m/2 article of horizontal line equation is as the 7th point, above-mentioned 4th boundary line and above-mentioned m/ Article 2, the intersection point of horizontal line equation as the 8th point, above-mentioned first diagonal equation and above-mentioned second diagonal equation intersection point as the 9 points;
S31: by calculating the connecting line equation of and at the 2nd at above-mentioned 7th, determines itself and above-mentioned and the 9th point at 1st The intersection point of connecting line as the 10th point;
S32: by calculating the connecting line equation of and at the 2nd at above-mentioned 8th, determines itself and above-mentioned and the 9th point at 3rd The intersection point of connecting line as the 11st point;
S33: by calculating the connecting line equation of and at the 5th at above-mentioned 8th, determines itself and above-mentioned and the 9th point at 6th The intersection point of connecting line as the 12nd point;
S34: by calculating the connecting line equation of and at the 5th at above-mentioned 7th, determines itself and above-mentioned and the 9th point at 4th The intersection point of connecting line as the 13rd point;
S35: by calculating the connecting line equation of and at the 10th at the 13rd, determine the friendship of itself and above-mentioned first boundary line O'clock make as the 15th point, its intersection point with above-mentioned the second boundary line as the 14th point, its intersection point with above-mentioned m/2 article of horizontal line equation It it is the 16th point;
S36: by calculating the connecting line equation of and at the 11st at the 12nd, determine the friendship of itself and above-mentioned first boundary line O'clock make as the 18th point, its intersection point with above-mentioned the second boundary line as the 17th point, its intersection point with above-mentioned m/2 article of horizontal line equation It it is the 19th point;
S37: by calculating the connecting line equation of and at the 10th at the 11st, determine the friendship of itself and above-mentioned 3rd boundary line O'clock make as the 21st point, its intersection point with above-mentioned 4th boundary line as the 20th point, its intersection point with above-mentioned n/2 article of vertical line equation It it is the 22nd point;
S38: by calculating the connecting line equation of and at the 12nd at the 13rd, determine the friendship of itself and above-mentioned 3rd boundary line O'clock make as the 24th point, its intersection point with above-mentioned 4th boundary line as the 23rd point, its intersection point with above-mentioned n/2 article of vertical line equation It it is the 25th point;
S39: by the 1st point, the 14th point, the 2nd point, the 20th point, the 10th point, the 21st point, the 7th point, the 10th point, the 9th group The region that becomes, by the 2nd point, the 17th point, the 3rd point, the 21st point, the 11st point, the 22nd point, the 9th point, the 18th point, the 8th form Region, by the 7th point, the 15th point, the 9th point, the 23rd point, the 13rd point, the 24th point, the 4th point, the 16th point, the 5th district formed Territory, by the 9th point, the 18th point, the 8th point, the 24th point, the 12nd point, the 25th point, the 5th point, the 19th point, the 6th region formed, Respectively by using the method identical with S31~S38 to carry out recursive calculation.
Accompanying drawing explanation
Fig. 1 is the affine schematic diagram of acquisition the 1st image of the present invention;
Fig. 2 is the affine schematic diagram of acquisition the 2nd image of the present invention;
Fig. 3 is the binary map obtained by the 1st image and the 2nd image subtraction of the present invention;
Fig. 4 is the affine schematic diagram of acquisition the 3rd image of the present invention;
Fig. 5 is the affine schematic diagram of acquisition the 4th image of the present invention;
Fig. 6 is first diagonal of the present invention;
Fig. 7 is the affine schematic diagram of acquisition the 5th image of the present invention;
Fig. 8 is the affine schematic diagram of acquisition the 6th image of the present invention;
Fig. 9 is second diagonal of the present invention;
Figure 10 is the affine schematic diagram obtaining direct picture of the present invention;
Figure 11 is the affine schematic diagram obtaining negative sense image of the present invention;
Figure 12 is the 1st row horizontal line of the present invention;
Figure 13 is the affine schematic diagram obtaining direct picture of the present invention;
Figure 14 is the affine schematic diagram obtaining negative sense image of the present invention;
Figure 15 is the 2nd row horizontal line of the present invention;
Figure 16 is the affine schematic diagram obtaining direct picture of the present invention;
Figure 17 is the affine schematic diagram obtaining negative sense image of the present invention;
Figure 18 is the 3rd row horizontal line of the present invention;
Figure 19 is the affine schematic diagram obtaining direct picture of the present invention;
Figure 20 is the affine schematic diagram obtaining negative sense image of the present invention;
Figure 21 is the first row vertical line of the present invention;
Figure 22 is the affine schematic diagram obtaining direct picture;
Figure 23 is the affine schematic diagram obtaining negative sense image;
Figure 24 is secondary series vertical line;
Figure 25 is the affine schematic diagram obtaining direct picture;
Figure 26 is the affine schematic diagram obtaining negative sense image;
Figure 27. the 3rd row vertical line;
Figure 28 is that the first straight line and the second straight line intersect with vertical line;
Figure 29 is the first boundary line;
Figure 30 is the gridiron pattern that obtains of the scaling method by the present invention and angle point thereof;
Figure 31 is to intersect with the first boundary line and the second boundary line while of the first diagonal and the second diagonal;
Figure 32 is the gridiron pattern that obtains of the another kind of computational methods by the present invention and angle point thereof;
Figure 33 is that the method by the present invention determines 9 points;
Figure 34 is that the method by the present invention determines the 10th point;
Figure 35 is that the method by the present invention determines the 11st point;
Figure 36 is that the method by the present invention determines the 12nd point;
Figure 37 is that the method by the present invention determines the 13rd point;
Figure 38 is that the method by the present invention determines 14-16 point;
Figure 39 is that the method by the present invention determines 17-19 point;
Figure 40 is that the method by the present invention determines 20-22 point;
Figure 41 is that the method by the present invention determines 23-25 point.
Detailed description of the invention
Technical scheme is further described below in conjunction with detailed description of the invention.Should be appreciated that and be described herein as Detailed description of the invention only in order to explain the present invention, be not intended to limit the present invention.
A kind of X-comers localization method based on recursive algorithm, including:
S1: correct photographic head;
S2: fixing above-mentioned photographic head and the general image by above-mentioned photographic head acquisition screen;
S3: arrange above-mentioned tessellated have m row and n row;
S4: project completely black information on above-mentioned screen, obtains the 1st image by above-mentioned photographic head;
S5: the complete white information of projection on above-mentioned screen, obtains the 2nd image by above-mentioned photographic head;
S6: by from above-mentioned 1st above-mentioned 2nd image of figure image subtraction, it is thus achieved that the binary map of above-mentioned screen;
S7: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be white bottom be the information of black, The 3rd image is obtained by above-mentioned photographic head;
S8: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be black bottom be white information, The 4th image is obtained by above-mentioned photographic head;
S9: obtain the point on the first diagonal according to the 3rd image and the 4th image, is determined the first diagonal side by these points Journey;
S10: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be white bottom be the letter of black Breath, obtains the 5th image by above-mentioned photographic head;
S11: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be black bottom be white letter Breath, obtains the 6th image by above-mentioned photographic head;
S12: obtain the point on the second diagonal according to the 5th image and the 6th image, is determined the second diagonal side by these points Journey;
S13: project the rectangle that length is identical with screen length, height is i gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by above-mentioned photographic head;
S14: project the rectangle that length is identical with screen length, height is m-i gridiron pattern height on above-mentioned screen White information, lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by above-mentioned photographic head;
S15: obtain the point on the i-th row horizontal line according to direct picture and negative sense image, is determined the i-th row horizontal line side by these points Journey, 1≤i≤m-1;
S16: repeat S13-S15, until obtaining m-1 bar horizontal line equation;
S17: project the rectangle that length is identical with screen height, width is j gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by above-mentioned photographic head;
S18: project the rectangle that length is identical with screen height, width is n-j gridiron pattern width on above-mentioned screen White information, lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by above-mentioned photographic head;
S19: obtain the point on jth row vertical line according to direct picture and negative sense image, is determined jth row vertical line side by these points Journey, 1≤j≤n-1;
S20: repeat S17-S19, until obtaining n-1 bar vertical line equation;
S21: the n-1 bar vertical line that m-1 bar horizontal line and step S18 obtained by step S15 obtains forms latticed image;
S22: in above-mentioned latticed image, arbitrarily choose between the 1st row horizontal line and the 2nd row horizontal line the first tetragon and Second tetragon, each connects two points on diagonal, and obtains the first straight line through above-mentioned two point and the respectively Two linear equations;
S23: select to be positioned on above-mentioned 1st row horizontal line, and above-mentioned first straight line, above-mentioned second straight line are perpendicular with above-mentioned Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the first boundary line of above-mentioned screen;
S24: in above-mentioned latticed image, arbitrarily choose the three or four limit between m-1 row horizontal line and m-2 row horizontal line Shape and the 4th tetragon, each connect two points on diagonal, and obtain the 3rd straight line through above-mentioned two point respectively With the 4th linear equation;
S25: select to be positioned under above-mentioned i-th row horizontal line, and above-mentioned 3rd straight line, above-mentioned 4th straight line are perpendicular with above-mentioned Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the second boundary line of above-mentioned screen;
S26: in above-mentioned latticed image, arbitrarily choose between the 1st row vertical line and the 2nd row vertical line the 5th tetragon and 6th tetragon, each connects two points on diagonal, and obtains the 5th straight line through above-mentioned two point and the respectively Six linear equations;
S27: before selecting to be positioned at above-mentioned 1st row vertical line, and above-mentioned 5th straight line, above-mentioned 6th straight line and above-mentioned horizontal stroke Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the 3rd boundary line of above-mentioned screen;
S28: in above-mentioned latticed image, arbitrarily chooses the seven or four limit between the (n-1)th row vertical line and the n-th-2 row vertical line Shape and the 8th tetragon, each connect two points on diagonal, and obtain the 7th straight line through above-mentioned two point respectively With the 8th linear equation;
S29: after selecting to be positioned at above-mentioned (n-1)th row vertical line, and above-mentioned 7th straight line, above-mentioned 8th straight line are with above-mentioned Two intersection points of horizontal line, obtain the linear equation through above-mentioned two intersection point, draw the 4th boundary line of above-mentioned screen;
S30: until drawing the chessboard figure and angle point image intersected to form by m+1 bar horizontal line with n+1 bar vertical line;
S31: find out above-mentioned first boundary line intersection point with the second diagonal equation as the 1st point, above-mentioned first boundary line Make as the intersection point of the 2nd point, above-mentioned first boundary line and above-mentioned first diagonal equation with the intersection point of above-mentioned n/2 article of vertical line equation Be the 3rd point, above-mentioned the second boundary line and above-mentioned first diagonal equation intersection point as the 4th point, above-mentioned the second boundary line with upper State the intersection point of n/2 article of vertical line equation as the 5th point, above-mentioned the second boundary line and above-mentioned second diagonal equation intersection point as the The intersection point of 6 points, above-mentioned 3rd boundary line and above-mentioned m/2 article of horizontal line equation is as the 7th point, above-mentioned 4th boundary line and above-mentioned m/2 The intersection point of article horizontal line equation as the 8th point, above-mentioned first diagonal equation and above-mentioned second diagonal equation intersection point as the 9th Point;
S32: by calculating the connecting line equation of and at the 2nd at above-mentioned 7th, determines itself and above-mentioned and the 9th point at 1st The intersection point of connecting line as the 10th point;
S33: by calculating the connecting line equation of and at the 2nd at above-mentioned 8th, determines itself and above-mentioned and the 9th point at 3rd The intersection point of connecting line as the 11st point;
S34: by calculating the connecting line equation of and at the 5th at above-mentioned 8th, determines itself and above-mentioned and the 9th point at 6th The intersection point of connecting line as the 12nd point;
S35: by calculating the connecting line equation of and at the 5th at above-mentioned 7th, determines itself and above-mentioned and the 9th point at 4th The intersection point of connecting line as the 13rd point;
S36: by calculating the connecting line equation of and at the 10th at the 13rd, determine the friendship of itself and above-mentioned first boundary line O'clock make as the 15th point, its intersection point with above-mentioned the second boundary line as the 14th point, its intersection point with above-mentioned m/2 article of horizontal line equation It it is the 16th point;
S37: by calculating the connecting line equation of and at the 11st at the 12nd, determine the friendship of itself and above-mentioned first boundary line O'clock make as the 18th point, its intersection point with above-mentioned the second boundary line as the 17th point, its intersection point with above-mentioned m/2 article of horizontal line equation It it is the 19th point;
S38: by calculating the connecting line equation of and at the 10th at the 11st, determine the friendship of itself and above-mentioned 3rd boundary line O'clock make as the 21st point, its intersection point with above-mentioned 4th boundary line as the 20th point, its intersection point with above-mentioned n/2 article of vertical line equation It it is the 22nd point;
S39: by calculating the connecting line equation of and at the 12nd at the 13rd, determine the friendship of itself and above-mentioned 3rd boundary line O'clock make as the 24th point, its intersection point with above-mentioned 4th boundary line as the 23rd point, its intersection point with above-mentioned n/2 article of vertical line equation It it is the 25th point;
S40: by the 1st point, the 14th point, the 2nd point, the 20th point, the 10th point, the 21st point, the 7th point, the 10th point, the 9th group The region that becomes, by the 2nd point, the 17th point, the 3rd point, the 21st point, the 11st point, the 22nd point, the 9th point, the 18th point, the 8th form Region, by the 7th point, the 15th point, the 9th point, the 23rd point, the 13rd point, the 24th point, the 4th point, the 16th point, the 5th district formed Territory, by the 9th point, the 18th point, the 8th point, the 24th point, the 12nd point, the 25th point, the 5th point, the 19th point, the 6th region formed, Respectively by using the method identical with S32~S39 to carry out recursive calculation.
Another kind of X-comers localization method based on recursive algorithm, including:
S1: correct photographic head;
S2: fixing above-mentioned photographic head and the general image by above-mentioned photographic head acquisition screen;
S3: arrange above-mentioned tessellated have m row and n row;
S4: project completely black information on above-mentioned screen, obtains the 1st image by above-mentioned photographic head;
S5: the complete white information of projection on above-mentioned screen, obtains the 2nd image by above-mentioned photographic head;
S6: by from above-mentioned 1st above-mentioned 2nd image of figure image subtraction, it is thus achieved that the binary map of above-mentioned screen;
S7: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be white bottom be the information of black, The 3rd image is obtained by above-mentioned photographic head;
S8: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be black bottom be white information, The 4th image is obtained by above-mentioned photographic head;
S9: obtain the point on the first diagonal according to the 3rd image and the 4th image, is determined the first diagonal side by these points Journey;
S10: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be white bottom be the letter of black Breath, obtains the 5th image by above-mentioned photographic head;
S11: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be black bottom be white letter Breath, obtains the 6th image by above-mentioned photographic head;
S12: obtain the point on the second diagonal according to the 5th image and the 6th image, is determined the second diagonal side by these points Journey;
S13: project the rectangle that length is identical with screen length, height is i gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by above-mentioned photographic head;
S14: project the rectangle that length is identical with screen length, height is m-i gridiron pattern height on above-mentioned screen White information, lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by above-mentioned photographic head;
S15: obtain the point on the i-th row horizontal line according to direct picture and negative sense image, is determined the i-th row horizontal line side by these points Journey, 1≤i≤m-1;
S16: repeat S13-S15, until obtaining m-1 bar horizontal line equation;
S17: project the rectangle that length is identical with screen height, width is j gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by above-mentioned photographic head;
S18: project the rectangle that length is identical with screen height, width is n-j gridiron pattern width on above-mentioned screen White information, lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by above-mentioned photographic head;
S19: obtain the point on jth row vertical line according to direct picture and negative sense image, is determined jth row vertical line side by these points Journey, 1≤j≤n-1;
S20: repeat S17-S19, until obtaining n-1 bar vertical line equation;
S21: the n-1 bar vertical line that m-1 bar horizontal line and step S18 obtained by step S15 obtains forms latticed image;
S22: in above-mentioned latticed image, arbitrarily choose between the 1st row horizontal line and the 2nd row horizontal line the first tetragon and Second tetragon, each connects two points on diagonal, and obtains the first straight line through above-mentioned two point and the respectively Two linear equations;
S23: select to be positioned on above-mentioned 1st row horizontal line, and above-mentioned first straight line, above-mentioned second straight line are perpendicular with above-mentioned Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the first boundary line of above-mentioned screen;
S24: in above-mentioned latticed image, arbitrarily choose the three or four limit between m-1 row horizontal line and m-2 row horizontal line Shape and the 4th tetragon, each connect two points on diagonal, and obtain the 3rd straight line through above-mentioned two point respectively With the 4th linear equation;
S25: select to be positioned under above-mentioned i-th row horizontal line, and above-mentioned 3rd straight line, above-mentioned 4th straight line are perpendicular with above-mentioned Two intersection points of line, obtain the linear equation through above-mentioned two intersection point, draw the second boundary line of above-mentioned screen;
S26: select two intersection points that above-mentioned first boundary line is intersected respectively with above-mentioned first diagonal, the second diagonal, Select two intersection points that above-mentioned the second boundary line intersects respectively with above-mentioned first diagonal, the second diagonal;
S27: select to be positioned at two intersection points before above-mentioned 1st row vertical line in step S26, obtain and hand over through above-mentioned two The linear equation of point, draws the 3rd boundary line of above-mentioned screen;
S28: select to be positioned at two intersection points after above-mentioned n-th-2 row vertical line in step S26, obtain through above-mentioned two The linear equation of intersection point, draws the 4th boundary line of above-mentioned screen;
S29: until drawing the chessboard figure and angle point image intersected to form by m+1 bar horizontal line with n+1 bar vertical line;
S30: find out above-mentioned first boundary line intersection point with the second diagonal equation as the 1st point, above-mentioned first boundary line Make as the intersection point of the 2nd point, above-mentioned first boundary line and above-mentioned first diagonal equation with the intersection point of above-mentioned n/2 article of vertical line equation Be the 3rd point, above-mentioned the second boundary line and above-mentioned first diagonal equation intersection point as the 4th point, above-mentioned the second boundary line with upper State the intersection point of n/2 article of vertical line equation as the 5th point, above-mentioned the second boundary line and above-mentioned second diagonal equation intersection point as the The intersection point of 6 points, above-mentioned 3rd boundary line and above-mentioned m/2 article of horizontal line equation is as the 7th point, above-mentioned 4th boundary line and above-mentioned m/2 The intersection point of article horizontal line equation as the 8th point, above-mentioned first diagonal equation and above-mentioned second diagonal equation intersection point as the 9th Point;
S31: by calculating the connecting line equation of and at the 2nd at above-mentioned 7th, determines itself and above-mentioned and the 9th point at 1st The intersection point of connecting line as the 10th point;
S32: by calculating the connecting line equation of and at the 2nd at above-mentioned 8th, determines itself and above-mentioned and the 9th point at 3rd The intersection point of connecting line as the 11st point;
S33: by calculating the connecting line equation of and at the 5th at above-mentioned 8th, determines itself and above-mentioned and the 9th point at 6th The intersection point of connecting line as the 12nd point;
S34: by calculating the connecting line equation of and at the 5th at above-mentioned 7th, determines itself and above-mentioned and the 9th point at 4th The intersection point of connecting line as the 13rd point;
S35: by calculating the connecting line equation of and at the 10th at the 13rd, determine the friendship of itself and above-mentioned first boundary line O'clock make as the 15th point, its intersection point with above-mentioned the second boundary line as the 14th point, its intersection point with above-mentioned m/2 article of horizontal line equation It it is the 16th point;
S36: by calculating the connecting line equation of and at the 11st at the 12nd, determine the friendship of itself and above-mentioned first boundary line O'clock make as the 18th point, its intersection point with above-mentioned the second boundary line as the 17th point, its intersection point with above-mentioned m/2 article of horizontal line equation It it is the 19th point;
S37: by calculating the connecting line equation of and at the 10th at the 11st, determine the friendship of itself and above-mentioned 3rd boundary line O'clock make as the 21st point, its intersection point with above-mentioned 4th boundary line as the 20th point, its intersection point with above-mentioned n/2 article of vertical line equation It it is the 22nd point;
S38: by calculating the connecting line equation of and at the 12nd at the 13rd, determine the friendship of itself and above-mentioned 3rd boundary line O'clock make as the 24th point, its intersection point with above-mentioned 4th boundary line as the 23rd point, its intersection point with above-mentioned n/2 article of vertical line equation It it is the 25th point;
S39: by the 1st point, the 14th point, the 2nd point, the 20th point, the 10th point, the 21st point, the 7th point, the 10th point, the 9th group The region that becomes, by the 2nd point, the 17th point, the 3rd point, the 21st point, the 11st point, the 22nd point, the 9th point, the 18th point, the 8th form Region, by the 7th point, the 15th point, the 9th point, the 23rd point, the 13rd point, the 24th point, the 4th point, the 16th point, the 5th district formed Territory, by the 9th point, the 18th point, the 8th point, the 24th point, the 12nd point, the 25th point, the 5th point, the 19th point, the 6th region formed, Respectively by using the method identical with S31~S38 to carry out recursive calculation.
The concrete technical scheme of the present invention for convenience of description, existing m takes 4, and n takes 4 and is described in detail for example.Should manage Solving, detailed description of the invention described herein only in order to explain the present invention, is not intended to limit the present invention.
The present invention provides a kind of X-comers localization method based on recursive algorithm, including:
S1: correct photographic head.
S2: fixing above-mentioned photographic head and the general image by above-mentioned photographic head acquisition screen.
S3: arrange above-mentioned tessellated have 4 row and 4 row.
Fig. 1 is the affine schematic diagram of acquisition the 1st image of the present invention, as it is shown in figure 1,
S4: project completely black information on above-mentioned screen, obtains the 1st image by above-mentioned photographic head.
Fig. 2 is the affine schematic diagram of acquisition the 2nd image of the present invention, as in figure 2 it is shown,
S5: the complete white information of projection on above-mentioned screen, obtains the 2nd image by above-mentioned photographic head.
Fig. 3 is the binary map obtained by the 1st image and the 2nd image subtraction of the present invention, as it is shown on figure 3,
S6: by from above-mentioned 1st above-mentioned 2nd image of figure image subtraction, it is thus achieved that the binary map of above-mentioned screen.
Fig. 4 is the affine schematic diagram of acquisition the 3rd image of the present invention, as shown in Figure 4,
S7: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be white bottom be the information of black, The 3rd image is obtained by above-mentioned photographic head.
Fig. 5 is the affine schematic diagram of acquisition the 4th image of the present invention, as it is shown in figure 5,
S8: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be black bottom be white information, The 4th image is obtained by above-mentioned photographic head.
Fig. 6 is first diagonal of the present invention, as shown in Figure 6,
S9: obtain the point on the first diagonal according to the 3rd image and the 4th image, is determined the first diagonal side by these points Journey C1.
Fig. 7 is the affine schematic diagram of acquisition the 5th image of the present invention, as it is shown in fig. 7,
S10: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be white bottom be the letter of black Breath, obtains the 5th image by above-mentioned photographic head.
Fig. 8 is the affine schematic diagram of acquisition the 6th image of the present invention, as shown in Figure 8,
S11: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be black bottom be white letter Breath, obtains the 6th image by above-mentioned photographic head.
Fig. 9 is second diagonal of the present invention, as it is shown in figure 9,
S12: obtain the point on the second diagonal according to the 5th image and the 6th image, is determined the second diagonal side by these points Journey C2.
Figure 10 is the affine schematic diagram obtaining direct picture of the present invention, as shown in Figure 10,
S13: project the rectangle that length is identical with screen length, height is 1 gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head.
Figure 11 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 11,
S14: project the rectangle that length is identical with screen length, height is 3 gridiron pattern height on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head.
Figure 12 is the 1st row horizontal line of the present invention, as shown in figure 12,
S15: obtain the 1st row horizontal line equation L1 according to direct picture and negative sense image.
Figure 13 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 13,
S16: project the rectangle that length is identical with screen length, height is 2 gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head.
Figure 14 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 14,
S17: project the rectangle that length is identical with screen length, height is 2 gridiron pattern height on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head.
Figure 15 is the 2nd row horizontal line of the present invention, as shown in figure 15,
S18: obtain the 2nd row horizontal line equation L2 according to direct picture and negative sense image.
Figure 16 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 16,
S19: project the rectangle that length is identical with screen length, height is 3 gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head.
Figure 17 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 17,
S20: project the rectangle that length is identical with screen length, width is 1 gridiron pattern height on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head.
Figure 18 is the 3rd row horizontal line of the present invention, as shown in figure 18,
S21: obtain the 3rd row horizontal line equation L3 according to direct picture and negative sense image.
Figure 19 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 19,
S22: project the rectangle that length is identical with screen height, width is 1 gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head.
Figure 20 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 20,
S23: project the rectangle that length is identical with screen height, width is 4 gridiron pattern width on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head.
Figure 21 is the 1st row vertical line of the present invention, as shown in figure 21,
S24: obtain the 1st row vertical line equation R1 according to direct picture and negative sense image.
Figure 22 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 22,
S25: project the rectangle that length is identical with screen height, width is 2 gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head.
Figure 23 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 23,
S26: project the rectangle that length is identical with screen height, width is 3 gridiron pattern width on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head.
Figure 24 is the 2nd row vertical line of the present invention, as shown in figure 24,
S27: obtain the 2nd row vertical line equation R2 according to direct picture and negative sense image.
Figure 25 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 25,
S28: project the rectangle that length is identical with screen height, width is 3 gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head.
Figure 26 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 26,
S29: project the rectangle that length is identical with screen height, width is 2 gridiron pattern width on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head.
Figure 27 is the 3rd row vertical line of the present invention, as shown in figure 27,
S30: obtain the 3rd row vertical line equation R3 according to direct picture and negative sense image.
S31: formed the latticed image of even partition by 3 horizontal lines and 3 vertical lines.
Figure 28 is that first straight line of the present invention intersects with the second straight line and vertical line, as shown in figure 28,
S32: in above-mentioned latticed image, arbitrarily chooses the one or four limit between the 1st row horizontal line L1 and the 2nd row horizontal line L2 Shape and the second tetragon, obtain the first linear equation H1 of two somes Q1, Q2 on the first tetragon diagonal, obtain through Cross the second linear equation line H2 of two somes Q1, Q3 on the second tetragon diagonal.
Figure 29 is first boundary line of the present invention, as shown in figure 29,
S33: select be positioned on above-mentioned 1st row horizontal line L1, and above-mentioned first straight line H1, above-mentioned second straight line H2 with Two intersection points A, B of above-mentioned vertical line R2, R4, obtain the linear equation through above-mentioned two intersection point A, B, draw the of above-mentioned screen One boundary line K1;
S34: the principle identical with S35-S36, in above-mentioned latticed image, at the 3rd row horizontal line L3 and the 2nd row horizontal line L2 Between arbitrarily choose the 3rd tetragon and the 4th tetragon, each connect two points on diagonal, and obtain respectively through 3rd straight line of above-mentioned two point and the 4th linear equation (being not drawn in figure).
S35: select to be positioned under above-mentioned 3rd row horizontal line L3, and above-mentioned 3rd straight line, above-mentioned 4th straight line are with above-mentioned Two intersection points of vertical line, obtain the linear equation through above-mentioned two intersection point, draw the second boundary line K2 (reference of above-mentioned screen Figure 30).
S36: in the principle identical with S35-S36, in above-mentioned latticed image, at the 1st row vertical line R1 and the 2nd row vertical line R2 Between arbitrarily choose the 5th tetragon and the 6th tetragon, each connect two points on diagonal, and obtain respectively through 5th straight line of above-mentioned two point and the 6th linear equation (being not drawn in figure).
S37: before selecting to be positioned at above-mentioned 1st row vertical line R1, and above-mentioned 5th straight line, above-mentioned 6th straight line are with above-mentioned Two intersection points of horizontal line, obtain the linear equation through above-mentioned two intersection point, draw the 3rd boundary line K3 (reference of above-mentioned screen Figure 30).
S38: the principle identical with S32-S33, in above-mentioned latticed image, at the 3rd row vertical line R4 and the 3rd row vertical line R3 Between arbitrarily choose the 7th tetragon and the 8th tetragon, each connect two points on diagonal, and obtain respectively through 7th straight line of above-mentioned two point and the 8th linear equation (being not drawn in figure);
S39: after selecting to be positioned at above-mentioned 3rd row vertical line R3, and above-mentioned 7th straight line, above-mentioned 8th straight line are with above-mentioned Two intersection points of horizontal line, obtain the linear equation through above-mentioned two intersection point, draw the 4th boundary line K4 (ginseng of above-mentioned screen Examine Figure 30).
Figure 30 is the gridiron pattern that obtains of the scaling method by the present invention of the present invention and angle point thereof, as shown in figure 30,
S40: finally draw the chessboard figure and angle point image intersected to form by 5 horizontal lines and 6 vertical lines.
Obtain the second boundary line K2, the 3rd boundary line K3 and the 4th boundary line K4 method with obtain above-mentioned first border The method of line K1 is identical, therefore does not draw accompanying drawing.
Figure 33 is that the method by the present invention determines 9 points, as shown in figure 33,
S41: find out the intersection point of above-mentioned first boundary line K1 and the second diagonal C2 equation as the 1st: 1, above-mentioned first limit The intersection point of boundary line K1 and above-mentioned 2nd article of vertical line equation R2 is as the 2nd: 2, above-mentioned first boundary line K1 and above-mentioned first diagonal The intersection point of equation C1 as the 3rd: 3, the intersection point of above-mentioned the second boundary line K2 and above-mentioned first diagonal equation C1 is as the 4th point 4, above-mentioned the second boundary line K2 and the intersection point of above-mentioned 2nd article of vertical line equation R2 as the 5th: 5, above-mentioned the second boundary line K2 is with upper State the intersection point friendship as the 6th: 6, above-mentioned 3rd boundary line K3 and above-mentioned 2nd article of horizontal line equation L2 of the second diagonal equation C2 O'clock as the 7th: 7, above-mentioned 4th boundary line K4 and the intersection point of above-mentioned 2nd article of horizontal line equation L2 as the 8th: 8, above-mentioned first right The intersection point of linea angulata equation C1 and above-mentioned second diagonal equation C2 is as the 9th: 9;
Figure 34 is that the method by the present invention determines the 10th point, as shown in figure 34,
S42: by calculate the 2nd: 2 with the above-mentioned connecting line equation of the 7th: 7, determine that it is with the above-mentioned 1st: 1 and the The intersection point of the connecting line of 9: 9 is as the 10th: 10;
Figure 35 is that the method by the present invention determines the 11st point, as shown in figure 35,
S43: by calculate the 2nd: 2 with the above-mentioned connecting line equation of the 8th: 8, determine that it is with the above-mentioned 3rd: 3 and the The intersection point of the connecting line of 9: 9 is as the 11st: 11;
Figure 36 is that the method by the present invention determines the 12nd point, as shown in figure 36,
S44: by calculate the 5th: 5 with the above-mentioned connecting line equation of the 8th: 8, determine that it is with the above-mentioned 6th: 6 and the The intersection point of the connecting line of 9: 9 is as the 12nd: 12;
Figure 37 is that the method by the present invention determines the 13rd point;As shown in figure 37,
S45: by calculate the 5th: 5 with the above-mentioned connecting line equation of the 7th: 7, determine that it is with the above-mentioned 4th: 4 and the The intersection point of the connecting line of 9: 9 is as the 13rd: 13;
Figure 38 is that the method by the present invention determines 14-16 point, as shown in figure 38,
S46: by calculating the 10th: 10 and the connecting line equation of the 13rd: 13, determine itself and above-mentioned first boundary line The intersection point that the intersection point of K1 is as the 14th: 14, it is with above-mentioned 2nd article of horizontal line equation L2 as the 15th: 15, itself and above-mentioned second limit The intersection point in boundary line k2 is as the 16th: 16;
Figure 39 is that the method by the present invention determines 17-19 point, as shown in figure 39,
S47: by calculating the 11st: 11 and the connecting line equation of the 12nd: 12, determine itself and above-mentioned first boundary line The intersection point that the intersection point of K1 is as the 17th: 17, it is with above-mentioned 2nd article of horizontal line equation L2 as the 18th: 18, itself and above-mentioned second limit The intersection point in boundary line K2 is as the 19th: 19;
Figure 40 is that the method by the present invention determines 20-22 point, as shown in figure 40,
S48: by calculating the 10th: 10 and the connecting line equation of the 11st: 11, determine itself and above-mentioned 3rd boundary line The intersection point that the intersection point of K3 is as the 20th: 20, it is with above-mentioned 2nd article of vertical line equation R2 as the 21st: 21, itself and above-mentioned 4th limit The intersection point in boundary line K4 is as the 22nd: 22;
Figure 41 is that the method by the present invention determines 23-25 point, as shown in figure 41,
S49: by calculating the 12nd: 12 and the connecting line equation of the 13rd: 13, determine itself and above-mentioned 3rd boundary line The intersection point that the intersection point of K3 is as the 23rd: 23, it is with above-mentioned 2nd article of vertical line equation R2 as the 24th: 24, itself and above-mentioned 4th limit The intersection point in boundary line K4 is as the 25th: 25;
S50: by the 1st point, the 14th point, the 2nd point, the 20th point, the 10th point, the 21st point, the 7th point, the 10th point, the 9th group The region that becomes, by the 2nd point, the 17th point, the 3rd point, the 21st point, the 11st point, the 22nd point, the 9th point, the 18th point, the 8th form Region, by the 7th point, the 15th point, the 9th point, the 23rd point, the 13rd point, the 24th point, the 4th point, the 16th point, the 5th district formed Territory, by the 9th point, the 18th point, the 8th point, the 24th point, the 12nd point, the 25th point, the 5th point, the 19th point, the 6th region formed, Respectively by using the method identical with S41~S49 to carry out recursive calculation.
The present invention provides another kind of X-comers localization method based on recursive algorithm, including:
S1: correct photographic head;
S2: fixing above-mentioned photographic head and the general image by above-mentioned photographic head acquisition screen;
S3: arrange above-mentioned tessellated have 4 row and 5 row;
Fig. 1 is the affine schematic diagram of acquisition the 1st image of the present invention, as it is shown in figure 1,
S4: project completely black information on above-mentioned screen, obtains the 1st image by above-mentioned photographic head;
Fig. 2 is the affine schematic diagram of acquisition the 2nd image of the present invention, as in figure 2 it is shown,
S5: the complete white information of projection on above-mentioned screen, obtains the 2nd image by above-mentioned photographic head;
Fig. 3 is the binary map obtained by the 1st image and the 2nd image subtraction of the present invention, as it is shown on figure 3,
S6: by from above-mentioned 1st above-mentioned 2nd image of figure image subtraction, it is thus achieved that the binary map of above-mentioned screen;
Fig. 4 is the affine schematic diagram of acquisition the 3rd image of the present invention, as shown in Figure 4,
S7: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be white bottom be the information of black, The 3rd image is obtained by above-mentioned photographic head;
Fig. 5 is the affine schematic diagram of acquisition the 4th image of the present invention, as it is shown in figure 5,
S8: project on above-mentioned screen and be as the criterion with the first diagonal of screen, top be black bottom be white information, The 4th image is obtained by above-mentioned photographic head;
Fig. 6 is first diagonal of the present invention, as shown in Figure 6,
S9: obtain the point on the first diagonal according to the 3rd image and the 4th image, is determined the first diagonal side by these points Journey C1;
Fig. 7 is the affine schematic diagram of acquisition the 5th image of the present invention, as it is shown in fig. 7,
S10: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be white bottom be the letter of black Breath, obtains the 5th image by above-mentioned photographic head;
Fig. 8 is the affine schematic diagram of acquisition the 6th image of the present invention, as shown in Figure 8,
S11: project on above-mentioned screen and be as the criterion with the second diagonal of screen, top be black bottom be white letter Breath, obtains the 6th image by above-mentioned photographic head;
Fig. 9 is second diagonal of the present invention, as it is shown in figure 9,
S12: obtain the point on the second diagonal according to the 5th image and the 6th image, is determined the second diagonal side by these points Journey C2;
Figure 10 is the affine schematic diagram obtaining direct picture of the present invention, as shown in Figure 10,
S13: project the rectangle that length is identical with screen length, height is 1 gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head;
Figure 11 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 11,
S14: project the rectangle that length is identical with screen length, height is 3 gridiron pattern height on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head;
Figure 12 is the 1st row horizontal line of the present invention, as shown in figure 12,
S15: obtain the 1st row horizontal line equation L1 according to direct picture and negative sense image;
Figure 13 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 13,
S16: project the rectangle that length is identical with screen length, height is 2 gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head;
Figure 14 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 14,
S17: project the rectangle that length is identical with screen length, height is 2 gridiron pattern height on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head;
Figure 15 is the 2nd row horizontal line of the present invention, as shown in figure 15,
S18: obtain the 2nd row horizontal line equation L2 according to direct picture and negative sense image;
Figure 16 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 16,
S19: project the rectangle that length is identical with screen length, height is 3 gridiron pattern height on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head;
Figure 17 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 17,
S20: project the rectangle that length is identical with screen length, width is 1 gridiron pattern height on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head;
Figure 18 is the 3rd row horizontal line of the present invention, as shown in figure 18,
S21: obtain the 3rd row horizontal line equation L3 according to direct picture and negative sense image;
Figure 19 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 19,
S22: project the rectangle that length is identical with screen height, width is 1 gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head;
Figure 20 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 20,
S23: project the rectangle that length is identical with screen height, width is 4 gridiron pattern width on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head;
Figure 21 is the 1st row vertical line of the present invention, as shown in figure 21,
S24: obtain the 1st row vertical line equation R1 according to direct picture and negative sense image;
Figure 22 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 22,
S25: project the rectangle that length is identical with screen height, width is 2 gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head;
Figure 23 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 23,
S26: project the rectangle that length is identical with screen height, width is 3 gridiron pattern width on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head;
Figure 24 is the 2nd row vertical line of the present invention, as shown in figure 24,
S27: obtain the 2nd row vertical line equation R2 according to direct picture and negative sense image;
Figure 25 is the affine schematic diagram obtaining direct picture of the present invention, as shown in figure 25,
S28: project the rectangle that length is identical with screen height, width is 3 gridiron pattern width on above-mentioned screen black Color information, lefts in rectangular area projection white information, obtains direct picture by above-mentioned photographic head;
Figure 26 is the affine schematic diagram obtaining negative sense image of the present invention, as shown in figure 26,
S29: project the rectangle that length is identical with screen height, width is 2 gridiron pattern width on above-mentioned screen white Color information, lefts in rectangular area projection black information, obtains negative sense image by above-mentioned photographic head;
Figure 27 is the 3rd row vertical line of the present invention, as shown in figure 27,
S30: obtain the 3rd row vertical line equation R3 according to direct picture and negative sense image;
S31: formed the latticed image of even partition by 3 horizontal lines and 3 vertical lines;
Figure 28 is that first straight line of the present invention intersects with the second straight line and vertical line, as shown in figure 28,
S32: in above-mentioned latticed image, arbitrarily chooses the one or four limit between the 1st row horizontal line L1 and the 2nd row horizontal line L2 Shape and the second tetragon, obtain the first linear equation H1 of two somes Q1, Q2 on the first tetragon diagonal, obtain through Cross the second linear equation line H2 of two somes Q1, Q3 on the second tetragon diagonal;
Figure 29 is first boundary line of the present invention, as shown in figure 29,
S33: select be positioned on above-mentioned 1st row horizontal line L1, and above-mentioned first straight line H1, above-mentioned second straight line H2 with Two intersection points A, B of above-mentioned vertical line R2, R3, obtain the linear equation through above-mentioned two intersection point A, B, draw the of above-mentioned screen One boundary line K1;
S34: the principle identical with S32-S33, in above-mentioned latticed image, at the 3rd row horizontal line L3 and the 2nd row horizontal line L2 Between arbitrarily choose the 3rd tetragon and the 4th tetragon, each connect two points on diagonal, and obtain respectively through 3rd straight line of above-mentioned two point and the 4th linear equation (being not drawn in figure);
S35: select to be positioned under above-mentioned 3rd row horizontal line L3, and above-mentioned 3rd straight line, above-mentioned 4th straight line are with above-mentioned Two intersection points of vertical line, obtain the linear equation through above-mentioned two intersection point, draw the second boundary line K2 (reference of above-mentioned screen Figure 32);
Figure 31 is to intersect with the first boundary line and the second boundary line while of the first diagonal and second diagonal of the present invention, As shown in figure 30,
S36: two intersection points that above-mentioned first boundary line K1 intersects with above-mentioned first diagonal C1, the second diagonal C2 respectively C, D, select two intersection points E, F that above-mentioned the second boundary line intersects respectively with above-mentioned first diagonal C1, the second diagonal C2;
S37: select to be positioned at two intersection points C, E before above-mentioned 1st row vertical line R1 in step S36, obtain through above-mentioned The linear equation of two intersection points C, E, draws the 3rd boundary line K3 (with reference to Figure 32) of above-mentioned screen;
S38: select to be positioned at two intersection points D, F after above-mentioned 3rd row vertical line R3 in step S36, obtain through above-mentioned The linear equation of two intersection points D, F, draws the 4th boundary line K4 (with reference to Figure 32) of above-mentioned screen;
S39: finally draw the chessboard figure and angle point image intersected to form by 3 horizontal lines and 3 vertical lines.
Figure 32 is the gridiron pattern that obtains of the another kind of computational methods by the present invention of the present invention and angle point thereof, such as Figure 32 institute Show,
S41: finally draw the chessboard figure and angle point image intersected to form by 5 horizontal lines and 6 vertical lines.
Obtain the second boundary line K2, the 3rd boundary line K3 and the 4th boundary line K4 method with obtain above-mentioned first border The method of line K1 is identical, therefore does not draw accompanying drawing.
Figure 33 is that the method by the present invention determines 9 points, as shown in figure 33,
S42: find out the intersection point of above-mentioned first boundary line K1 and the second diagonal C2 equation as the 1st: 1, above-mentioned first limit The intersection point of boundary line K1 and above-mentioned 2nd article of vertical line equation R2 is as the 2nd: 2, above-mentioned first boundary line K1 and above-mentioned first diagonal The intersection point of equation C1 as the 3rd: 3, the intersection point of above-mentioned the second boundary line K2 and above-mentioned first diagonal equation C1 is as the 4th point 4, above-mentioned the second boundary line K2 and the intersection point of above-mentioned 2nd article of vertical line equation R2 as the 5th: 5, above-mentioned the second boundary line K2 is with upper State the intersection point friendship as the 6th: 6, above-mentioned 3rd boundary line K3 and above-mentioned 2nd article of horizontal line equation L2 of the second diagonal equation C2 O'clock as the 7th: 7, above-mentioned 4th boundary line K4 and the intersection point of above-mentioned 2nd article of horizontal line equation L2 as the 8th: 8, above-mentioned first right The intersection point of linea angulata equation C1 and above-mentioned second diagonal equation C2 is as the 9th: 9;
Figure 34 is that the method by the present invention determines the 10th point, as shown in figure 34,
S43: by calculate the 2nd: 2 with the above-mentioned connecting line equation of the 7th: 7, determine that it is with the above-mentioned 1st: 1 and the The intersection point of the connecting line of 9: 9 is as the 10th: 10;
Figure 35 is that the method by the present invention determines the 11st point, as shown in figure 35,
S44: by calculate the 2nd: 2 with the above-mentioned connecting line equation of the 8th: 8, determine that it is with the above-mentioned 3rd: 3 and the The intersection point of the connecting line of 9: 9 is as the 11st: 11;
Figure 36 is that the method by the present invention determines the 12nd point, as shown in figure 36,
S45: by calculate the 5th: 5 with the above-mentioned connecting line equation of the 8th: 8, determine that it is with the above-mentioned 6th: 6 and the The intersection point of the connecting line of 9: 9 is as the 12nd: 12;
Figure 37 is that the method by the present invention determines the 13rd point;As shown in figure 37,
S46: by calculate the 5th: 5 with the above-mentioned connecting line equation of the 7th: 7, determine that it is with the above-mentioned 4th: 4 and the The intersection point of the connecting line of 9: 9 is as the 13rd: 13;
Figure 38 is that the method by the present invention determines 14-16 point, as shown in figure 38,
S467: by calculating the 10th: 10 and the connecting line equation of the 13rd: 13, determine itself and above-mentioned first border The intersection point that the intersection point of line K1 is as the 14th: 14, it is with above-mentioned 2nd article of horizontal line equation L2 as the 15th: 15, it is with above-mentioned second The intersection point of boundary line k2 is as the 16th: 16;
Figure 39 is that the method by the present invention determines 17-19 point, as shown in figure 39,
S48: by calculating the 11st: 11 and the connecting line equation of the 12nd: 12, determine itself and above-mentioned first boundary line The intersection point that the intersection point of K1 is as the 17th: 17, it is with above-mentioned 2nd article of horizontal line equation L2 as the 18th: 18, itself and above-mentioned second limit The intersection point in boundary line K2 is as the 19th: 19;
Figure 40 is that the method by the present invention determines 20-22 point, as shown in figure 40,
S49: by calculating the 10th: 10 and the connecting line equation of the 11st: 11, determine itself and above-mentioned 3rd boundary line The intersection point that the intersection point of K3 is as the 20th: 20, it is with above-mentioned 2nd article of vertical line equation R2 as the 21st: 21, itself and above-mentioned 4th limit The intersection point in boundary line K4 is as the 22nd: 22;
Figure 41 is that the method by the present invention determines 23-25 point, as shown in figure 41,
S50: by calculating the 12nd: 12 and the connecting line equation of the 13rd: 13, determine itself and above-mentioned 3rd boundary line The intersection point that the intersection point of K3 is as the 23rd: 23, it is with above-mentioned 2nd article of vertical line equation R2 as the 24th: 24, itself and above-mentioned 4th limit The intersection point in boundary line K4 is as the 25th: 25;
S51: by the 1st point, the 14th point, the 2nd point, the 20th point, the 10th point, the 21st point, the 7th point, the 10th point, the 9th group The region that becomes, by the 2nd point, the 17th point, the 3rd point, the 21st point, the 11st point, the 22nd point, the 9th point, the 18th point, the 8th form Region, by the 7th point, the 15th point, the 9th point, the 23rd point, the 13rd point, the 24th point, the 4th point, the 16th point, the 5th district formed Territory, by the 9th point, the 18th point, the 8th point, the 24th point, the 12nd point, the 25th point, the 5th point, the 19th point, the 6th region formed, Respectively by using the method identical with S42~S50 to carry out recursive calculation.
In sum, the present invention provides a kind of X-comers localization method based on recursive algorithm, improves angle point fixed The accuracy of position and robustness, use method of geometry to obtain the straight line on four borders of screen, then calculate 25 with by 9 points The method of individual point, improves the degree of accuracy of location.Further, the most only project straight line, do not have the problem confusing straight line; Actively the straight line of projection is a straight border formed by black and white region rather than the straight line directly projecting certain width, protects Demonstrate,prove the location accuracy of represented straight line, be also not easy marginal point and missed by low resolution image collection;For up and down Straight line positions, and have employed 2 affine transformations determining straight line, image, fixed to being difficult to the method by directly projection straight line The problem of screen limit, position straight line, be have employed geometrical principle and is obtained by Theoretical Calculation.
Above embodiment is the preferred embodiment of the present invention, not thereby limits the patent protection model of the present invention Enclose.Those skilled in the art belonging to any present invention, in the premise without departing from spirit and scope disclosed in this invention Under, the equivalent structure being done present disclosure each falls within claimed the scope of the claims with the conversion of equivalent step Within.

Claims (2)

1. an X-comers localization method based on recursive algorithm, it is characterised in that including:
S1: correct photographic head;
S2: fixing described photographic head and the general image by described photographic head acquisition screen;
S3: arranging described gridiron pattern has m row and n row, and wherein, m and n is the even number more than or equal to 4;
S4: project completely black information on the screen, obtains the 1st image by described photographic head;
S5: the complete white information of projection on the screen, obtains the 2nd image by described photographic head;
S6: by from the 2nd image described in described 1st figure image subtraction, it is thus achieved that the binary map of described screen;
S7: project on the screen and be as the criterion with the first diagonal of screen, top be white bottom be the information of black, pass through Described photographic head obtains the 3rd image;
S8: project on the screen and be as the criterion with the first diagonal of screen, top be black bottom be white information, pass through Described photographic head obtains the 4th image;
S9: obtain the point on the first diagonal according to the 3rd image and the 4th image, is determined the first diagonal equation by these points;
S10: project on the screen and be as the criterion with the second diagonal of screen, top be white bottom be the information of black, logical Cross described photographic head and obtain the 5th image;
S11: project on the screen and be as the criterion with the second diagonal of screen, top be black bottom be the information of white, logical Cross described photographic head and obtain the 6th image;
S12: obtain the point on the second diagonal according to the 5th image and the 6th image, is determined the second diagonal equation by these points;
S13: project the rectangle black letter that length is identical with screen length, height is i gridiron pattern height on the screen Breath, lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by described photographic head;
S14: project the rectangular white that length is identical with screen length, height is m-i gridiron pattern height on the screen Information, lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by described photographic head;
S15: obtain the point on the i-th row horizontal line according to direct picture and negative sense image, is determined the i-th row horizontal line equation by these points, 1 ≤i≤m-1;
S16: repeat S13-S15, until obtaining m-1 bar horizontal line equation;
S17: project the rectangle black letter that length is identical with screen height, width is j gridiron pattern width on the screen Breath, lefts in rectangular area projection white information, obtains direct picture by described photographic head, 1≤j≤n-1;
S18: project the rectangular white that length is identical with screen height, width is n-j gridiron pattern width on the screen Information, lefts in rectangular area projection black information, obtains negative sense image by described photographic head, 1≤j≤n-1;
S19: obtain the point on jth row vertical line according to direct picture and negative sense image, is determined jth row vertical line equation by these points, 1 ≤j≤n-1;
S20: repeat S17-S19, until obtaining n-1 bar vertical line equation;
S21: the n-1 bar vertical line that m-1 bar horizontal line and step S18 obtained by step S15 obtains forms latticed image;
S22: in described latticed image, arbitrarily choose the first tetragon and second between the 1st row horizontal line and the 2nd row horizontal line Tetragon, each connects two points on diagonal, and obtains through the first straight line of said two point and second straight respectively Line equation;
S23: select to be positioned on described 1st row horizontal line, and described first straight line, described second straight line and described vertical line Two intersection points, obtain the linear equation through said two intersection point, draw the first boundary line of described screen;
S24: in described latticed image, arbitrarily choose between m-1 row horizontal line and m-2 row horizontal line the 3rd tetragon and 4th tetragon, each connects two points on diagonal, and obtains the 3rd straight line through said two point and the respectively Four linear equations;
S25: select to be positioned under described i-th row horizontal line, and described 3rd straight line, described 4th straight line and described vertical line Two intersection points, obtain the linear equation through said two intersection point, draw the second boundary line of described screen;
S26: in described latticed image, arbitrarily choose the 5th tetragon and the 6th between the 1st row vertical line and the 2nd row vertical line Tetragon, each connects two points on diagonal, and obtains through the 5th straight line of said two point and the 6th straight respectively Line equation;
S27: before selecting to be positioned at described 1st row vertical line, and described 5th straight line, described 6th straight line and described horizontal line Two intersection points, obtain the linear equation through said two intersection point, draw the 3rd boundary line of described screen;
S28: in described latticed image, arbitrarily choose between the (n-1)th row vertical line and the n-th-2 row vertical line the 7th tetragon and 8th tetragon, each connects two points on diagonal, and obtains the 7th straight line through said two point and the respectively Eight linear equations;
S29: after selecting to be positioned at described (n-1)th row vertical line, and described 7th straight line, described 8th straight line and described horizontal line Two intersection points, obtain the linear equation through said two intersection point, draw the 4th boundary line of described screen;
S30: until drawing the chessboard figure and angle point image intersected to form by m+1 bar horizontal line with n+1 bar vertical line;
S31: find out described first boundary line intersection point with the second diagonal equation as the 1st point, described first boundary line and institute State the intersection point of n/2 article of vertical line equation as the 2nd point, described first boundary line and described first diagonal equation intersection point as the The intersection point of 3 points, described the second boundary line and described first diagonal equation is as the 4th point, described the second boundary line and described n/2 The intersection point of article vertical line equation as the 5th point, described the second boundary line and described second diagonal equation intersection point as the 6th point, Described 3rd boundary line and the intersection point of described m/2 article of horizontal line equation are as the 7th point, described 4th boundary line and described m/2 article of horizontal stroke The intersection point of line equation as the 8th point, described first diagonal equation and described second diagonal equation intersection point as the 9th point;
S32: by calculating the connecting line equation of and at the 2nd at described 7th, determines itself and described 1st company with the 9th The intersection point of wiring is as the 10th point;
S33: by calculating the connecting line equation of and at the 2nd at described 8th, determines itself and described 3rd company with the 9th The intersection point of wiring is as the 11st point;
S34: by calculating the connecting line equation of and at the 5th at described 8th, determines itself and described 6th company with the 9th The intersection point of wiring is as the 12nd point;
S35: by calculating the connecting line equation of and at the 5th at described 7th, determines itself and described 4th company with the 9th The intersection point of wiring is as the 13rd point;
S36: by calculating the connecting line equation of and at the 10th at the 13rd, determines the intersection point work of itself and described first boundary line Be the 14th point, its intersection point with described m/2 article of horizontal line equation as the 15th point, its intersection point with described the second boundary line as the 16 points;
S37: by calculating the connecting line equation of and at the 11st at the 12nd, determines the intersection point work of itself and described first boundary line Be the 17th point, its intersection point with described m/2 article of horizontal line equation as the 18th point, its intersection point with described the second boundary line as the 19 points;
S38: by calculating the connecting line equation of and at the 10th at the 11st, determines the intersection point work of itself and described 3rd boundary line Be the 20th point, its intersection point with described n/2 article of vertical line equation as the 21st point, its intersection point with described 4th boundary line as the 22 points;
S39: by calculating the connecting line equation of and at the 12nd at the 13rd, determines the intersection point work of itself and described 3rd boundary line Be the 23rd point, its intersection point with described n/2 article of vertical line equation as the 24th point, its intersection point with described 4th boundary line as the 25 points;
S40: by the 1st point, the 14th point, the 2nd point, the 20th point, the 10th point, the 21st point, the 7th point, the 10th point, the 9th form Region, by the 2nd point, the 17th point, the 3rd point, the 21st point, the 11st point, the 22nd point, the 9th point, the 18th point, the 8th district formed Territory, by the 7th point, the 15th point, the 9th point, the 23rd point, the 13rd point, the 24th point, the 4th point, the 16th point, the 5th region formed, By the 9th point, the 18th point, the 8th point, the 24th point, the 12nd point, the 25th point, the 5th point, the 19th point, the 6th region formed, difference By using the method identical with S32~S39 to carry out recursive calculation.
2. an X-comers localization method based on recursive algorithm, it is characterised in that including:
S1: correct photographic head;
S2: fixing described photographic head and the general image by described photographic head acquisition screen;
S3: arranging described gridiron pattern has m row and n row, m and n is the even number more than or equal to 4;
S4: project completely black information on the screen, obtains the 1st image by described photographic head;
S5: the complete white information of projection on the screen, obtains the 2nd image by described photographic head;
S6: by from the 2nd image described in described 1st figure image subtraction, it is thus achieved that the binary map of described screen;
S7: project on the screen and be as the criterion with the first diagonal of screen, top be white bottom be the information of black, pass through Described photographic head obtains the 3rd image;
S8: project on the screen and be as the criterion with the first diagonal of screen, top be black bottom be white information, pass through Described photographic head obtains the 4th image;
S9: obtain the point on the first diagonal according to the 3rd image and the 4th image, is determined the first diagonal equation by these points;
S10: project on the screen and be as the criterion with the second diagonal of screen, top be white bottom be the information of black, logical Cross described photographic head and obtain the 5th image;
S11: project on the screen and be as the criterion with the second diagonal of screen, top be black bottom be the information of white, logical Cross described photographic head and obtain the 6th image;
S12: obtain the point on the second diagonal according to the 5th image and the 6th image, is determined the second diagonal equation by these points;
S13: project the rectangle black letter that length is identical with screen length, height is i gridiron pattern height on the screen Breath, lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by described photographic head;
S14: project the rectangular white that length is identical with screen length, height is m-i gridiron pattern height on the screen Information, lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by described photographic head;
S15: obtain the point on the i-th row horizontal line according to direct picture and negative sense image, is determined the i-th row horizontal line equation by these points, 1 ≤i≤m-1;
S16: repeat S13-S15, until obtaining m-1 bar horizontal line equation;
S17: project the rectangle black letter that length is identical with screen height, width is j gridiron pattern width on the screen Breath, lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by described photographic head;
S18: project the rectangular white that length is identical with screen height, width is n-j gridiron pattern width on the screen Information, lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by described photographic head;
S19: obtain the point on jth row vertical line according to direct picture and negative sense image, is determined jth row vertical line equation by these points, 1 ≤j≤n-1;
S20: repeat S17-S19, until obtaining n-1 bar vertical line equation;
S21: the n-1 bar vertical line that m-1 bar horizontal line and step S18 obtained by step S15 obtains forms latticed image;
S22: in described latticed image, arbitrarily choose the first tetragon and second between the 1st row horizontal line and the 2nd row horizontal line Tetragon, each connects two points on diagonal, and obtains through the first straight line of said two point and second straight respectively Line equation;
S23: select to be positioned on described 1st row horizontal line, and described first straight line, described second straight line and described vertical line Two intersection points, obtain the linear equation through said two intersection point, draw the first boundary line of described screen;
S24: in described latticed image, arbitrarily choose between m-1 row horizontal line and m-2 row horizontal line the 3rd tetragon and 4th tetragon, each connects two points on diagonal, and obtains the 3rd straight line through said two point and the respectively Four linear equations;
S25: select to be positioned under described i-th row horizontal line, and described 3rd straight line, described 4th straight line and described vertical line Two intersection points, obtain the linear equation through said two intersection point, draw the second boundary line of described screen;
S26: select two intersection points that described first boundary line is intersected respectively with described first diagonal, the second diagonal, selects Two intersection points that described the second boundary line intersects with described first diagonal, the second diagonal respectively;
S27: select to be positioned at two intersection points before described 1st row vertical line in step S26, obtain through said two intersection point Linear equation, draws the 3rd boundary line of described screen;
S28: select to be positioned at two intersection points after described n-th-2 row vertical line in step S26, obtain through said two intersection point Linear equation, draw the 4th boundary line of described screen;
S29: until drawing the chessboard figure and angle point image intersected to form by m+1 bar horizontal line with n+1 bar vertical line;
S30: find out described first boundary line intersection point with the second diagonal equation as the 1st point, described first boundary line and institute State the intersection point of n/2 article of vertical line equation as the 2nd point, described first boundary line and described first diagonal equation intersection point as the The intersection point of 3 points, described the second boundary line and described first diagonal equation is as the 4th point, described the second boundary line and described n/2 The intersection point of article vertical line equation as the 5th point, described the second boundary line and described second diagonal equation intersection point as the 6th point, Described 3rd boundary line and the intersection point of described m/2 article of horizontal line equation are as the 7th point, described 4th boundary line and described m/2 article of horizontal stroke The intersection point of line equation as the 8th point, described first diagonal equation and described second diagonal equation intersection point as the 9th point;
S31: by calculating the connecting line equation of and at the 2nd at described 7th, determines itself and described 1st company with the 9th The intersection point of wiring is as the 10th point;
S32: by calculating the connecting line equation of and at the 2nd at described 8th, determines itself and described 3rd company with the 9th The intersection point of wiring is as the 11st point;
S33: by calculating the connecting line equation of and at the 5th at described 8th, determines itself and described 6th company with the 9th The intersection point of wiring is as the 12nd point;
S34: by calculating the connecting line equation of and at the 5th at described 7th, determines itself and described 4th company with the 9th The intersection point of wiring is as the 13rd point;
S35: by calculating the connecting line equation of and at the 10th at the 13rd, determines the intersection point work of itself and described first boundary line Be the 14th point, its intersection point with described m/2 article of horizontal line equation as the 15th point, its intersection point with described the second boundary line as the 16 points;
S36: by calculating the connecting line equation of and at the 11st at the 12nd, determines the intersection point work of itself and described first boundary line Be the 17th point, its intersection point with described m/2 article of horizontal line equation as the 18th point, its intersection point with described the second boundary line as the 19 points;
S37: by calculating the connecting line equation of and at the 10th at the 11st, determines the intersection point work of itself and described 3rd boundary line Be the 20th point, its intersection point with described n/2 article of vertical line equation as the 21st point, its intersection point with described 4th boundary line as the 22 points;
S38: by calculating the connecting line equation of and at the 12nd at the 13rd, determines the intersection point work of itself and described 3rd boundary line Be the 23rd point, its intersection point with described n/2 article of vertical line equation as the 24th point, its intersection point with described 4th boundary line as the 25 points;
S39: by the 1st point, the 14th point, the 2nd point, the 20th point, the 10th point, the 21st point, the 7th point, the 10th point, the 9th form Region, by the 2nd point, the 17th point, the 3rd point, the 21st point, the 11st point, the 22nd point, the 9th point, the 18th point, the 8th district formed Territory, by the 7th point, the 15th point, the 9th point, the 23rd point, the 13rd point, the 24th point, the 4th point, the 16th point, the 5th region formed, By the 9th point, the 18th point, the 8th point, the 24th point, the 12nd point, the 25th point, the 5th point, the 19th point, the 6th region formed, difference By using the method identical with S31~S38 to carry out recursive calculation.
CN201610459515.7A 2016-06-23 2016-06-23 A kind of X-comers localization method based on recursive algorithm Active CN106201062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610459515.7A CN106201062B (en) 2016-06-23 2016-06-23 A kind of X-comers localization method based on recursive algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610459515.7A CN106201062B (en) 2016-06-23 2016-06-23 A kind of X-comers localization method based on recursive algorithm

Publications (2)

Publication Number Publication Date
CN106201062A true CN106201062A (en) 2016-12-07
CN106201062B CN106201062B (en) 2019-05-07

Family

ID=57460813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610459515.7A Active CN106201062B (en) 2016-06-23 2016-06-23 A kind of X-comers localization method based on recursive algorithm

Country Status (1)

Country Link
CN (1) CN106201062B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942784A (en) * 2014-04-03 2014-07-23 云南大学 Method for solving parameters in parabolic catadioptric camera through three unparallel straight lines in checkerboard
CN103996191A (en) * 2014-05-09 2014-08-20 东北大学 Detection method for black and white checkerboard image corners based on least square optimization
CN104091324A (en) * 2014-06-16 2014-10-08 华南理工大学 Quick checkerboard image feature matching algorithm based on connected domain segmentation
CN104517276A (en) * 2013-09-28 2015-04-15 沈阳新松机器人自动化股份有限公司 Checker corner detection method
CN105447877A (en) * 2015-12-13 2016-03-30 大巨龙立体科技有限公司 Parallel dual-camera stereo calibration method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517276A (en) * 2013-09-28 2015-04-15 沈阳新松机器人自动化股份有限公司 Checker corner detection method
CN103942784A (en) * 2014-04-03 2014-07-23 云南大学 Method for solving parameters in parabolic catadioptric camera through three unparallel straight lines in checkerboard
CN103996191A (en) * 2014-05-09 2014-08-20 东北大学 Detection method for black and white checkerboard image corners based on least square optimization
CN104091324A (en) * 2014-06-16 2014-10-08 华南理工大学 Quick checkerboard image feature matching algorithm based on connected domain segmentation
CN105447877A (en) * 2015-12-13 2016-03-30 大巨龙立体科技有限公司 Parallel dual-camera stereo calibration method

Also Published As

Publication number Publication date
CN106201062B (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN103954970B (en) A kind of topographic(al) feature acquisition method
CN109685019B (en) Component identification method, electronic equipment and storage medium
CN109801301A (en) A kind of automatic collection method of tile work progress msg based on BIM and computer vision
CN105184208B (en) A kind of Quick Response Code Primary Location method and system
CN103035022A (en) Facial expression synthetic method based on feature points
CN109064395A (en) A kind of bookshelf image split-joint method, electronic equipment and storage medium made an inventory based on books
CN105574933A (en) Accurate drawing method for omnidirectional object contour
CN107749986A (en) Instructional video generation method, device, storage medium and computer equipment
CN108563847A (en) The method that three-dimensional bridge model is generated into two-dimensional arrangement figure with CATIA softwares
JP2940736B2 (en) Image processing apparatus and distortion correction method in the image processing apparatus
CN106709952B (en) A kind of automatic calibration method of display screen
CN103729834B (en) The self adaptation joining method of a kind of X ray image and splicing system thereof
CN110415304A (en) A kind of vision calibration method and system
WO2023246321A1 (en) Method and system for generating thermodynamic diagram of pedestrians
CN102420971B (en) Car-reversing auxiliary system and method
US20220309710A1 (en) Obtaining method for image coordinates of position invisible to camera, calibration method and system
CN106022344B (en) A kind of virtual X-comers localization method
CN106201062B (en) A kind of X-comers localization method based on recursive algorithm
CN104766314A (en) Fabric reading machine and method with defect marking function
CN107517366A (en) Projector's image information method for automatic measurement based on RGBD
JP2009169676A (en) Sketch map creation and recording support system for exposed strata and exposed rock
CN103383745B (en) The method that a kind of quality of welding spot detecting system detection window optimizes layout
US20110101608A1 (en) Puzzle plane generation system and method for generating puzzle plane
CN102547270B (en) Method and system for obtaining availability information of adjacent blocks of current block
KR102319183B1 (en) Knit design system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20181204

Address after: 210028 7th Floor, 330 Science and Technology Venture Building, 18 Yinchun Road, Maigaoqiao Pioneer Park, Qixia District, Nanjing, Jiangsu Province

Applicant after: Nanjing kernel Optoelectronics Technology Co., Ltd.

Address before: 215000 Suzhou 78 high tech Industrial Development Zone, Jiangsu

Applicant before: Suzhou Canglong Electronics Science and Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant