A kind of method and system based on two-point locating image

文档序号:1756790 发布日期:2019-11-29 浏览:13次 中文

阅读说明:本技术 一种基于两点定位图像的方法及系统 (A kind of method and system based on two-point locating image ) 是由 林金泳 于 2018-05-21 设计创作,主要内容包括:本发明公开了一种基于两点定位图像的方法,本发明还公开了一种基于两点定位图像的系统,本发明通过两点定位,减少了一个定位点,通过空白样板的四个角作为参考点测量绝对坐标,克服了以往三点定位时查找定位点困难,查找定位点方便,快捷;通过测量定位点间的相对位置以及空白样板和学生答题卡的矫正,使得学生答题卡图像查找定位准确,出错率低。(The invention discloses a kind of methods based on two-point locating image, the invention also discloses a kind of systems based on two-point locating image, the present invention passes through two-point locating, reduce an anchor point, pass through four angles measurement absolute coordinate as a reference point of blank template, it is difficult that point is searched and located when overcoming previous three-point fix, search and orientation point is convenient, fast;By the correction of relative position and blank template and student's answering card between measurement and positioning point, so that student's answer card graphic searchs and locates accurately, error rate is low.)

1. a kind of method based on two-point locating image, includes the following steps:

(1) two anchor points on blank template are arbitrarily selected, anchor point one and anchor point two are denoted as;

(2) absolute coordinate of anchor point one and anchor point two on blank template is measured and recorded;

(3) relative position of anchor point one and anchor point two is calculated;

(4) relative position for measuring and recording objective item and anchor point one on blank template measures and records main on blank template The relative position of sight topic and anchor point one;

(5) one He of anchor point on student's answering card is searched by the absolute coordinate of anchor point one and anchor point two on blank template Anchor point two;

(6) by anchor point one and two distance of anchor point on student's answering card and the anchor point one and anchor point two on blank template The comparison of distance, if the two absolute value of the difference with the ratio of two distance of anchor point one and anchor point on blank template be greater than set Definite value, then by student's answering card anchor point one and anchor point two abandon, and two anchor points are reselected, if the two difference Absolute value is less than setting value with the ratio of two distance of anchor point one and anchor point on blank template, then carries out in next step;

(7) anchor point one of student's answering card and the distance and angle of anchor point two are calculated, student's answering card and blank sample are compared Anchor point one and two distance of anchor point determine the ratio of student's answering card and blank sample volume on plate;

(8) student's answering card is corrected according to ratio;

(9) the objective item position on student's answering card is determined according to the relative position of objective item and anchor point one on blank template It sets, the subjective item position on student's answering card is determined according to the relative position of subjective item and anchor point one on blank template, it is right Subjective item scans after being sliced with objective item gos over examination papers.

2. a kind of method based on two-point locating image according to claim 1, which is characterized in that the step (2) In measure and record anchor point one and anchor point two absolute coordinate mode be by with four angles of blank template for referring to really Determine the distance and angle of anchor point.

3. a kind of method based on two-point locating image according to claim 1, which is characterized in that the step (3) Middle anchor point one and the relative position of anchor point two are at a distance from anchor point one and anchor point two and angle.

4. a kind of method based on two-point locating image according to claim 1, which is characterized in that the step (8) The method of middle correction is that student's answering card is done scaling and angle correction referring to blank template by ratio.

5. a kind of method based on two-point locating image according to claim 1, which is characterized in that the step (6) Setting value be set as 5%.

6. a kind of system based on two-point locating image characterized by comprising

Locating module: for positioning two anchor points of blank template;

Measurement module: the measurement module is connected with locating module, for measuring the absolute seat of two anchor points on blank template Mark calculates the relative position between anchor point, measures objective item and subjective item and anchor point relative position on blank template;

Logging modle: logging modle is connected with locating module and measurement module respectively, for record location point absolute coordinate and Objective item and subjective item and anchor point relative position on relative position and blank template;

Search contrast module: the lookup contrast module is connect with logging modle, is searched contrast module and is answered for searching student Anchor point absolute coordinate and relative position on topic card, and the distance between student's answering card and blank template anchor point is compared, if The two absolute value of the difference and the ratio of two distance of anchor point one and anchor point on blank template are greater than the set value, then give up this Point, reselects, if being not more than setting value, measures the relative position on the anchor point on blank template and student's answering card, Determine the ratio of the two;

Rectification module: the rectification module is connect with contrast module is searched, for correcting student's answering card.

7. a kind of system based on two-point locating image according to claim 6, which is characterized in that the measurement module Measurement absolute coordinate is by being referring to the distance and angle for determining anchor point with four angles of blank template.

