CN106201062B - 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
CN106201062B
CN106201062B CN201610459515.7A CN201610459515A CN106201062B CN 106201062 B CN106201062 B CN 106201062B CN 201610459515 A CN201610459515 A CN 201610459515A CN 106201062 B CN106201062 B CN 106201062B
Authority
CN
China
Prior art keywords
point
line
equation
screen
intersection
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.)
Active
Application number
CN201610459515.7A
Other languages
Chinese (zh)
Other versions
CN106201062A (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
Nanjing Kernel Optoelectronics 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 Nanjing Kernel Optoelectronics Technology Co Ltd filed Critical Nanjing Kernel Optoelectronics 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 the accuracy and robustness of Corner character, the straight line on four boundaries of screen is obtained using method of geometry, solves the problems, such as that four boundary angle points are difficult to position.Also, straight line is only projected every time, is not in the problem of confusing straight line;Actively the straight line of projection is the straight border formed by black and white region, rather than directly projects the straight line of certain width, ensure that the location accuracy of represented straight line, is also not easy marginal point and is missed by the acquisition of low resolution image;For straight line positioning up and down, the affine transformation of straight line, image is determined using two o'clock, the problem of to the method positioning screen side straight line by directly projecting straight line is difficult to, is obtained using geometrical principle by theoretical calculation.The present invention provides a kind of virtual X-comers localization method, improves the accuracy and robustness of Corner character, obtains the straight line on four boundaries of screen using method of geometry, then with the method for calculating 25 points by 9 points, improves the accuracy of positioning.

Description

A kind of X-comers localization method based on recursive algorithm
Technical field
The present invention relates to field of human-computer interaction more particularly to a kind of X-comers localization methods based on recursive algorithm.
Background technique
In the image that the imaging sensor of human-computer interaction acquires, mainly pass through detection chessboard when demarcating to screen Lattice angle point carries out operable screen area and is demarcated.
Currently used Corner character method has, and people makes camera to people by the corner location prompted in touch screen The position of the point of touch-control is demarcated.
However, being easy to be influenced by local interference using above-mentioned scaling method, Corner Detection failure or inclined is caused Difference is excessive, and especially boundary angle point is more difficult to detect.
Summary of the invention
To solve the above-mentioned problems, the present invention provides a kind of X-comers localization method based on recursive algorithm, improves The accuracy and robustness of Corner character, obtain the straight line on four boundaries of screen using method of geometry, then with passing through 9 points The method for calculating 25 points improves the accuracy of positioning.
A kind of X-comers localization method based on recursive algorithm, comprising:
S1: correction camera;
S2: the fixed camera and the general image that screen is obtained by the camera;
S3: the gridiron pattern, which is arranged, m row and n column, wherein m and n is the even number more than or equal to 4;
S4: projecting completely black information on the screen, obtains the 1st image by the camera;
S5: projecting complete white information on the screen, obtains the 2nd image by the camera;
S6: by subtracting the 2nd image from the 1st image, the binary map of the screen is obtained;
S7: projecting be subject to the first diagonal line of screen on the screen, and top is the information that white lower part is black, The 3rd image is obtained by the camera;
S8: projecting be subject to the first diagonal line of screen on the screen, and top is the information that black lower part is white, The 4th image is obtained by the camera;
S9: the point on the first diagonal line is obtained according to the 3rd image and the 4th image, is put by these and determines the first diagonal line side Journey;
S10: it projects be subject to the second diagonal line of screen on the screen, top is the letter that white lower part is black Breath obtains the 5th image by the camera;
S11: it projects be subject to the second diagonal line of screen on the screen, top is the letter that black lower part is white Breath obtains the 6th image by the camera;
S12: the point on the second diagonal line is obtained according to the 5th image and the 6th image, is put by these and determines the second diagonal line side Journey;
S13: it is identical as screen length, highly black for the rectangle of i gridiron pattern height that length is projected on the screen Color information lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by the camera;
S14: project on the screen length it is identical as screen length, highly be m-i gridiron pattern height rectangle White information lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by the camera;
S15: the point on the i-th row horizontal line is obtained according to direct picture and negative sense image, is put by these and determines the i-th row horizontal line side Journey, 1≤i≤m-1;
S16: repeating S13-S15, until obtaining m-1 horizontal line equation;
S17: it is black that the rectangle that length is identical as screen height, width is j gridiron pattern width is projected on the screen Color information lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by the camera;
S18: the rectangle that length is identical as screen height, width is n-j gridiron pattern width is projected on the screen White information lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by the camera;
S19: the point on jth column vertical line is obtained according to direct picture and negative sense image, is put by these and determines jth column vertical line side Journey, 1≤j≤n-1;
S20: repeating S17-S19, until obtaining n-1 vertical line equation;
S21: the n-1 vertical line that the m-1 horizontal line and step S19 obtained by step S15 obtains forms latticed image;
S22: in the latticed image, arbitrarily chosen between the 1st row horizontal line and the 2nd row horizontal line the first quadrangle and Second quadrangle respectively connects two points on diagonal line, and finds out the first straight line by described two points and the respectively Two linear equations;
S23: selection is located on the 1st row horizontal line, and the first straight line, the second straight line are erected with described Two intersection points of line, find out the linear equation by described two intersection points, obtain the first borderline of the screen;
S24: in the latticed image, the three or four side is arbitrarily chosen between m-1 row horizontal line and m-2 row horizontal line Shape and the 4th quadrangle respectively connect two points on diagonal line, and find out the third straight line by described two points respectively With the 4th linear equation;
S25: selection is located under the i-th row horizontal line, and the third straight line, the 4th straight line are erected with described Two intersection points of line, find out the linear equation by described two intersection points, obtain the second borderline of the screen;
S26: in the latticed image, arbitrarily chosen between the 1st column vertical line and the 2nd column vertical line the 5th quadrangle and 6th quadrangle respectively connects two points on diagonal line, and finds out the 5th straight line by described two points and the respectively Six linear equations;
S27: selection is located at before the 1st column vertical line, and the 5th straight line, the 6th straight line and the cross Two intersection points of line, find out the linear equation by described two intersection points, obtain the third boundary line of the screen;
S28: in the latticed image, the seven or four side is arbitrarily chosen between the (n-1)th column vertical line and the n-th -2 column vertical line Shape and the 8th quadrangle respectively connect two points on diagonal line, and find out the 7th straight line by described two points respectively With the 8th linear equation;
S29: selection be located at the (n-1)th column vertical line after, and the 7th straight line, the 8th straight line with it is described Two intersection points of horizontal line, find out the linear equation by described two intersection points, obtain the 4th boundary line of the screen;
S30: until obtaining the chessboard figure and angle point image that are intersected to form by m+1 horizontal line and n+1 vertical line;
S31: the intersection point of the first borderline and the second diagonal equation is found out as, the first borderline at the 1st point With the intersection point of the 2nd article of vertical line equation as the 2nd point, the intersection point of the first borderline and first diagonal equation as the 3 points, the intersection point of the second borderline and first diagonal equation is as the 4th point, the second borderline and the described 2nd The intersection point of article vertical line equation as the 5th point, the intersection point of the second borderline and second diagonal equation as the 6th point, The intersection point of the third boundary line and the 2nd article of horizontal line equation is as the 7th point, the 4th boundary line and the 2nd article of cross The intersection point of line equation is as the 8th point, the intersection point of first diagonal equation and second diagonal equation as the 9th point;
S32: by the way that and the 7th point of the connecting line equation is calculated at the 2nd point, itself and and are determined at described 1st point at the 9th point Connecting line intersection point as the 10th point;
S33: by the way that and the 8th point of the connecting line equation is calculated at the 2nd point, itself and and are determined at described 3rd point at the 9th point Connecting line intersection point as the 11st point;
S34: by the way that and the 8th point of the connecting line equation is calculated at the 5th point, itself and and are determined at described 6th point at the 9th point Connecting line intersection point as the 12nd point;
S35: by the way that and the 7th point of the connecting line equation is calculated at the 5th point, itself and and are determined at described 4th point at the 9th point Connecting line intersection point as the 13rd point;
S36: the connecting line equation by the way that with is calculated at the 10th point at the 13rd point determines the friendship of itself and the first borderline Point is as the 14th point, its intersection point with m/2 articles of horizontal line equation as the 15th point, the intersection point conduct of itself and the second borderline 16th point;
S37: the connecting line equation by the way that with is calculated at the 11st point at the 12nd point determines the friendship of itself and the first borderline Point is as the 17th point, its intersection point with the m/2 articles of horizontal line equation as the 18th point, the intersection point work of itself and the second borderline It is the 19th point;
S38: the connecting line equation by the way that with is calculated at the 10th point at the 11st point determines the friendship of itself and the third boundary line Point is as the 20th point, its intersection point with n/2 articles of vertical line equation as the 21st point, the intersection point conduct of itself and the 4th boundary line 22nd point;
S39: the connecting line equation by the way that with is calculated at the 12nd point at the 13rd point determines the friendship of itself and the third boundary line Point is as the 23rd point, its intersection point with the n/2 articles of vertical line equation as the 24th point, the intersection point work of itself and the 4th boundary line 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 point group At region, what is be made of 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 point 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 point of area formed Domain, 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 point of region formed, Recursive calculation is carried out by using method identical with S32~S39 respectively.
X-comers localization method of the another kind based on recursive algorithm, comprising:
S1: correction camera;
S2: the fixed camera and the general image that screen is obtained by the camera;
S3: the gridiron pattern, which is arranged, m row and n column, and m and n are the even number more than or equal to 4;
S4: projecting completely black information on the screen, obtains the 1st image by the camera;
S5: projecting complete white information on the screen, obtains the 2nd image by the camera;
S6: by subtracting the 2nd image from the 1st image, the binary map of the screen is obtained;
S7: projecting be subject to the first diagonal line of screen on the screen, and top is the information that white lower part is black, The 3rd image is obtained by the camera;
S8: projecting be subject to the first diagonal line of screen on the screen, and top is the information that black lower part is white, The 4th image is obtained by the camera;
S9: the point on the first diagonal line is obtained according to the 3rd image and the 4th image, is put by these and determines the first diagonal line side Journey;
S10: it projects be subject to the second diagonal line of screen on the screen, top is the letter that white lower part is black Breath obtains the 5th image by the camera;
S11: it projects be subject to the second diagonal line of screen on the screen, top is the letter that black lower part is white Breath obtains the 6th image by the camera;
S12: the point on the second diagonal line is obtained according to the 5th image and the 6th image, is put by these and determines the second diagonal line side Journey;
S13: it is identical as screen length, highly black for the rectangle of i gridiron pattern height that length is projected on the screen Color information lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by the camera;
S14: project on the screen length it is identical as screen length, highly be m-i gridiron pattern height rectangle White information lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by the camera;
S15: the point on the i-th row horizontal line is obtained according to direct picture and negative sense image, is put by these and determines the i-th row horizontal line side Journey, 1≤i≤m-1;
S16: repeating S13-S15, until obtaining m-1 horizontal line equation;
S17: it is black that the rectangle that length is identical as screen height, width is j gridiron pattern width is projected on the screen Color information lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by the camera;
S18: the rectangle that length is identical as screen height, width is n-j gridiron pattern width is projected on the screen White information lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by the camera;
S19: the point on jth column vertical line is obtained according to direct picture and negative sense image, is put by these and determines jth column vertical line side Journey, 1≤j≤n-1;
S20: repeating S17-S19, until obtaining n-1 vertical line equation;
S21: the n-1 vertical line that the m-1 horizontal line and step S19 obtained by step S15 obtains forms latticed image;
S22: in the latticed image, arbitrarily chosen between the 1st row horizontal line and the 2nd row horizontal line the first quadrangle and Second quadrangle respectively connects two points on diagonal line, and finds out the first straight line by described two points and the respectively Two linear equations;
S23: selection is located on the 1st row horizontal line, and the first straight line, the second straight line are erected with described Two intersection points of line, find out the linear equation by described two intersection points, obtain the first borderline of the screen;
S24: in the latticed image, the three or four side is arbitrarily chosen between m-1 row horizontal line and m-2 row horizontal line Shape and the 4th quadrangle respectively connect two points on diagonal line, and find out the third straight line by described two points respectively With the 4th linear equation;
S25: selection is located under the i-th row horizontal line, and the third straight line, the 4th straight line are erected with described Two intersection points of line, find out the linear equation by described two intersection points, obtain the second borderline of the screen;
S26: two intersection points for selecting the first borderline to intersect respectively with first diagonal line, the second diagonal line, Two intersection points for selecting the second borderline to intersect respectively with first diagonal line, the second diagonal line;
S27: selection is located at two intersection points before the 1st column vertical line in step S26, finds out by described two intersection points Linear equation obtains the third boundary line of the screen;
S28: selection is located at two intersection points after the n-th -2 column vertical line in step S26, finds out by described two intersection points Linear equation, obtain the 4th boundary line of the screen;
S29: until obtaining the chessboard figure and angle point image that are intersected to form by m+1 horizontal line and n+1 vertical line;
S30: the intersection point of the first borderline and the second diagonal equation is found out as, the first borderline at the 1st point With the intersection point of the 2nd article of vertical line equation as the 2nd point, the intersection point of the first borderline and first diagonal equation as the 3 points, the intersection point of the second borderline and first diagonal equation is as the 4th point, the second borderline and the described 2nd The intersection point of article vertical line equation as the 5th point, the intersection point of the second borderline and second diagonal equation as the 6th point, The intersection point of the third boundary line and the 2nd article of horizontal line equation is as the 7th point, the 4th boundary line and the 2nd article of cross The intersection point of line equation is as the 8th point, the intersection point of first diagonal equation and second diagonal equation as the 9th point;
S31: by the way that and the 7th point of the connecting line equation is calculated at the 2nd point, itself and and are determined at described 1st point at the 9th point Connecting line intersection point as the 10th point;
S32: by the way that and the 8th point of the connecting line equation is calculated at the 2nd point, itself and and are determined at described 3rd point at the 9th point Connecting line intersection point as the 11st point;
S33: by the way that and the 8th point of the connecting line equation is calculated at the 5th point, itself and and are determined at described 6th point at the 9th point Connecting line intersection point as the 12nd point;
S34: by the way that and the 7th point of the connecting line equation is calculated at the 5th point, itself and and are determined at described 4th point at the 9th point Connecting line intersection point as the 13rd point;
S35: the connecting line equation by the way that with is calculated at the 10th point at the 13rd point determines the friendship of itself and the first borderline Point is as the 14th point, its intersection point with m/2 articles of horizontal line equation as the 15th point, the intersection point conduct of itself and the second borderline 16th point;
S36: the connecting line equation by the way that with is calculated at the 11st point at the 12nd point determines the friendship of itself and the first borderline Point is as the 17th point, its intersection point with the m/2 articles of horizontal line equation as the 18th point, the intersection point work of itself and the second borderline It is the 19th point;
S37: the connecting line equation by the way that with is calculated at the 10th point at the 11st point determines the friendship of itself and the third boundary line Point is as the 20th point, its intersection point with n/2 articles of vertical line equation as the 21st point, the intersection point conduct of itself and the 4th boundary line 22nd point;
S38: the connecting line equation by the way that with is calculated at the 12nd point at the 13rd point determines the friendship of itself and the third boundary line Point is as the 23rd point, its intersection point with the n/2 articles of vertical line equation as the 24th point, the intersection point work of itself and the 4th boundary line 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 point group At region, what is be made of 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 point 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 point of area formed Domain, 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 point of region formed, Recursive calculation is carried out by using method identical with S31~S38 respectively.
Detailed description of the invention
Fig. 1 is the affine schematic diagram of the 1st image of acquisition of the invention;
Fig. 2 is the affine schematic diagram of the 2nd image of acquisition of the invention;
Fig. 3 is the binary map obtained by the 1st image and the 2nd image subtraction of the invention;
Fig. 4 is the affine schematic diagram of the 3rd image of acquisition of the invention;
Fig. 5 is the affine schematic diagram of the 4th image of acquisition of the invention;
Fig. 6 is the first diagonal line of the invention;
Fig. 7 is the affine schematic diagram of the 5th image of acquisition of the invention;
Fig. 8 is the affine schematic diagram of the 6th image of acquisition of the invention;
Fig. 9 is the second diagonal line of the invention;
Figure 10 is the affine schematic diagram of acquisition direct picture of the invention;
Figure 11 is the affine schematic diagram of acquisition negative sense image of the invention;
Figure 12 is the 1st row horizontal line of the invention;
Figure 13 is the affine schematic diagram of acquisition direct picture of the invention;
Figure 14 is the affine schematic diagram of acquisition negative sense image of the invention;
Figure 15 is the 2nd row horizontal line of the invention;
Figure 16 is the affine schematic diagram of acquisition direct picture of the invention;
Figure 17 is the affine schematic diagram of acquisition negative sense image of the invention;
Figure 18 is the 3rd row horizontal line of the invention;
Figure 19 is the affine schematic diagram of acquisition direct picture of the invention;
Figure 20 is the affine schematic diagram of acquisition negative sense image of the invention;
Figure 21 is first row vertical line of the invention;
Figure 22 is the affine schematic diagram for obtaining direct picture;
Figure 23 is the affine schematic diagram for obtaining negative sense image;
Figure 24 is secondary series vertical line;
Figure 25 is the affine schematic diagram for obtaining direct picture;
Figure 26 is the affine schematic diagram for obtaining negative sense image;
Figure 27 third column vertical line;
Figure 28 is that first straight line intersects with second straight line and vertical line;
Figure 29 is first borderline;
Figure 30 is the gridiron pattern and its angle point that scaling method through the invention obtains;
Figure 31 is that the first diagonal line and the second diagonal line intersect with first borderline and second borderline simultaneously;
Figure 32 is the gridiron pattern and its angle point that another calculation method through the invention obtains;
Figure 33 is to determine 9 points by means of the present invention;
Figure 34 is to determine by means of the present invention at the 10th point;
Figure 35 is to determine by means of the present invention at the 11st point;
Figure 36 is to determine by means of the present invention at the 12nd point;
Figure 37 is to determine by means of the present invention at the 13rd point;
Figure 38 is to determine 14-16 point by means of the present invention;
Figure 39 is to determine 17-19 point by means of the present invention;
Figure 40 is to determine 20-22 point by means of the present invention;
Figure 41 is to determine 23-25 point by means of the present invention.
Specific embodiment
Below in conjunction with the specific embodiment technical solution that present invention be described in more detail.It should be appreciated that being described herein as Specific embodiment be only used to explain the present invention, be not intended to limit the present invention.
A kind of X-comers localization method based on recursive algorithm, comprising:
S1: correction camera;
S2: fixed above-mentioned camera and the general image that screen is obtained by above-mentioned camera;
S3: setting it is above-mentioned it is tessellated have m row and n column;
S4: projecting completely black information on above-mentioned screen, obtains the 1st image by above-mentioned camera;
S5: projecting complete white information on above-mentioned screen, obtains the 2nd image by above-mentioned camera;
S6: by subtracting above-mentioned 2nd image from above-mentioned 1st image, the binary map of above-mentioned screen is obtained;
S7: the first diagonal line of screen is subject in projection on above-mentioned screen, and top is the information that white lower part is black, The 3rd image is obtained by above-mentioned camera;
S8: the first diagonal line of screen is subject in projection on above-mentioned screen, and top is the information that black lower part is white, The 4th image is obtained by above-mentioned camera;
S9: the point on the first diagonal line is obtained according to the 3rd image and the 4th image, is put by these and determines the first diagonal line side Journey;
S10: the second diagonal line of screen is subject in projection on above-mentioned screen, and top is the letter that white lower part is black Breath obtains the 5th image by above-mentioned camera;
S11: the second diagonal line of screen is subject in projection on above-mentioned screen, and top is the letter that black lower part is white Breath obtains the 6th image by above-mentioned camera;
S12: the point on the second diagonal line is obtained according to the 5th image and the 6th image, is put by these and determines the second diagonal line side Journey;
S13: it is identical as screen length, highly black for the rectangle of i gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by above-mentioned camera;
S14: projected on above-mentioned screen length it is identical as screen length, highly be m-i gridiron pattern height rectangle White information lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by above-mentioned camera;
S15: the point on the i-th row horizontal line is obtained according to direct picture and negative sense image, is put by these and determines the i-th row horizontal line side Journey, 1≤i≤m-1;
S16: repeating S13-S15, until obtaining m-1 horizontal line equation;
S17: it is black that the rectangle that length is identical as screen height, width is j gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by above-mentioned camera;
S18: the rectangle that length is identical as screen height, width is n-j gridiron pattern width is projected on above-mentioned screen White information lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by above-mentioned camera;
S19: the point on jth column vertical line is obtained according to direct picture and negative sense image, is put by these and determines jth column vertical line side Journey, 1≤j≤n-1;
S20: repeating S17-S19, until obtaining n-1 vertical line equation;
S21: the n-1 vertical line that the m-1 horizontal line and step S19 obtained by step S15 obtains forms latticed image;
S22: in above-mentioned latticed image, arbitrarily chosen between the 1st row horizontal line and the 2nd row horizontal line the first quadrangle and Second quadrangle respectively connects two points on diagonal line, and finds out the first straight line by above-mentioned two point and the respectively Two linear equations;
S23: selection is located on above-mentioned 1st row horizontal line, and above-mentioned first straight line, above-mentioned second straight line are erected with above-mentioned Two intersection points of line, find out the linear equation by above-mentioned two intersection point, obtain the first borderline of above-mentioned screen;
S24: in above-mentioned latticed image, the three or four side is arbitrarily chosen between m-1 row horizontal line and m-2 row horizontal line Shape and the 4th quadrangle respectively connect two points on diagonal line, and find out the third straight line by above-mentioned two point respectively With the 4th linear equation;
S25: selection is located under above-mentioned i-th row horizontal line, and above-mentioned third straight line, above-mentioned 4th straight line are erected with above-mentioned Two intersection points of line, find out the linear equation by above-mentioned two intersection point, obtain the second borderline of above-mentioned screen;
S26: in above-mentioned latticed image, arbitrarily chosen between the 1st column vertical line and the 2nd column vertical line the 5th quadrangle and 6th quadrangle respectively connects two points on diagonal line, and finds out the 5th straight line by above-mentioned two point and the respectively Six linear equations;
S27: selection is located at before above-mentioned 1st column vertical line, and above-mentioned 5th straight line, above-mentioned 6th straight line and above-mentioned cross Two intersection points of line, find out the linear equation by above-mentioned two intersection point, obtain the third boundary line of above-mentioned screen;
S28: in above-mentioned latticed image, the seven or four side is arbitrarily chosen between the (n-1)th column vertical line and the n-th -2 column vertical line Shape and the 8th quadrangle respectively connect two points on diagonal line, and find out the 7th straight line by above-mentioned two point respectively With the 8th linear equation;
S29: selection be located at above-mentioned (n-1)th column vertical line after, and above-mentioned 7th straight line, above-mentioned 8th straight line with it is above-mentioned Two intersection points of horizontal line, find out the linear equation by above-mentioned two intersection point, obtain the 4th boundary line of above-mentioned screen;
S30: until obtaining the chessboard figure and angle point image that are intersected to form by m+1 horizontal line and n+1 vertical line;
S31: the intersection point of above-mentioned first borderline and the second diagonal equation is found out as, above-mentioned first borderline at the 1st point Intersection point with above-mentioned 2nd column vertical line equation is as the 2nd point, the intersection point work of above-mentioned first borderline and above-mentioned first diagonal equation For the 3rd point, the intersection point of above-mentioned second borderline and above-mentioned first diagonal equation as the 4th point, above-mentioned second borderline with it is upper The intersection point of the 2nd column vertical line equation is stated as, the intersection point of above-mentioned second borderline and above-mentioned second diagonal equation at the 5th point as the 6 points, the intersection point of above-mentioned third boundary line and above-mentioned m row horizontal line equation is as the 7th point, above-mentioned 4th boundary line and above-mentioned m The intersection point of row horizontal line equation is as the 8th point, the intersection point of above-mentioned first diagonal equation and above-mentioned second diagonal equation as the 9th Point;
S32: by the way that and above-mentioned 7th point of connecting line equation is calculated at the 2nd point, itself and and are determined at above-mentioned 1st point at the 9th point Connecting line intersection point as the 10th point;
S33: by the way that and above-mentioned 8th point of connecting line equation is calculated at the 2nd point, itself and and are determined at above-mentioned 3rd point at the 9th point Connecting line intersection point as the 11st point;
S34: by the way that and above-mentioned 8th point of connecting line equation is calculated at the 5th point, itself and and are determined at above-mentioned 6th point at the 9th point Connecting line intersection point as the 12nd point;
S35: by the way that and above-mentioned 7th point of connecting line equation is calculated at the 5th point, itself and and are determined at above-mentioned 4th point at the 9th point Connecting line intersection point as the 13rd point;
S36: the connecting line equation by the way that with is calculated at the 10th point at the 13rd point determines the friendship of itself and above-mentioned first borderline Point is as the 14th point, its intersection point with above-mentioned m/2 articles of horizontal line equation as the 15th point, the intersection point work of itself and above-mentioned second borderline It is the 16th point;
S37: the connecting line equation by the way that with is calculated at the 11st point at the 12nd point determines the friendship of itself and above-mentioned first borderline Point is as the 17th point, its intersection point with above-mentioned m/2 articles of horizontal line equation as the 18th point, the intersection point work of itself and above-mentioned second borderline It is the 19th point;
S38: the connecting line equation by the way that with is calculated at the 10th point at the 11st point determines the friendship of itself and above-mentioned third boundary line Point is as the 20th point, its intersection point with above-mentioned n/2 articles of vertical line equation as the 21st point, the intersection point work of itself and above-mentioned 4th boundary line It is the 22nd point;
S39: the connecting line equation by the way that with is calculated at the 12nd point at the 13rd point determines the friendship of itself and above-mentioned third boundary line Point is as the 23rd point, its intersection point with above-mentioned n/2 articles of vertical line equation as the 24th point, the intersection point work of itself and above-mentioned 4th boundary line 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 point group At region, what is be made of 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 point 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 point of area formed Domain, 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 point of region formed, Recursive calculation is carried out by using method identical with S32~S39 respectively.
X-comers localization method of the another kind based on recursive algorithm, comprising:
S1: correction camera;
S2: fixed above-mentioned camera and the general image that screen is obtained by above-mentioned camera;
S3: setting it is above-mentioned it is tessellated have m row and n column;
S4: projecting completely black information on above-mentioned screen, obtains the 1st image by above-mentioned camera;
S5: projecting complete white information on above-mentioned screen, obtains the 2nd image by above-mentioned camera;
S6: by subtracting above-mentioned 2nd image from above-mentioned 1st image, the binary map of above-mentioned screen is obtained;
S7: the first diagonal line of screen is subject in projection on above-mentioned screen, and top is the information that white lower part is black, The 3rd image is obtained by above-mentioned camera;
S8: the first diagonal line of screen is subject in projection on above-mentioned screen, and top is the information that black lower part is white, The 4th image is obtained by above-mentioned camera;
S9: the point on the first diagonal line is obtained according to the 3rd image and the 4th image, is put by these and determines the first diagonal line side Journey;
S10: the second diagonal line of screen is subject in projection on above-mentioned screen, and top is the letter that white lower part is black Breath obtains the 5th image by above-mentioned camera;
S11: the second diagonal line of screen is subject in projection on above-mentioned screen, and top is the letter that black lower part is white Breath obtains the 6th image by above-mentioned camera;
S12: the point on the second diagonal line is obtained according to the 5th image and the 6th image, is put by these and determines the second diagonal line side Journey;
S13: it is identical as screen length, highly black for the rectangle of i gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by above-mentioned camera;
S14: projected on above-mentioned screen length it is identical as screen length, highly be m-i gridiron pattern height rectangle White information lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by above-mentioned camera;
S15: the point on the i-th row horizontal line is obtained according to direct picture and negative sense image, is put by these and determines the i-th row horizontal line side Journey, 1≤i≤m-1;
S16: repeating S13-S15, until obtaining m-1 horizontal line equation;
S17: it is black that the rectangle that length is identical as screen height, width is j gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by above-mentioned camera;
S18: the rectangle that length is identical as screen height, width is n-j gridiron pattern width is projected on above-mentioned screen White information lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by above-mentioned camera;
S19: the point on jth column vertical line is obtained according to direct picture and negative sense image, is put by these and determines jth column vertical line side Journey, 1≤j≤n-1;
S20: repeating S17-S19, until obtaining n-1 vertical line equation;
S21: the n-1 vertical line that the m-1 horizontal line and step S19 obtained by step S15 obtains forms latticed image;
S22: in above-mentioned latticed image, arbitrarily chosen between the 1st row horizontal line and the 2nd row horizontal line the first quadrangle and Second quadrangle respectively connects two points on diagonal line, and finds out the first straight line by above-mentioned two point and the respectively Two linear equations;
S23: selection is located on above-mentioned 1st row horizontal line, and above-mentioned first straight line, above-mentioned second straight line are erected with above-mentioned Two intersection points of line, find out the linear equation by above-mentioned two intersection point, obtain the first borderline of above-mentioned screen;
S24: in above-mentioned latticed image, the three or four side is arbitrarily chosen between m-1 row horizontal line and m-2 row horizontal line Shape and the 4th quadrangle respectively connect two points on diagonal line, and find out the third straight line by above-mentioned two point respectively With the 4th linear equation;
S25: selection is located under above-mentioned i-th row horizontal line, and above-mentioned third straight line, above-mentioned 4th straight line are erected with above-mentioned Two intersection points of line, find out the linear equation by above-mentioned two intersection point, obtain the second borderline of above-mentioned screen;
S26: two intersection points for selecting above-mentioned first borderline to intersect respectively with above-mentioned first diagonal line, the second diagonal line, Two intersection points for selecting above-mentioned second borderline to intersect respectively with above-mentioned first diagonal line, the second diagonal line;
S27: selection is located at two intersection points before above-mentioned 1st column vertical line in step S26, finds out by above-mentioned two friendship The linear equation of point, obtains the third boundary line of above-mentioned screen;
S28: selection is located at two intersection points after above-mentioned n-th -2 column vertical line in step S26, finds out by above-mentioned two The linear equation of intersection point obtains the 4th boundary line of above-mentioned screen;
S29: until obtaining the chessboard figure and angle point image that are intersected to form by m+1 horizontal line and n+1 vertical line;
S30: the intersection point of above-mentioned first borderline and the second diagonal equation is found out as, above-mentioned first borderline at the 1st point Intersection point with above-mentioned 2nd column vertical line equation is as the 2nd point, the intersection point work of above-mentioned first borderline and above-mentioned first diagonal equation For the 3rd point, the intersection point of above-mentioned second borderline and above-mentioned first diagonal equation as the 4th point, above-mentioned second borderline with it is upper The intersection point of the 2nd column vertical line equation is stated as, the intersection point of above-mentioned second borderline and above-mentioned second diagonal equation at the 5th point as the 6 points, the intersection point of above-mentioned third boundary line and above-mentioned m row horizontal line equation is as the 7th point, above-mentioned 4th boundary line and above-mentioned m The intersection point of row horizontal line equation is as the 8th point, the intersection point of above-mentioned first diagonal equation and above-mentioned second diagonal equation as the 9th Point;
S31: by the way that and above-mentioned 7th point of connecting line equation is calculated at the 2nd point, itself and and are determined at above-mentioned 1st point at the 9th point Connecting line intersection point as the 10th point;
S32: by the way that and above-mentioned 8th point of connecting line equation is calculated at the 2nd point, itself and and are determined at above-mentioned 3rd point at the 9th point Connecting line intersection point as the 11st point;
S33: by the way that and above-mentioned 8th point of connecting line equation is calculated at the 5th point, itself and and are determined at above-mentioned 6th point at the 9th point Connecting line intersection point as the 12nd point;
S34: by the way that and above-mentioned 7th point of connecting line equation is calculated at the 5th point, itself and and are determined at above-mentioned 4th point at the 9th point Connecting line intersection point as the 13rd point;
S35: the connecting line equation by the way that with is calculated at the 10th point at the 13rd point determines the friendship of itself and above-mentioned first borderline Point is as the 14th point, its intersection point with above-mentioned m/2 articles of horizontal line equation as the 15th point, the intersection point work of itself and above-mentioned second borderline It is the 16th point;
S36: the connecting line equation by the way that with is calculated at the 11st point at the 12nd point determines the friendship of itself and above-mentioned first borderline Point is as the 17th point, its intersection point with above-mentioned m/2 articles of horizontal line equation as the 18th point, the intersection point work of itself and above-mentioned second borderline It is the 19th point;
S37: the connecting line equation by the way that with is calculated at the 10th point at the 11st point determines the friendship of itself and above-mentioned third boundary line Point is as the 20th point, its intersection point with above-mentioned n/2 articles of vertical line equation as the 21st point, the intersection point work of itself and above-mentioned 4th boundary line It is the 22nd point;
S38: the connecting line equation by the way that with is calculated at the 12nd point at the 13rd point determines the friendship of itself and above-mentioned third boundary line Point is as the 23rd point, its intersection point with above-mentioned n/2 articles of vertical line equation as the 24th point, the intersection point work of itself and above-mentioned 4th boundary line 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 point group At region, what is be made of 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 point 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 point of area formed Domain, 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 point of region formed, Recursive calculation is carried out by using method identical with S31~S38 respectively.
The specific technical solution of the present invention for ease of description, existing m take 4, n to take 4 to be described in detail for example.It should manage Solution, specific embodiment described herein are only used to explain the present invention, be not intended to limit the present invention.
The present invention provides a kind of X-comers localization method based on recursive algorithm, comprising:
S1: correction camera.
S2: fixed above-mentioned camera and the general image that screen is obtained by above-mentioned camera.
S3: setting it is above-mentioned it is tessellated have 4 rows and 4 column.
Fig. 1 is the affine schematic diagram of the 1st image of acquisition of the invention, as shown in Figure 1,
S4: projecting completely black information on above-mentioned screen, obtains the 1st image by above-mentioned camera.
Fig. 2 is the affine schematic diagram of the 2nd image of acquisition of the invention, as shown in Fig. 2,
S5: projecting complete white information on above-mentioned screen, obtains the 2nd image by above-mentioned camera.
Fig. 3 is the binary map obtained by the 1st image and the 2nd image subtraction of the invention, as shown in figure 3,
S6: by subtracting above-mentioned 2nd image from above-mentioned 1st image, the binary map of above-mentioned screen is obtained.
Fig. 4 is the affine schematic diagram of the 3rd image of acquisition of the invention, as shown in figure 4,
S7: the first diagonal line of screen is subject in projection on above-mentioned screen, and top is the information that white lower part is black, The 3rd image is obtained by above-mentioned camera.
Fig. 5 is the affine schematic diagram of the 4th image of acquisition of the invention, as shown in figure 5,
S8: the first diagonal line of screen is subject in projection on above-mentioned screen, and top is the information that black lower part is white, The 4th image is obtained by above-mentioned camera.
Fig. 6 is the first diagonal line of the invention, as shown in fig. 6,
S9: the point on the first diagonal line is obtained according to the 3rd image and the 4th image, is put by these and determines the first diagonal line side Journey C1.
Fig. 7 is the affine schematic diagram of the 5th image of acquisition of the invention, as shown in fig. 7,
S10: the second diagonal line of screen is subject in projection on above-mentioned screen, and top is the letter that white lower part is black Breath obtains the 5th image by above-mentioned camera.
Fig. 8 is the affine schematic diagram of the 6th image of acquisition of the invention, as shown in figure 8,
S11: the second diagonal line of screen is subject in projection on above-mentioned screen, and top is the letter that black lower part is white Breath obtains the 6th image by above-mentioned camera.
Fig. 9 is the second diagonal line of the invention, as shown in figure 9,
S12: the point on the second diagonal line is obtained according to the 5th image and the 6th image, is put by these and determines the second diagonal line side Journey C2.
Figure 10 is the affine schematic diagram of acquisition direct picture of the invention, as shown in Figure 10,
S13: it is identical as screen length, highly black for the rectangle of 1 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera.
Figure 11 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 11,
S14: it is identical as screen length, highly white for the rectangle of 3 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera.
Figure 12 is the 1st row horizontal line of the invention, as shown in figure 12,
S15: the 1st row horizontal line equation L1 is obtained according to direct picture and negative sense image.
Figure 13 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 13,
S16: it is identical as screen length, highly black for the rectangle of 2 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera.
Figure 14 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 14,
S17: it is identical as screen length, highly white for the rectangle of 2 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera.
Figure 15 is the 2nd row horizontal line of the invention, as shown in figure 15,
S18: the 2nd row horizontal line equation L2 is obtained according to direct picture and negative sense image.
Figure 16 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 16,
S19: it is identical as screen length, highly black for the rectangle of 3 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera.
Figure 17 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 17,
S20: it is white that the rectangle that length is identical as screen length, width is 1 gridiron pattern height is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera.
Figure 18 is the 3rd row horizontal line of the invention, as shown in figure 18,
S21: the 3rd row horizontal line equation L3 is obtained according to direct picture and negative sense image.
Figure 19 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 19,
S22: it is black that the rectangle that length is identical as screen height, width is 1 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera.
Figure 20 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 20,
S23: it is white that the rectangle that length is identical as screen height, width is 4 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera.
Figure 21 is the 1st column vertical line of the invention, as shown in figure 21,
S24: the 1st column vertical line equation R1 is obtained according to direct picture and negative sense image.
Figure 22 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 22,
S25: it is black that the rectangle that length is identical as screen height, width is 2 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera.
Figure 23 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 23,
S26: it is white that the rectangle that length is identical as screen height, width is 3 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera.
Figure 24 is the 2nd column vertical line of the invention, as shown in figure 24,
S27: the 2nd column vertical line equation R2 is obtained according to direct picture and negative sense image.
Figure 25 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 25,
S28: it is black that the rectangle that length is identical as screen height, width is 3 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera.
Figure 26 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 26,
S29: it is white that the rectangle that length is identical as screen height, width is 2 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera.
Figure 27 is the 3rd column vertical line of the invention, as shown in figure 27,
S30: the 3rd column vertical line equation R3 is obtained according to direct picture and negative sense image.
S31: the latticed image of even partition is formed by 3 horizontal lines and 3 vertical lines.
Figure 28 is that first straight line of the invention intersects with second straight line and vertical line, as shown in figure 28,
S32: in above-mentioned latticed image, the one or four side is arbitrarily chosen between the 1st row horizontal line L1 and the 2nd row horizontal line L2 Shape and the second quadrangle find out the first straight line equation H1 by two points Q1, Q2 on the first quadrangle diagonal line, find out through Cross the second straight line equation line H2 of two points Q1, Q3 on the second quadrangle diagonal line.
Figure 29 is first borderline of the invention, as shown in figure 29,
S33: selection be located at above-mentioned 1st row horizontal line L1 on, and above-mentioned first straight line H1, above-mentioned second straight line H2 with Two intersection points A, B of above-mentioned vertical line R1, R3, find out the linear equation by above-mentioned two intersection point A, B, obtain above-mentioned screen First borderline K1;
S34: principle identical with S32-S33, in above-mentioned latticed image, in the 3rd row horizontal line L3 and the 2nd row horizontal line L2 Between arbitrarily choose third quadrangle and the 4th quadrangle, respectively connect diagonal line on two points, and find out respectively by The third straight line of above-mentioned two point and the 4th linear equation (being not drawn into figure).
S35: selection be located at above-mentioned 3rd row horizontal line L3 under, and above-mentioned third straight line, above-mentioned 4th straight line with it is above-mentioned Two intersection points of vertical line, find out the linear equation by above-mentioned two intersection point, obtain the second borderline K2 (reference of above-mentioned screen Figure 30).
S36: in principle identical with S32-S33, above-mentioned latticed image, in the 1st column vertical line R1 and the 2nd column vertical line R2 Between arbitrarily choose the 5th quadrangle and the 6th quadrangle, respectively connect diagonal line on two points, and find out respectively by The 5th straight line and the 6th linear equation (being not drawn into figure) of above-mentioned two point.
S37: selection be located at above-mentioned 1st column vertical line R1 before, and above-mentioned 5th straight line, above-mentioned 6th straight line with it is above-mentioned Two intersection points of horizontal line, find out the linear equation by above-mentioned two intersection point, obtain the third boundary line K3 (reference of above-mentioned screen Figure 30).
S38: principle identical with S32-S33, in above-mentioned latticed image, in the 3rd column vertical line R4 and the 3rd column vertical line R3 Between arbitrarily choose the 7th quadrangle and the 8th quadrangle, respectively connect diagonal line on two points, and find out respectively by The 7th straight line and the 8th linear equation (being not drawn into figure) of above-mentioned two point;
S39: selection be located at above-mentioned 3rd column vertical line R3 after, and above-mentioned 7th straight line, above-mentioned 8th straight line with it is above-mentioned Two intersection points of horizontal line, find out the linear equation by above-mentioned two intersection point, obtain the 4th boundary line K4 (reference of above-mentioned screen Figure 30).
Figure 30 is the gridiron pattern and its angle point that scaling method through the invention of the invention obtains, as shown in figure 30,
S40: the chessboard figure and angle point image intersected to form by 5 horizontal lines and 6 vertical lines is finally obtained.
It finds out the method for second borderline K2, third boundary line K3 and the 4th boundary line K4 and finds out above-mentioned first boundary The method of line K1 is identical, therefore does not draw attached drawing.
Figure 33 is to determine 9 points by means of the present invention, as shown in figure 33,
S41: the intersection point of above-mentioned first borderline K1 and the second diagonal line C2 equation is found out as the 1st: 1, above-mentioned first side 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 borderline K1 and above-mentioned first diagonal line The intersection point of equation C1 as the 3rd: 3, above-mentioned second borderline K2 and above-mentioned first diagonal equation C1 intersection point as the 4th point 4, the intersection point of above-mentioned second borderline K2 and above-mentioned 2nd article of vertical line equation R2 as the 5th: 5, above-mentioned second borderline K2 with it is upper State friendship of the intersection point of the second diagonal equation C2 as the 6th: 6, above-mentioned third boundary line K3 and above-mentioned 2nd article of horizontal line equation L2 The intersection point as the 7th: 7, above-mentioned 4th boundary line K4 and above-mentioned 2nd article of horizontal line equation L2 is put as the 8th: 8, above-mentioned first The intersection point of diagonal equation C1 and above-mentioned second diagonal equation C2 is as the 9th: 9;
Figure 34 is to determine by means of the present invention at the 10th point, as shown in figure 34,
S42: by the way that the 2nd: 2 and above-mentioned 7th: 7 connecting line equation is calculated, itself and the above-mentioned 1st: 1 and are determined The intersection point of 9: 9 connecting line is as the 10th: 10;
Figure 35 is to determine by means of the present invention at the 11st point, as shown in figure 35,
S43: by the way that the 2nd: 2 and above-mentioned 8th: 8 connecting line equation is calculated, itself and the above-mentioned 3rd: 3 and are determined The intersection point of 9: 9 connecting line is as the 11st: 11;
Figure 36 is to determine by means of the present invention at the 12nd point, as shown in figure 36,
S44: by the way that the 5th: 5 and above-mentioned 8th: 8 connecting line equation is calculated, itself and the above-mentioned 6th: 6 and are determined The intersection point of 9: 9 connecting line is as the 12nd: 12;
Figure 37 is to determine by means of the present invention at the 13rd point;As shown in figure 37,
S45: by the way that the 5th: 5 and above-mentioned 7th: 7 connecting line equation is calculated, itself and the above-mentioned 4th: 4 and are determined The intersection point of 9: 9 connecting line is as the 13rd: 13;
Figure 38 is to determine 14-16 point by means of the present invention, as shown in figure 38,
S46: the connecting line equation by the way that the 10th: 10 and the 13rd: 13 is calculated determines itself and above-mentioned first borderline The intersection point of K1 as the 14th: 14, its intersection point 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 to determine 17-19 point by means of the present invention, as shown in figure 39,
S47: the connecting line equation by the way that the 11st: 11 and the 12nd: 12 is calculated determines itself and above-mentioned first borderline The intersection point of K1 as the 17th: 17, its intersection point with above-mentioned 2nd article of horizontal line equation L2 as the 18th: 18, it is with above-mentioned second The intersection point of boundary line K2 is as the 19th: 19;
Figure 40 is to determine 20-22 point by means of the present invention, as shown in figure 40,
S48: the connecting line equation by the way that the 10th: 10 and the 11st: 11 is calculated determines itself and above-mentioned third boundary line The intersection point of K3 as the 20th: 20, its intersection point with above-mentioned 2nd article of vertical line equation R2 as the 21st: 21, it is with the above-mentioned 4th The intersection point of boundary line K4 is as the 22nd: 22;
Figure 41 is to determine 23-25 point by means of the present invention, as shown in figure 41,
S49: the connecting line equation by the way that the 12nd: 12 and the 13rd: 13 is calculated determines itself and above-mentioned third boundary line The intersection point of K3 as the 23rd: 23, its intersection point with above-mentioned 2nd article of vertical line equation R2 as the 24th: 24, it is with the above-mentioned 4th The intersection point of 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 point group At region, what is be made of 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 point 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 point of area formed Domain, 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 point of region formed, Recursive calculation is carried out by using method identical with S41~S49 respectively.
The present invention provides another X-comers localization method based on recursive algorithm, comprising:
S1: correction camera;
S2: fixed above-mentioned camera and the general image that screen is obtained by above-mentioned camera;
S3: setting it is above-mentioned it is tessellated have 4 rows and 5 column;
Fig. 1 is the affine schematic diagram of the 1st image of acquisition of the invention, as shown in Figure 1,
S4: projecting completely black information on above-mentioned screen, obtains the 1st image by above-mentioned camera;
Fig. 2 is the affine schematic diagram of the 2nd image of acquisition of the invention, as shown in Fig. 2,
S5: projecting complete white information on above-mentioned screen, obtains the 2nd image by above-mentioned camera;
Fig. 3 is the binary map obtained by the 1st image and the 2nd image subtraction of the invention, as shown in figure 3,
S6: by subtracting above-mentioned 2nd image from above-mentioned 1st image, the binary map of above-mentioned screen is obtained;
Fig. 4 is the affine schematic diagram of the 3rd image of acquisition of the invention, as shown in figure 4,
S7: the first diagonal line of screen is subject in projection on above-mentioned screen, and top is the information that white lower part is black, The 3rd image is obtained by above-mentioned camera;
Fig. 5 is the affine schematic diagram of the 4th image of acquisition of the invention, as shown in figure 5,
S8: the first diagonal line of screen is subject in projection on above-mentioned screen, and top is the information that black lower part is white, The 4th image is obtained by above-mentioned camera;
Fig. 6 is the first diagonal line of the invention, as shown in fig. 6,
S9: the point on the first diagonal line is obtained according to the 3rd image and the 4th image, is put by these and determines the first diagonal line side Journey C1;
Fig. 7 is the affine schematic diagram of the 5th image of acquisition of the invention, as shown in fig. 7,
S10: the second diagonal line of screen is subject in projection on above-mentioned screen, and top is the letter that white lower part is black Breath obtains the 5th image by above-mentioned camera;
Fig. 8 is the affine schematic diagram of the 6th image of acquisition of the invention, as shown in figure 8,
S11: the second diagonal line of screen is subject in projection on above-mentioned screen, and top is the letter that black lower part is white Breath obtains the 6th image by above-mentioned camera;
Fig. 9 is the second diagonal line of the invention, as shown in figure 9,
S12: the point on the second diagonal line is obtained according to the 5th image and the 6th image, is put by these and determines the second diagonal line side Journey C2;
Figure 10 is the affine schematic diagram of acquisition direct picture of the invention, as shown in Figure 10,
S13: it is identical as screen length, highly black for the rectangle of 1 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera;
Figure 11 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 11,
S14: it is identical as screen length, highly white for the rectangle of 3 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera;
Figure 12 is the 1st row horizontal line of the invention, as shown in figure 12,
S15: the 1st row horizontal line equation L1 is obtained according to direct picture and negative sense image;
Figure 13 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 13,
S16: it is identical as screen length, highly black for the rectangle of 2 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera;
Figure 14 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 14,
S17: it is identical as screen length, highly white for the rectangle of 2 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera;
Figure 15 is the 2nd row horizontal line of the invention, as shown in figure 15,
S18: the 2nd row horizontal line equation L2 is obtained according to direct picture and negative sense image;
Figure 16 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 16,
S19: it is identical as screen length, highly black for the rectangle of 3 gridiron pattern height that length is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera;
Figure 17 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 17,
S20: it is white that the rectangle that length is identical as screen length, width is 1 gridiron pattern height is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera;
Figure 18 is the 3rd row horizontal line of the invention, as shown in figure 18,
S21: the 3rd row horizontal line equation L3 is obtained according to direct picture and negative sense image;
Figure 19 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 19,
S22: it is black that the rectangle that length is identical as screen height, width is 1 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera;
Figure 20 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 20,
S23: it is white that the rectangle that length is identical as screen height, width is 4 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera;
Figure 21 is the 1st column vertical line of the invention, as shown in figure 21,
S24: the 1st column vertical line equation R1 is obtained according to direct picture and negative sense image;
Figure 22 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 22,
S25: it is black that the rectangle that length is identical as screen height, width is 2 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera;
Figure 23 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 23,
S26: it is white that the rectangle that length is identical as screen height, width is 3 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera;
Figure 24 is the 2nd column vertical line of the invention, as shown in figure 24,
S27: the 2nd column vertical line equation R2 is obtained according to direct picture and negative sense image;
Figure 25 is the affine schematic diagram of acquisition direct picture of the invention, as shown in figure 25,
S28: it is black that the rectangle that length is identical as screen height, width is 3 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection white information, obtains direct picture by above-mentioned camera;
Figure 26 is the affine schematic diagram of acquisition negative sense image of the invention, as shown in figure 26,
S29: it is white that the rectangle that length is identical as screen height, width is 2 gridiron pattern width is projected on above-mentioned screen Color information lefts in rectangular area projection black information, obtains negative sense image by above-mentioned camera;
Figure 27 is the 3rd column vertical line of the invention, as shown in figure 27,
S30: the 3rd column vertical line equation R3 is obtained according to direct picture and negative sense image;
S31: the latticed image of even partition is formed by 3 horizontal lines and 3 vertical lines;
Figure 28 is that first straight line of the invention intersects with second straight line and vertical line, as shown in figure 28,
S32: in above-mentioned latticed image, the one or four side is arbitrarily chosen between the 1st row horizontal line L1 and the 2nd row horizontal line L2 Shape and the second quadrangle find out the first straight line equation H1 by two points Q1, Q2 on the first quadrangle diagonal line, find out through Cross the second straight line equation line H2 of two points Q1, Q3 on the second quadrangle diagonal line;
Figure 29 is first borderline of the invention, as shown in figure 29,
S33: selection be located at above-mentioned 1st row horizontal line L1 on, 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, find out the linear equation by above-mentioned two intersection point A, B, obtain above-mentioned screen First borderline K1;
S34: principle identical with S32-S33, in above-mentioned latticed image, in the 3rd row horizontal line L3 and the 2nd row horizontal line L2 Between arbitrarily choose third quadrangle and the 4th quadrangle, respectively connect diagonal line on two points, and find out respectively by The third straight line of above-mentioned two point and the 4th linear equation (being not drawn into figure);
S35: selection be located at above-mentioned 3rd row horizontal line L3 under, and above-mentioned third straight line, above-mentioned 4th straight line with it is above-mentioned Two intersection points of vertical line, find out the linear equation by above-mentioned two intersection point, obtain the second borderline K2 (reference of above-mentioned screen Figure 32);
Figure 31 is that the first diagonal line and the second diagonal line of the invention intersect with first borderline and second borderline simultaneously, As shown in figure 30,
S36: above-mentioned first borderline K1 two intersection points intersected respectively with above-mentioned first diagonal line C1, the second diagonal line C2 C, D, two intersection points E, F for selecting above-mentioned second borderline to intersect respectively with above-mentioned first diagonal line C1, the second diagonal line C2;
S37: selection is located at two intersection points C, E before above-mentioned 1st column vertical line R1 in step S36, finds out by above-mentioned The linear equation of two intersection points C, E obtain the third boundary line K3 of above-mentioned screen (with reference to Figure 32);
S38: selection is located at two intersection points D, F after above-mentioned 3rd column vertical line R3 in step S36, finds out by above-mentioned The linear equation of two intersection points D, F obtain the 4th boundary line K4 of above-mentioned screen (with reference to Figure 32);
S39: the chessboard figure and angle point image intersected to form by 3 horizontal lines and 3 vertical lines is finally obtained.
Figure 32 is the gridiron pattern and its angle point that another calculation method through the invention of the invention obtains, such as Figure 32 institute Show,
S41: the chessboard figure and angle point image intersected to form by 5 horizontal lines and 6 vertical lines is finally obtained.
It finds out the method for second borderline K2, third boundary line K3 and the 4th boundary line K4 and finds out above-mentioned first boundary The method of line K1 is identical, therefore does not draw attached drawing.
Figure 33 is to determine 9 points by means of the present invention, as shown in figure 33,
S42: the intersection point of above-mentioned first borderline K1 and the second diagonal line C2 equation is found out as the 1st: 1, above-mentioned first side 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 borderline K1 and above-mentioned first diagonal line The intersection point of equation C1 as the 3rd: 3, above-mentioned second borderline K2 and above-mentioned first diagonal equation C1 intersection point as the 4th point 4, the intersection point of above-mentioned second borderline K2 and above-mentioned 2nd article of vertical line equation R2 as the 5th: 5, above-mentioned second borderline K2 with it is upper State friendship of the intersection point of the second diagonal equation C2 as the 6th: 6, above-mentioned third boundary line K3 and above-mentioned 2nd article of horizontal line equation L2 The intersection point as the 7th: 7, above-mentioned 4th boundary line K4 and above-mentioned 2nd article of horizontal line equation L2 is put as the 8th: 8, above-mentioned first The intersection point of diagonal equation C1 and above-mentioned second diagonal equation C2 is as the 9th: 9;
Figure 34 is to determine by means of the present invention at the 10th point, as shown in figure 34,
S43: by the way that the 2nd: 2 and above-mentioned 7th: 7 connecting line equation is calculated, itself and the above-mentioned 1st: 1 and are determined The intersection point of 9: 9 connecting line is as the 10th: 10;
Figure 35 is to determine by means of the present invention at the 11st point, as shown in figure 35,
S44: by the way that the 2nd: 2 and above-mentioned 8th: 8 connecting line equation is calculated, itself and the above-mentioned 3rd: 3 and are determined The intersection point of 9: 9 connecting line is as the 11st: 11;
Figure 36 is to determine by means of the present invention at the 12nd point, as shown in figure 36,
S45: by the way that the 5th: 5 and above-mentioned 8th: 8 connecting line equation is calculated, itself and the above-mentioned 6th: 6 and are determined The intersection point of 9: 9 connecting line is as the 12nd: 12;
Figure 37 is to determine by means of the present invention at the 13rd point;As shown in figure 37,
S46: by the way that the 5th: 5 and above-mentioned 7th: 7 connecting line equation is calculated, itself and the above-mentioned 4th: 4 and are determined The intersection point of 9: 9 connecting line is as the 13rd: 13;
Figure 38 is to determine 14-16 point by means of the present invention, as shown in figure 38,
S467: the connecting line equation by the way that the 10th: 10 and the 13rd: 13 is calculated determines itself and above-mentioned first boundary The intersection point of line K1 as the 14th: 14, its intersection point with above-mentioned 2nd article of horizontal line equation L2 as the 15th: 15, it is with above-mentioned The intersection point of two boundary line k2 is as the 16th: 16;
Figure 39 is to determine 17-19 point by means of the present invention, as shown in figure 39,
S48: the connecting line equation by the way that the 11st: 11 and the 12nd: 12 is calculated determines itself and above-mentioned first borderline The intersection point of K1 as the 17th: 17, its intersection point with above-mentioned 2nd article of horizontal line equation L2 as the 18th: 18, it is with above-mentioned second The intersection point of boundary line K2 is as the 19th: 19;
Figure 40 is to determine 20-22 point by means of the present invention, as shown in figure 40,
S49: the connecting line equation by the way that the 10th: 10 and the 11st: 11 is calculated determines itself and above-mentioned third boundary line The intersection point of K3 as the 20th: 20, its intersection point with above-mentioned 2nd article of vertical line equation R2 as the 21st: 21, it is with the above-mentioned 4th The intersection point of boundary line K4 is as the 22nd: 22;
Figure 41 is to determine 23-25 point by means of the present invention, as shown in figure 41,
S50: the connecting line equation by the way that the 12nd: 12 and the 13rd: 13 is calculated determines itself and above-mentioned third boundary line The intersection point of K3 as the 23rd: 23, its intersection point with above-mentioned 2nd article of vertical line equation R2 as the 24th: 24, it is with the above-mentioned 4th The intersection point of 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 point group At region, what is be made of 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 point 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 point of area formed Domain, 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 point of region formed, Recursive calculation is carried out by using method identical with S42~S50 respectively.
In conclusion the present invention provides a kind of X-comers localization method based on recursive algorithm, it is fixed to improve angle point The accuracy and robustness of position, the straight line on four boundaries of screen are obtained using method of geometry, then calculate 25 with by 9 points The method of a point, improves the accuracy of positioning.Also, straight line is only projected every time, is not in the problem of confusing straight line; Actively the straight line of projection is the straight border formed by black and white region, rather than directly projects the straight line of certain width, is protected The location accuracy of represented straight line has been demonstrate,proved, has also been not easy marginal point and is missed by the acquisition of low resolution image;For up and down Straight line positioning, the affine transformation of straight line, image is determined using two o'clock, fixed by the method for directly projecting straight line to being difficult to It the problem of position screen side straight line, is obtained using geometrical principle by theoretical calculation.
Above embodiment is the preferred embodiment of the present invention, is not intended to limit patent protection model of the invention It encloses.Those skilled in the art belonging to any present invention, in the premise for not departing from spirit and scope disclosed in this invention Under, the transformation of the equivalent structure and equivalent steps that done to the contents of the present invention each falls within claimed the scope of the patents Within.

Claims (2)

1. a kind of X-comers localization method based on recursive algorithm characterized by comprising
S1: correction camera;
S2: the fixed camera and the general image that screen is obtained by the camera;
S3: the gridiron pattern, which is arranged, m row and n column, wherein m and n is the even number more than or equal to 4;
S4: projecting completely black information on the screen, obtains the 1st image by the camera;
S5: projecting complete white information on the screen, obtains the 2nd image by the camera;
S6: by subtracting the 2nd image from the 1st image, the binary map of the screen is obtained;
S7: it projects be subject to the first diagonal line of screen on the screen, top is the information that white lower part is black, is passed through The camera obtains the 3rd image;
S8: it projects be subject to the first diagonal line of screen on the screen, top is the information that black lower part is white, is passed through The camera obtains the 4th image;
S9: the point on the first diagonal line is obtained according to the 3rd image and the 4th image, is put by these and determines the first diagonal equation;
S10: it projects be subject to the second diagonal line of screen on the screen, top is the information that white lower part is black, is led to It crosses the camera and obtains the 5th image;
S11: it projects be subject to the second diagonal line of screen on the screen, top is the information that black lower part is white, is led to It crosses the camera and obtains the 6th image;
S12: the point on the second diagonal line is obtained according to the 5th image and the 6th image, is put by these and determines the second diagonal equation;
S13: the rectangle black letter that length is identical as screen length, is highly i gridiron pattern height is projected on the screen Breath lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by the camera;
S14: project on the screen length it is identical as screen length, highly be m-i gridiron pattern height rectangular white Information lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by the camera;
S15: obtaining the point on the i-th row horizontal line according to direct picture and negative sense image, put by these and determine the i-th row horizontal line equation, and 1 ≤i≤m-1;
S16: repeating S13-S15, until obtaining m-1 horizontal line equation;
S17: the rectangle black letter that length is identical as screen height, width is j gridiron pattern width is projected on the screen Breath lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by the camera;
S18: the rectangular white that length is identical as screen height, width is n-j gridiron pattern width is projected on the screen Information lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by the camera;
S19: obtaining the point on jth column vertical line according to direct picture and negative sense image, put by these and determine jth column vertical line equation, and 1 ≤j≤n-1;
S20: repeating S17-S19, until obtaining n-1 vertical line equation;
S21: the n-1 vertical line that the m-1 horizontal line and step S19 obtained by step S15 obtains forms latticed image;
S22: in the latticed image, the first quadrangle and second are arbitrarily chosen between the 1st row horizontal line and the 2nd row horizontal line Quadrangle respectively connects two points on diagonal line, and finds out respectively straight by the first straight line of described two points and second Line equation;
S23: selection is located on the 1st row horizontal line, and the first straight line, the second straight line and the vertical line Two intersection points, find out the linear equation by described two intersection points, obtain the first borderline of the screen;
S24: in the latticed image, arbitrarily chosen between m-1 row horizontal line and m-2 row horizontal line third quadrangle and 4th quadrangle respectively connects two points on diagonal line, and finds out the third straight line by described two points and the respectively Four linear equations;
S25: selection is located under the i-th row horizontal line, and the third straight line, the 4th straight line and the vertical line Two intersection points, find out the linear equation by described two intersection points, obtain the second borderline of the screen;
S26: in the latticed image, the 5th quadrangle and the 6th are arbitrarily chosen between the 1st column vertical line and the 2nd column vertical line Quadrangle respectively connects two points on diagonal line, and finds out respectively straight by the 5th straight line of described two points and the 6th Line equation;
S27: selection is located at before the 1st column vertical line, and the 5th straight line, the 6th straight line and the horizontal line Two intersection points, find out the linear equation by described two intersection points, obtain the third boundary line of the screen;
S28: in the latticed image, arbitrarily chosen between the (n-1)th column vertical line and the n-th -2 column vertical line the 7th quadrangle and 8th quadrangle respectively connects two points on diagonal line, and finds out the 7th straight line by described two points and the respectively Eight linear equations;
S29: selection is located at after the (n-1)th column vertical line, and the 7th straight line, the 8th straight line and the horizontal line Two intersection points, find out the linear equation by described two intersection points, obtain the 4th boundary line of the screen;
S30: until obtaining the chessboard figure and angle point image that are intersected to form by m+1 horizontal line and n+1 vertical line;
S31: the intersection point of the first borderline and the second diagonal equation is found out as, the first borderline and the 2nd at the 1st point The intersection point of article vertical line equation as the 2nd point, the intersection point of the first borderline and first diagonal equation as the 3rd point, The intersection point of the second borderline and first diagonal equation is perpendicular as the 4th point, the second borderline and described 2nd article The intersection point of line equation as the 5th point, the intersection point of the second borderline and second diagonal equation as the 6th point, it is described The intersection point of third boundary line and the 2nd article of horizontal line equation is as the 7th point, the 4th boundary line and the 2nd article of horizontal line side The intersection point of journey is as the 8th point, the intersection point of first diagonal equation and second diagonal equation as the 9th point;
S32: by the way that and the 7th point of the connecting line equation is calculated at the 2nd point, itself and and the 9th point of company are determined at described 1st point The intersection point of wiring is as the 10th point;
S33: by the way that and the 8th point of the connecting line equation is calculated at the 2nd point, itself and and the 9th point of company are determined at described 3rd point The intersection point of wiring is as the 11st point;
S34: by the way that and the 8th point of the connecting line equation is calculated at the 5th point, itself and and the 9th point of company are determined at described 6th point The intersection point of wiring is as the 12nd point;
S35: by the way that and the 7th point of the connecting line equation is calculated at the 5th point, itself and and the 9th point of company are determined at described 4th point The intersection point of wiring is as the 13rd point;
S36: the connecting line equation by the way that with is calculated at the 10th point at the 13rd point determines that the intersection point of itself and the first borderline is made For the 14th point, its intersection point with m/2 articles of horizontal line equation as the 15th point, its intersection point with the second borderline as the 16th Point;
S37: the connecting line equation by the way that with is calculated at the 11st point at the 12nd point determines that the intersection point of itself and the first borderline is made For the 17th point, its intersection point with the m/2 articles of horizontal line equation as the 18th point, its intersection point with the second borderline as 19 points;
S38: the connecting line equation by the way that with is calculated at the 10th point at the 11st point determines that the intersection point of itself and the third boundary line is made For the 20th point, its intersection point with n/2 articles of vertical line equation as the 21st point, its intersection point with the 4th boundary line as the 22nd Point;
S39: the connecting line equation by the way that with is calculated at the 12nd point at the 13rd point determines that the intersection point of itself and the third boundary line is made For the 23rd point, its intersection point with the n/2 articles of vertical line equation as the 24th point, its intersection point with the 4th boundary line as 25 points;
S40: what is be made of 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 point 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 point of area formed Domain, 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 point of 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 point of region formed, difference Recursive calculation is carried out by using method identical with S32~S39.
2. a kind of X-comers localization method based on recursive algorithm characterized by comprising
S1: correction camera;
S2: the fixed camera and the general image that screen is obtained by the camera;
S3: the gridiron pattern, which is arranged, m row and n column, and m and n are the even number more than or equal to 4;
S4: projecting completely black information on the screen, obtains the 1st image by the camera;
S5: projecting complete white information on the screen, obtains the 2nd image by the camera;
S6: by subtracting the 2nd image from the 1st image, the binary map of the screen is obtained;
S7: it projects be subject to the first diagonal line of screen on the screen, top is the information that white lower part is black, is passed through The camera obtains the 3rd image;
S8: it projects be subject to the first diagonal line of screen on the screen, top is the information that black lower part is white, is passed through The camera obtains the 4th image;
S9: the point on the first diagonal line is obtained according to the 3rd image and the 4th image, is put by these and determines the first diagonal equation;
S10: it projects be subject to the second diagonal line of screen on the screen, top is the information that white lower part is black, is led to It crosses the camera and obtains the 5th image;
S11: it projects be subject to the second diagonal line of screen on the screen, top is the information that black lower part is white, is led to It crosses the camera and obtains the 6th image;
S12: the point on the second diagonal line is obtained according to the 5th image and the 6th image, is put by these and determines the second diagonal equation;
S13: the rectangle black letter that length is identical as screen length, is highly i gridiron pattern height is projected on the screen Breath lefts in rectangular area projection white information, obtains direct picture, 1≤i≤m-1 by the camera;
S14: project on the screen length it is identical as screen length, highly be m-i gridiron pattern height rectangular white Information lefts in rectangular area projection black information, obtains negative sense image, 1≤i≤m-1 by the camera;
S15: obtaining the point on the i-th row horizontal line according to direct picture and negative sense image, put by these and determine the i-th row horizontal line equation, and 1 ≤i≤m-1;
S16: repeating S13-S15, until obtaining m-1 horizontal line equation;
S17: the rectangle black letter that length is identical as screen height, width is j gridiron pattern width is projected on the screen Breath lefts in rectangular area projection white information, obtains direct picture, 1≤j≤n-1 by the camera;
S18: the rectangular white that length is identical as screen height, width is n-j gridiron pattern width is projected on the screen Information lefts in rectangular area projection black information, obtains negative sense image, 1≤j≤n-1 by the camera;
S19: obtaining the point on jth column vertical line according to direct picture and negative sense image, put by these and determine jth column vertical line equation, and 1 ≤j≤n-1;
S20: repeating S17-S19, until obtaining n-1 vertical line equation;
S21: the n-1 vertical line that the m-1 horizontal line and step-S19 obtained by step S15 obtains forms latticed image;
S22: in the latticed image, the first quadrangle and second are arbitrarily chosen between the 1st row horizontal line and the 2nd row horizontal line Quadrangle respectively connects two points on diagonal line, and finds out respectively straight by the first straight line of described two points and second Line equation;
S23: selection is located on the 1st row horizontal line, and the first straight line, the second straight line and the vertical line Two intersection points, find out the linear equation by described two intersection points, obtain the first borderline of the screen;
S24: in the latticed image, arbitrarily chosen between m-1 row horizontal line and m-2 row horizontal line third quadrangle and 4th quadrangle respectively connects two points on diagonal line, and finds out the third straight line by described two points and the respectively Four linear equations;
S25: selection is located under the i-th row horizontal line, and the third straight line, the 4th straight line and the vertical line Two intersection points, find out the linear equation by described two intersection points, obtain the second borderline of the screen;
S26: two intersection points for selecting the first borderline to intersect respectively with first diagonal line, the second diagonal line, selection Two intersection points that the second borderline intersects with first diagonal line, the second diagonal line respectively;
S27: selection is located at two intersection points before the 1st column vertical line in step S26, finds out the straight line by described two intersection points Equation obtains the third boundary line of the screen;
S28: selection is located at two intersection points after the n-th -2 column vertical line in step S26, finds out by the straight of described two intersection points Line equation obtains the 4th boundary line of the screen;
S29: until obtaining the chessboard figure and angle point image that are intersected to form by m+1 horizontal line and n+1 vertical line;
S30: the intersection point of the first borderline and the second diagonal equation is found out as, the first borderline and the 2nd at the 1st point The intersection point of article vertical line equation as the 2nd point, the intersection point of the first borderline and first diagonal equation as the 3rd point, The intersection point of the second borderline and first diagonal equation is perpendicular as the 4th point, the second borderline and described 2nd article The intersection point of line equation as the 5th point, the intersection point of the second borderline and second diagonal equation as the 6th point, it is described The intersection point of third boundary line and the 2nd article of horizontal line equation is as the 7th point, the 4th boundary line and the 2nd article of horizontal line side The intersection point of journey is as the 8th point, the intersection point of first diagonal equation and second diagonal equation as the 9th point;
S31: by the way that and the 7th point of the connecting line equation is calculated at the 2nd point, itself and and the 9th point of company are determined at described 1st point The intersection point of wiring is as the 10th point;
S32: by the way that and the 8th point of the connecting line equation is calculated at the 2nd point, itself and and the 9th point of company are determined at described 3rd point The intersection point of wiring is as the 11st point;
S33: by the way that and the 8th point of the connecting line equation is calculated at the 5th point, itself and and the 9th point of company are determined at described 6th point The intersection point of wiring is as the 12nd point;
S34: by the way that and the 7th point of the connecting line equation is calculated at the 5th point, itself and and the 9th point of company are determined at described 4th point The intersection point of wiring is as the 13rd point;
S35: the connecting line equation by the way that with is calculated at the 10th point at the 13rd point determines that the intersection point of itself and the first borderline is made For the 14th point, its intersection point with m/2 articles of horizontal line equation as the 15th point, its intersection point with the second borderline as the 16th Point;
S36: the connecting line equation by the way that with is calculated at the 11st point at the 12nd point determines that the intersection point of itself and the first borderline is made For the 17th point, its intersection point with the m/2 articles of horizontal line equation as the 18th point, its intersection point with the second borderline as 19 points;
S37: the connecting line equation by the way that with is calculated at the 10th point at the 11st point determines that the intersection point of itself and the third boundary line is made For the 20th point, its intersection point with n/2 articles of vertical line equation as the 21st point, its intersection point with the 4th boundary line as the 22nd Point;
S38: the connecting line equation by the way that with is calculated at the 12nd point at the 13rd point determines that the intersection point of itself and the third boundary line is made For the 23rd point, its intersection point with the n/2 articles of vertical line equation as the 24th point, its intersection point with the 4th boundary line as 25 points;
S39: what is be made of 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 point 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 point of area formed Domain, 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 point of 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 point of region formed, difference Recursive calculation is carried out by using method identical with S31~S38.
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 CN106201062A (en) 2016-12-07
CN106201062B true 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
CN106201062A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN110458898B (en) Camera calibration board, calibration data acquisition method, distortion correction method and device
US20080031514A1 (en) Camera Calibration Method And Camera Calibration Device
CN109685019B (en) Component identification method, electronic equipment and storage medium
CN103954970B (en) A kind of topographic(al) feature acquisition method
CN106251326B (en) A kind of building occlusion detection and occlusion area compensation method using ghost picture
CN103927748B (en) A kind of coordinate scaling method based on many rectangular images distance transformation model
CN104168476B (en) A kind of test chart content grasping means and system
CN105469057B (en) A kind of vehicle window detection method based on hough straight-line detection and projection
US20150304568A1 (en) Field display system, field display method, and field display program
CN106709952B (en) A kind of automatic calibration method of display screen
KR20160006114A (en) System and method for nuclear fuel assembly deformation measurement
CN106022344B (en) A kind of virtual X-comers localization method
CN106407973A (en) Robust recognition method for AR code marked on cylinder
CN106612423A (en) Touch control method and device for projection image
CN106201062B (en) A kind of X-comers localization method based on recursive algorithm
JPH05274426A (en) Image processor and distortion correcting method of image processor
CN102420971B (en) Car-reversing auxiliary system and method
CA2971996C (en) Chinese character information recording method and chinese character stroke order determining diagram device for teaching
TW200945259A (en) Image processing apparatus and method for generating coordination calibration points
CN106097281B (en) A kind of calibration maps and its calibration detection method for projecting interactive system
CN107464214A (en) The method for generating solar power station panorama sketch
CN105739938B (en) A kind of focus image display method and device
CN110533647A (en) A kind of liquid crystal display Mark independent positioning method based on line characteristic matching
CN106127826B (en) It is a kind of for projecting the connected component labeling method of interactive system
CN106028019B (en) Video 3 dimensional format quick determination method

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