CN108628061A - A kind of adaptive Atomatic focusing method of industrial camera and device - Google Patents

A kind of adaptive Atomatic focusing method of industrial camera and device Download PDF

Info

Publication number
CN108628061A
CN108628061A CN201810425023.5A CN201810425023A CN108628061A CN 108628061 A CN108628061 A CN 108628061A CN 201810425023 A CN201810425023 A CN 201810425023A CN 108628061 A CN108628061 A CN 108628061A
Authority
CN
China
Prior art keywords
industrial camera
focusing
image
pulse
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810425023.5A
Other languages
Chinese (zh)
Other versions
CN108628061B (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.)
Luster LightTech Co Ltd
Original Assignee
Luster LightTech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Luster LightTech Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN201810425023.5A priority Critical patent/CN108628061B/en
Publication of CN108628061A publication Critical patent/CN108628061A/en
Application granted granted Critical
Publication of CN108628061B publication Critical patent/CN108628061B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B13/00Viewfinders; Focusing aids for cameras; Means for focusing for cameras; Autofocus systems for cameras
    • G03B13/32Means for focusing
    • G03B13/34Power focusing
    • G03B13/36Autofocus systems
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • G02B7/36Systems for automatic generation of focusing signals using image sharpness techniques, e.g. image processing techniques for generating autofocus signals

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Optics & Photonics (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)
  • Focusing (AREA)

Abstract

A kind of adaptive Atomatic focusing method of industrial camera provided by the present application and device, are related to test technique automatic field.Including:It keeps industrial camera mobile axis constant, moves freely industrial camera, multi collect benchmark screen image;The definition values for calculating each benchmark screen image select definition values maximum benchmark screen image position, as to focus layer β, extract about the information to benchmark screen image at focus layer β, and be stored as Template Information;Index table information is created based on Template Information;Mobile industrial camera acquires screen image to be detected, and screen image information to be detected and index table information are carried out comparison judgement;According to the adaptive auto-focusing of judging result.This method focusing is simple, and focusing speed is fast, and high robust adapts to the variation of extraneous illumination condition, and to the LCD screen of different machines, the screen of different process sections adapts to, and accuracy of detection is high, can improve the degree of automation of detection device, improves working efficiency.

Description

