CN101706609B - Image processing based fast automatic focusing method of microscope - Google Patents

Image processing based fast automatic focusing method of microscope Download PDF

Info

Publication number
CN101706609B
CN101706609B CN2009102349887A CN200910234988A CN101706609B CN 101706609 B CN101706609 B CN 101706609B CN 2009102349887 A CN2009102349887 A CN 2009102349887A CN 200910234988 A CN200910234988 A CN 200910234988A CN 101706609 B CN101706609 B CN 101706609B
Authority
CN
China
Prior art keywords
search
focusing
evaluation function
decision
microscope
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.)
Expired - Fee Related
Application number
CN2009102349887A
Other languages
Chinese (zh)
Other versions
CN101706609A (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.)
National University of Defense Technology
Original Assignee
CHANGZHOU HYPER MEDIUM AND SENSING TECHNOLOGY INSTITUTE 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 CHANGZHOU HYPER MEDIUM AND SENSING TECHNOLOGY INSTITUTE Co Ltd filed Critical CHANGZHOU HYPER MEDIUM AND SENSING TECHNOLOGY INSTITUTE Co Ltd
Priority to CN2009102349887A priority Critical patent/CN101706609B/en
Publication of CN101706609A publication Critical patent/CN101706609A/en
Application granted granted Critical
Publication of CN101706609B publication Critical patent/CN101706609B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to the technical field of automatic focusing of microscopes, in particular to an image processing based fast automatic focusing method of a microscope. In the method, the automatic focusing process is divided into a coarse focusing stage and a fine focusing stage; different focusing evaluation functions and different extremum searching strategies are adopted on different stages, specifically, on the coarse focusing stage, the gray scale different evaluation function and a fast hill-climbing backtracking search algorithm are adopted, and decision-making factors are introduced to prevent the search algorithm from falling into local extrema; and on the fine focusing stage, the Laplace operator based evaluation function and the small-step searching strategy are adopted. The method provided by the invention better solves the problem that the traditional algorithm is slow in focusing speed, easily falls into local extrema and is not high in focusing accuracy, and has strong real-time property and high reliability and practicability.

Description

