CN101546432B - Method and device for acquiring image deviation position - Google Patents

Method and device for acquiring image deviation position Download PDF

Info

Publication number
CN101546432B
CN101546432B CN2009101353917A CN200910135391A CN101546432B CN 101546432 B CN101546432 B CN 101546432B CN 2009101353917 A CN2009101353917 A CN 2009101353917A CN 200910135391 A CN200910135391 A CN 200910135391A CN 101546432 B CN101546432 B CN 101546432B
Authority
CN
China
Prior art keywords
scale line
image
line transect
transect
tomographic image
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
CN2009101353917A
Other languages
Chinese (zh)
Other versions
CN101546432A (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.)
Shenzhen Ipanel TV Inc
Original Assignee
Shenzhen Ipanel TV Inc
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 Shenzhen Ipanel TV Inc filed Critical Shenzhen Ipanel TV Inc
Priority to CN2009101353917A priority Critical patent/CN101546432B/en
Publication of CN101546432A publication Critical patent/CN101546432A/en
Priority to HK10103257.0A priority patent/HK1136681A1/en
Application granted granted Critical
Publication of CN101546432B publication Critical patent/CN101546432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to image processing technology field, discloses a method and device for inquiring image deviation position. The method comprises: a first scale spline and the second scale spline along Y axis and /or X axis of image are probed, the image being constituted by superposing the upper image and lower image; The first scale spline and the second scale spline are pre-rendered on the upper image and the preset condition is satisfied; position of any one scale spline on the upper image is determined according to the probed first scale spline and the second scale spline; then deviation position of upper image in the lower image can be computed. In the embodiment of the invention, accurate deviation position of upper image in the lower image can be obtained under superposition of upper image and lower image.

Description

