The inclination angle detection method and detecting system of cylindrical lens array
Technical field
The present invention relates to display, imaging field, the inclination angle inspection of the cylindrical lens array used in particular to display device
Survey method and detecting system.
Background technology
With the development of electronic technology, 2D display devices have been difficult to the demand for meeting people, and that arise at the historic moment is 3D
Display device.3D shows and shown compared to 2D have more preferable spatial impression, gives impression on the spot in person.3D shows and divided
For spectacle and the major class of bore hole formula two.Bore hole 3D is mainly used on the portable sets such as public business situations and mobile phone.And be in
With consumer field, display, projector or TV are required to coordinate 3D glasses to use, such as 3D movie theatres.Spectacle 3D technology
In, three kinds of main types can be segmented out again:Aberration formula, polarization type and active-shutter, that is, usually described color point
Method, light point-score and time-sharing procedure.
At present, obtaining relief method has a variety of, wherein during using bore hole 3D Display Techniques, observer is without going through spy
Device processed can directly detect by an unaided eye.This method generally uses the specular 3 D grating of post or parallel lines grating, its theoretical base
Plinth is to coordinate the binocular parallax of people and convergence to form third dimension the refraction of light using 3 D grating.
For cylindrical lens array grating, in industrial production quality control, the inclined angle of cylindrical lens array is ten
Divide important optical parametric, in practical operation, it usually needs after completion integral display is prepared, pass through pattern generator
Specific pattern is generated after lighting could be detected, be calibrated the angle of inclination (referred to as " inclination angle ") of the cylindrical lens array, such as
Fruit inclination angle is undesirable, then can be adjusted by way of some later stages are remedied, but if inclination angle problem is excessively tight
Weight, then can only abandon as defect ware, or spend substantial amounts of energy and manpower to carry out repairing of doing over again.
The content of the invention
The inclination angle detection method and system of the cylindrical lens array used it is an object of the invention to provide display device, to carry
The convenient degree of detection of high dip angle.
In a first aspect, the embodiments of the invention provide the inclination angle detection method of cylindrical lens array, including:
Obtain and halation is shown on primary image, primary image, halation is to irradiate cylindrical lens array by light source and present
On cylindrical lens array surface;
Calculate in primary image, the optimization deflection of halation;
The inclination angle of cylindrical lens array is determined according to the deflection of halation.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the first of first aspect, wherein, step
Rapid to calculate in primary image, the deflection of halation includes:
Window sample is carried out to primary image, to obtain destination sample window;
Calculate the optimization deflection of halation in destination sample window.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of second of first aspect, wherein, step
It is rapid that window sample is carried out to primary image, included with obtaining destination sample window:
According to default step-length and default sampling window size, primary image is traveled through, is adopted with obtaining the first candidate successively
Sample window;Obtain every time after first candidate's sampling window, judge that the first of first current candidate's sampling window refers to evaluation of estimate
Whether meet default condition, if meeting, will current first candidate sampling window as destination sample window, and stopping time
Go through;If it is not satisfied, then obtaining next first candidate sampling window in the way of traversal;First is according to the with reference to evaluation of estimate
The attribute of pixel is worth in one candidate's sampling window.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the third of first aspect, wherein, step
It is rapid that window sample is carried out to primary image, included with obtaining destination sample window:
The search of formula is iterated as follows,
It is enterprising in primary image along the default direction of search according to default step-length using default reference point as starting point
Row traversal formula is searched for, to obtain multiple second candidate sampling windows that this is searched;
The second of each second candidate sampling window is calculated respectively and refers to evaluation of estimate, and second is according to second with reference to evaluation of estimate
The attribute of pixel is worth in candidate's sampling window;
Evaluation of estimate is referred to according to second, judges whether the second candidate's sampling window specified meets the requirements;If so, will then refer to
Second fixed candidate's sampling window if it is not, then adjusting the position of starting point, and re-executes step edge as destination sample window
The default direction of search carries out traversal formula search on primary image.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the 4th of first aspect kind, wherein, step
It is rapid to refer to evaluation of estimate according to second, judge the second candidate's sampling window specified whether meet the requirements including:
The second of second candidate's sampling window that judgement is specified is with reference to evaluation of estimate and another the second candidate sampling window
Whether the difference of the second reference evaluation of estimate exceedes predetermined threshold value;
Or, judge when previous the second reference evaluation of estimate and preceding n times for searching the obtained second candidate's sampling window specified
Whether the difference that search obtains the extreme value in second candidate's sampling window exceedes predetermined threshold value.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the 5th of first aspect kind, wherein, refer to
Second fixed candidate's sampling window is to be carried out along first direction of search on primary image in the resulting window of traversal formula search,
Second with reference to the maximum sampling window of evaluation of estimate;Another the second candidate sampling window is in primary image along second direction of search
It is upper to carry out in the resulting window of traversal formula search, the sampling window of the second reference evaluation of estimate maximum/minimum.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the 6th of first aspect kind, wherein, step
The rapid optimization deflection for calculating halation in destination sample window includes:
The first computing is carried out to destination sample window using the first convolution operator of different directions, and according to the first computing
As a result optimization deflection is determined.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the 7th of first aspect kind, wherein, step
It is rapid to determine that optimization deflection includes according to the result of computing:
If operation result does not meet default requirement, using the second convolution operator of different directions to destination sample window
The second computing is carried out, and optimization deflection is determined according to the result of the second computing;The exponent number of second convolution operator is more than the first volume
The exponent number of integrating.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the 8th of first aspect kind, wherein, make
For cylindrical lens array inclination detecting device, device includes fixed station, light source and image pick-up device, and method also includes:
Cylindrical lens array is fixed on fixed station;
First side using light source in cylindrical lens array irradiates cylindrical lens array, and passes through image pick-up device court in first side
Taken pictures to the direction of cylindrical lens array, to obtain primary image;Light source is spot light.
Second aspect, the embodiment of the present invention additionally provides the system for detecting angle of inclination of cylindrical lens array, including:
Acquisition module, halation is shown for obtaining on primary image, primary image, halation is saturating by light source irradiation post
Lens array and be presented on cylindrical lens array surface;
Computing module, for calculating in primary image, the optimization deflection of halation;
Determining module, the inclination angle for determining cylindrical lens array according to the deflection of halation.
The inclination angle detection method of cylindrical lens array provided in an embodiment of the present invention, make use of direction and the post lens array of halation
This vertical physical characteristic of the length direction of the prism of row grating, carries out the measurement at cylindrical lens array inclination angle, with prior art
In the need for after cylindrical lens array prepares completion completely, could be detected and be demarcated, when detecting inclination angle problem excessively
When serious, it is difficult to which progress, which is remedied, to be compared, and it first obtains the primary image with halation, wherein, halation is irradiated by light source
Cylindrical lens array and be presented on cylindrical lens array surface;Then, the direction according to halation and the prism of cylindrical lens array grating
Vertical this physical characteristic of length direction, first calculate the deflection of halation, then define inclining for cylindrical lens array
Angle, improves the convenient degree for determining inclination angle.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate
Appended accompanying drawing, is described in detail below.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be attached to what is used required in embodiment
Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, therefore is not construed as pair
The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this
A little accompanying drawings obtain other related accompanying drawings.
Fig. 1 shows the basic flow sheet of the inclination angle detection method for the cylindrical lens array that the embodiment of the present invention is provided;
Fig. 2 shows the refined flow chart of the inclination angle detection method for the cylindrical lens array that the embodiment of the present invention is provided;
Fig. 3-6 shows the use different directions of the inclination angle detection method for the cylindrical lens array that the embodiment of the present invention is provided
The result schematic diagram that is calculated same image of convolution operator;
Fig. 7 shows the post lens array that the inclination angle detection method for the cylindrical lens array that the embodiment of the present invention is provided is acted on
The Spatial infrastructure figure of row inclination detecting device.
Fig. 8 shows the halation direction signal of the inclination angle detection method for the cylindrical lens array that the embodiment of the present invention is provided
Figure.
Main element symbol description:
701, fixed station;702, light source;703, image pick-up device;704, cylindrical lens array.
Embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Ground is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Generally exist
The component of the embodiment of the present invention described and illustrated in accompanying drawing can be arranged and designed with a variety of configurations herein.Cause
This, the detailed description of the embodiments of the invention to providing in the accompanying drawings is not intended to limit claimed invention below
Scope, but it is merely representative of the selected embodiment of the present invention.Based on embodiments of the invention, those skilled in the art are not doing
The every other embodiment obtained on the premise of going out creative work, belongs to the scope of protection of the invention.
In correlation technique, Lenticular screen is the technology that bore hole 3D fields are widely adopted, in industrial production quality control
In, the inclined angle of cylindrical lens array is important optical parametric, but is generally required after complete finished product display is generated, and is led to
Cross and specific pattern is generated after pattern generator is lighted could carry out detection demarcation, be unfavorable for procedure inspection and do over again.
For this kind of situation, this application provides a kind of direction that make use of halation and the length of the prism of Lenticular screen
This vertical physical characteristic of direction, the inclination angle detection method of the cylindrical lens array of corresponding formation.
As shown in figure 1, this method comprises the following steps:
S101, obtains and halation is shown on primary image, primary image, and halation is by light source irradiation cylindrical lens array
It is presented on cylindrical lens array surface;
S102, is calculated in primary image, the optimization deflection of halation;
S103, the inclination angle of cylindrical lens array is determined according to the deflection of halation.
In above-mentioned steps S101, it is necessary first to obtain primary image, the primary image is obtained by instant shooting
Arrive.The object of shooting is the surface for the cylindrical lens array for presenting halation, and halation herein is (preferably to put light by light source
Source) be radiated at cylindrical lens array it is enterprising formed by.In order to improve the convenience of shooting, preferably first cylindrical lens array is fixed on
On the support frame specified, then shot again.
Inventor is it is considered that as shown in figure 8, because the straight line where the major axis of halation is always perpendicular to strip post lens
Length direction (grating orientation), it therefore, it can determine the direction of cylindrical lens array, Jin Erke by detecting the direction of halation
Whether there is error with direction and grating alignment that cylindrical lens array is determined with this.
, it is necessary to calculate the deflection of halation in step S102, generally, the cylindrical lens array object of shooting is mainly
Dark-coloured (such as black, Dark grey) is presented, and halation is typically highlighted white, therefore, can be by many in primary image
Kind of mode determines the picture shape of halation, and certain its angle very easy can also be determined.It can such as be carried with prospect of the application
Follow the example of to determine the direction of halation.Specifically, foreground extraction method can prestore in systems first when using, background image is (usual
It is black or Dark grey), the prospect in primary image is determined by the way of primary image and background image are compared afterwards
Image (image i.e. where halation);Afterwards, the profile of halation is determined by the way of marginalisation, then, just according to the wheel
Exterior feature determines the direction of halation.
Such as explanation hereinbefore, always grating is long in strip cylindrical lens array for the straight line where the major axis of halation
Direction is spent, therefore, just can be with the corresponding inclination angle for calculating cylindrical lens array, i.e. post is saturating after the direction of halation is determined
The inclination angle of lens array length direction.
In order to simplify evaluation work, the whole efficiency of system is improved, the specific of step S102 of the above method is held below
Row process is illustrated.As shown in Fig. 2 step is calculated in primary image, the deflection of halation includes:
S1021, carries out window sample, to obtain destination sample window to primary image;
S1022, calculates the optimization deflection of halation in destination sample window.
By using the mode of window sample so that when the optimization deflection of halation is calculated, it is no longer necessary to whole
Open image to be handled, but only destination sample window is handled, alleviate the amount of calculation of system.It should be noted that
Should include the complete image of halation in destination sample window, or halation parts of images, comprising image size
The optimization deflection that should be guaranteed that can accurately calculate halation by destination sample window is defined, and then, sampling window
Size should not be excessive, also should not be too small, sampling window it is oversized, then can cause system perform step S1022 when
Amount of calculation is excessive;Sampling window it is undersized, then can cause effectively show effective halation (such as in sampling window
Sampling window is filled up by halation, or main region is filled up by halation);Meanwhile, using undersized sample window
Mouthful come travel through formula to also result in the sampling window determined when being scanned to primary image excessive, and then increase and determine target
The complexity of sampling window.Thus, by the analysis and summary of many experiments, determine that cornerwise length of sampling window should
When meet equation below (in formula, sampling window catercorner length be l, unit be dimensionless pixel count):
Wherein, normalization factor
Φ is the diameter of light source (circular spot light), and L1 (can also be that light source is arrived for the distance at light source to tested surface center
The distance at cylindrical lens array center), L2 be image acquisition units arrive treat center side distance (can also be shooting primary image
Image acquisition units to cylindrical lens array center distance);W be treat lateral width (can also be primary image width or
Length), A is the constant relevant with the dominant wavelength of light source, such as, and for white light source, rule of thumb numerical value is 300mm2, d is light
Grid each cycle width (i.e. periodic width in pitch, cylindrical lens array, the periodic width is typically A and B sums, wherein,
A is the width of a grating, and B is the width in the gap between two adjacent gratings), HRSL is the image for shooting primary image
Collecting unit is in the resolution ratio of specific direction (such as horizontal direction), and HFOV is the image acquisition units for shooting primary image specific
The angle of visual field in direction (such as horizontal direction).
Pass through described above, it is seen then that destination sample window is generally not a unique window, and is satisfactory
One class window.After destination sample window is determined, just destination sample can be calculated according to the image of destination sample window
The optimization deflection of halation in window.
The search of traversal formula can be used by determining the mode of destination sample window, it would however also be possible to employ the way of search more optimized
Scan for, this several ways is illustrated respectively below:
The first, the traversal formula search of optimization, i.e. S1021, step carries out window sample to primary image, to obtain target
Sampling window includes:
According to default step-length and default sampling window size, primary image is traveled through, is adopted with obtaining the first candidate successively
Sample window;Obtain every time after first candidate's sampling window, judge that the first of first current candidate's sampling window refers to evaluation of estimate
Whether meet default condition, if meeting, will current first candidate sampling window as destination sample window, and stopping time
Go through;If it is not satisfied, then obtaining next first candidate sampling window in the way of traversal;First is according to the with reference to evaluation of estimate
The attribute of pixel is worth in one candidate's sampling window.
Above-mentioned steps are got during execution, every time after first candidate's sampling window, just calculate this first
The first of candidate's sampling window refers to evaluation of estimate, and judges whether the first reference evaluation of estimate meets predetermined condition, if full
Foot, then no longer obtain next first candidate sampling window;If be unsatisfactory for, next first candidate sampling window is obtained,
And judge that the first of next first candidate sampling window refers to evaluation of estimate, and judge whether the first reference evaluation of estimate meets pre-
If condition ... until searching satisfactory first candidate sampling window or traveling through complete primary image.If time
Go through after complete primary image, also do not find the first candidate's sampling window for meeting preparatory condition, then waited from whole first
Select and destination sample window is selected in sampling window, the destination sample window now selected is whole first candidate's sampling windows
In first with reference to the maximum sampling window of evaluation of estimate.
Generally, first with reference to evaluation of estimate can be first candidate's sampling window, the gray values of whole pixels it
With or whole pixel gray value average value or the average gray and standard deviation sum of whole pixels,
It can also be the length value for the image that the essentially identical pixel of gray value is continuously constituted.It is, first candidate's sample window
The property value of pixel is commonly referred to as the gray value of pixel in mouthful.
Second, the traversal formula search of deterioration, i.e. S1021, step carries out window sample to primary image, to obtain target
Sampling window includes:
According to default step-length and default sampling window size, primary image is traveled through, is adopted with obtaining multiple first candidates
Sample window (multiple first candidate sampling windows herein should cover each position of primary image);Afterwards from whole first
Destination sample window is selected in candidate's sampling window, the destination sample window now selected is whole first candidate's sample windows
First with reference to the maximum sampling window of evaluation of estimate in mouthful.
Generally, first with reference to evaluation of estimate can be first candidate's sampling window, the gray values of whole pixels it
With or whole pixel gray value average value or the average gray and standard deviation sum of whole pixels,
It can also be the length value for the image that the essentially identical pixel of gray value is continuously constituted.It is, first candidate's sample window
The property value of pixel is commonly referred to as the gray value of pixel in mouthful.
The third, basic non-traversal formula search, i.e. S1021, step carries out window sample to primary image, to obtain mesh
Mark sampling window includes:
The search of formula is iterated as follows,
It is enterprising in primary image along the default direction of search according to default step-length using default reference point as starting point
Row traversal formula is searched for, to obtain multiple second candidate sampling windows that this is searched;
The second of each second candidate sampling window is calculated respectively and refers to evaluation of estimate, and second is according to second with reference to evaluation of estimate
The attribute of pixel is worth in candidate's sampling window;
Evaluation of estimate is referred to according to second, judges whether the second candidate's sampling window specified meets the requirements;If so, will then refer to
Second fixed candidate's sampling window if it is not, then adjusting the position of starting point, and re-executes step edge as destination sample window
The default direction of search carries out traversal formula search on primary image.
Wherein, the default direction of search can be that some direction can also be certain two, multiple directions;Base can be selected
Pixel on the marginal position of this image can also select the pixel on center on primary image as starting point
Point is used as starting point.
Evaluation of estimate is referred to according to second, judges that the step of whether second candidate's sampling window specified meets the requirements there are three kinds
The mode implemented, it is lower to be illustrated facing to three kinds of modes:
Mode 1, judges whether the numerical values recited of the second reference evaluation of estimate meets requirement;
Such a mode is a kind of absolute judgment mode, it is, its core judged is to judge second with reference to evaluation
Some number range whether value reaches, such a judgement is relatively easy.
Mode 2, judges that the second of the second candidate's sampling window specified is sampled with reference to evaluation of estimate with another second candidate
Whether the second of window exceedes predetermined threshold value with reference to the difference of evaluation of estimate;
Such a mode is a kind of relative judgment mode, compared with the first judgment mode, and what it mainly judged is specified
Second candidate's sampling window and another the second candidate sampling window second with reference to evaluation of estimate difference it is whether sufficiently large;Such as
Fruit difference is sufficiently large, then illustrates that second is more with reference to the highlight regions in the larger sampling window of evaluation of estimate, therefore, it can this
Sampling window is used as destination sample window.
Similar, a kind of foundation is provided in mode 2 with two second candidate's sample windows resulting in once traveling through
Mouth is come two obtained by determining then to provide a kind of foundation in the mode of destination sample window, mode 3 in not homogeneous traversal
Second candidate's sampling window determines the mode of destination sample window, and specifically, the implementation process of mode 3 is as follows:
Mode 3, judges when previous the second reference evaluation of estimate and preceding N for searching the obtained second candidate's sampling window specified
Whether the difference that secondary search obtains the extreme value in second candidate's sampling window exceedes predetermined threshold value.
Wherein N is positive integer, it is, in mode 3, what it judged is second candidate sampling that this search is obtained
Whether the second of second candidate's sampling window that window is obtained with a certain before search be enough with reference to the difference of evaluation of estimate
Greatly.
Generally, in mode 2 and 3, the second candidate's sampling window specified is usually this/and certain once searches for gained
To whole sampling windows in second with reference to the maximum sampling window of evaluation of estimate;Corresponding, sampled with another second candidate
Window is usually the sampling window of the second reference evaluation of estimate minimum in the resulting whole sampling windows of this search.
Generally, second with reference to evaluation of estimate can be second candidate's sampling window, the gray values of whole pixels it
With or whole pixel gray value average value, can also be that the essentially identical pixel of gray value is continuously constituted
Image length value.It is, the property value of pixel is commonly referred to as the gray value of pixel in second candidate's sampling window.It is excellent
Choosing, when occupation mode 3, a judgement can also be increased, that is, judge whether N numerical value is more than predetermined threshold value, if
It is, and searches the second of the obtained second candidate's sampling window specified when previous with reference to evaluation of estimate and the search of preceding n times and obtain the
The difference of extreme value in two candidate's sampling windows exceedes predetermined threshold value, it is determined that the second candidate's sampling window specified is conformed to
Ask.
It is preferred that, the second candidate's sampling window specified is to carry out traversal formula on primary image along first direction of search to search
In window obtained by rope, second with reference to the maximum sampling window of evaluation of estimate;Another the second candidate sampling window is along second
The direction of search is carried out on primary image in the window obtained by the search of traversal formula, the second adopting with reference to evaluation of estimate maximum/minimum
Sample window.It is furthermore preferred that first direction of search is mutually perpendicular to second direction of search.
Step S1021 full instance is provided below:
That is, step carries out window sample to primary image, is included with obtaining destination sample window:
The search of formula is iterated as follows,
S1, using default first reference point as starting point, according to default step-length, along first direction of search in primary image
Upper progress traversal formula search, to obtain multiple 3rd candidate's sampling windows that this is searched;And each 3rd time is calculated respectively
The 3rd of sampling window is selected to refer to evaluation of estimate, the 3rd with reference to the gray value that evaluation of estimate is according to pixel in the 3rd candidate's sampling window
Obtain;
S2, using default second reference point as starting point, according to default step-length, along second direction of search in primary image
Upper progress traversal formula search, to obtain multiple 4th candidate's sampling windows that this is searched;And each 4th time is calculated respectively
The 4th of sampling window is selected to refer to evaluation of estimate, the 4th with reference to the gray value that evaluation of estimate is according to pixel in the 4th candidate's sampling window
Obtain;
S3, judges whether objective appraisal value exceedes default threshold value, if exceeding, by multiple 3rd candidate's sampling windows or
A satisfactory sampling window is as destination sample window in multiple 4th candidate's sampling windows, and objective appraisal value is basis
What maximum and the 4th in multiple three references evaluations of estimate were obtained with reference to the maximum value calculation in evaluation of estimate;If being no more than,
The position of starting point is adjusted, and re-executes step S1, S2 and S3.
Wherein, the second reference point and the first reference point are preferably same pixel.Generally, it is elected to be destination sample
3rd ginseng of the sampling window (in multiple 3rd candidate's sampling windows or multiple 4th candidate's sampling windows some) of window
Some threshold value should be exceeded by checking and rating value, or the 3rd is the 3rd of all sampling windows to refer to evaluation of estimate with reference to evaluation of estimate
Middle numerical value maximum.By step S1- step S3, the determination of the higher destination sample window of precision is completed.
The process that implements to step S1022 is illustrated below, i.e., step calculates halation in destination sample window
Optimization deflection includes:
The first computing is carried out to destination sample window using the first convolution operator of different directions, and according to the first computing
As a result optimization deflection is determined.
In general, it is a kind of process of filtering operation to carry out computing using convolution operator, is obtaining primary image (now
Primary image be typically gray matrix image) after, for each pixel of image, calculate its neighborhood territory pixel and filter
The product of the corresponding element of ripple device matrix, is then added up, and is used as the value of the location of pixels.When the corresponding anglec of rotation of convolution operator
Main shaft (length direction of the halation) orientation of α and image is more identical, and the brightness of output image is higher (intensity profile is more concentrated),
With this, it may be determined that the length direction of halation and that rotation angle α are closest, afterwards, using the rotation angle α as halation optimization
Deflection.
In order to improve the precision of computing, step determines that optimization deflection includes according to the result of computing:
If operation result does not meet default requirement, using the second convolution operator of different directions to destination sample window
The second computing is carried out, and optimization deflection is determined according to the result of the second computing;The exponent number of second convolution operator is more than the first volume
The exponent number of integrating.
It is, after the first computing is carried out to destination sample window using the first convolution operator, each can be obtained
The brightness results (being typically the summation of brightness value) of output image corresponding to first convolution operator, if each brightness results
Numerical value does not reach predetermined requirement (numerical value of such as brightness results is too low), or has the numerical value of two brightness results excessively close,
The precision for then illustrating the first convolution operator not enough, now, then should use the convolution operator (the second convolution operator) of high-order again
Calculated.
Specifically, convolution operator is calculated by Two Dimensional Rotating matrix (effect is the direction of change convolution operator) with benchmark convolution
The product of son is obtained, with centre-symmetric properties.In practical operation, the determination of the exponent number and element of benchmark convolution operator, with
Halation is relevant in the intensity distribution function of dispersal direction, and then relevant with Lenticular screen face type function.As with certain general
All over the simplification of meaning, can it not influenceed for grating orientation using the form for being similar to quasi- one-dimensional gaussian profile or Sinc functions
The measure at angle.Such as, behind rotate counterclockwise α angles, a kind of typical convolution operator is:
Wherein
A, σ H, σ V are constant, for Lenticular screen σ V<<σ H and σ H are inversely proportional with raster pitch.
Another calculation is that operational form is identical,Wherein A, p, q are constant.
Generally, grating orientation angle is still the method for seeking extreme value using traversal search, and hunting zone is pi/2-α
Max~pi/2-α min (number range now is empirical value, or perhaps during product design a error range value), herein
In the range of often obtain a new operator, to halation image array carry out convolutional filtering computing, with all GTGs be more than setting threshold
The average value (one kind of operation result) of the pixel of value is evaluation function.The convolution operator that convolutional calculation needs is by above formula
Provide, wherein variable is exactly direction angle alpha, remaining is constant.
The example of several different directions convolution is provided below, as seen in figures 3-6, in figure, left side 5*5 light spot image is fortune
The gray-value image of destination sample window before calculation, right side 5*5 light spot image is the gray scale of the destination sample window after computing
It is worth image, middle 3*3 matrix is the image of the convolution operator of different directions.
By average it is recognized that higher using the average of the gray-value image calculated of the convolution operator in Fig. 4,
It is, the direction of sampling window and the convolution operator is more suitable for.By this several figure it can also be seen that, exponent number be 3*3 volume
Integrating, in some cases, possibly can not calculate satisfactory result (precision is inadequate), at this point it is necessary to improve volume
The exponent number of integrating, and recalculate.
In addition to above-mentioned use convolution operator is asked for optimizing the method for deflection, other method can also be used to ask for,
Such as image is completed from background after segmentation, and all standing spot area is gone with minimum ellipse, the method for calculating transverse orientation;
Or further extract after skeleton, calculate method of least-square deviation of point and different angle straight line, etc. on skeleton.With this
A little methods are compared, and have more stability with the method for convolution operator, it is not easy to influenceed (such as, above-mentioned two by pretreating effect
In kind of control methods, due to image acquisition units signal to noise ratio, when cut zone or skeleton occur compared with multiple-limb, precision
It can be remarkably decreased).In addition, for less convolution kernel (such as above-mentioned 3*3 operator), it is right due to being indifference processing pixel-by-pixel
Logical order dependence is small, the above-mentioned easy parallelization of convolution algorithm, be more convenient for moving to hardware processing platform (GPU, FPGA or
ASIC faster processing speed) is reached, this is particularly important for the image procossing of high-resolution.
Several primary objects of the present invention are this concludes the description of, below, said for the process for obtaining primary image
It is bright.
As shown in fig. 7, method provided herein acts on cylindrical lens array inclination detecting device, device includes fixing
Platform 701, light source 702 and image pick-up device 703, method also includes:
Cylindrical lens array 704 is fixed on fixed station 701;
Cylindrical lens array 704 is irradiated in the first side of cylindrical lens array 704 using light source 702, and it is logical in first side
The direction for crossing image pick-up device 703 towards cylindrical lens array 704 is taken pictures, to obtain primary image;Light source 702 is spot light 702.
Wherein, light source 702 preferably uses less approximate spot light rather than the expansion light source (line of light source 702 of light-emitting area
Degree arrives the distance of target to be measured much smaller than it), it is non-to reduce width and light source 702 itself of the light source 702 in halation transverse direction
Influence of the uniformity to test.Specifically, when taking pictures, light source 702 and image pick-up device 703 are positioned at the same side of cylindrical lens array 704.
Before step S101 is performed, if primary image is undesirable, adaptability should be carried out to primary image
Processing, the processing of adaptability includes following one or more (which can use according to concrete condition selection):Gray processing,
Size normalization, illumination equalization.
Inclination angle detection method with foregoing cylindrical lens array is corresponding, and present invention also provides the inclination angle of cylindrical lens array
Detecting system, including:
Acquisition module, halation is shown for obtaining on primary image, primary image, halation is saturating by light source irradiation post
Lens array and be presented on cylindrical lens array surface;
Computing module, for calculating in primary image, the optimization deflection of halation;
Determining module, the inclination angle for determining cylindrical lens array according to the deflection of halation.
It is preferred that, computing module includes:
Sampling unit, for carrying out window sample to primary image, to obtain destination sample window;
Computing unit, the optimization deflection for calculating halation in destination sample window.
It is preferred that, sampling unit is further used for:
According to default step-length and default sampling window size, primary image is traveled through, is adopted with obtaining the first candidate successively
Sample window;Obtain every time after first candidate's sampling window, judge that the first of first current candidate's sampling window refers to evaluation of estimate
Whether meet default condition, if meeting, will current first candidate sampling window as destination sample window, and stopping time
Go through;If it is not satisfied, then obtaining next first candidate sampling window in the way of traversal;First is according to the with reference to evaluation of estimate
The attribute of pixel is worth in one candidate's sampling window.
It is preferred that, sampling unit includes:
Subelement is searched for, for using default reference point as starting point, according to default step-length, along the default direction of search
Traversal formula search is carried out on primary image, to obtain multiple second candidate sampling windows that this is searched;
Computation subunit, evaluation of estimate, the second reference are referred to for calculating the second of each second candidate sampling window respectively
Evaluation of estimate is worth to according to the attribute of pixel in second candidate's sampling window;
Judgment sub-unit, for referring to evaluation of estimate according to second, judges whether the second candidate's sampling window specified meets
It is required that;If so, then using second specified candidate's sampling window as destination sample window, if it is not, the position of starting point is then adjusted,
And retriggered search subelement work.
It is preferred that, judgment sub-unit is further used for:
The second of second candidate's sampling window that judgement is specified is with reference to evaluation of estimate and another the second candidate sampling window
Whether the difference of the second reference evaluation of estimate exceedes predetermined threshold value;
Or, judge when previous the second reference evaluation of estimate and preceding n times for searching the obtained second candidate's sampling window specified
Whether the difference that search obtains the extreme value in second candidate's sampling window exceedes predetermined threshold value.
It is preferred that, the second candidate's sampling window specified is to carry out traversal formula on primary image along first direction of search to search
In window obtained by rope, second with reference to the maximum sampling window of evaluation of estimate;Another the second candidate sampling window is along second
The direction of search is carried out on primary image in the window obtained by the search of traversal formula, the second adopting with reference to evaluation of estimate maximum/minimum
Sample window.
It is preferred that, computing unit includes:
First convolution computing unit, first is carried out for the first convolution operator using different directions to destination sample window
Computing, and optimization deflection is determined according to the result of the first computing.
It is preferred that, computing unit also includes:
Second convolution computing unit, for when operation result does not meet default require, then using the of different directions
Two convolution operators carry out the second computing to destination sample window, and determine optimization deflection according to the result of the second computing;Second
The exponent number of convolution operator is more than the exponent number of the first convolution operator.
It is preferred that, system provided herein acts on cylindrical lens array inclination detecting device, and device includes fixing
Platform, light source and image pick-up device, method also include:
Cylindrical lens array is fixed on fixed station;
First side using light source in cylindrical lens array irradiates cylindrical lens array, and passes through image pick-up device court in first side
Taken pictures to the direction of cylindrical lens array, to obtain primary image;Light source is spot light.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
, can be with several embodiments provided herein, it should be understood that disclosed systems, devices and methods
Realize by another way.Device embodiment described above is only schematical, for example, the division of the unit,
It is only a kind of division of logic function, there can be other dividing mode when actually realizing, in another example, multiple units or component can
To combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or beg for
The coupling each other of opinion or direct-coupling or communication connection can be by some communication interfaces, device or unit it is indirect
Coupling is communicated to connect, and can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.
If the function is realized using in the form of SFU software functional unit and is used as independent production marketing or in use, can be with
It is stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially in other words
The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, including some instructions are to cause a computer equipment (can be individual
People's computer, server, or network equipment etc.) perform all or part of step of each of the invention embodiment methods described.
And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention described should be defined by scope of the claims.