8. a kind of system based on two-point locating image according to claim 6, which is characterized in that the relative position Refer to the distance and angle between anchor point.

9. a kind of system based on two-point locating image according to claim 6, which is characterized in that the method for the correction It is that student's answering card is done referring to blank template by scaling and angle correction by ratio.

10. a kind of method based on two-point locating image according to claim 6, which is characterized in that the setting value It is set as 5%.

Technical field

The invention belongs to papery field of information management more particularly to a kind of method based on two-point locating image and it is System.

Background technique

With advances in technology, the mode goed over examination papers of nowadays taking an examination largely tends to papery and gos over examination papers, and current all online Identification technology used in product of going over examination papers requires to find three or three or more characteristic points in the student's answering card to be identified, (three points just can determine that a plane), with these three characteristic points to the objective item on picture, subjective item is positioned.These three Anchor point requirement cannot be straight line, that is, need these three feature point groups at a triangle.But make actual With in environment, often the printing quality of student's answering card is excessively poor, and three characteristic points cannot be found in many cases by having, or not Can find three characteristic points not point-blank, then the characteristic point poor quality that finds, in this case, tradition Marking system just will appear a large amount of exception information, and use is very inconvenient.

Summary of the invention

Technical problem to be solved by the present invention lies in provide a kind of network grading search and locate it is accurate, conveniently one Method and system of the kind based on two-point locating image.

In order to solve the above technical problems, the technical solution of the invention is as follows:

A method of based on two-point locating image, include the following steps:

(1) two anchor points on blank template are arbitrarily selected, anchor point one and anchor point two are denoted as;

(2) absolute coordinate of anchor point one and anchor point two on blank template is measured and recorded;

(3) relative position of anchor point one and anchor point two is calculated;

(4) relative position for measuring and recording objective item and anchor point one on blank template measures and records blank template The relative position of upper subjective item and anchor point one;

(5) anchor point on student's answering card is searched by the absolute coordinate of anchor point one and anchor point two on blank template One and anchor point two;

(6) by student's answering card anchor point one and two distance of anchor point on blank template anchor point one and positioning Point two distances comparison, if the two absolute value of the difference with it is big with the ratio of two distance of anchor point one and anchor point on blank template In setting value, then by student's answering card anchor point one and anchor point two abandon, and two anchor points are reselected, if the two Absolute value of the difference is less than setting value with the ratio of two distance of anchor point one and anchor point on blank template, then carries out next Step;

(7) anchor point one of student's answering card and the distance and angle of anchor point two are calculated, student's answering card and sky are compared Anchor point one and two distance of anchor point determine the ratio of student's answering card and blank sample volume on white template;

(8) student's answering card is corrected according to ratio;

(9) objective item on student's answering card is determined according to the relative position of objective item and anchor point one on blank template Position determines the subjective item position on student's answering card according to the relative position of subjective item and anchor point one on blank template, Scanning is goed over examination papers after being sliced to subjective item with objective item.

Further, the mode of the absolute coordinate of anchor point one and anchor point two is measured and recorded in the step (2) It is by being referring to the distance and angle for determining anchor point with four angles of blank template.

Further, the relative position of anchor point one and anchor point two is anchor point one and positioning in the step (3) The distance and angle of point two.

Further, the method corrected in the step (8) is by student's answering card by ratio referring to blank template Do scaling and angle correction.

Further, the setting value of the step (6) is set as 5%.

A kind of system based on two-point locating image characterized by comprising

Locating module: for positioning two anchor points of blank template;

Measurement module: the measurement module is connected with locating module, for measuring the exhausted of two anchor points on blank template To coordinate, the relative position between anchor point is calculated, measures objective item and subjective item and anchor point relative position on blank template;

Logging modle: logging modle is connected with locating module and measurement module respectively, the absolute seat for record location point Objective item and subjective item and anchor point relative position on mark and relative position and blank template;

Search contrast module: the lookup contrast module is connect with logging modle, is searched contrast module and is learned for searching Anchor point absolute coordinate and relative position on raw answering card, and compare between student's answering card and blank template anchor point away from From giving up if the two absolute value of the difference and the ratio of two distance of anchor point one and anchor point on blank template are greater than the set value The point is abandoned, is reselected, if being not more than setting value, measures the opposite position on the anchor point on blank template and student's answering card It sets, determines the ratio of the two;

Rectification module: the rectification module is connect with contrast module is searched, for correcting student's answering card.

Further, measurement module measurement absolute coordinate is by being fixed referring to determining with four angles of blank template At a distance from site and the upper left corner pinpoint and angle.

Further, the relative position refers to the distance and angle between anchor point.