Obtain the method and the device of image shift position
Technical field
The present invention relates to technical field of image processing, relate in particular to a kind of method and device that obtains the image shift position.
Background technology
In Auto-Test System, piece image is made of by being layering multiple image often.When last tomographic image and lower image are superimposed and constitute piece image, if last tomographic image and lower image are overlapping fully, then the upper strata edge of image can not form the image boundary on lower image, just there is not deviation post in tomographic image on this moment on lower image, and going up the deviation post of tomographic image on lower image in other words is zero; On the contrary, if last tomographic image and lower image are not overlapping fully, and last tomographic image has dropped on the lower image fully, this moment, the upper strata edge of image will inevitably form the image boundary on lower image, just can obtain the deviation post of tomographic image on lower image as long as obtain the upper strata edge of image in the position of the image boundary that forms on the lower image.
The inventor finds, the position of the image boundary that direct acquisition upper strata edge of image forms on lower image is very difficult sometimes, because if the pattern of last tomographic image and lower image is all very complicated, perhaps pattern is very close, the image boundary that can cause the upper strata edge of image to form on lower image like this is very not obvious, can't accurately obtain the deviation post of tomographic image on lower image.
Summary of the invention
The embodiment of the invention provides a kind of method and device that obtains the image shift position, can obtain the deviation post of tomographic image on lower image exactly under the stacked situation of last tomographic image and lower image.
The embodiment of the invention provides a kind of method of obtaining the image shift position, comprising:
The Y-axis or the X-direction of the image after the stack of edge are surveyed the first scale line transect and the second scale line transect; Image after the described stack is made of the stack of last tomographic image and lower image, and the described first scale line transect and the second scale line transect are pre-rendered on described on the tomographic image, and are parallel to each other; The described first scale line transect and the second scale line transect are used to calculate that tomographic image drops on deviation post on the lower image fully paints the rule lines certainly;
Determine the described first scale line transect and the second scale line transect position according to the described first scale line transect that detects and the second scale line transect at last tomographic image;
According to the position of first scale line transect tomographic image on described and the position of the image of the first scale line transect after described stack, and according to position and second scale line transect tomographic image deviation post in lower image on the position calculation of the image after the described stack of second scale line transect tomographic image on described.
The embodiment of the invention provides a kind of device that obtains the image shift position, comprising:
Detecting module, the Y-axis or the X-direction that are used for the image after the edge superposes are surveyed the first scale line transect and the second scale line transect; Image after the described stack is made of the stack of last tomographic image and lower image, and the described first scale line transect and the second scale line transect are pre-rendered on described on the tomographic image, and are parallel to each other; The described first scale line transect and the second scale line transect are used to calculate that tomographic image drops on deviation post on the lower image fully paints the rule lines certainly;
Determination module is used for determining the described first scale line transect and the second scale line transect position at last tomographic image according to the described first scale line transect that detects and the second scale line transect
Computing module, be used for according to the position of first scale line transect tomographic image on described and the position of the image of the first scale line transect after described stack, and according to position and second scale line transect tomographic image deviation post in lower image on the position calculation of the image after the described stack of second scale line transect tomographic image on described.
The embodiment of the invention is based on image processing techniques, utilizing to draw has the image of scale line transect to drop on the lower image fully as last tomographic image, and superpose with lower image, by the image after the stack is carried out first continuous scale line transect and the detection of the second scale line transect from Y-axis or X-direction, and analyze the first scale line transect and the second scale line transect in the position on the image after the stack and the position on last tomographic image according to result of detection, with the first scale line transect or the second scale line transect in the position on the image after the stack and the position on last tomographic image compare, can obtain tomographic image and drop on deviation post on the lower image.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use among the embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
A kind of method flow diagram that obtain image shift position of Fig. 1 for providing in the embodiment of the invention;
A kind of method flow diagram that obtain image shift position of Fig. 2 for providing in the embodiment of the invention;
The last tomographic image synoptic diagram of scale line transect is provided for the drafting that provides in the embodiment of the invention Fig. 3;
A kind of structure drawing of device that obtain image shift position of Fig. 4 for providing in the embodiment of the invention;
The structural representation of a kind of detecting module of providing in the embodiment of the invention is provided Fig. 5;
The structural representation of a kind of determination module of providing in the embodiment of the invention is provided Fig. 6.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Embodiment one:
See also Fig. 1, a kind of method flow diagram that obtain image shift position of Fig. 1 for providing in the embodiment of the invention.As shown in Figure 1, this method can comprise:
Step 101: Y-axis and/or X-direction along image are surveyed the first scale line transect and the second scale line transect; This image is made of the stack of last tomographic image and lower image, and this first scale line transect and the second scale line transect are pre-rendered on this on tomographic image, and satisfy default distributional condition;
Wherein, the first above-mentioned scale line transect and the second scale line transect are pre-rendered on this on tomographic image, and satisfy default distributional condition and be specifically as follows:
The first above-mentioned scale line transect and the second scale line transect are pre-rendered on last tomographic image, be parallel to each other and the spacing correspondence of the first scale line transect and the second scale line transect the default first scale line transect and the second scale line transect distance that arrives the reference position of tomographic image on this respectively.
That is to say that the spacing of the first scale line transect and the second scale line transect is corresponding with the distance that the first scale line transect and the second scale line transect arrive the reference position that goes up tomographic image.Need to prove, according to inventive concept, the spacing of two continuous scale line transects is inequality arbitrarily, and the distance that pairing two the continuous scale line transects of this spacing arrive the reference position of tomographic image on this is inequality with the distance that other two continuous arbitrarily scale line transects arrive the reference position of tomographic image on this.
The method that provides according to the embodiment of the invention, can be before step 101 on the image that constitutes of tomographic image and lower image stack carry out binary conversion treatment, the purpose of binary conversion treatment is in order to make the detection first scale line transect and the second scale line transect simpler, need not to be subjected to the influence of brightness of image and color.
The method that provides according to the embodiment of the invention, can be after this image of binary conversion treatment, obtain a plurality of reference point locations along the X-direction of image, each reference point location satisfies the difference greater than the height of above-mentioned lower image and last tomographic image, and less than the condition of the non-scale line transect region height of the above-mentioned last tomographic image of presetting; And/or
Can obtain a plurality of reference point locations along the Y direction of image, each reference point location satisfies the difference greater than the width of above-mentioned lower image and last tomographic image, and less than the condition of the non-scale line transect peak width of the above-mentioned last tomographic image of presetting.
Preferably, in the above-mentioned steps 101 along the Y-axis of image and/or X-direction is surveyed the first scale line transect and the second scale line transect specifically can comprise:
Each reference point location that obtains from X-direction, along the Y direction of image one by one the pixel traversal detect the pixel gray-scale value, when gray-scale value is zero, stop to detect, and be that the ordinate of zero picture element is stored in first array with gray-scale value;
The maximum ordinate of statistics occurrence number from first array is as the height of article one scale line transect on this image;
Then, be zero picture element from gray-scale value, continue along the Y direction of image one by one the pixel traversal detect the pixel gray-scale value, when gray-scale value is zero, stop to detect, and be that the ordinate of zero picture element is stored in second array with gray-scale value;
The maximum ordinate of statistics occurrence number from second array is as the height of second scale line transect on described image;
And/or, each reference point location that obtains from Y direction, along the X-direction of image one by one the pixel traversal detect the pixel gray-scale value, when gray-scale value is zero, stop to detect, and be that the horizontal ordinate of zero picture element is stored in first array with gray-scale value;
The maximum ordinate of statistics occurrence number from first array is as the width of article one scale line transect on described image;
Then, be zero picture element from gray-scale value, continue along the X-direction of image one by one the pixel traversal detect the pixel gray-scale value, when gray-scale value is zero, stop to detect, and be that the horizontal ordinate of zero picture element is stored in second array with gray-scale value;
The maximum horizontal ordinate of statistics occurrence number from second array is as the width of second scale line transect on described image.
Step 102: determine the position of any scale line transect at last tomographic image according to the first scale line transect that detects and the second scale line transect;
Wherein, step 102 can comprise:
1) spacing of the calculating first scale line transect and the second scale line transect;
Wherein, the spacing of the first scale line transect and the second scale line transect can be the first scale line transect and the height of the second scale line transect or the spacing between the width.
2) arrive the corresponding relation of distance of the reference position of above-mentioned last tomographic image respectively according to the spacing of the first default scale line transect and the second scale line transect and the first scale line transect and the second scale line transect, determine the height or the width of first scale line transect tomographic image on above-mentioned, perhaps determine the height or the width of described second scale line transect tomographic image on above-mentioned.
Step 103: position and this scale line transect according to this scale line transect tomographic image on this that detects are somebody's turn to do the deviation post of tomographic image in lower image in the position calculation of this image.
Wherein, step 103 can comprise:
Calculate the first scale line transect height on the tomographic image and difference of the height of the first scale line transect on above-mentioned image on above-mentioned; And/or, calculate the height of second scale line transect tomographic image on above-mentioned and the difference of the height of the second scale line transect on above-mentioned image;
Perhaps, calculate the first scale line transect width on the tomographic image and difference of the width of the first scale line transect on above-mentioned image on above-mentioned; And/or, calculate the width of second scale line transect tomographic image on above-mentioned and the difference of the width of the second scale line transect on above-mentioned image, thereby obtain to go up the deviation post of tomographic image in lower image.
Need to prove; the embodiment of the invention is just for the ease of introducing; only survey the first continuous scale line transect and the second scale line transect; it will be appreciated by those skilled in the art that; the number of the scale line transect of drawing on last tomographic image in advance can all belong to protection scope of the present invention greater than two.
The above-mentioned method of obtaining the image shift position that the embodiment of the invention one is provided is described in detail, embodiment of the invention utilization is drawn has the image of scale line transect to drop on the lower image fully as last tomographic image, and superpose with lower image, by the image after the stack is carried out first continuous scale line transect and the detection of the second scale line transect from Y-axis and/or X-direction, and analyze the first scale line transect and the second scale line transect in the position on the image after the stack and the position on last tomographic image according to result of detection, with the first scale line transect or the second scale line transect in the position on the image after the stack and the position on last tomographic image compare, can obtain tomographic image and drop on deviation post on the lower image.
Embodiment two:
See also Fig. 2, a kind of method flow diagram that obtain image shift position of Fig. 2 for providing in the embodiment of the invention.The rate respectively of the above tomographic image of the embodiment of the invention is 640 * 526, and the resolution of lower image is 704 * 576 for example, introduces the method for obtaining the image shift position that the embodiment of the invention provides.As shown in Figure 2, this method can comprise:
Step 201: on last tomographic image, draw the scale line transect in advance;
Wherein, so-called scale line transect is meant and is used to calculate that tomographic image drops on deviation post on the lower image fully paints the rule lines certainly.
The embodiment of the invention is that white background picture with 640 * 526 sizes is as last tomographic image, at first from the top of last tomographic image down direction be initial with the position of height 100 pixels, draw 8 horizontal black lines with (left and right 100 pixel width of respectively staying) in 2 the high spacing of n (wherein, 1<=n<=8) the power residence row successively;
In like manner, the position from the Far Left of last tomographic image toward right with left width 100 pixels is initial, occupies in the row (upper and lower 100 pixel width of respectively staying) with the wide spacing of 2 n (wherein, 1<=n<=8) power successively and draws 8 perpendicular black lines;
So just formed a secondary last tomographic image that the scale line transect is arranged of drawing, seen also Fig. 3, the drafting that Fig. 3 provides for the embodiment of the invention has the synoptic diagram of the last tomographic image of scale line transect.As shown in Figure 3, scale line transect position description is as follows:
The scale line transect from top to bottom, from left to right respectively with 21 power (=2) of relative 100 pixels skew, 22 powers (=4), 23 powers (=8), 24 powers (=16), 25 powers (=32), 26 powers (=64), 27 powers (=128), 28 powers (=256); Wherein, horizontal direction, vertical direction are respectively drawn 8 scale line transects in the last tomographic image shown in Figure 3, and 100 pixel back gauges zone in upper and lower, left and right is non-scale line transect zone, and middle scale line transect interlaced area 440x326 is scale line transect zone.
Step 202: the image after last tomographic image and the lower image stack is carried out binary conversion treatment;
The purpose of binaryzation is simpler in order to allow the detection of follow-up scale line transect to image handle, and is not subjected to the influence of brightness of image and color.
The factor that influences the binaryzation result mainly is the value of intermediate grey values (brightness value), if the value of gray-scale value is on the low side, then the black line transect after the binaryzation can be lighter thin, and the sharpness between the line transect can be obvious more; If the value of gray-scale value is higher, then more overstriking is dense for the black line transect after the binaryzation, and the sharpness that the scale line transect is only seen can be fuzzy more.
Step 203: obtain a plurality of reference point locations along the X-direction of image;
Wherein, a plurality of reference point locations satisfy greater than the difference of the height of above-mentioned lower image and last tomographic image and less than the condition of the non-scale line transect region height of the above-mentioned last tomographic image of presetting.
The last tomographic image that provides according to the embodiment of the invention and the size of lower image because last tomographic image drops on the lower image fully, so go up the deviation post scope of the relative lower image of tomographic image are: 0<=go up skew<=64; 0<=left avertence moves<=and 50.Wherein, 64 is the difference of height 704 with the height 640 of last tomographic image of lower image, and 50 is the difference of width 576 with the width 526 of last tomographic image of lower image.
Promptly be, the height of a plurality of reference point locations greater than the width of 60 pixels and/or a plurality of reference point locations greater than 50 pixels, and less than the height condition in the non-scale line transect zone of 100 pixels.The height in the non-scale line transect zone of 100 pixels described here comprises, descends a left side, the height in right non-scale line transect zone.Wherein, image 80 pixel locations after the embodiment of the invention smart stacking can satisfy the condition of reference point location needs as reference point location.
Step 204: a plurality of reference points that obtain with X-direction begin, and survey article one scale line transect along Y direction, obtain the height value of article one scale line transect;
Suppose, the embodiment of the invention is 30 from the number of a plurality of reference points that X-direction is obtained, then travel through this 30 reference point, successively from each reference point, along on the Y direction one by one pixel traversal detect the pixel gray-scale value, be 0 pixel up to having run into gray-scale value, the ordinate (height value) of this pixel is stored in first array, when adopting detection to finish for 30, first array is filled up like this; For example: first array=452,381,382,451,382,382,382,382,452,382,382,382,382,383,382,382,382,452,382,382,381,382,382,382,382,382,383,382,382,382};
Statistics occurrence number maximum ordinate is 382 from first array, then with ordinate 382 as the height value of article one scale line transect on this image.
Step 205: continue to survey second scale line transect, obtain the height value of second scale line transect along Y direction;
The gray-scale value of storing since first array is zero picture element, continuation along the Y direction of image one by one the pixel traversal detect the pixel gray-scale value, up to having run into gray-scale value is 0 pixel, the ordinate (height value) of this pixel is stored in second array, when adopting detection to finish for 30, second array is filled up like this; For example:
Second array=and 451,254,254,450,254,254,255,254,451,254,254,255,254,254,254,253,255,451,254,254,253,254,254,254,254,254,253,254,254,254};
Statistics occurrence number maximum ordinate is 254 from second array, then with ordinate 254 as the height value of second scale line transect on this image.
Step 206: calculate the spacing of article one scale line transect and second scale line transect, the Y direction deviation post of tomographic image on lower image in the reckoning.
Wherein, by above-mentioned steps 203 and step 204 as can be known, article one, the height value of scale line transect on image is 382, and the height value of second scale line transect on image is 254, so the spacing of article one scale line transect and second scale line transect is: 382-254=128.
The rule of the scale line transect of drawing on the tomographic image in the utilization is determined article one scale line transect or the position of second scale line transect on last tomographic image.
See also following table 1, table 1 expression is plotted in the layout rule of tomographic image subscript chi line transect.
Figure GDA0000068556960000081
Table 1
Can learn that from above-mentioned table 1 scale line transect pre-rendered on the tomographic image has such layout rule:
1) be that spacing between the scale line transect of any two 2 n location can not repeat;
2) there is relation in the spacing between the scale line transect of n time any two 2 location:
2 n-2 m>=2 (n-1)(m>=0,n>=1,m<n)
According to above rule, can when calculating the spacing of article one scale line transect and second scale line transect, learn article one scale line transect and the position of second scale line transect on last tomographic image easily.
In embodiments of the present invention, the spacing of article one scale line transect and second scale line transect is 128, according to above-mentioned table 1, can know that this is 2 8The scale line transect and 2 of sign 7Spacing between the scale line transect of sign.Thereby know that article one scale line transect is 2 8The scale line transect of sign, second scale line transect is 2 7The scale line transect of sign.
In addition, know 2 again 8Article one scale line transect of sign is gone up tomographic image height topmost relatively: 2 8+ 100; 2 7The second scale line transect of sign is gone up tomographic image height topmost relatively: 2 7+ 100; So, go up tomographic image height (2 topmost relatively according to article one scale line transect 8+ 100) and the position 382 in the image of article one scale line transect after stack, perhaps go up tomographic image height (2 topmost relatively according to second scale line transect 7+ 100) and the position 254 in the image of second scale line transect after stack, can obtain the deviation post that tomographic image drops on the lower image is: deviation post=382-(2 8+ 100)=26, perhaps, deviation post=254-(2 7+ 100)=26.
Present embodiment is just introduced from obtain the deviation post of tomographic image on lower image in Y direction, it will be appreciated by those skilled in the art that, the method that provides according to the embodiment of the invention, equally can be from obtaining the deviation post of tomographic image on lower image on the X-direction, since on the X-direction to obtain tomographic image identical at deviation post on the lower image and the method for obtaining the deviation post of tomographic image on lower image on Y direction, so present embodiment is not given unnecessary details at this.
In addition, present embodiment is the truth of a matter with 2 only, introduces the layout rule that is plotted in the scale line transect on the tomographic image that present embodiment provides, and can also be 3,4 by changing index 2,5...... etc. is greater than 2 rational number, mainly satisfies: a n-a m>=a (n-1)(wherein, a>=2, m>=0, n>=1, m<n) get final product, present embodiment does not limit.
The above-mentioned method of obtaining the image shift position that the embodiment of the invention two is provided is described in detail, embodiment of the invention utilization is drawn has the image of scale line transect to drop on the lower image fully as last tomographic image, and superpose with lower image, by the image after the stack is carried out first continuous scale line transect and the detection of the second scale line transect from Y direction, and analyze the first scale line transect and the second scale line transect in the position on the image after the stack and the position on last tomographic image according to result of detection, with the first scale line transect or the second scale line transect in the position on the image after the stack and the position on last tomographic image compare, can obtain tomographic image and drop on deviation post on the lower image.
Embodiment three:
See also Fig. 4, a kind of structural representation that obtains the device of image shift position that Fig. 4 provides for the embodiment of the invention.As shown in Figure 4, this device can comprise:
Detecting module 401 is used for surveying the first scale line transect and the second scale line transect along the Y-axis and/or the X-direction of image; This image is made of the stack of last tomographic image and lower image, and the first scale line transect and the second scale line transect are pre-rendered on above-mentioned on the tomographic image, and satisfy default layout rule;
Preferably, the first scale line transect and the second scale line transect satisfy default layout rule and comprise: the first scale line transect and the second scale line transect are parallel to each other, and the default first scale line transect and the second scale line transect of the spacing of the first scale line transect and second scale line transect correspondence arrives the above-mentioned distance that goes up the reference position of tomographic image respectively.
Particularly, the first scale line transect and the second scale line transect satisfy default layout rule can be with shown in the table 1 in the foregoing description two, and present embodiment is no longer repeated at this.
Determination module 402 is used for determining the position of any scale line transect at last tomographic image according to the first scale line transect and the second scale line transect that detect;
Computing module 403 is used for according to tomographic image on the position of this scale line transect of detecting tomographic image on above-mentioned and the position calculation of this scale line transect at this image at the deviation post of lower image.
Preferably, the device that provides of the embodiment of the invention can also also comprise:
Processing module 404 is used for before 401 pairs of this image detection first scale line transects of above-mentioned detecting module and the second scale line transect this image being carried out binary conversion treatment.
Preferably, the device that provides of the embodiment of the invention can also also comprise:
Acquisition module 405, be used for before 401 pairs of this image detection first scale line transects of above-mentioned detecting module and the second scale line transect, obtain a plurality of reference point locations along the X-direction of this image, this reference point location satisfies the difference greater than the height of above-mentioned lower image and last tomographic image, and less than the condition of the non-scale line transect region height of the above-mentioned last tomographic image of presetting; And/or
Obtain a plurality of reference point locations along the Y direction of this image, this reference point location satisfies the difference greater than the width of above-mentioned lower image and last tomographic image, and less than the condition of the non-scale line transect peak width of the above-mentioned last tomographic image of presetting.
See also Fig. 5, the structural representation of a kind of detecting module that Fig. 5 provides for the embodiment of the invention.As shown in Figure 5, described detecting module 401 comprises:
Traversal detection sub-module 4011, be used for each reference point location of obtaining from X-direction, along the Y direction of image one by one the pixel traversal detect the pixel gray-scale value, when gray-scale value is zero, stop to detect, and be that the ordinate of zero picture element is stored in first array with gray-scale value;
Statistics submodule 4012, user and the maximum ordinate of statistics occurrence number from first array are as the height of article one scale line transect on this image;
This travels through detection sub-module 4011, being used for from gray-scale value is zero picture element, continuation along the Y direction of image one by one the pixel traversal detect the pixel gray-scale value, when gray-scale value is zero, stop to detect, and be that the ordinate of zero picture element is stored in second array with gray-scale value;
This adds up submodule 4012, is used for from the maximum ordinate of second array statistics occurrence number, as the height of second scale line transect on this image.
Perhaps, above-mentioned traversal detection sub-module 4011 is used for each reference point location of obtaining from Y direction, along the X-direction of image one by one the pixel traversal detect the pixel gray-scale value, when gray-scale value is zero, stop to detect, and be that the horizontal ordinate of zero picture element is stored in first array with gray-scale value;
Above-mentioned statistics submodule 4012 is used for from the maximum ordinate of first array statistics occurrence number, as the width of article one scale line transect on described image;
It is zero picture element that above-mentioned traversal detection sub-module 4011 also is used for from gray-scale value, continuation along the X-direction of image one by one the pixel traversal detect the pixel gray-scale value, when gray-scale value is zero, stop to detect, and be that the horizontal ordinate of zero picture element is stored in second array with gray-scale value;
Above-mentioned statistics submodule 4012 also is used for from the maximum horizontal ordinate of second array statistics occurrence number, as the width of second scale line transect on described image.
See also Fig. 6, the structural representation of a kind of determination module that Fig. 6 provides for the embodiment of the invention.As shown in Figure 6, described determination module 402 can comprise:
Calculating sub module 4021 is used to calculate the spacing of the first scale line transect and the second scale line transect;
Determine submodule 4022, be used for arriving respectively the corresponding relation of distance of the reference position of above-mentioned last tomographic image according to the spacing of the default described first scale line transect and the second scale line transect and the first scale line transect and the second scale line transect, determine the height or the width of first scale line transect tomographic image on above-mentioned, perhaps determine the height or the width of second scale line transect tomographic image on above-mentioned.
Alternatively, aforementioned calculation module 403 specifically is used to calculate height or width and the height of the first scale line transect on described image or the difference of width of first scale line transect tomographic image on above-mentioned;
Perhaps, be used to calculate height or width and the height of the second scale line transect on described image or the difference of width of second scale line transect tomographic image on described, thereby obtain the above-mentioned deviation post of tomographic image in lower image of going up.
The above-mentioned device that obtains the image shift position that the embodiment of the invention three is provided is described in detail, embodiment of the invention utilization is drawn has the image of scale line transect to drop on the lower image fully as last tomographic image, and superpose with lower image, by the image after the stack is carried out first continuous scale line transect and the detection of the second scale line transect from Y direction, and analyze the first scale line transect and the second scale line transect in the position on the image after the stack and the position on last tomographic image according to result of detection, with the first scale line transect or the second scale line transect in the position on the image after the stack and the position on last tomographic image compare, can obtain tomographic image and drop on deviation post on the lower image.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of programmed instruction, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM (read-only memory) (ROM), random access device (RAM), magnetic disc or CD.
More than a kind of method and device that obtains the image shift position that the embodiment of the invention provided is described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (6)