A kind of adaptive Atomatic focusing method of industrial camera and device
Technical field
This application involves test technique automatic field more particularly to a kind of adaptive Atomatic focusing method of industrial camera and Device.
Background technology
As electronic product function, type are continuously increased, LCD screen (Liquid Crystal Display, liquid crystal display Device) demand be also continuously increased, while the requirement to LCD screen is also higher and higher, this just needs strictly to examine LCD screen It surveys, to ensure that screen function reaches requirement.Current all kinds of detection devices mostly use industrial camera and carry out auxiliary detection, industry The degree of automation of detection device can be improved in camera, and the design of existing industrial camera is generally using the searching algorithm of hill climbing as base Plinth, hill climbing are guided using heuristic information, and heuristic information includes initial point position, heuristic function, and search is made constantly to advance, And eventually find optimal searching position.
The detailed process of hill climbing is:Initial position is set, uses a larger fixed step size in one direction first Advance, often take a step forward, read an image information, calculates image definition, the image clarity values being calculated every time are all It to be compared with previous image clarity values, to judge moving direction.Such as the definition values that n-th image calculates For Qn, the definition values that (n+1)th image calculates are Qn+1If Qn+1More than Qn, then prolong set direction and moves on, until certain Image clarity values Qn+1Less than or equal to Qn, change direction of advance at this time, advance in the opposite direction, and reduces moving step length, Above procedure is repeated, until image clarity values Q next timem+1Less than or equal to Qm, change moving direction, continue to reduce movement Step-length ... last time searching position is then regarded as optimum search position, that is, position when image is most clear.
Image most clear position is found using hill climbing, needs multi collect image back and forth, collecting quantity is more, take compared with It is long.And it is affected by external condition using hill climbing, such as when light changes, focusing curve is possible to occur false Wave crest, i.e. local maximum, influence search result at this time so that search result rests at local maximum, causes error.It is existing There is electronic product that can use different LCD screens, even identical product, in different process sections, the composition of screen is also not quite similar, When external environment such as illumination condition etc. changes, there are larger mistakes for the testing result obtained using hill climbing algorithm Difference.Therefore, the existing industrial camera based on hill climbing searching algorithm needs the position and the coke that constantly adjust industrial camera Away from control external environment condition, this there is, and not strong to the LCD screen fitness of different machines, accuracy of detection is not high, to illumination item Part reaction is sensitive, focus process is complicated, focusing speed is slow, reduces automation degree of equipment, reduces the problems such as equipment beat.
Invention content
This application provides a kind of adaptive Atomatic focusing methods of industrial camera, to solve existing detection device to LCD screen Fitness is not strong, accuracy of detection is not high, to illumination condition reacts sensitive, focus process is complicated, focusing speed is slow, reduces equipment certainly Dynamicization degree reduces the problems such as equipment beat.
A kind of adaptive Atomatic focusing method of industrial camera, the method includes:
S1 keeps industrial camera mobile axis constant, moves freely industrial camera, multi collect benchmark screen image, wherein The benchmark screen is coaxially set with the industrial camera;
S2 calculates the definition values of each benchmark screen image, selects the maximum picture position of the definition values;
The maximum picture position of the definition values is set as to focus layer β by S3, and extraction is about described to the positions focus layer β place Described image information storage is Template Information by the image information for stating benchmark screen;
S4 is based on the Template Information and creates index table information;
S5 moves the industrial camera, screen image to be detected is acquired, by the information of the screen image to be detected and the rope Draw table information and carry out comparison judgement, obtains judging result;
S6 is according to the adaptive auto-focusing of the judging result.
Optionally, before step S3, upon step s 2, further include:
Judge whether the maximum picture position of the definition values is first image or the position of last image,
If it is then adjusting the moving step length of industrial camera repeatedly, step S1, S2 is repeated, until the definition values Maximum picture position reaches convergence between first image and last image;
Otherwise, step S3 is executed.
Optionally, the S4 includes:
S41 delimit γ pulsating spheres centered on the β to focus layer, in its both sides, and select the γ pulsating spheres and appoint One endpoint of meaning is initial position;
S42 at interval of fixed pulse α, acquires the primary benchmark screen image, until described since the initial position Image Acquisition finishes in γ pulsating spheres;
The shape of the benchmark screen image of acquisition is painted prime information and is matched with the Template Information by S43, will match As a result conversion is that shape matches score value;
S44 records shape matching score value according to mobile pulse sequence, forms the index table information.
Optionally, before step S43, after step S42, further include:
In the γ pulsating spheres, all benchmark screen images that the shape matching score value is more than or equal to λ are chosen Information executes step S43, S44, wherein 0<λ≤0.5.
Optionally, subregion is carried out to the index table information, is divided successively from small to large according to shape matching score value To redirect area, slightly focusing area, area of carefully focusing.
Optionally, the S5 includes:
If the shape matching score value is less than λ, judge the industrial camera focusing in no Matching band;
If the shape matches score value between λ to μ, judge that the industrial camera focusing is redirected in described Area;
If the shape matches score value between μ to ν, judge that the industrial camera focusing is in the thick focusing Area;
If the shape matching score value is more than ν, judge that the industrial camera focusing is in the thin focusing area;
Wherein, λ, μ, ν are to normalize numerical value, 0<λ<μ<ν<1.
Optionally, the S6 includes:
If the industrial camera focusing is in the no Matching band, the industrial camera is continued with ζ pulse step sizes It is mobile, until jumping to described any one area redirected in area, area of slightly focusing, thin focusing area;
If the industrial camera focusing redirects area in described, the industrial camera continues to move with φ pulse step sizes It is dynamic, until jumping to any one area in the thick focusing area, thin focusing area;
If the industrial camera focusing is in the thick focusing area, the industrial camera is continued with η pulse step sizes It is mobile, until jumping to thin focusing area;
If the industrial camera focusing is in the thin focusing area, the industrial camera is moved with τ pulse step sizes, Until obtaining the maximum image of the definition values, realizes and successfully focus;
Wherein, ζ>φ>η>τ.
Optionally, the ζ pulse step sizes, φ pulse step sizes, η pulse step sizes, the size of τ pulse step sizes are respectively:
The size of the ζ pulse step sizes is that the index table information pulse moves the 1/2 of total span;
The size of the φ pulse step sizes is that shape described in the index table information matches the maximum picture position of score value The pulse span between picture position when score value is recorded for the first time is matched with the shape;
The size of the η pulse step sizes is the 1/2 of thin focusing area's pulse total span;
The τ pulse step sizes are θ times of the η pulse step sizes, wherein 0<θ<1.
A kind of adaptive automatic focusing mechanism of industrial camera, for executing a kind of adaptive auto-focusing side of industrial camera Method, described device include:
Aobvious panel module:For placing benchmark screen and screen to be detected;
Image capture module:Including the industrial camera, slideway, driving device, the driving device drives the industry Camera moves back and forth along the slideway, and mobile axis is constant;
Computer control module:For controlling the industrial camera, the driving device, and handles, stores the industry The image information of camera acquisition.
Technical solution provided by the present application includes following advantageous effects:
Compared with prior art, the adaptive Atomatic focusing method of a kind of industrial camera provided by the present application, initially sets up base The image information of quasi- screen, and the rule of benchmark screen, feature are explored, concordance list is formed, whether is accelerated as screen to be detected Focusing or successful basis for estimation of whether focusing.For same machine, in the different LCD screens of the same process section, keep work first Industry camera mobile axis is constant, moves freely industrial camera, acquires benchmark screen image, calculates the definition values of each image, selects Go out the maximum picture position of definition values to be set as acquiring focus layer β to the information of benchmark screen image at focus layer β as template letter Otherwise breath, picture position when definition values maximum should need to adjust repeatedly between first image and last image The step-length of whole industrial camera movement, resurveys benchmark screen image information.Index table information, concordance list are created based on Template Information Information according to shape match score value size be divided into multiple and different regions, as the adaptive auto-focusing of screen to be detected redirect according to According to.Specifically, mobile industrial camera acquires screen image to be detected, and screen image information to be detected and index table information is carried out Comparison judges, judges the location of industrial camera region, is located at different zones, using the movement of different pulse step sizes, until Position when clarity maximum is searched out, adaptive auto-focusing is completed, i.e., successfully focuses.For different machines, different processes The LCD screen of section, using same method.The adaptive automatic focusing mechanism of a kind of industrial camera provided by the present application, for executing A kind of adaptive Atomatic focusing method of industrial camera.Adaptive Atomatic focusing method and device provided by the present application, can accelerate work Industry camera focus process improves equipment beat, improves working efficiency.It introduces shape and matches score value, to the LCD screen of different machines, The LCD screen of different process sections, different illumination conditions have stronger adaptability, can focus quickly, in high precision, have Gao Lu Stick is greatly improved the degree of automation of detection device, improves working efficiency.
Description of the drawings
In order to illustrate more clearly of the technical solution of the application, letter will be made to attached drawing needed in the embodiment below Singly introduce, it should be apparent that, for those of ordinary skills, without having to pay creative labor, Other drawings may also be obtained based on these drawings.
Fig. 1 is the flow diagram of the adaptive Atomatic focusing method of industrial camera provided by the embodiments of the present application.
Fig. 2 is articulation curve figure of certain imaging system provided by the embodiments of the present application in different focus range image.
Fig. 3 is that certain imaging system provided by the embodiments of the present application matches score value curve in the shape of different focus range image Figure.
Fig. 4 is index table information visioning procedure figure provided by the embodiments of the present application.
Fig. 5 is adaptive auto-focusing process schematic provided by the embodiments of the present application.
Fig. 6 is the structure diagram of the adaptive Atomatic focusing method device of industrial camera provided by the embodiments of the present application.
Reference sign:1, panel module is shown;2, image capture module;3, computer control module.
Specific implementation mode
Attached drawing 1 is referred to, the figure shows a kind of process steps of the adaptive Atomatic focusing method of industrial camera.
A kind of adaptive Atomatic focusing method of industrial camera, includes the following steps:
Step S1 keeps industrial camera mobile axis constant, moves freely industrial camera, multi collect benchmark screen image, Wherein, benchmark screen is coaxially set with industrial camera.
Benchmark screen, that is, benchmark LCD screen, are coaxially set with industrial camera, and the setting of benchmark screen is protected at aobvious screen position It holds motionless, on the axis, moves back and forth industrial camera, after mobile every time, acquire a secondary standard screen image.
Step S2 calculates the definition values of each benchmark screen image, selects the maximum picture position of definition values.
There is the maximum picture position of a definition values and industrial camera and successfully focus position in each LCD screen It sets.
The maximum picture position of definition values is set as, to focus layer β, extracting about to benchmark at the positions focus layer β by step S3 Image information is stored as Template Information by the image information of screen.
Definition values calculating is carried out to all benchmark screen images of step S1 acquisitions, therefrom selects the maximum figure of definition values Picture and position, the position are set as to focus layer β, and Template Information will be stored as to the image information of benchmark screen at focus layer β.Template is believed The standard information of breath i.e. benchmark LCD screen.
Step S1, S2, S3 are to create benchmark for screen to be detected, that is, LCD screen to be detected, are to the image at focus layer β The maximum image of benchmark LCD screen definition values, this position are also the position that industrial camera is successfully focused, thus, in step S1 In, the range of Image Acquisition is big as possible and intensive, ensures the accuracy to the positions focus layer β.
Searching can realize focus layer β by following steps:
Step T1:By manual operation, a maximum picture position of definition values is found out first, is set as A1
Step T2:With A1Position is risen, and pushes ahead m pulses, with fixed pulse x, in negative direction 2m pulsating spheres, repeatedly Acquire image, wherein the size of fixed pulse x is set according to the precision of detection device.
Step T3:Select the maximum picture position A of definition values2, A2As to the position of focus layer β.
Template Information will be stored as to benchmark LCD screen image information at focus layer β.
It should be noted that obtaining the maximum image of definition values is not limited to method mentioned above, can also pass through The methods of traversal, Fibonacci search methods are realized.
As shown in Fig. 2, being articulation curve figure of certain imaging system in different focus range image, which contains work The complete focus process of industry camera.In the figure, using 0 pulse as boundary, left side negative value represents industrial camera and is gradually distance from aobvious screen position It sets, right side positive value represents industrial camera and moves closer to aobvious screen position, and both sides indicate industrial camera far to focus layer β.0 pulse When, obtained definition values are maximum, are exactly the position to focus layer β at 0 pulse, the benchmark LCD screen image information at this, that is, Template Information.
Step S4 is based on the Template Information and creates index table information.
Index table information be the adaptive auto-focusing of industrial camera whether accelerate judge, whether focus successfully judge according to According to.
The process that the establishment process of index table information learns similar to one, be the feature having to benchmark LCD screen, rule into The process that row is explored and recorded.Near to focus layer β in a certain range, preferably symmetric interval is pressed since the side in section Image is acquired according to fixed pulse α, the image information collected every time carries out shape matching with Template Information, according to matching degree Corresponding shape matching score value is obtained, the sequence to move pulse records each shape matching score value, forms concordance list letter Breath.
The size of score value is matched according to shape comprising the image information at different location, limited amount in index table information, Different zones are divided into, including redirect area, slightly focus area, area of carefully focusing, trizonal matching score value is sequentially increased, matching point Image when value is maximum is included in thin focusing area, i.e., carefully has crest value in focusing area.
The shape that the data that certain index table information records according to Fig. 3 are drawn matches score value curve graph, which contains rope Draw the total data of table information record.Curve shown in Fig. 3 and Fig. 2 dotted lines (redirecting area), dotted line (area of slightly focusing), solid line The region of (area of carefully focusing) composition corresponds to, and shape matches the smaller image of score value, is not recorded in index table information.
Step S5 mobile industrial cameras, acquire screen image to be detected, by the information and index table information of screen image to be detected Comparison judgement is carried out, judging result is obtained.
After index table information creates, the speed of other LCD screen quality testings can be accelerated, quickly complete focusing.
LCD screen to be detected is placed at aobvious screen position first, lights light irradiation apparatus, industrial camera starts to focus.It is mobile Industrial camera acquires screen image to be detected, and screen image information to be detected includes mainly the score value that difference paints element, and comprehensive consideration is different Plain score value is painted, comparison judgement is carried out with index table information, obtains a judging result.
Step S6 is according to the adaptive auto-focusing of judging result.
Judging result is primarily referred to as judging that the region that the focusing of current industrial camera is residing, adaptive auto-focusing refer to calculating Machine control industrial camera redirected with different pulse moving step lengths, can the maximum position of quick lock in LCD screen definition values, Complete focus process.
The adaptive Atomatic focusing method of a kind of industrial camera provided by the present application, initially sets up the graphical information of benchmark screen, Rule, the feature of benchmark screen are explored, concordance list is formed, whether accelerates to focus or whether focus into as screen to be detected The basis for estimation of work(.For same machine, in the different LCD screens of the same process section, keep industrial camera mobile axis not first Become, move freely industrial camera, acquires benchmark screen image, calculate the definition values of each image, it is maximum to select most clear value Picture position is used as to focus layer β, is acquired to the information of benchmark screen image at focus layer β as Template Information, Template Information is namely The standard information of benchmark LCD screen.Index table information is created based on Template Information, index table information matches the big of score value according to shape It is small to be divided into multiple and different regions, redirect foundation as the adaptive auto-focusing of screen to be detected.Specifically, mobile industrial camera, Screen image to be detected is acquired, and image information and index table information are subjected to comparison judgement, judges the location of industrial camera Region, to the image positioned at different zones, using the movement of different pulse step sizes, until position when searching out clarity highest It sets, completes adaptive auto-focusing.For the LCD screen of different machines, different process sections, using same method.
It should be noted that for the LCD screen of same machine, the same process section, need to only a rope be created to benchmark LCD screen Draw table information, i.e. step S1, S2, S3, S4 need to only be executed once in order, and each screen to be detected needs to execute step in order Rapid S5, S6.
Identical method is used for different machines, different process sections.
Adaptive Atomatic focusing method provided by the present application, industrial camera to redirect step number few, industrial camera pair can be accelerated Burnt process improves equipment beat, improves working efficiency.The application introduces shape matching score value and finds focusing position as industrial camera The characteristic quantity set can meet different illumination conditions, and different zones are divided using index table information, simplify focus process, raising pair Burnt speed, to the LCD screen of different machines, the LCD screen of same machine difference process section has stronger adaptability, can quickly, High-precision is focused, and has high robust, greatly improves the degree of automation of detection device, improves working efficiency.
Optionally, before step S3, upon step s 2, further include:
Judge whether the maximum picture position of definition values is first image or the position of last image, if It is, then adjusting the moving step length of industrial camera repeatedly, to repeat step S1, S2, until the maximum picture position of definition values exists Between first image and last image, reach convergence;Otherwise, step S3 is executed.
The maximum picture position of definition values cannot be first image or last image, otherwise be based on template When information creating index table information, the imperfect of index table information can be caused, influences the detection of follow-up LCD screen.
When the definition values maximum of first image or most one image, the moving step length of industrial camera is adjusted repeatedly, Again multi collect benchmark screen image, and definition values are calculated, until obtaining the maximum image of definition values positioned at first figure Between picture and last image, reach convergence.Take this as the standard foundation index table information range it is larger, can preferably adapt to The detection of LCD screen.
Optionally, S4 includes:
Step S41 delimit γ pulsating spheres centered on to focus layer β, in its both sides, and selected γ pulsating spheres are any one A endpoint is initial position.
Step S42 at interval of fixed pulse α, acquires a secondary standard screen image, until γ pulse models since initial position Interior Image Acquisition is enclosed to finish.
The shape of the benchmark screen image of acquisition is painted prime information and is matched with Template Information by step S43, by matching result Conversion is that shape matches score value.
Step S44 records shape matching score value according to mobile pulse sequence, forms index table information.
As shown in figure 4, the figure shows the process steps that index table information creates.
Centered on to focus layer β, the pulses of γ/2 are extended out forward, backward, form the range that a total span is γ pulses.
In γ pulsating spheres, select any one endpoint as the initial position of acquisition benchmark screen image, at interval of solid Determine pulse α and carry out an Image Acquisition, is finished until the image in γ pulsating spheres is collected, the image of each acquisition is believed Breath is matched with Template Information, and shape matching score value is obtained after conversion, finally divides shape matching according to mobile pulse sequence Value is recorded, and index table information is formed.
It is normalization numerical value that shape, which matches score value, and range is between 0~1, and shape matching score value is bigger, and corresponding image is clear Clear angle value is bigger, and distance is closer to the position of focus layer β, that is, closer to success focusing position.
Matching includes painting plain comparison, paints element comparison and refers to that the various of current position image paint element, such as red (R), green (G), blue (B), white (W) etc., the comparison for painting plain value with Template Information record.Wherein, paint element record is that image is included Least unit then only records these three and paints plain value for example, some LCD screens only paint element comprising tri- kinds of R, G, B.
It is each to paint plain value comprehensive consideration, shape matching score value is obtained after conversion, matches shape according to mobile pulse sequence Score value is recorded, and index table information is eventually formed, for screen to be detected acceleration redirects, rapid focus provides foundation.
γ pulses are obtained by two ways, first, being set by empirical value, on the basis of previous detection experience, in advance The size of γ pulses is set, ensures that all images with definition values of benchmark LCD screen have and can be collected, to improve rope Draw the accuracy of table information;Second is that being set by automatic acquisition modes, a valuation γ is set first0Impulse magnitude, in the model If first image of the initial position acquisition enclosed has certain definition values, stops acquiring image, expand γ repeatedly0 Pulse, until first image of acquisition does not have definition values, the γ after expanding at this time0Pulse is the pulse to focus layer β movements Span.
The characteristics of index table information created by this method, is, from initial position to final position, shape matches score value It is gradually reduced after first gradually increasing, with graphical representation as shown in figure 3, the figure is there are a maximum wave crest, i.e. at 0 pulse, Crest location is successful location of focusing, that is, the position to focus layer β.
Optionally, before step S43, after step S42, further include:In γ pulsating spheres, selected shape matches score value All benchmark screen image information more than or equal to λ execute step S43, S44, wherein 0<λ≤0.5.
In order to accelerate focus process, image of the shape matching score value less than λ will not be recorded in index in γ pulsating spheres In table information, therefore, the pulse total span of index table information is always less than γ pulses.In this way, on the one hand ensureing concordance list letter Under the premise of breath is complete, the establishment process of index table information is improved;On the other hand it can accelerate the speed that redirects of screen to be detected, it is real Now quickly positioning, rapid focus.
The shape matching score value of image is too small, represents industrial camera distance to focus layer β farther out, records image letter at this time Breath only can increase detection workload.When shape matching score value is less than λ, image is substantially at very fuzzy state, computer The shape matching score value that program is directly defaulted as present image is 0, and it is successful focusing position that can directly exclude position herein.
Optionally, to index table information carry out subregion, according to shape matching score value be in turn divided into from small to large redirect area, Thick focusing area, area of carefully focusing.
Index table information is divided into according to the size of matching score value and redirects area, slightly focus area, area of carefully focusing, it is corresponding as schemed The regional extent of 2 dotted lines, dotted line, solid line composition, in fig. 2 at 0 pulse, image clarity values are maximum, in figure 3,0 pulse It is maximum to locate shape matching score value.
Optionally, S5 includes:
If shape, which matches score value, is less than λ, judge industrial camera focusing in no Matching band.
If shape matches score value between λ to μ, judge that industrial camera focusing redirects area in described.
If shape matches score value between μ to ν, judge that industrial camera focusing is in the thick focusing area.
If fruit shape shape, which matches score value, is more than ν, then judging that industrial camera focusing is in the thin focusing area.
Wherein, λ, μ, ν are to normalize numerical value, 0<λ<μ<ν<1.
LCD screen to be detected is placed at aobvious screen position, lighting device is lighted, mobile industrial camera starts to focus, acquisition The image information of LCD screen to be detected.
An image is often acquired, present image information is compared with index table information, can quickly position industrial camera Residing regional extent, the setting according to index table information to different zones range moving step length, instruction industrial camera is with difference Step-length is moved, and is successfully focused to quickly realize.
It should be noted that in index table information, the range that shape matches score value is λ to 1, if shape matching score value is small In λ, it is believed that the definition values very little of present image, i.e. image are fringe, it is considered that industrial camera is in no matching Area.
Optionally, S6 includes:
If industrial camera is focused in no Matching band, industrial camera is continued to move to ζ pulse step sizes, until redirecting To described any one area redirected in area, area of slightly focusing, thin focusing area.
If industrial camera focusing is in area is redirected, industrial camera is continued to move to φ pulse step sizes, until redirecting Any one area into the thick focusing area, thin focusing area.
If industrial camera focusing is in thick focusing area, industrial camera is continued to move to η pulse step sizes, until redirecting To thin focusing area.
If industrial camera focusing is in thin focusing area, industrial camera is moved with τ pulse step sizes, until obtaining clearly The maximum image of angle value, realizes and successfully focuses.
Wherein, ζ>φ>η>τ.
As shown in figure 5, the figure shows the overall process of adaptive auto-focusing, crest location is the position to focus layer β.
Image information of the index table information not comprising no Matching band represents work when the shape of image matching score value is less than λ Farther out to the positions focus layer β, then industrial camera needs to be moved using a larger step-length, ability is quickly for industry camera distance The image range with certain definition values is found, focusing is quickly completed.
When industrial camera is in no Matching band, moved with ζ pulse step sizes.Three parts can will be divided into without matching, Respectively P1, P2, P3, in the areas P1, after carrying out mobile with ζ pulse step sizes, industrial camera will jump directly to redirect area; In the areas P2, after carrying out mobile with ζ pulse step sizes, industrial camera will jump to thick focusing area;In the areas P3, walked when with ζ pulses After length carries out movement, industrial camera will jump to thin focusing area.
Industrial camera is moved with φ pulse step sizes in when redirecting area, can will redirect and divide into two parts, respectively For Q1, Q2, in the areas Q1, after carrying out mobile with φ pulse step sizes, industrial camera will jump to thick focusing area;In the areas Q2, After carrying out mobile with φ pulse step sizes, industrial camera will jump to thin focusing area.
When industrial camera is in thick focusing area, moved when with η pulse step sizes, industrial camera will jump to thin focusing Area.
Industrial camera is in thin focusing area, is moved with τ pulse step sizes, finds successfully focusing position.
It should be noted that being more than or equal to 1 with ζ, φ, η, τ pulse step size movement number and being limited number of time.
Using the adaptive Atomatic focusing method, quickly industrial camera can be navigated to that at the positions focus layer β, can save It makes an appointment, improves working efficiency.
Optionally, ζ pulse step sizes, φ pulse step sizes, η pulse step sizes, the size of τ pulse step sizes are respectively:
The size of ζ pulse step sizes is that index table information pulse moves the 1/2 of total span.
The size of φ pulse step sizes is that shape matches score value maximum picture position and matched with shape point in index table information Pulse span when value is recorded for the first time between picture position.
The size of η pulse step sizes is the 1/2 of thin focusing area's pulse total span.
τ pulse step sizes are θ times of η pulse step sizes, wherein 0<θ<1.
When the size of ζ pulse step sizes be index table information pulse move total span 1/2 when, no matter industrial camera be in it is assorted Position, after mobile several ζ pulse step sizes, industrial camera only can to redirect area, area of slightly focusing, thin focusing area redirect.
When the size of φ pulse step sizes is to match the maximum picture position of score value in index table information and match score value first When pulse span between secondary picture position when being recorded, no matter industrial camera be in where, mobile several φ pulses steps After length, industrial camera can only be redirected to thick focusing area, thin focusing area.
When 1/2 that the size of η pulse step sizes is thin focusing area's pulse total span, no matter industrial camera be in where, After mobile several φ pulse step sizes, industrial camera can only be redirected to thin focusing area.
When θ times that τ pulse step sizes are η pulse step sizes, wherein 0<θ<1, in carefully focusing area, τ pulse step sizes can guarantee inspection The precision of measurement equipment quickly navigates to the position to focus layer β.
It should be noted that the movement that this method is mentioned, the movement being not limited in the same direction can move back and forth It is dynamic.
The adaptive Atomatic focusing method of industrial camera provided by the present application can focus, have high robust quickly, in high precision Property, after introducing shape matching score value characteristic quantity, extraneous illumination variation operating mode is adapted to, and to the LCD screen of different machines, same machine The LCD screen of the different process sections of kind adapts to, and improves the degree of automation of detection device, improves working efficiency.
A kind of adaptive automatic focusing mechanism of industrial camera, it is adaptive automatic right for executing a kind of industrial camera Burnt method, as shown in fig. 6, device provided by the embodiments of the present application includes mainly following three modules.Respectively:
Aobvious panel module 1, for placing benchmark screen and screen to be detected.
Image capture module 2, including industrial camera, slideway, driving device, driving device drive industrial camera to come along slideway Return is dynamic, and mobile axis remains unchanged.
Computer control module 3 for controlling industrial camera, driving device, and is handled, the figure of storage industry camera acquisition As information.
The adaptive automatic focusing mechanism of industrial camera provided by the present application, high degree of automation, accuracy of detection is high, can be substantially Degree provides working efficiency.
It should be noted that the terms "include", "comprise" or its any other variant are intended to the packet of nonexcludability Contain, so that article or equipment including a series of elements include not only those elements, but also includes not arranging clearly The other element gone out, or further include for elements inherent to such a process, method, article, or device.Not more In the case of limitation, the element that is limited by sentence "including a ...", it is not excluded that in the process including the element, side There is also other identical elements in method, article or equipment.
The above is only the specific implementation mode of the application, is made skilled artisans appreciate that or realizing this Shen Please.Various modifications to these embodiments will be apparent to one skilled in the art, as defined herein General Principle can in other embodiments be realized in the case where not departing from spirit herein or range.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest range caused.
It should be understood that the application is not limited to the content for being described above and being shown in the accompanying drawings, and can To carry out various modifications and change without departing from the scope.Scope of the present application is only limited by the accompanying claims.

Claims (9)

1. a kind of adaptive Atomatic focusing method of industrial camera, which is characterized in that the method includes:
S1 keeps industrial camera mobile axis constant, moves freely industrial camera, multi collect benchmark screen image, wherein described Benchmark screen is coaxially set with the industrial camera;
S2 calculates the definition values of each benchmark screen image, selects the maximum picture position of the definition values;
The maximum picture position of the definition values is set as to focus layer β by S3, and extraction is about described to the base at the positions focus layer β Described image information storage is Template Information by the image information of quasi- screen;
S4 is based on the Template Information and creates index table information;
S5 moves the industrial camera, screen image to be detected is acquired, by the information of the screen image to be detected and the concordance list Information carries out comparison judgement, obtains judging result;
S6 is according to the adaptive auto-focusing of the judging result.
2. the adaptive Atomatic focusing method of a kind of industrial camera according to claim 1, which is characterized in that step S3 it Before, upon step s 2, further include:
Judge whether the maximum picture position of the definition values is first image or the position of last image,
If it is then adjusting the moving step length of industrial camera repeatedly, step S1, S2 is repeated, until the definition values are maximum Picture position between first image and last image, reach convergence;
Otherwise, step S3 is executed.
3. the adaptive Atomatic focusing method of a kind of industrial camera according to claim 1, which is characterized in that the S4 packets It includes:
S41 delimit γ pulsating spheres centered on the β to focus layer, in its both sides, and it is any one to select the γ pulsating spheres A endpoint is initial position;
S42, at interval of fixed pulse α, acquires the primary benchmark screen image, until the γ arteries and veins since the initial position Image Acquisition in range is rushed to finish;
The shape of the benchmark screen image of acquisition is painted prime information and is matched with the Template Information by S43, by matching result Conversion is that shape matches score value;
S44 records shape matching score value according to mobile pulse sequence, forms the index table information.
4. the adaptive Atomatic focusing method of a kind of industrial camera according to claim 3, which is characterized in that step S43 it Before, after step S42, further include:
In the γ pulsating spheres, all benchmark screen image information that the shape matching score value is more than or equal to λ are chosen, Execute step S43, S44, wherein 0<λ≤0.5.
5. the adaptive Atomatic focusing method of a kind of industrial camera according to claim 3 or 4, which is characterized in that described Index table information carries out subregion, is in turn divided into from small to large according to shape matching score value and redirects area, area of slightly focusing, thin right Jiao Qu.
6. the adaptive Atomatic focusing method of a kind of industrial camera according to claim 5, which is characterized in that the S5 packets It includes:
If the shape matching score value is less than λ, judge the industrial camera focusing in no Matching band;
If the shape matches score value between λ to μ, judge that the industrial camera focusing redirects area in described;
If the shape matches score value between μ to ν, judge that the industrial camera focusing is in the thick focusing area;
If the shape matching score value is more than ν, judge that the industrial camera focusing is in the thin focusing area;
Wherein, λ, μ, ν are to normalize numerical value, 0<λ<μ<ν<1.
7. the adaptive Atomatic focusing method of a kind of industrial camera according to claim 6, which is characterized in that the S6 packets It includes:
If the industrial camera focusing is in the no Matching band, the industrial camera is continued to move to ζ pulse step sizes, Until jumping to described any one area redirected in area, area of slightly focusing, thin focusing area;
If the industrial camera focusing redirects area in described, the industrial camera is continued to move to φ pulse step sizes, Until jumping to any one area in the thick focusing area, thin focusing area;
If the industrial camera focusing is in the thick focusing area, the industrial camera is continued to move to η pulse step sizes, Until jumping to thin focusing area;
If the industrial camera focusing is in the thin focusing area, the industrial camera is moved with τ pulse step sizes, until The maximum image of the definition values is obtained, realizes and successfully focuses;
Wherein, ζ>φ>η>τ.
8. the adaptive Atomatic focusing method of a kind of industrial camera according to claim 7, which is characterized in that the ζ pulses Step-length, φ pulse step sizes, η pulse step sizes, the size of τ pulse step sizes are respectively:
The size of the ζ pulse step sizes is that the index table information pulse moves the 1/2 of total span;
The size of the φ pulse step sizes matches the maximum picture position of score value and institute for shape described in the index table information State the pulse span between picture position when shape matching score value is recorded for the first time;
The size of the η pulse step sizes is the 1/2 of thin focusing area's pulse total span;
The τ pulse step sizes are θ times of the η pulse step sizes, wherein 0<θ<1.
9. a kind of adaptive automatic focusing mechanism of industrial camera requires a kind of work described in 1-8 any one for perform claim The adaptive Atomatic focusing method of industry camera, which is characterized in that described device includes:
Aobvious panel module (1):For placing benchmark screen and screen to be detected;
Image capture module (2):Including the industrial camera, slideway, driving device, the driving device driving industrial phase Machine moves back and forth along the slideway, and mobile axis is constant;
Computer control module (3):For controlling the industrial camera, the driving device, and handles, stores the industrial phase The image information of machine acquisition.
CN201810425023.5A 2018-05-07 2018-05-07 Self-adaptive automatic focusing method and device for industrial camera Active CN108628061B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810425023.5A CN108628061B (en) 2018-05-07 2018-05-07 Self-adaptive automatic focusing method and device for industrial camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810425023.5A CN108628061B (en) 2018-05-07 2018-05-07 Self-adaptive automatic focusing method and device for industrial camera

Publications (2)

Publication Number Publication Date
CN108628061A true CN108628061A (en) 2018-10-09
CN108628061B CN108628061B (en) 2020-09-29

Family

ID=63695730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810425023.5A Active CN108628061B (en) 2018-05-07 2018-05-07 Self-adaptive automatic focusing method and device for industrial camera

Country Status (1)

Country Link
CN (1) CN108628061B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239901A (en) * 2018-11-07 2019-01-18 凌云光技术集团有限责任公司 A kind of micro imaging system focusing plane Fast Calibration, focusing localization method and device
CN109510944A (en) * 2018-12-30 2019-03-22 深圳市明日实业有限责任公司 A kind of focusing method of camera
CN109884601A (en) * 2018-12-28 2019-06-14 中国航天科工集团八五一一研究所 The radar pulse method for fast searching of technology is jumped based on equal ranks
CN110930403A (en) * 2019-12-17 2020-03-27 易诚高科(大连)科技有限公司 Screen pixel acquisition method for OLED screen
CN111311511A (en) * 2020-01-22 2020-06-19 凌云光技术集团有限责任公司 Moire pattern removing method and device
CN113219622A (en) * 2021-03-19 2021-08-06 哈工大机器人(中山)无人装备与人工智能研究院 Objective lens focusing method, device and system for panel defect detection
CN113639630A (en) * 2021-04-01 2021-11-12 浙江大学台州研究院 Dimension measuring instrument system based on multi-template matching and automatic focusing functions
CN114026596A (en) * 2019-06-24 2022-02-08 通快机床两合公司 Method, mobile terminal device and system for evaluating laser cutting edge
WO2022052066A1 (en) * 2020-09-11 2022-03-17 西门子(中国)有限公司 Method and apparatus for realizing focusing of industrial camera
CN116095477A (en) * 2022-08-16 2023-05-09 荣耀终端有限公司 Focusing processing system, method, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101762232A (en) * 2008-12-23 2010-06-30 鸿富锦精密工业(深圳)有限公司 Multi-surface focusing system and method
CN102333171A (en) * 2011-09-22 2012-01-25 山东易创电子有限公司 Image scanning method and system based on linear array CCD (charge coupled device) system
CN105938243A (en) * 2016-06-29 2016-09-14 华南理工大学 Multi-magnification microscope fast focusing method applied to TFT-LCD detection
CN106341596A (en) * 2016-08-31 2017-01-18 浙江宇视科技有限公司 Focusing method and focusing device
CN107748428A (en) * 2017-10-18 2018-03-02 歌尔股份有限公司 Screen detects Atomatic focusing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101762232A (en) * 2008-12-23 2010-06-30 鸿富锦精密工业(深圳)有限公司 Multi-surface focusing system and method
CN102333171A (en) * 2011-09-22 2012-01-25 山东易创电子有限公司 Image scanning method and system based on linear array CCD (charge coupled device) system
CN105938243A (en) * 2016-06-29 2016-09-14 华南理工大学 Multi-magnification microscope fast focusing method applied to TFT-LCD detection
CN106341596A (en) * 2016-08-31 2017-01-18 浙江宇视科技有限公司 Focusing method and focusing device
CN107748428A (en) * 2017-10-18 2018-03-02 歌尔股份有限公司 Screen detects Atomatic focusing method and device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239901B (en) * 2018-11-07 2021-08-27 凌云光技术股份有限公司 Method and device for quickly calibrating focusing surface and positioning focusing of microscopic imaging system
CN109239901A (en) * 2018-11-07 2019-01-18 凌云光技术集团有限责任公司 A kind of micro imaging system focusing plane Fast Calibration, focusing localization method and device
CN109884601A (en) * 2018-12-28 2019-06-14 中国航天科工集团八五一一研究所 The radar pulse method for fast searching of technology is jumped based on equal ranks
CN109510944A (en) * 2018-12-30 2019-03-22 深圳市明日实业有限责任公司 A kind of focusing method of camera
CN114026596A (en) * 2019-06-24 2022-02-08 通快机床两合公司 Method, mobile terminal device and system for evaluating laser cutting edge
CN110930403A (en) * 2019-12-17 2020-03-27 易诚高科(大连)科技有限公司 Screen pixel acquisition method for OLED screen
CN111311511A (en) * 2020-01-22 2020-06-19 凌云光技术集团有限责任公司 Moire pattern removing method and device
CN111311511B (en) * 2020-01-22 2023-08-29 凌云光技术股份有限公司 Method and device for removing moire patterns
WO2022052066A1 (en) * 2020-09-11 2022-03-17 西门子(中国)有限公司 Method and apparatus for realizing focusing of industrial camera
CN113219622A (en) * 2021-03-19 2021-08-06 哈工大机器人(中山)无人装备与人工智能研究院 Objective lens focusing method, device and system for panel defect detection
CN113639630A (en) * 2021-04-01 2021-11-12 浙江大学台州研究院 Dimension measuring instrument system based on multi-template matching and automatic focusing functions
CN116095477A (en) * 2022-08-16 2023-05-09 荣耀终端有限公司 Focusing processing system, method, equipment and storage medium
CN116095477B (en) * 2022-08-16 2023-10-20 荣耀终端有限公司 Focusing processing system, method, equipment and storage medium

Also Published As

Publication number Publication date
CN108628061B (en) 2020-09-29

Similar Documents

Publication Publication Date Title
CN108628061A (en) A kind of adaptive Atomatic focusing method of industrial camera and device
US10178321B2 (en) Machine vision inspection system and method for obtaining an image with an extended depth of field
CN109584227A (en) A kind of quality of welding spot detection method and its realization system based on deep learning algorithm of target detection
CN107944504B (en) Board recognition and machine learning method and device for board recognition and electronic equipment
CN111680594A (en) Augmented reality interaction method based on gesture recognition
CN108090896B (en) Wood board flatness detection and machine learning method and device and electronic equipment
CN105306825A (en) Novel infrared image focusing system and use method thereof
CN112700435B (en) Wall defect detection method based on deep learning
JP7319903B2 (en) High-speed TAG lens-assisted 3D measurement and extended depth-of-field imaging
US20240062988A1 (en) Machine vision-based automatic focusing and automatic centering method and system
JP6907634B2 (en) Work support equipment, work support methods, and work support programs
CN106031148A (en) Imaging device and method for automatic focus in an imaging device as well as a corresponding computer program
CN113923358A (en) Online automatic focusing method and system in flying shooting mode
Koch et al. A methods-time-measurement based approach to enable action recognition for multi-variant assembly in human-robot collaboration
US11138752B2 (en) Training a pose detection algorithm, and deriving an object pose using a trained pose detection algorithm
CN110267031A (en) A kind of camera output delay time test method and system
CN112381190B (en) Cable force testing method based on mobile phone image recognition
CN107124547A (en) Double-camera photographing method and device
CN116475563A (en) Deep learning three-dimensional weld tracking method and device
CN115319739B (en) Method for grabbing workpiece based on visual mechanical arm
Yu et al. Robotic grasping of novel objects from RGB-D images by using multi-level convolutional neural networks
CN111126279B (en) Gesture interaction method and gesture interaction device
Kulecki Intuitive robot programming and interaction using RGB-D perception and CNN-based objects detection
Lin et al. An image quality assessment method for surface defect inspection
US20230001576A1 (en) Adaptive mobile manipulation apparatus and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Patentee after: Lingyunguang Technology Co., Ltd

Address before: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Patentee before: LUSTER LIGHTTECH GROUP Co.,Ltd.

CP01 Change in the name or title of a patent holder