Further, the method for the correction is that student's answering card is done scaling and angle referring to blank template by ratio Correction.

Further, the setting value is set as 5%.

The beneficial effects of the present invention are:

1, the present invention reduces an anchor point by two-point locating, as a reference point by four angles of blank template Absolute coordinate is measured, point difficulty is searched and located when overcoming previous three-point fix, search and orientation point is convenient, fast;

2, the present invention is realized by the correction of relative position and blank template and student's answering card between measurement and positioning point It is accurate that student's answer card graphic searchs and locates, the low advantage of error rate.

Detailed description of the invention

Fig. 1 is the flow chart of corresponding method of the present invention;

Fig. 2 is the structural block diagram of correspondence system of the present invention.

Figure: 100- locating module;200- measurement module;300- logging modle;400- searches contrast module;500- corrects mould Block.

Specific embodiment

The invention will be further described in the following with reference to the drawings and specific embodiments.It should be noted that following institute Technical characteristic involved in each embodiment of the present invention of description can be combined with each other as long as they do not conflict with each other.

Identification technology used in existing network grading product requires to find three in the student's answering card to be identified Or three or more characteristic points, (three points just can determine that a plane) is main with these three characteristic points to the objective item on picture Sight topic is positioned.But in actual use environment, often the printing quality of student's answering card is excessively poor, has in many cases Three characteristic points cannot be found, cannot perhaps find three characteristic points not point-blank again or the characteristic point that finds Poor quality, in this case, traditional marking system just will appear a large amount of exception information, and use is very inconvenient.The present invention By improvement, reduce a characteristic point, so that lookup is convenient and efficient, accurate positioning.

The invention particularly discloses a kind of methods based on two-point locating image to include the following steps: such as Fig. 1 depicted

(1) two anchor points on blank template are arbitrarily selected, are denoted as anchor point one and anchor point two, blank template is one The answering card of part printing initial stage blank and the answering card of student are essentially identical, but since student's answering card is by printing quality Influence, often there are small deviations in student's answering card, anchor point is on the blank answering card with blank template in size Any two point, thus search get up quickly, be not in search less than the case where;

(2) absolute coordinate of anchor point one and anchor point two on blank template is measured and recorded, specific measurement method is logical Cross four angles of blank template be referring to the distance and angle for determining anchor point, can be with for example, anchor point one is closer apart from the upper left corner Anchor point one is measured at a distance from the upper left corner and angle, is assured that the absolute coordinate of anchor point in this way;

(3) relative position for calculating anchor point one and anchor point two, is specifically exactly the distance for calculating two anchor points With angle;

(4) relative position for measuring and recording objective item and anchor point one on blank template measures and records blank template The relative position of upper subjective item and anchor point one, relative position herein refer to distance and angle, in the plane, pass through distance The relative position of two targets is assured that with angle;

(5) anchor point on student's answering card is searched by the absolute coordinate of anchor point one and anchor point two on blank template One and anchor point two, two anchor point absolute coordinates on blank template have been known by step (2), have only been needed in student at this time The two points are found out using absolute coordinate on answering card;

(6) by student's answering card anchor point one and two distance of anchor point on blank template anchor point one and positioning Point two distances comparison, if the two absolute value of the difference with it is big with the ratio of two distance of anchor point one and anchor point on blank template In setting value, then by student's answering card anchor point one and anchor point two abandon, and reselect two on blank template Anchor point, if the two absolute value of the difference is less than setting with the ratio of two distance of anchor point one and anchor point on blank template Value then carries out in next step;Setting value herein is specifically set by user according to different situations, is not a fixed value, often Be set as 5% in the case of rule, but it is larger or smaller for special such as answering card to do corresponding adjustment, when setting value is 5%, the i.e. absolute value of the difference of anchor point one and two distance of anchor point and two distance of anchor point one and anchor point on blank template It is less than 5% with the ratio of two distance of anchor point one and anchor point on blank template, i.e., there are two types of situations, the first is when The anchor point one and anchor point two of raw answering card apart from it is larger when, the anchor point one and two distance of anchor point and sky of student's answering card Anchor point one and two distance ratio of anchor point on white template are less than 105%, and second is the anchor point for working as student's answering card One and anchor point two apart from it is smaller when, the anchor point one and two distance of anchor point of student's answering card and the anchor point on blank template One and two distance ratio of anchor point be greater than 95%. the step primarily to giving up some noise spots, guarantee blank template Anchor point and student's answering card anchor point between position it is accurate;

(7) anchor point one of student's answering card and the distance and angle of anchor point two are calculated, student's answering card and sky are compared Anchor point one and two distance of anchor point determine the ratio of student's answering card and blank sample volume on white template, it is for instance known that Two anchor points distance on blank template is a, and the two anchor points distance on student's answering card is b, then the ratio of the two is just b/a;