1. a method of obtaining the image shift position is characterized in that, comprising:
The Y-axis or the X-direction of the image after the stack of edge are surveyed the first scale line transect and the second scale line transect; Image after the described stack is made of the stack of last tomographic image and lower image, and the described first scale line transect and the second scale line transect are pre-rendered on described on the tomographic image, and are parallel to each other; The described first scale line transect and the second scale line transect are used to calculate that tomographic image drops on deviation post on the lower image fully paints the rule lines certainly;
Determine the described first scale line transect and the second scale line transect position according to the described first scale line transect that detects and the second scale line transect at last tomographic image;
According to the position of first scale line transect tomographic image on described and the position of the image of the first scale line transect after described stack, and according to position and second scale line transect tomographic image deviation post in lower image on the position calculation of the image after the described stack of second scale line transect tomographic image on described.
2. method according to claim 1 is characterized in that, the spacing of the described first scale line transect and the second scale line transect is with respect to described upward described first scale line transect of the reference position of tomographic image and the distance between the second scale line transect.
3. method according to claim 1 and 2 is characterized in that, the Y-axis or the X-direction of described image after stack are surveyed before the first scale line transect and the second scale line transect, and this method also comprises:
Image after the described stack is carried out binary conversion treatment.
4. a device that obtains the image shift position is characterized in that, comprising:
Detecting module, the Y-axis or the X-direction that are used for the image after the edge superposes are surveyed the first scale line transect and the second scale line transect; Image after the described stack is made of the stack of last tomographic image and lower image, and the described first scale line transect and the second scale line transect are pre-rendered on described on the tomographic image, and are parallel to each other; The described first scale line transect and the second scale line transect are used to calculate that tomographic image drops on deviation post on the lower image fully paints the rule lines certainly;
Determination module is used for determining the described first scale line transect and the second scale line transect position at last tomographic image according to the described first scale line transect that detects and the second scale line transect;
Computing module, be used for according to the position of first scale line transect tomographic image on described and the position of the image of the first scale line transect after described stack, and according to position and second scale line transect tomographic image deviation post in lower image on the position calculation of the image after the described stack of second scale line transect tomographic image on described.
5. device according to claim 4 is characterized in that, described device also comprises:
Processing module is used for before the described first scale line transect of image detection and the second scale line transect after described detecting module is to described stack the image after the described stack being carried out binary conversion treatment.
6. device according to claim 4 is characterized in that, the spacing of the described first scale line transect and the second scale line transect is with respect to described upward described first scale line transect of the reference position of tomographic image and the distance between the second scale line transect.
CN2009101353917A 2009-04-28 2009-04-28 Method and device for acquiring image deviation position Active CN101546432B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2009101353917A CN101546432B (en) 2009-04-28 2009-04-28 Method and device for acquiring image deviation position
HK10103257.0A HK1136681A1 (en) 2009-04-28 2010-03-30 Method for obtaining image offset position and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101353917A CN101546432B (en) 2009-04-28 2009-04-28 Method and device for acquiring image deviation position