Fast automatic focusing method of microscope based on Flame Image Process
Technical field
The present invention relates to microscope automatic focus technical field, especially a kind of fast automatic focusing method of microscope based on Flame Image Process.
Background technology
Traditional microscope focus method is to adopt manually the mode of regulating, this method place one's entire reliance upon people's visual inspection and manual adjustments, and focusing efficiency is very low.Auto focusing method based on image processing techniques is applied in the microscope focusing process gradually in recent years, but these methods also exist focusing speed to be absorbed in local extremum, the problem that focusing accuracy is not high slowly, easily at present.
Automatic focus is a gordian technique in the full-automatic Image Acquisition, is widely used in fields such as digital camera, photomicrograph, retrofit, optical measuring device, robot visual guidance.Automatic focus can be divided into active focusing according to its focusing principle and passive type focuses on two kinds.Active focusing is based on range measurement principle mostly, because this method needs extra distance-measuring equipment, therefore adopts the general volume of equipment of this method bigger, and price is higher.Passive type focuses on the focus state that only utilizes the current system of sequence digital image analysis that has obtained, and regulates lens parameters repeatedly according to certain search strategy control motor, up to obtaining distinct image.This mode does not rely on any distance-measuring equipment, is the basis with Digital Image Processing and analytical technology fully, is more conducive to the integrated and microminiaturized of system, and can reduce system cost greatly, therefore in digital camera and various instrument and equipment, is used widely.
Passive type automatic focus relates generally to two key issues: one is to focus on evaluation function, and one is the extremum search strategy, many to the research that focuses on evaluation function at present, and is also having a lot of problems not obtain fine solution aspect the extremum search strategy.
The extremum search strategy that has proposed at present is a lot, and wherein most widely used is hill-climbing algorithm (CMS), and its principle is as shown in Figure 1, at first, sets an initial position P 0And calculate the focusing evaluation function value F (P of this position 0), select a direction (such as selecting to the right) the certain step-length S in-position P of motion then arbitrarily 1And calculate the focusing evaluation function value F (P of this position 1), compare F (P 0) and F (P 1) size, if F (P 0)<F (P 1), then keep the constant continuation search of direction until F (P 0)>F (P 1), next carry out reverse search, search procedure is the same with the forward lookup process; But step-length is less than the forward lookup step-length; Generally get the half the or littler of forward step-length, so under the situation that is satisfying certain accuracy requirement, search maximal value repeatedly, this position is best focus position.The CMS algorithm performance is more stable, and search precision is higher, but has a very big problem: the search step number is too much, and algorithm is very consuming time! Especially after search " top more ", return the definite numerical standard of definite neither one of step-length; Very random; The size of returning step-length under many circumstances has very big influence to the stability and the real-time of algorithm, step-length is too for a short time cause searching for step number too much, system real time will descend greatly, step-length can cause excessively " pushing up more " too greatly again; Excessively must return again again after " top more ", this also can greatly influence the entire system performance.
To above situation, a lot of scholars have proposed the improvement algorithm, such as based on slope adaptive step searching algorithm, curve fitting searching algorithm etc., but these algorithms all exist problems such as noiseproof feature is poor, adaptability is wide, stability is not high.Such as variable step-size search algorithm based on slope; Because noise effect causes focusing curve to have a lot of local extremums; Do not existed in the relation of these local extremum place slopes with step-length; The unavoidable failure of search like this, slope itself is a relative concept in addition, only relies on former and later two focus function measure values can't effectively define slope.The curve fitting searching algorithm comes approximate focus evaluation function curve with a mathematical function; This algorithm in particular cases can be obtained reasonable effect at some; But the non-constant of versatility, this is height correlation owing to focusing on evaluation function with picture material, same focusing evaluation function is not on all four to its form of pictures different; In some cases even differ greatly, therefore can't go match with a general purpose function.
In fact, be that classical hill-climbing algorithm or a lot of algorithm that improves do not consider that all mechanical motion is to the influence of system real time ability in the real system.Present most of autofocus system all is to carry out the search of best focal plane with step motor drive camera lens or objective table; And motor movement is very consuming time with respect to Flame Image Process; The calculating that generally focuses on the evaluation function value such as the image of a secondary 800*600 only needs several milliseconds to accomplish; But motor movement then can consume great amount of time comparatively speaking; Generally just start with, but speed improves for the very-short-reach motion and have little significance, and the bump of motor will be very serious also in this case from improving movement velocity in order to reduce the motor movement time.Therefore radical solving method is started with from search strategy exactly, seeks a kind of algorithm that can find maximum value with minimum step number.Through analyze hill-climbing algorithm we find step number what return the big or small closely related of step-length after with " top more ", if algorithm ability fast return of " top more " back near maximum value, the overall performance of system will obtain the lifting of essence so.
Summary of the invention
In order to overcome the slow and coarse deficiency of focusing of existing microscope automatic focus speed, the invention provides a kind of fast automatic focusing method of microscope based on Flame Image Process.
The technical solution adopted for the present invention to solve the technical problems is: a kind of fast automatic focusing method of microscope based on Flame Image Process; The automatic focus process is divided into thick focusing and two stages of fine focus; Adopt different focusing evaluation function and extremum search strategy in the different stages; Adopt the grey scale difference evaluation function and climb the mountain fast and recall searching algorithm in the thick focusing stage; And introduce the decision-making factor and prevent that searching algorithm is absorbed in local extremum, adopt evaluation function and the long search strategy of small step in the fine focus stage based on the laplace operator.
According to another embodiment of the invention, further comprise the steps:
(1) objective table initial position setting: the motor-driven objective table moves to the initial position that pre-sets along the Z axle; Place microslide to be observed on the objective table; Said initial position is positioned near the microscope focal plane; Generally be positioned at the focal plane upside, this initial position is as self-focusing starting point;
(2) microscope slightly focuses on: start the camera collection video, adopt the grey scale difference evaluation function and climb the mountain fast and recall searching algorithm and carry out coarse focus;
(3) microscope fine focus: adopt evaluation function and the long search strategy of small step to carry out fine focus based on the laplace operator.
According to another embodiment of the invention; Further comprise said objective table initial position setting, confirm that this position generally is positioned at the micro objective below by the limit switch that photoelectric sensor constitutes; Apart from micro objective lower plane 0.1mm; This position can change to some extent when adopting different microscopes, objective table or slide, and photoelectric sensor sends signal and gives controller behind the arrival initial position, the stop motion of controller control motor.
According to another embodiment of the invention, comprise that further said microscope slightly focuses on, and comprises the steps:
(1) setting search step-length S 0With decision-making factor threshold value Th: step-size in search is that microscope stage stops the distance of moving during this for the first time from the setting in motion to the post exercise, and decision-making factor threshold value Th representative value can get 0.02, when adopting different focusing evaluation functions, can change to some extent;
(2) start the camera collection video;
(3) the motor-driven objective table along the Z axle with step-length S 0Carry out search by hill climbing, every observation position motor stop motion in the search procedure is taken out the two field picture in the internal memory and is calculated definition values, and the present invention requires the definition values Y of three adjacent observation positions of search procedure record L, Y MAnd Y R, and calculate the decision-making vitamin T, said definition values also promptly focuses on the evaluation function measure value, calculates as follows:
Step 1, the image pre-service: said image is carried out medium filtering and gaussian filtering, with filtering noise to focusing on the measure value influence of evaluation function;
Step 2, calculate the definition values of image after the pre-service: establish that the image length and width are M * N after the said pre-service, (x y) is pixel (x, the gray-scale value of y) locating, then evaluation function Y to v LExpression formula is (Y as follows MAnd Y RCalculate according to identical formula):
Y L = 1 MN Σ x = 1 N - 1 Σ y = 1 M - 1 ( | v ( x , y ) - v ( x , y - 1 ) | + | v ( x , y ) - v ( x - 1 , y ) | )
Said decision-making vitamin T calculates according to following formula:
T = Y M - Y R Y M
(4) search procedure decision-making: judge the magnitude relationship and the relation of the factor with threshold value of making a strategic decision between definition values, based on the strategy of these relation decision search, specifically decision-making is as follows:
If Y L<Y M<Y R, perhaps T<Th then continues towards former direction search;
If Y R<Y L, and T>Th, then stop towards former direction search;
(5) calculate layback: utilizing climbs the mountain fast recalls searching algorithm and confirms the distance value that need return after the search procedure " top more ";
(6) recall fast: calculate layback S bAfter, the motor-driven objective table is pressed and former direction move distance S in the opposite direction along the Z axle bAnd stop, this moment, objective table arrived near the focal plane.
According to another embodiment of the invention, further comprise said microscope fine focus, comprise the steps:
(1) obtains a two field picture: from current internal memory, extract a two field picture as pending image;
(2) the long search by hill climbing of small step: with the long S of small step 1Carry out search by hill climbing, generally get S 1 = 1 10 S 0 , Every observation position motor stop motion in the search procedure is taken out the two field picture in the internal memory and is calculated definition values, and the present invention requires the definition values Y of two adjacent observation positions of search procedure record LAnd Y R, Y wherein LPairing picture numbers is positioned at Y RBefore the pairing picture numbers, said definition values also promptly focuses on the evaluation function measure value, calculates as follows:
Step 1, the image pre-service: pending image is carried out medium filtering and gaussian filtering, with filtering noise to focusing on the measure value influence of evaluation function;
Step 2 is calculated and is focused on the evaluation function measure value: to the focusing evaluation function measure value Y of pretreated image calculation based on the Laplace evaluation function L, establishing said image length and width is M * N, (x y) is pixel (x, the gray-scale value of y) locating, then evaluation function Y to v LExpression formula is (Y as follows RPressing the same manner calculates):
Y L = 1 MN Σ x = 1 N - 1 Σ y = 1 M - 1 ( | 2 v ( x , y ) - v ( x - 1 , y ) - v ( x + 1 , y ) | + | 2 v ( x , y ) - v ( x , y - 1 ) - v ( x , y + 1 ) | )
(3) search procedure decision-making: judge the magnitude relationship between definition values, based on the strategy of these relation decision search, specifically decision-making is as follows:
If Y L<Y R, then continue towards former direction search;
If Y L>Y R, then stop towards former direction search, found the focal plane this moment.
According to another embodiment of the invention; Further comprise the described back-track algorithm of climbing the mountain fast; It is the fast search algorithm of extreme value in a kind of microscope automatic focus process; This algorithm, makes after the search procedure " top more " and can return near the extreme point with a step with the relation between " top more " back layback with reasonable assumption and the approximate evaluation function measure value of having set up.According to optical imaging concept, desirable focusing evaluation function curve should satisfy unimodal symmetry, establishes the search by hill climbing process successively through a P L, P MAnd P R, three point coordinate are respectively (X L, Y L), (X M, Y M), (X R, Y R), step-size in search is S 0, maximum point P to be searched ACoordinate is (X A, Y A).Layback S then bWith sharpness measure value Y L, Y R, Y MAnd initial step length S 0Between concern S b=f (Y L, Y M, Y R, S 0) as follows:
The invention has the beneficial effects as follows; One aspect of the present invention has improved the automaticity that microscope focuses on; Solved traditional focus method focusing speed on the other hand and be absorbed in problems such as local extremum, focusing accuracy are not high slowly, easily, had very high reliability and practicality, can be widely used in the microscopic system; This algorithm also has good universality simultaneously, can be applicable in the self-focusing picture system of some other needs.
Compared with prior art, the invention has the advantages that:
(1) the automatic focus process is divided into thick focusing and two stages of fine focus; The thick focusing stage adopts grey scale difference to focus on the evaluation function and the back-track algorithm of climbing the mountain fast; This has strengthened the real-time of system greatly; The fine focus stage is adopted focusing evaluation function and the long searching algorithm of small step based on the Laplace operator, has greatly strengthened the reliability of system;
(2) in thick focusing process, pass through to introduce the decision-making factor, avoided the extremum search process to be absorbed in local extremum, improved the reliability of auto-focusing algorithm greatly;
(3) in thick focusing process, adopt the back-track algorithm of climbing the mountain fast; Make after the search procedure " more top " and can return near the extreme point with a step; Improved greatly and returned step-length more behind the classical search by hill climbing algorithm " top " and be difficult to confirm and return problem such as search procedure complicated and time consumption, improved the real-time and the practicality of algorithm greatly.
Description of drawings
Below in conjunction with accompanying drawing and embodiment the present invention is further specified.
Fig. 1 is traditional automatic focus search by hill climbing algorithm synoptic diagram;
Fig. 2 is the microscope fast automatic focusing algorithm flow chart that the present invention proposes;
Fig. 3 is ideal focusing evaluation function curve and climbs the mountain fast and recall the search synoptic diagram: (a) climb the mountain for fast and recall first kind of situation of search; (b) recall second kind of situation of search for climbing the mountain fast;
Fig. 4 is one embodiment of the present of invention " automatic tubercle bacillus detector " software and hardware structure figure.
Embodiment
Combine accompanying drawing and preferred embodiment that the present invention is done further detailed explanation now.These accompanying drawings are the synoptic diagram of simplification, basic structure of the present invention only is described in a schematic way, so it only show the formation relevant with the present invention.
Like Fig. 2 is the microscope fast automatic focusing algorithm flow chart that the present invention proposes; A kind of fast automatic focusing method of microscope based on Flame Image Process; The automatic focus process is divided into thick focusing and two stages of fine focus; Adopt different focusing evaluation function and extremum search strategy in different stage, adopt the grey scale difference evaluation function and climb the mountain fast and recall searching algorithm, and the introducing factor of making a strategic decision prevents that searching algorithm is absorbed in local extremum in the thick focusing stage; Adopt evaluation function and the long search strategy of small step in the fine focus stage based on the laplace operator; Evaluation function half width based on the laplace operator is minimum, and sensitivity is higher, therefore can obtain higher precision in the fine focus stage.
The present invention includes following steps:
(1) objective table initial position setting: the motor-driven objective table moves to the initial position that pre-sets along the Z axle; Place microslide to be observed on the objective table; Said initial position is positioned near the microscope focal plane; Generally be positioned at the focal plane upside, this initial position is as self-focusing starting point;
(2) microscope slightly focuses on: start the camera collection video, adopt the grey scale difference evaluation function and climb the mountain fast and recall searching algorithm and carry out coarse focus;
(3) microscope fine focus: adopt evaluation function and the long search strategy of small step to carry out fine focus based on the laplace operator.
Said objective table initial position setting; Limit switch by photoelectric sensor constitutes is confirmed; This position generally is positioned at the micro objective below, and apart from micro objective lower plane 0.1mm, this position can change to some extent when adopting different microscopes, objective table or slide; Photoelectric sensor sends signal to controller after arriving initial position, the stop motion of controller control motor.
Said microscope slightly focuses on, and comprises the steps:
(1) setting search step-length S 0With decision-making factor threshold value Th: step-size in search is that microscope stage stops the distance of moving during this for the first time from the setting in motion to the post exercise; In operating process; This step-length is generally expressed with umber of pulse, and therefore concrete numerical value follows the correlation parameter of the controller, driver and the motor that are adopted relevant, and the value of this step-length is also determining the real-time and the robustness of algorithm to a certain extent simultaneously; Therefore must constitute through testing definite according to real system; This step-length to the general influence of algorithm is: step-length is too little, causes algorithm consuming time serious, is absorbed in local extremum easily in the focusing incipient stage simultaneously; Step-length is excessive, causes search procedure very easily " top more ", if " top more " is very serious; Then cause algorithm to restrain; The representative value of step-length can get 300, and decision-making factor threshold value Th follows the focusing evaluation function that is adopted relevant, and decision-making factor threshold value Th can value be 0.02 when adopting grey scale difference to focus on evaluation function; Equally, this threshold value can be changed with the focusing evaluation function value that is adopted according to the system configuration of reality;
(2) start the camera collection video: camera in internal memory, can be opened up a region of memory earlier, based on different requirement with video acquisition in computer; The video flowing of being gathered all can be deposited in internal memory or other storage mediums; Such as hard disk, also can only deposit a two field picture, when also promptly beginning the current frame image collection former frame image is override; The internal memory that is consumed is minimum like this, generally adopts this mode;
(3) begin rough automatic focus: the motor-driven objective table along the Z axle with step-length S 0Carry out search by hill climbing; Every observation position motor stop motion in the search procedure; Take out the two field picture in the internal memory and calculate the focusing evaluation function measure value (also claiming definition values) based on grey scale difference, the present invention requires the definition values Y of three adjacent observation positions of search procedure record L, Y MAnd Y R, and calculate the decision-making vitamin T, concrete steps are following:
Step 1, the starter motor driving objective table axially descends move distance S along Z 0
Step 2 waits for a period of time to guarantee that the image acquisition process exposure finishes, and there is relation the stand-by period, general desirable 50ms with the camera exposure time;
Step 3 is taken out a two field picture as pending image from internal memory;
Step 4, pending image is carried out pre-service: at first carry out medium filtering, the filtering template size is got 5*5, carries out gaussian filtering then, the filtering template size is also got 5*5, like this can filtering noise to focusing on the measure value influence of evaluation function;
Step 5, calculate the definition values of image after the pre-service: establish that the image length and width are M * N after the said pre-service, (x y) is pixel (x, the gray-scale value of y) locating, then evaluation function Y to v RExpression formula is following:
Y R = 1 MN Σ x = 1 N - 1 Σ y = 1 M - 1 ( | v ( x , y ) - v ( x , y - 1 ) | + | v ( x , y ) - v ( x - 1 , y ) | )
Step 6, the motor-driven objective table axially descends move distance S along Z 0, handle according to step 2 to step 5 again then, different is, and that to calculate in step 5 is Y MValue, computing method are with Y RComputing method identical;
Step 7 is calculated the decision-making vitamin T, and computing formula is following:
T = Y M - Y R Y M
Step 8, search procedure is tentatively made a strategic decision: follow the direction and the search procedure of the relation decision search between decision-making factor threshold value whether to stop concrete the decision-making as follows according to the decision-making factor values:
If T<Th then continues towards former direction search;
If T>Th then stops towards former direction search;
Step 9 is if continue towards former direction search, then with Y MValue compose to Y L, then with Y RValue compose to Y M, also be Y LValue by Y MOverride, and Y MValue by Y ROverride;
Step 10 is then handled according to step 2 to step 9 towards former direction search if continue again;
Step 11, search procedure is made a strategic decision again: judge the magnitude relationship and the relation of the factor with threshold value of making a strategic decision between definition values, according to the strategy of these relation decision search, specifically decision-making is as follows:
If Y L<Y M<Y R, perhaps T<Th then continues towards former direction search;
If Y R<Y L, and T>Th, then stop towards former direction search;
Step 12 is then calculated layback if stop towards former direction search; Computation process adopts to climb the mountain fast recalls searching algorithm; Said climbing the mountain fast recalled searching algorithm, is the fast search algorithm of extreme value in a kind of microscope automatic focus process, and this algorithm is started with from analyzing focusing evaluation function tracing pattern;, make after the search procedure " top more " and can return near the extreme point with the relation between " top more " back layback with reasonable assumption and the approximate evaluation function measure value of having set up with a step.According to optical imaging concept, desirable focusing evaluation function curve should satisfy unimodal symmetry, and Fig. 2 has provided ideal focusing evaluation function curve, establishes the search by hill climbing process successively through a P L, P MAnd P R, three point coordinate are respectively (X L, Y L), (X M, Y M), (X R, Y R), step-size in search is S 0, maximum point P to be searched ACoordinate is (X A, Y A).Layback S then bWith sharpness measure value Y L, Y R, Y MAnd initial step length S 0Between concern S b=f (Y L, Y M, Y R, S 0) as follows:
If Y L<Y R<Y M, maximum point P then is described AAt a P MThe right side, like Fig. 3 (a), at this moment
If Y R<Y L<Y M, maximum point P then is described AAt a P MThe left side, like Fig. 3 (b), at this moment
Figure G2009102349887D00112
Step 13 is recalled: calculate layback S fast bAfter, the motor-driven objective table is pressed and former direction move distance S in the opposite direction along the Z axle bAnd stop, this moment, objective table arrived near the focal plane, and the coarse focus process finishes.
Said microscope fine focus comprises the steps:
(1) obtains a two field picture: from current internal memory, extract a two field picture as pending image;
(2) the long search by hill climbing of small step: with the long S of small step 1Carry out search by hill climbing, generally get S 1 = 1 10 S 0 , Every observation position motor stop motion in the search procedure is taken out the two field picture in the internal memory and is calculated definition values, and the present invention requires the definition values Y of two adjacent observation positions of search procedure record LAnd Y R, Y wherein LPairing picture numbers is positioned at Y RBefore the pairing picture numbers, said definition values also promptly focuses on the evaluation function measure value, calculates as follows:
Step 1, the image pre-service: pending image is carried out medium filtering and gaussian filtering, with filtering noise to focusing on the measure value influence of evaluation function;
Step 2 is calculated and is focused on the evaluation function measure value: to the focusing evaluation function measure value Y of pretreated image calculation based on the Laplace evaluation function L, establishing said image length and width is M * N, (x y) is pixel (x, the gray-scale value of y) locating, then evaluation function Y to v LExpression formula is (Y as follows RPressing the same manner calculates):
Y L = 1 MN Σ x = 1 N - 1 Σ y = 1 M - 1 ( | 2 v ( x , y ) - v ( x - 1 , y ) - v ( x + 1 , y ) | + | 2 v ( x , y ) - v ( x , y - 1 ) - v ( x , y + 1 ) | )
(3) search procedure decision-making: judge the magnitude relationship between definition values, based on the strategy of these relation decision search, specifically decision-making is as follows:
If Y L<Y R, then continue towards former direction search;
If Y L>Y R, then stop towards former direction search, found the focal plane this moment.
The described back-track algorithm of climbing the mountain fast; It is the fast search algorithm of extreme value in a kind of microscope automatic focus process; This algorithm, makes after the search procedure " top more " and can return near the extreme point with a step with the relation between " top more " back layback with reasonable assumption and the approximate evaluation function measure value of having set up.According to optical imaging concept, desirable focusing evaluation function curve should satisfy unimodal symmetry, establishes the search by hill climbing process successively through a P L, P MAnd P R, three point coordinate are respectively (X L, Y L), (X M, Y M), (X R, Y R), step-size in search is S 0, maximum point P to be searched ACoordinate is (X A, Y A).Layback S then bWith sharpness measure value Y L, Y R, Y MAnd initial step length S 0Between concern S b=f (Y L, Y M, Y R, S 0) as follows:
Figure G2009102349887D00131
One embodiment of the present of invention are:
The method is applied in " automatic tubercle bacillus detector " that we research and develop voluntarily, and this system is made up of PC, full microscope, video camera, printer and picture and text analysis software, system architecture such as Fig. 4.Wherein video camera adopts the HV3103UC of Beijing company of Daheng; Full microscope comprises light path part and mechanical part; Wherein light path part adopts the BA3000i of Chongqing photoelectric instrument company; Mechanical part requires design voluntarily by us according to the full microscope motion control; Comprise: controller, driver, stepper motor, program-controlled objective table etc., this part can be accomplished microscopical automatic three stereo-motions control, comprise that the control microscope carries out automatic focus and according to preset scanning pattern slide carried out automatically scanning etc.
Automatic focus certain applications in this system our foregoing invention " based on the fast automatic focusing method of microscope of Flame Image Process "; After the system start-up, microscope stage moves to initial position under the driving of motor, this initial position next-door neighbour micro objective below; Apart from micro objective lower plane 0.1mm; After starting auto-focus function, microscope stage begins coarse focus along the Z axle with step-length 300 under the driving of motor, and the focusing process can be accomplished in 2 seconds; System started the fine focus process automatically after coarse focus was accomplished; The fine focus process can be accomplished in 1 second, and therefore whole focusing process can be accomplished in 3 seconds, and focusing accuracy is very high.Need to prove that being provided with of initial position is very crucial, improper if initial position is provided with, then accumulation process need expend the long time, but the focusing process still can accomplish smoothly, focusing accuracy is also unaffected.
We rely on to have carried out a large amount of tests; The result shows; The fast automatic focusing method of microscope that we propose has well solved the traditional algorithm focusing speed and has been absorbed in local extremum slowly, easily; The problem that focusing accuracy is not high has very high reliability, practicality and admissibility.
With above-mentioned foundation desirable embodiment of the present invention is enlightenment, and through above-mentioned description, the related work personnel can carry out various change and modification fully in the scope that does not depart from this invention technological thought.The technical scope of this invention is not limited to the content on the instructions, must confirm its technical scope according to the claim scope.