(8) student's answering card is corrected according to ratio, the ratio of the two is had determined that by step (7), at this moment Only need to according to ratio adjust correction student's answering card size, when ratio be b/a when, only student's answering card need to be scaled or Expand b/a times;

(9) after having corrected student's answering card, student's answering card and blank template are identical, at this moment pass through blank sample again The relative position of subjective and objective topic on plate and anchor point one determines the relative position on student's answering card, after determining to master Sight topic scans after being sliced with objective item gos over examination papers.

The invention also discloses a kind of systems based on two-point locating image, as shown in Figure 2, comprising:

Locating module 100: for positioning two anchor points of blank template, blank template is a printing initial stage blank Answering card and the answering card of student are essentially identical, but since student's answering card is influenced by printing quality, student's answering card Often there are small deviations with blank template in size, anchor point is any two point on the blank answering card;

Measurement module 200: the measurement module 200 is connected with locating module 100, fixed for measuring on blank template two The absolute coordinate in site, it is by determining anchor point with four angles of blank template for reference that measurement module 200, which measures absolute coordinate,; The relative position between anchor point is calculated, objective item and subjective item and anchor point relative position on blank template are measured, for plane For, it can determine that relative position as long as the distance between anchor point and angle has been determined, therefore, above-mentioned relative position refers to Distance and angle;

Logging modle 300: logging modle 300 is connected with locating module 100 and measurement module 200 respectively, fixed for recording Objective item and subjective item and anchor point relative position on the absolute coordinate in site and relative position and blank template;

Search contrast module 400: the lookup contrast module 400 is connect with logging modle 300, searches contrast module 400 for searching anchor point absolute coordinate and relative position on student's answering card, and compares student's answering card and blank template Distance between anchor point, if the two absolute value of the difference and the ratio of two distance of anchor point one and anchor point on blank template are greater than Setting value is then given up the point, is reselected, if being not more than setting value, measures the positioning on blank template and student's answering card Relative position on point determines that the ratio of the two, preferential setting value are 5%, i.e. anchor point one and two distance of anchor point and sky The absolute value of the difference of two distance of anchor point one and anchor point on white template and anchor point one and anchor point two on blank template When the ratio of distance is greater than 5%, the selection of anchor point on student's answering card can be given up by searching contrast module 400, restart to look for Two anchor points on blank template;When anchor point one and two distance of anchor point and the anchor point one and anchor point on blank template The absolute value of the difference of two distances and the ratio of two distance of anchor point one and anchor point on blank template search comparison less than 5% Module both will measure relative position, determine ratio, and the step guarantees blank sample primarily to give up some noise spots Position is accurate between the anchor point of plate and the anchor point of student's answering card;

Rectification module 500: the rectification module 500 is connect with contrast module 400 is searched, for correcting student's answering card, Antidote is that student's answering card is done scaling and angle correction referring to blank template by ratio.

The application method of this system is:

Firstly, locating module 100 positions two anchor points on blank template, then measurement module 200 measures two and determines After the absolute coordinates in site and relative position, absolute coordinate information and relative position information are sent to logging modle 300 and recorded, Measurement module 200 can also measure anchor point one and main, objective item relative position on blank template, equally be handed over to record mould Block 300 records;Then, lookup contrast module 400 first finds student according to the absolute coordinate of anchor point in logging modle 300 and answers Topic blocks the absolute coordinate of upper anchor point, and two positioning on blank template and student's answering card can be compared by then searching contrast module 400 Point distance, if deviation greatly if give up two anchor points, restart to select, if difference do not begin to very much determine both Ratio, then issues rectification module 500 for ratio, and rectification module 500 adjusts student's answering card according to ratio, scales or expand Greatly, so that itself and blank Model match, then further according to anchor point on the blank template of logging modle 300 and master, objective item Relative position determines the subjective and objective topic position on student's answering card.

The present invention reduces an anchor point, passes through four angle surveys as a reference point of blank template by two-point locating Absolute coordinate is measured, point difficulty is searched and located when overcoming previous three-point fix, search and orientation point is convenient, fast;It is fixed by measuring It is quasi- to realize that student's answer card graphic searchs and locates for the correction of relative position and blank template and student's answering card between site Really, the low advantage of error rate.

The above described is only a preferred embodiment of the present invention, be not intended to limit the scope of the present invention, Therefore the changes or modifications that claim under this invention and specification are done in every case, it all should belong to the range that the invention patent covers Within.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于机器视觉相机图像处理的钢坯定位方法及应用

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!