Publications (2)

Publication Number Publication Date
CN101546432A CN101546432A (en) 2009-09-30
CN101546432B true CN101546432B (en) 2011-10-19

Family

ID=41193552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101353917A Active CN101546432B (en) 2009-04-28 2009-04-28 Method and device for acquiring image deviation position

Country Status (2)

Country Link
CN (1) CN101546432B (en)
HK (1) HK1136681A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905746B (en) * 2012-12-28 2017-02-22 清华大学 Method and device for localization and superposition of sub-pixel-level image offset and video device
CN104361289A (en) * 2014-11-17 2015-02-18 深圳市中兴移动通信有限公司 Method and device for storing pictures
CN112530823B (en) * 2020-10-30 2024-02-06 普冉半导体(上海)股份有限公司 Method for detecting coordinate deviation in electronic bitmap in wafer test process

Also Published As

Publication number Publication date
HK1136681A1 (en) 2010-07-02
CN101546432A (en) 2009-09-30

Similar Documents

Publication Publication Date Title
CN101645091B (en) Image data compression method, pattern model positioning method in image processing, image processing apparatus
CN102509383B (en) Feature detection and template matching-based mixed number identification method
US9242601B2 (en) Method and device for detecting drivable region of road
CN104899892B (en) A kind of quickly star map image asterism extracting method
CN106097360A (en) A kind of strip steel surface defect identification method and device
CN100473141C (en) Image angle detection device and scan line interpolation device having the same
CN103295239A (en) Laser-point cloud data automatic registration method based on plane base images
CN101546432B (en) Method and device for acquiring image deviation position
CN101833644B (en) Correction graph searching method based on dynamic template
US20090180690A1 (en) Image searching apparatus and image searching method
CN103593664B (en) A kind of preprocess method of QR code fault image
AU2020294280A1 (en) Method, apparatus and system for identifying target objects
CN104750837A (en) Visualization method and system for growth type time series data
CN115619791A (en) Article display detection method, device, equipment and readable storage medium
CN108363962A (en) A kind of method for detecting human face and system based on multi-level features deep learning
CN107480710B (en) Feature point matching result processing method and device
CN105957237A (en) Method and device for identifying version of banknote
CN111583191B (en) Light field EPI Fourier transform-based refraction characteristic detection method
CN103136536A (en) System and method for detecting target and method for exacting image features
CN102855619A (en) Rectangle detecting method and device for stamp images
CN104992218A (en) Production line output real-time automatic counting device and counting method thereof
CN105740869A (en) Square operator edge extraction method and system based on multiple scales and multiple resolutions
CN109740337A (en) A kind of method and device for realizing the identification of sliding block identifying code
CN100383809C (en) QR code image sampling and recognition method
CN113538556B (en) Volume measuring device based on IR diagram

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1136681

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: GR

Ref document number: 1136681

Country of ref document: HK