Claims (3)

1. fast automatic focusing method of microscope based on Flame Image Process; It is characterized in that; The automatic focus process is divided into thick focusing and two stages of fine focus; Adopt different focusing evaluation function and extremum search strategy in the different stages; Adopt the grey scale difference evaluation function and climb the mountain fast and recall searching algorithm in the thick focusing stage, and introduce the decision-making factor and prevent that searching algorithm is absorbed in local extremum, at evaluation function and the small step long search strategy of fine focus stage employing based on the laplace operator;
Said microscope slightly focuses on, and comprises the steps:
(1) setting search step-length S 0With decision-making factor threshold value Th: step-size in search is that microscope stage stops the distance of moving during this for the first time from the setting in motion to the post exercise, and decision-making factor threshold value Th representative value gets 0.02;
(2) start the camera collection video;
(3) the motor-driven objective table along the Z axle with step-length S 0Carry out search by hill climbing, every observation position motor stop motion in the search procedure is taken out the two field picture in the internal memory and is calculated definition values, the definition values Y of three observation positions that the search procedure record is adjacent L, Y MAnd Y R, and calculate the decision-making vitamin T, said definition values also promptly focuses on the evaluation function measure value, calculates as follows:
Step 1, the image pre-service: said image is carried out medium filtering and gaussian filtering, with filtering noise to focusing on the measure value influence of evaluation function;
Step 2, calculate the definition values of image after the pre-service: establish that the image length and width are M * N after the said pre-service, (x y) is pixel (x, the gray-scale value of y) locating, then evaluation function Y to v LExpression formula is following, Y MAnd Y RCalculate according to identical formula:
Y L = 1 MN Σ x = 1 N - 1 Σ y = 1 M - 1 ( | v ( x , y ) - v ( x , y - 1 ) | + | v ( x , y ) - v ( x - 1 , y ) |
Said decision-making vitamin T calculates according to following formula:
T = Y M - Y R Y M ;
(4) search procedure decision-making: judge the magnitude relationship and the relation of the factor with threshold value of making a strategic decision between definition values, based on the strategy of these relation decision search, specifically decision-making is as follows:
If Y L<Y M<Y R, perhaps T<Th then continues towards former direction search;
If Y R<Y L, and T>Th, then stop towards former direction search;
(5) calculate layback: utilizing climbs the mountain fast recalls searching algorithm and confirms the distance value that need return after the search procedure " top more ";
(6) recall fast: calculate layback S bAfter, the motor-driven objective table is pressed and former direction move distance S in the opposite direction along the Z axle bAnd stop, this moment, objective table arrived near the focal plane;
Said microscope fine focus comprises the steps:
(1) obtains a two field picture: from current internal memory, extract a two field picture as pending image;
(2) the long search by hill climbing of small step: with the long S of small step 1Carry out search by hill climbing, get
Figure FSB00000688168900021
Every observation position motor stop motion in the search procedure is taken out the two field picture in the internal memory and is calculated definition values, the definition values Y of two observation positions that the search procedure record is adjacent LAnd Y R, Y wherein LPairing picture numbers is positioned at Y RBefore the pairing picture numbers, said definition values also promptly focuses on the evaluation function measure value, calculates as follows:
Step 1, the image pre-service: pending image is carried out medium filtering and gaussian filtering, with filtering noise to focusing on the measure value influence of evaluation function;
Step 2 is calculated and is focused on the evaluation function measure value: to the focusing evaluation function measure value Y of pretreated image calculation based on the evaluation function of laplace operator L, establishing said image length and width is M * N, (x y) is pixel (x, the gray-scale value of y) locating, then evaluation function Y to v LExpression formula is following, Y RPressing the same manner calculates:
Y L = 1 MN Σ x = 1 N - 1 Σ y = 1 M - 1 ( | 2 v ( x , y ) - v ( x - 1 , y ) - v ( x + 1 , y ) | + | 2 v ( x , y ) - v ( x , y - 1 ) - v ( x , y + 1 ) |
(3) search procedure decision-making: judge the magnitude relationship between definition values, based on the strategy of these relation decision search, specifically decision-making is as follows:
If Y L<Y R, then continue towards former direction search;
If Y L>Y R, then stop towards former direction search, found the focal plane this moment.
2. the fast automatic focusing method of microscope based on Flame Image Process according to claim 1 is characterized in that, comprises the steps:
(1) objective table initial position setting: the motor-driven objective table moves to the initial position that pre-sets along the Z axle; Place microslide to be observed on the objective table; Said initial position is positioned near the microscope focal plane, is positioned at the focal plane upside, and this initial position is as self-focusing starting point;
(2) the thick focusing of said microscope also comprises: start the camera collection video.
3. the fast automatic focusing method of microscope based on Flame Image Process according to claim 2; It is characterized in that said objective table initial position setting is confirmed by the limit switch that photoelectric sensor constitutes; This position is positioned at the micro objective below; Apart from micro objective lower plane 0.1mm, photoelectric sensor sends signal and gives controller behind the arrival initial position, the stop motion of controller control motor.
CN2009102349887A 2009-11-23 2009-11-23 Image processing based fast automatic focusing method of microscope Expired - Fee Related CN101706609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102349887A CN101706609B (en) 2009-11-23 2009-11-23 Image processing based fast automatic focusing method of microscope

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102349887A CN101706609B (en) 2009-11-23 2009-11-23 Image processing based fast automatic focusing method of microscope

Publications (2)

Publication Number Publication Date
CN101706609A CN101706609A (en) 2010-05-12
CN101706609B true CN101706609B (en) 2012-05-02

Family

ID=42376846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102349887A Expired - Fee Related CN101706609B (en) 2009-11-23 2009-11-23 Image processing based fast automatic focusing method of microscope

Country Status (1)

Country Link
CN (1) CN101706609B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669264A (en) * 2019-01-08 2019-04-23 哈尔滨理工大学 Self-adapting automatic focus method based on shade of gray value

Families Citing this family (40)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708564A (en) * 2012-05-04 2012-10-03 哈尔滨工业大学 Infrared microscopic image focusing evaluating method based on wavelet packet transformation
CN104516085B (en) * 2013-09-30 2017-04-26 香港纺织及成衣研发中心有限公司 Quick focusing method and device for multispectral imaging
CN104284095B (en) * 2014-10-28 2017-07-14 福建福光股份有限公司 The fast automatic focusing method and system of a kind of long-focus visible ray industrial lens
CN104469153A (en) * 2014-12-02 2015-03-25 广东威创视讯科技股份有限公司 Quick focusing method and system
WO2016101092A1 (en) 2014-12-22 2016-06-30 杭州唐光科技有限公司 Digital microscope and focusing method thereof
CN105785561B (en) * 2014-12-22 2018-04-03 杭州舜立光电科技有限公司 A kind of digital microscope and its focus method
CN104898265B (en) * 2015-06-11 2017-09-26 昆山国显光电有限公司 Prevent system and method, the image-taking system of micro objective bumped substrate
CN105093509B (en) * 2015-09-29 2017-09-01 爱威科技股份有限公司 Microscopical auto focusing method, system and stool microscopy microscope
CN105530429B (en) * 2015-11-05 2018-10-09 杭州舜立光电科技有限公司 A kind of autofocus and system
WO2017076060A1 (en) 2015-11-05 2017-05-11 杭州唐光科技有限公司 Automatic focusing device and system
CN105516600B (en) * 2015-12-31 2019-03-01 珠海市百爱科技有限公司 Atomatic focusing method
CN106303242A (en) * 2016-08-18 2017-01-04 上海交通大学 The focusing system quickly of muti-spectrum imaging and method
CN108345085A (en) * 2017-01-25 2018-07-31 广州康昕瑞基因健康科技有限公司 Focus method and focusing system
CN107797262B (en) * 2017-11-03 2019-09-10 华东师范大学 Microscope different multiples camera lens based on image texture combines focus method
CN113358654B (en) * 2018-07-05 2022-07-19 深圳辉煌耀强科技有限公司 Image acquisition and analysis system
CN109031638B (en) * 2018-08-23 2021-05-14 深圳市瑞图生物技术有限公司 Quick automatic focusing method of biological microscope
CN109461187A (en) * 2018-10-23 2019-03-12 杭州智微信息科技有限公司 A kind of Atomatic focusing method based on myeloplast picture
CN111147732B (en) * 2018-11-06 2021-07-20 浙江宇视科技有限公司 Focusing curve establishing method and device
CN109612992B (en) * 2018-11-26 2021-07-23 深圳辉煌耀强科技有限公司 Rapid scanning method and system for cervical exfoliated cell smear
CN109766784A (en) * 2018-12-21 2019-05-17 北京理工大学 Capsule robot interaction control method based on monocular image
CN109652298B (en) * 2018-12-29 2022-03-22 北京化工大学 Droplet PCR amplification detection device based on micro-fluidic chip
CN111474103B (en) * 2019-01-24 2023-04-07 武汉兰丁智能医学股份有限公司 Automatic focusing scanning method and system for bone marrow cell glass slide
CN109873948B (en) * 2019-01-30 2020-06-26 中国地质大学(武汉) Intelligent automatic focusing method and device for optical microscope and storage device
CN110443794B (en) 2019-05-29 2020-12-18 腾讯科技(深圳)有限公司 Pathological image-based image state determination method, device and system
CN110389088B (en) * 2019-08-06 2021-09-07 哈尔滨工业大学 On-line monitoring method for particle pollutants on surface of large-diameter reflector
CN110519514B (en) * 2019-08-28 2020-06-26 中国科学院长春光学精密机械与物理研究所 Automatic focusing algorithm for astronomical telescope
CN110794549B (en) * 2019-11-11 2022-02-11 湖南伊鸿健康科技有限公司 Automatic focusing method, blood cell analyzer, and computer-readable storage medium
CN114450616B (en) * 2019-11-12 2023-10-27 深圳迈瑞生物医疗电子股份有限公司 Film reader adjusting method, device, equipment and medium
CN111199536B (en) * 2019-12-13 2023-11-14 深圳市瑞沃德生命科技有限公司 Focusing evaluation method and device
CN111770271B (en) * 2020-06-28 2021-07-27 青岛海洋地质研究所 Automatic focusing method based on image processing
CN112261285A (en) * 2020-09-18 2021-01-22 中国科学院上海技术物理研究所 Improved front focus position searching method based on hill climbing method
CN112230416B (en) * 2020-10-26 2023-03-10 琉明光电(常州)有限公司 Objective lens detection system method and device based on miniature crystal grains
CN113064269A (en) * 2021-04-09 2021-07-02 苏州华文海智能科技有限公司 Microscope and intelligent microscope system
CN113064267A (en) * 2021-04-09 2021-07-02 苏州华文海智能科技有限公司 Automatic focusing method of microscope
CN113777769B (en) * 2021-09-10 2022-11-15 深圳市高川自动化技术有限公司 Automatic focusing method and device for microscopic instrument, intelligent terminal and storage medium
CN113899698B (en) * 2021-09-27 2022-08-30 武汉大学 Real-time focusing and centering adjustment method and device for in-situ test platform
CN114040069B (en) * 2021-11-05 2023-03-24 东方晶源微电子科技(北京)有限公司 Automatic focusing method and device based on detector channel, equipment and storage medium
CN114299601A (en) * 2022-03-08 2022-04-08 北京万里红科技有限公司 Control method, control device, electronic equipment and storage medium
CN115308876A (en) * 2022-08-04 2022-11-08 苏州深捷信息科技有限公司 Reference focal plane-based microscope rapid focusing method, device, medium and product
CN115877556B (en) * 2022-11-29 2023-09-12 梧州学院 Automatic focusing method of optical imaging device and camera circuit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1553241A (en) * 2003-06-05 2004-12-08 北京普利生仪器有限公司 Automatic optical microscope
CN2679705Y (en) * 2003-12-31 2005-02-16 石家庄钢铁股份有限公司 Auto focusing device of microscope
EP1770428A1 (en) * 2005-09-30 2007-04-04 Sysmex Corporation Microscope and auto focusing method for a microscope

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1553241A (en) * 2003-06-05 2004-12-08 北京普利生仪器有限公司 Automatic optical microscope
CN2679705Y (en) * 2003-12-31 2005-02-16 石家庄钢铁股份有限公司 Auto focusing device of microscope
EP1770428A1 (en) * 2005-09-30 2007-04-04 Sysmex Corporation Microscope and auto focusing method for a microscope

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开平10-161195A 1998.06.19

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669264A (en) * 2019-01-08 2019-04-23 哈尔滨理工大学 Self-adapting automatic focus method based on shade of gray value

Also Published As

Publication number Publication date
CN101706609A (en) 2010-05-12

Similar Documents

Publication Publication Date Title
CN101706609B (en) Image processing based fast automatic focusing method of microscope
CN1967245B (en) Microscope and auto focusing method for a microscope
US8213782B2 (en) Predictive autofocusing system
CN107197151A (en) Atomatic focusing method, device, storage medium and electronic equipment
CN106303242A (en) The focusing system quickly of muti-spectrum imaging and method
CN104181685A (en) Automatic digital slide focusing device and method based on microscope
CN103513395A (en) Passive auto-focusing method and device
CN103945133B (en) Auto-focus device and method for visible light lens
CN109873948A (en) A kind of optical microscopy intelligence auto focusing method, equipment and storage equipment
CN101086600A (en) Imaging apparatus, imaging apparatus control method, and computer program
CN105049723B (en) Atomatic focusing method based on defocusing amount difference qualitative analysis
CN101494735B (en) Imaging apparatus, imaging apparatus control method
CN107664899A (en) The method, apparatus and system of auto-focusing
CN107421722A (en) Based on CCD camera image intensifier modulation transfer function test method and system
CN108628061A (en) A kind of adaptive Atomatic focusing method of industrial camera and device
CN201576122U (en) Multi-platform-based ultraprecise automatically-focusing system
CN105209955A (en) Automatic microscopic focus system and method for analysis of transparent or low contrast specimens
CN106878617B (en) A kind of focusing method and system
CN113923358A (en) Online automatic focusing method and system in flying shooting mode
CN1790095A (en) Automatic image focusing system and method
CN107806830A (en) A kind of range unit and application method based on zoom camera
CN106154688A (en) A kind of method and device of auto-focusing
CN201732207U (en) Auto-focusing recognition system for microscope
CN103529544A (en) Nano membrane thickness measuring instrument capable of automatically positioning and focusing
CN100378487C (en) Autofocus control method, autofocus controller, and image processor

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: CHANGZHOU INSTITUTE OF SUPERMEDIA AND SENSING TECH

Free format text: FORMER OWNER: CHANGZHOU DAQI INFORMATION TECHNOLOGY CO., LTD.

Effective date: 20111213

C41 Transfer of patent application or patent right or utility model
C53 Correction of patent for invention or patent application
CB03 Change of inventor or designer information

Inventor after: Zhou Dongxiang

Inventor after: Liu Yunhui

Inventor after: Di Yongping

Inventor after: Liu Shun

Inventor after: Cai Xuanping

Inventor before: Liu Yunhui

Inventor before: Liu Shun

Inventor before: Di Yongping

Inventor before: Zhou Dongxiang

Inventor before: Cai Xuanping

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: LIU YUNHUI LIU SHUN ZHAI YONGPING ZHOU DONGXIANG CAI XUANPING TO: ZHOU DONGXIANG LIU YUNHUI ZHAI YONGPING LIU SHUN CAI XUANPING

TA01 Transfer of patent application right

Effective date of registration: 20111213

Address after: 213000 Jiangsu Province, the Clock Tower District, ERON Road, No. 213 High-tech Venture Center, room 1008

Applicant after: Changzhou Hyper Medium and Sensing Technology Institute Co., Ltd.

Address before: 213000 Jiangsu Province, the Clock Tower District, ERON Road, No. 213 High-tech Venture Center, room 1008

Applicant before: Changzhou Daqi Information Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: DEFENSIVE SCIENTIFIC AND TECHNOLOGICAL UNIV., PLA

Effective date: 20130205

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20130205

Address after: 213000 Jiangsu Province, the Clock Tower District, ERON Road, No. 213 High-tech Venture Center, room 1008

Patentee after: Changzhou Hyper Medium and Sensing Technology Institute Co., Ltd.

Patentee after: National University of Defense Technology of People's Liberation Army of China

Address before: 213000 Jiangsu Province, the Clock Tower District, ERON Road, No. 213 High-tech Venture Center, room 1008

Patentee before: Changzhou Hyper Medium and Sensing Technology Institute Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120502

Termination date: 20181123