CN109116541A - Microscope focusing method, device, computer equipment and storage medium - Google Patents
Microscope focusing method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109116541A CN109116541A CN201811050022.3A CN201811050022A CN109116541A CN 109116541 A CN109116541 A CN 109116541A CN 201811050022 A CN201811050022 A CN 201811050022A CN 109116541 A CN109116541 A CN 109116541A
- Authority
- CN
- China
- Prior art keywords
- image
- thick
- focusing
- focus
- focus image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B21/00—Microscopes
- G02B21/36—Microscopes arranged for photographic purposes or projection purposes or digital imaging or video purposes including associated control and data processing arrangements
- G02B21/365—Control or image processing arrangements for digital or video microscopes
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B21/00—Microscopes
- G02B21/24—Base structure
- G02B21/241—Devices for focusing
- G02B21/242—Devices for focusing with coarse and fine adjustment mechanism
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B7/00—Mountings, adjusting means, or light-tight connections, for optical elements
- G02B7/28—Systems for automatic generation of focusing signals
- G02B7/36—Systems for automatic generation of focusing signals using image sharpness techniques, e.g. image processing techniques for generating autofocus signals
Abstract
This application involves a kind of microscope focusing method, device, computer equipment and storage mediums.The described method includes: the acquisition microscopical thick focus image;Assess the image definition of the thick focus image;According to described image clarity, thick focusing position and focusing adjustment direction are determined;Acquire the microscopical thin focus image;The thin focus image is the image that the microscope is obtained according to captured by the thick focusing position;According to the thin focus image, preferred focusing position is determined.According to the embodiment of the present application, preferred focusing position directly can be searched in the search range determined according to thick focusing position, without focusing repeated multiple timesly, save focusing time, improve focusing efficiency.
Description
Technical field
This application involves technical field of image processing, set more particularly to a kind of microscope focusing method, device, computer
Standby and storage medium.
Background technique
Microscope focusing technology, is mainly realized by measurement focal position.Passive focusing technology is based on picture quality
The focusing method of analysis processing is determined based on the analysis results by analyzing the image captured by current focus position
Optimal focal position, the method achieve extensive use in microscope focusing technology at present.
However, current focusing method needs are being focused repeated multiple timesly, it is best that search is attempted on multiple focusing positions
Focal position, cause focus process expend time it is more, focusing efficiency it is lower.
Therefore, current microscope focusing method has that focusing efficiency is lower.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of microscope focusing method, device, computer equipment
And storage medium.
A kind of microscope focusing method, comprising:
Acquire the microscopical thick focus image;
Assess the image definition of the thick focus image;
According to described image clarity, thick focusing position is determined;
Acquire the microscopical thin focus image;The thin focus image is the microscope according to the thick focusing position
Set captured obtained image;
According to the thin focus image, preferred focusing position is determined.
One embodiment wherein, the acquisition microscopical thick focus image, comprising:
Obtain amount of images demand and moving step length demand;
Determine the thick focus image quantity N1 of described image quantity demand, and, determine the thick of the moving step length demand
Focus step-length S1;Wherein, N1 > 0, S1 > 0;
It controls the microscopical focus lens and shoots image according to the thick focusing step-length S1, meet until obtaining quantity
The image of the thick focus image quantity N1, as the thick focus image.
One embodiment wherein, the acquisition microscopical thin focus image, comprising:
Determine the corresponding thin focus image quantity N2 of the thick focus image quantity N1, and, determine the thick focusing step
The corresponding thin focusing step-length S2 of long S1;Wherein, N1 > N2 > 0, S1 > S2 > 0;
The microscopical focus lens are controlled in the corresponding search range of the thick focusing position, to preset focusing
Adjustment direction is mobile, and shoots image in the movement thin focusing step-length S2, until obtaining quantity meets the thin focusing figure
As the image of quantity S2, as the thin focus image.
One embodiment wherein is clapped in the control microscopical focus lens according to the thick focusing step-length S1
It takes the photograph before image, further includes:
Determine initial focusing position and initial focusing adjustment direction;
The control microscopical focus lens shoot image according to the thick focusing step-length S1, comprising:
It is mobile to the initial focusing adjustment direction in the initial focusing position to control the microscopical focus lens,
And image is shot in the movement thick focusing step-length S1.
One embodiment wherein, it is described according to described image clarity, determine thick focusing position, comprising:
According to described image clarity, articulation curve is generated;
Detect the clarity wave crest of the articulation curve;
The corresponding focusing position of the clarity wave crest is obtained, as the thick focusing position.
One embodiment wherein, the image definition of the assessment thick focus image, comprising:
Binary conversion treatment is carried out to the thick focus image, obtains binary image;
Determine the inactive area of the binary image;
The inactive area is removed in the thick focus image, obtains optimizing thick focus image;
The clarity for calculating the thick focus image of optimization, obtains described image clarity.
One embodiment wherein, the image definition of the assessment thick focus image, comprising:
Carrying out multiple spot to the thick focus image takes window to handle, and obtains area image;
It identifies the area image, obtains effective coverage image;
The clarity for calculating the effective coverage image, obtains described image clarity.
A kind of microscope focusing mechanism, comprising:
First acquisition module, for acquiring the microscopical thick focus image;
Evaluation module, for assessing the image definition of the thick focus image;
Focusing determining module, for determining thick focusing position according to described image clarity;
Second acquisition module, for acquiring the microscopical thin focus image;The thin focus image is described micro-
The image that mirror is obtained according to captured by the thick focusing position;
Focusing position determining module, for determining preferred focusing position according to the thin focus image
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing
Device performs the steps of when executing the computer program
Acquire the microscopical thick focus image;
Assess the image definition of the thick focus image;
According to described image clarity, thick focusing position is determined;
Acquire the microscopical thin focus image;The thin focus image is the microscope according to the thick focusing position
Set captured obtained image;
According to the thin focus image, preferred focusing position is determined.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
It is performed the steps of when row
Acquire the microscopical thick focus image;
Assess the image definition of the thick focus image;
According to described image clarity, thick focusing position is determined;
Acquire the microscopical thin focus image;The thin focus image is the microscope according to the thick focusing position
Set captured obtained image;
According to the thin focus image, preferred focusing position is determined.
Above-mentioned microscope focusing method, device, computer equipment and storage medium acquire thick focusing by the slightly mode of focusing
Image determines thick focusing position according to the image definition of thick focus image, for thick focusing position, according to thin focusing mode
Thin focus image is acquired, preferred focusing position is determined according to thin focus image.As a result, in thin focus process, can directly it exist
Preferred focusing position is searched in the search range determined according to thick focusing position, without focusing repeated multiple timesly, saves focusing
Time improves focusing efficiency.
Moreover, because need not focus repeatedly, microscopical focus lens error as caused by dealing campaign is avoided, is mentioned
Focusing precision is risen.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of microscope focusing method of one embodiment;
Fig. 2 is a kind of structural block diagram of microscope focusing mechanism of one embodiment;
Fig. 3 is a kind of specific example of microscope focusing process of the application;
Fig. 4 is a kind of internal structure chart of computer equipment of one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
In one embodiment, as shown in Figure 1, providing a kind of microscope focusing method, which may include having
Above-mentioned microscope focusing method may be implemented in focusing process device and focus lens, focusing process device, and focus lens can be used for
Image is shot, above-mentioned method may comprise steps of:
Step S110 acquires the microscopical thick focus image.
Wherein, thick focus image is the image shot under relatively large focusing step-length.
In the specific implementation, focusing process device can initialize focusing axis of orientation first, microscopical focusing axis of orientation is usual
For the Z axis with horizontal plane.Amount of images demand and moving step length demand can be set in user.In general, amount of images demand
The number of image is as acquired, moving step length demand is the distance that microscopical focus lens are moved along each step of Z axis.
Determine that the thick focus image quantity currently to be acquired is N1 according to set amount of images demand, according to set moving step length
Demand determines that current thick focusing step-length is S1, and focusing process device controls microscopical focus lens and shoots image according to S1, until
The image of thick focus image quantity N1 is obtained, as thick focus image.
Step S120 assesses the image definition of the thick focus image.
Wherein, image definition can be the numerical value of assessment image clearly degree.
In the specific implementation, focusing process device can calculate image definition for one or more thick focus images.
In practical application, can by various focusing evaluation functions calculate image definition, as energy gradient function,
Sobel gradient function, Brenner gradient function, Roberts gradient function, variance function, Lpalace gradient function, comentropy
Function.Longer has energy gradient, variance function, entropy function etc..
Step S130 determines thick focusing position according to described image clarity.
Wherein, thick focusing position can according to focal position determined by the image definition of thick focus image.
In the specific implementation, can for each thick focus image focusing position and its corresponding image definition, generate
Articulation curve, the articulation curve reflect the image definition of the acquired image of each focusing position, clearly write music at this
On the wave crest of line, determine that corresponding focusing position is thick focusing position, i.e., it is currently acquired relatively clear under thick focusing mode
The focusing position of clear image.
Step S140 acquires the microscopical thin focus image;The thin focus image is the microscope according to institute
State the image obtained captured by focusing position.
Wherein, thin focus image is the image shot under relatively small focusing step-length.
In the specific implementation, focusing process device can calculate the thin focus image quantity acquired required for acquiring thin focus image
And step-length of carefully focusing, microscopical focus lens are then controlled according to thin focusing step-length shooting image, until carefully being focused
The image of amount of images, as thin focus image.
For example, the corresponding thick focus image quantity of set amount of images demand is N1, set moving step length demand
Corresponding thick focusing step-length is S1, calculates thin focus image quantity N2=N1/2, calculates thin focusing step-length S2=S1/4.At focusing
It manages device and controls microscopical focus lens according to S2 shooting image, until N2 images are obtained, as thin focus image.
Step S150 determines preferred focusing position according to the thin focus image.
Wherein, preferably focusing position by acquisition focus image the optimal focusing position of clarity.
In the specific implementation, focusing process device can assess the thin focusing clarity of multiple thin focus images, determine optimal
Thin focusing clarity is carefully focused clarity as target, the corresponding focusing position of clarity that target is carefully focused, as preferably right
Burnt position.Thus, it is possible to which controlling microscopical focus lens is moved to the preferred focusing position, to realize auto-focusing.
It should be noted that determining thick focusing position by the slightly mode of focusing, since the step-length for mode of slightly focusing is larger, very
Positive preferred focusing position is likely to be on the position near thick focusing position, accordingly, it is determined that after thick focusing position, it can be with needle
Search range is determined to thick focusing position, for example, the range of 100 step of front and back of thick focusing position, alternatively, before thick focusing position
The range of 200 steps.Then, preferably right using the determination of lesser step-length further by mode of carefully focusing according to the search range
Burnt position.
According to the technical solution of the embodiment of the present application, thick focus image is acquired by the slightly mode of focusing, according to thick focusing figure
The image definition of picture determines thick focusing position, for thick focusing position, acquires thin focus image according to thin focusing mode, according to
Thin focus image determines preferred focusing position.It, can be directly according to the determination of thick focusing position as a result, in thin focus process
Preferred focusing position is searched in search range and saves focusing time without focusing repeated multiple timesly, improves focusing efficiency.
Moreover, because need not focus repeatedly, microscopical focus lens error as caused by dealing campaign is avoided, is mentioned
Focusing precision is risen.
In another embodiment, the step S110, comprising:
Obtain amount of images demand and moving step length demand;Determine the thick focus image quantity of described image quantity demand
N1, and, determine the thick focusing step-length S1 of the moving step length demand;Wherein, N1 > 0, S1 > 0;It controls described microscopical
Focus lens shoot image according to the thick focusing step-length S1, until obtaining the figure that quantity meets the thick focus image quantity N1
Picture, as the thick focus image.
In the specific implementation, amount of images demand and moving step length demand can be set in user, for example, thick focus image is arranged
Quantity N1, and, thick focusing step-length S1 is set.It is clapped after the mobile thick focusing step-length S1 of focusing process device control focus lens
It takes the photograph, N1 images of shooting, as thick focus image.
In another embodiment, it is clapped in the control microscopical focus lens according to the thick focusing step-length S1
It takes the photograph before image, further includes:
Determine initial focusing position and initial focusing adjustment direction;
The control microscopical focus lens shoot image according to the thick focusing step-length S1, comprising:
It is mobile to the initial focusing adjustment direction in the initial focusing position to control the microscopical focus lens,
And image is shot in the movement thick focusing step-length S1.
Wherein, focusing adjustment direction can carry out the direction of focusing adjustment for microscope, usually microscopical Z axis, show
Micro mirror focus lens in focusing can be adjusted upward along Z axis, can also be adjusted downwards along Z axis, to adjust to different directions
Focusing position.Initial focusing adjustment direction is the focusing adjustment direction initialized.
In the specific implementation, focusing process device can set an initial focusing position and initial focusing adjustment direction, for example,
It is adjusted upward in some focusing position along Z axis.In thick focusing, it can control focus lens in the initial focusing position to initial
Focusing adjustment direction is moved, and shoots image in mobile thick focusing step-length S1.
It is acquired by larger step size thick according to the technical solution of the embodiment of the present application according to the focusing adjustment direction of setting
Focus image simultaneously determines thick focusing position and focusing adjustment direction according to the image definition of thick focus image, avoids directly
Focusing time spent by preferred focusing position is determined by smaller step-length, improves focusing efficiency.
In another embodiment, the step S120, comprising:
Binary conversion treatment is carried out to the thick focus image, obtains binary image;Determine the nothing of the binary image
Imitate region;The inactive area is removed in the thick focus image, obtains optimizing thick focus image;It is thick right to calculate the optimization
The clarity of burnt image obtains described image clarity.
In the specific implementation, focusing process device after collecting thick focus image, can carry out two-value to thick focus image
Change processing, obtains black white image, as binary image.Then, by the method for Threshold segmentation, judge each in binary image
Whether a pixel is inactive pixels point, after determining multiple inactive pixels points, determines that inactive pixels point is formed by region, is
Inactive area removes the image of inactive area in thick focus image, obtains optimizing thick focus image, for the thick focusing figure of optimization
Picture calculates clarity, has obtained the image definition of thick focus image by various focusing evaluation functions.
Dead space is determined by carrying out binary conversion treatment to thick focus image according to the technical solution of the embodiment of the present application
Domain generates according to inactive area and optimizes thick focus image, calculates image definition for thick focus image is optimized, avoids to thick right
Background area in burnt image calculates image definition, does so as to avoid the picture material in background area to clarity
It disturbs, improves the accuracy of assessment image definition.
In another embodiment, the step S120, comprising:
Carrying out multiple spot to the thick focus image takes window to handle, and obtains area image;It identifies the area image, is had
Imitate area image;The clarity for calculating the effective coverage image, obtains described image clarity.
In the specific implementation, focusing process device after collecting thick focus image, can also carry out thick focus image more
Point takes window to handle, and thick focus image is divided into multiple regions image.For example, thick focus image to be divided into four areas of equal part
Area image.Then, identification each region image determines that it is inactive area if area image only includes empty content
Image determines that it is effective coverage image if area image includes the content of feature to be detected.Determine effective coverage figure
As after, clarity is calculated, the figure of thick focus image has been obtained by various focusing evaluation functions for effective coverage image
Image sharpness.
According to the technical solution of the embodiment of the present application, takes window to handle by carrying out multiple spot to thick focus image, obtain multiple
Area image, and effective coverage image is filtered out in area image, image definition is calculated for effective coverage image, thus
Image definition can be calculated to avoid to the inactive area in thick focus image, reduce calculation amount, it is clear to improve assessment image
The efficiency of clear degree.
In another embodiment, the step S130, comprising:
According to described image clarity, articulation curve is generated;Detect the clarity wave crest of the articulation curve;It obtains
The corresponding focusing position of the clarity wave crest, as the thick focusing position.
In the specific implementation, focusing position and its corresponding image definition for each thick focus image, it is clear to generate
It writes music line, which reflects the image definition of the acquired image of each focusing position, detect the articulation curve
Wave crest, as clarity wave crest.By the corresponding focusing position of clarity wave crest, as above-mentioned thick focusing position.
In another embodiment, the step S140, comprising:
Determine the corresponding thin focus image quantity N2 of the thick focus image quantity N1, and, determine the thick focusing step
The corresponding thin focusing step-length S2 of long S1;Wherein, N1 > N2 > 0, S1 > S2 > 0;The microscopical focus lens are controlled in institute
It is mobile to the focusing adjustment direction to state focusing position, and shoots image in the movement thin focusing step-length S2, until obtaining
Quantity meets the image of the thin focus image quantity S2, as the thin focus image.
For example, current thick focus image quantity is N1=10, current thick focusing step-length is S1=4, calculates thin focusing
Amount of images N2=10/2=5 calculates thin focusing step-length S2=4/4=1.Focusing process device controls focus lens according to S2=1
Step-length, moved to focusing adjustment direction, shoot image after movement, until N2=5 images are obtained, as thin focusing
Image.
In another embodiment, the step S150, comprising:
Assess the thin focusing clarity of the thin focus image;Determine that target is carefully focused clarity;It is thin to obtain the target
The corresponding focusing position of clarity of focusing, as the preferred focusing position.
In the specific implementation, the image definition of thin focus image can be calculated by various focusing evaluation functions, determine most
Excellent thin focusing clarity is carefully focused clarity as target, the corresponding focusing position of clarity that target is carefully focused, as excellent
Select focusing position.
It should be understood that although each step in the flow chart of Fig. 1 is successively shown according to the instruction of arrow, this
A little steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these steps
It executes there is no the limitation of stringent sequence, these steps can execute in other order.Moreover, at least part in Fig. 1
Step may include that perhaps these sub-steps of multiple stages or stage are executed in synchronization to multiple sub-steps
It completes, but can execute at different times, the execution sequence in these sub-steps or stage, which is also not necessarily, successively to be carried out,
But it can be executed in turn or alternately at least part of the sub-step or stage of other steps or other steps.
In one embodiment, as shown in Fig. 2, providing a kind of microscope focusing mechanism, comprising: the first acquisition module
210, evaluation module 220, focusing determining module 230, the second acquisition module 240 and focusing position determining module 250, in which:
First acquisition module 210, for acquiring the microscopical thick focus image;
Evaluation module 220, for assessing the image definition of the thick focus image;
Focusing determining module 230, for determining thick focusing position and focusing adjustment direction according to described image clarity;
Second acquisition module 240, for acquiring the microscopical thin focus image;The thin focus image is described aobvious
The image that micro mirror is obtained according to captured by the thick focusing position;
Focusing position determining module 250, for determining preferred focusing position according to the thin focus image.
According to the technical solution of the embodiment of the present application, thick focus image is acquired by the slightly mode of focusing, according to thick focusing figure
The image definition of picture determines thick focusing position, for thick focusing position, acquires thin focus image, root according to thin focusing mode
Preferred focusing position is determined according to thin focus image.As a result, in thin focus process, can directly it be determined according to thick focusing position
Search range in the preferred focusing position of search without focusing repeated multiple timesly save focusing time, improve focusing effect
Rate.
Moreover, because need not focus repeatedly, microscopical focus lens error as caused by dealing campaign is avoided, is mentioned
Focusing precision is risen.
In another embodiment, first acquisition module 210, comprising:
Demand acquisition submodule, for obtaining amount of images demand and moving step length demand;
Quantity and step-length determine the first submodule, for determining the thick focus image quantity N1 of described image quantity demand,
And determine the thick focusing step-length S1 of the moving step length demand;Wherein, N1 > 0, S1 > 0;
Thick focusing submodule, for controlling the microscopical focus lens according to the thick focusing step-length S1 shooting figure
Picture, until the image that quantity meets the thick focus image quantity N1 is obtained, as the thick focus image.
In another embodiment, second acquisition module 240, comprising:
Quantity and step-length determine second submodule, for determining the corresponding thin focus image of the thick focus image quantity N1
Quantity N2, and, determine the corresponding thin focusing step-length S2 of the thick focusing step-length S1;Wherein, N1 > N2 > 0, S1 > S2 > 0;
Thin focusing submodule, for controlling the microscopical focus lens in the corresponding search model of the thick focusing position
It is mobile to preset focusing adjustment direction in enclosing, and image is shot in the movement thin focusing step-length S2, until obtaining quantity
The image for meeting the thin focus image quantity S2, as the thin focus image.
In another embodiment, further includes:
Initial module, for determining initial focusing position and initial focusing adjustment direction;
The thick focusing submodule, is specifically used for:
It is mobile to the initial focusing adjustment direction in the initial focusing position to control the microscopical focus lens,
And image is shot in the movement thick focusing step-length S1.
In another embodiment, the focusing determining module 230, comprising:
Curve generates submodule, for generating articulation curve according to described image clarity;
Wave crest detection sub-module, for detecting the clarity wave crest of the articulation curve;
Thick focusing position submodule, for obtaining the corresponding focusing position of the clarity wave crest, as the thick focusing
Position.
In another embodiment, the evaluation module 220, comprising:
Binaryzation submodule obtains binary image for carrying out binary conversion treatment to the thick focus image;
It is invalid to determine submodule, for determining the inactive area of the binary image;
Optimization submodule obtains optimizing thick focus image for removing the inactive area in the thick focus image;
First sharpness meter operator module obtains described image for calculating the clarity of the thick focus image of optimization
Clarity.
In another embodiment, the evaluation module 220, comprising:
Multiple spot takes window module, takes window to handle for carrying out multiple spot to the thick focus image, obtains area image;
Identify submodule, the area image, obtains effective coverage image for identification;
It is clear to obtain described image for calculating the clarity of the effective coverage image for second sharpness meter operator module
Clear degree.
Dead space is determined by carrying out binary conversion treatment to thick focus image according to the technical solution of the embodiment of the present application
Domain generates according to inactive area and optimizes thick focus image, calculates image definition for thick focus image is optimized, avoids to thick right
Background area in burnt image calculates image definition, does so as to avoid the picture material in background area to clarity
It disturbs, improves the accuracy of assessment image definition.
According to the technical solution of the embodiment of the present application, takes window to handle by carrying out multiple spot to thick focus image, obtain multiple
Area image, and effective coverage image is filtered out in area image, image definition is calculated for effective coverage image, thus
Image definition can be calculated to avoid to the inactive area in thick focus image, reduce calculation amount, it is clear to improve assessment image
The efficiency of clear degree.
Specific about microscope focusing mechanism limits the restriction that may refer to above for microscope focusing method,
This is repeated no more.Modules in above-mentioned microscope focusing mechanism can come fully or partially through software, hardware and combinations thereof
It realizes.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with software
Form is stored in the memory in computer equipment, executes the corresponding operation of the above modules in order to which processor calls.
The microscope focusing method of the application in order to facilitate understanding by those skilled in the art, below with reference to the specific of Fig. 3
Example is illustrated.
Fig. 3 is a kind of specific example of microscope focusing process of the application.As shown, microscope starts to carry out pair
Coke initializes microscopical Z axis first, i.e., adjusts focus lens to the initial position of Z axis.Then, whether judgement currently deposits
There is thick focusing position.There is thick focusing position if it exists, it is determined that thin focus image quantity N2=N1/2 determines thin focusing step-length
S2=S1/4, control focus lens are moved to thick focusing position, according to according to the corresponding focusing adjustment direction of thick focusing position, press
Thin focus image is acquired according to thin focusing step-length, and according to the image definition of thin focus image, determines thin focusing position, thus logical
Meticulous focus search goes out thin focusing position.
There is thick focusing position if it does not exist, then amount of images demand and moving step length need according to set by user first
It asks, determines thick focus image quantity N1 and thick focusing step-length S1, judge whether present image acquisition is completed, if not completing, according to
Thick focusing step-length S1 is slightly focused, and thick focus image is obtained, and carries out binaryzation to thick focus image image, according to binaryzation
Image determines the image preprocessing of inactive area etc., assesses image definition for the pretreated thick focus image of optimization, and
Record focusing number, control focus lens are moved to next focusing position along Z axis according to thick focusing step-length S1, until acquisition
To the image of thick focus image quantity N1.When the image for collecting thick focus image quantity N1 determines thick according to image definition
Focusing position, and focusing number is recorded, when focusing number reaches preset threshold, then focusing terminates;If it is not, being then back to initialization
The step of Z axis, to carry out the thin focusing of next round.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction
Composition can be as shown in Figure 4.The computer equipment include by system bus connect processor, memory, network interface and
Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment
Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data
Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The network interface of machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor with
Realize a kind of microscope focusing method.
It will be understood by those skilled in the art that structure shown in Fig. 4, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory
Computer program, the processor perform the steps of when executing computer program
Acquire the microscopical thick focus image;
Assess the image definition of the thick focus image;
According to described image clarity, thick focusing position and focusing adjustment direction are determined;
Acquire the microscopical thin focus image;The thin focus image is the microscope according to the thick focusing position
Set captured obtained image;
According to the thin focus image, preferred focusing position is determined.
In one embodiment, it is also performed the steps of when processor executes computer program
Obtain amount of images demand and moving step length demand;
Determine the thick focus image quantity N1 of described image quantity demand, and, determine the thick of the moving step length demand
Focus step-length S1;Wherein, N1 > 0, S1 > 0;
It controls the microscopical focus lens and shoots image according to the thick focusing step-length S1, meet until obtaining quantity
The image of the thick focus image quantity N1, as the thick focus image.
In one embodiment, it is also performed the steps of when processor executes computer program
Determine the corresponding thin focus image quantity N2 of the thick focus image quantity N1, and, determine the thick focusing step
The corresponding thin focusing step-length S2 of long S1;Wherein, N1 > N2 > 0, S1 > S2 > 0;
The microscopical focus lens are controlled in the corresponding search range of the thick focusing position, to preset focusing
Adjustment direction is mobile, and shoots image in the movement thin focusing step-length S2, until obtaining quantity meets the thin focusing figure
As the image of quantity S2, as the thin focus image.
In one embodiment, it is also performed the steps of when processor executes computer program
Determine initial focusing position and initial focusing adjustment direction;
The control microscopical focus lens shoot image according to the thick focusing step-length S1, comprising:
It is mobile to the initial focusing adjustment direction in the initial focusing position to control the microscopical focus lens,
And image is shot in the movement thick focusing step-length S1.
In one embodiment, it is also performed the steps of when processor executes computer program
According to described image clarity, articulation curve is generated;
Detect the clarity wave crest of the articulation curve;
The corresponding focusing position of the clarity wave crest is obtained, as the thick focusing position.
In one embodiment, it is also performed the steps of when processor executes computer program
Binary conversion treatment is carried out to the thick focus image, obtains binary image;
Determine the inactive area of the binary image;
The inactive area is removed in the thick focus image, obtains optimizing thick focus image;
The clarity for calculating the thick focus image of optimization, obtains described image clarity.
In one embodiment, it is also performed the steps of when processor executes computer program
Carrying out multiple spot to the thick focus image takes window to handle, and obtains area image;
It identifies the area image, obtains effective coverage image;
The clarity for calculating the effective coverage image, obtains described image clarity.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program performs the steps of when being executed by processor
Acquire the microscopical thick focus image;
Assess the image definition of the thick focus image;
According to described image clarity, thick focusing position and focusing adjustment direction are determined;
Acquire the microscopical thin focus image;The thin focus image is the microscope according to the thick focusing position
Set captured obtained image;
According to the thin focus image, preferred focusing position is determined.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Obtain amount of images demand and moving step length demand;
Determine the thick focus image quantity N1 of described image quantity demand, and, determine the thick of the moving step length demand
Focus step-length S1;Wherein, N1 > 0, S1 > 0;
It controls the microscopical focus lens and shoots image according to the thick focusing step-length S1, meet until obtaining quantity
The image of the thick focus image quantity N1, as the thick focus image.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Determine the corresponding thin focus image quantity N2 of the thick focus image quantity N1, and, determine the thick focusing step
The corresponding thin focusing step-length S2 of long S1;Wherein, N1 > N2 > 0, S1 > S2 > 0;
The microscopical focus lens are controlled in the corresponding search range of the thick focusing position, to preset focusing
Adjustment direction is mobile, and shoots image in the movement thin focusing step-length S2, until obtaining quantity meets the thin focusing figure
As the image of quantity S2, as the thin focus image.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Determine initial focusing position and initial focusing adjustment direction;
The control microscopical focus lens shoot image according to the thick focusing step-length S1, comprising:
It is mobile to the initial focusing adjustment direction in the initial focusing position to control the microscopical focus lens,
And image is shot in the movement thick focusing step-length S1.
In one embodiment, it is also performed the steps of when computer program is executed by processor
According to described image clarity, articulation curve is generated;
Detect the clarity wave crest of the articulation curve;
The corresponding focusing position of the clarity wave crest is obtained, as the thick focusing position.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Binary conversion treatment is carried out to the thick focus image, obtains binary image;
Determine the inactive area of the binary image;
The inactive area is removed in the thick focus image, obtains optimizing thick focus image;
The clarity for calculating the thick focus image of optimization, obtains described image clarity.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Carrying out multiple spot to the thick focus image takes window to handle, and obtains area image;
It identifies the area image, obtains effective coverage image;
The clarity for calculating the effective coverage image, obtains described image clarity.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of microscope focusing method characterized by comprising
Acquire the microscopical thick focus image;
Assess the image definition of the thick focus image;
According to described image clarity, thick focusing position is determined;
Acquire the microscopical thin focus image;The thin focus image is the microscope according to the thick focusing position institute
Shoot obtained image;
According to the thin focus image, preferred focusing position is determined.
2. the method according to claim 1, wherein the acquisition microscopical thick focus image, comprising:
Obtain amount of images demand and moving step length demand;
Determine the thick focus image quantity N1 of described image quantity demand, and, determine the thick focusing of the moving step length demand
Step-length S1;Wherein, N1 > 0, S1 > 0;
Control the microscopical focus lens and shoot image according to the thick focusing step-length S1, until obtain quantity meet it is described
The image of thick focus image quantity N1, as the thick focus image.
3. according to the method described in claim 2, it is characterized in that, the acquisition microscopical thin focus image, comprising:
Determine the corresponding thin focus image quantity N2 of the thick focus image quantity N1, and, determine the thick focusing step-length S1
Corresponding thin focusing step-length S2;Wherein, N1 > N2 > 0, S1 > S2 > 0;
The microscopical focus lens are controlled in the corresponding search range of the thick focusing position, are adjusted to preset focusing
Direction is mobile, and shoots image in the movement thin focusing step-length S2, until obtaining quantity meets the thin focus image number
The image for measuring S2, as the thin focus image.
4. according to the method described in claim 2, it is characterized in that, in the control microscopical focus lens according to institute
It states before slightly focusing step-length S1 shooting image, further includes:
Determine initial focusing position and initial focusing adjustment direction;
The control microscopical focus lens shoot image according to the thick focusing step-length S1, comprising:
It is mobile to the initial focusing adjustment direction in the initial focusing position to control the microscopical focus lens, and
Image is shot when the mobile thick focusing step-length S1.
5. the method according to claim 1, wherein described according to described image clarity, determining thick focusing position
It sets, comprising:
According to described image clarity, articulation curve is generated;
Detect the clarity wave crest of the articulation curve;
The corresponding focusing position of the clarity wave crest is obtained, as the thick focusing position.
6. the method according to claim 1, wherein the image definition of the assessment thick focus image,
Include:
Binary conversion treatment is carried out to the thick focus image, obtains binary image;
Determine the inactive area of the binary image;
The inactive area is removed in the thick focus image, obtains optimizing thick focus image;
The clarity for calculating the thick focus image of optimization, obtains described image clarity.
7. according to the method described in claim 6, it is characterized in that, the image definition of the assessment thick focus image,
Include:
Carrying out multiple spot to the thick focus image takes window to handle, and obtains area image;
It identifies the area image, obtains effective coverage image;
The clarity for calculating the effective coverage image, obtains described image clarity.
8. a kind of microscope focusing mechanism characterized by comprising
First acquisition module, for acquiring the microscopical thick focus image;
Evaluation module, for assessing the image definition of the thick focus image;
Focusing determining module, for determining thick focusing position according to described image clarity;
Second acquisition module, for acquiring the microscopical thin focus image;The thin focus image is the microscope root
According to the image obtained captured by the thick focusing position;
Focusing position determining module, for determining preferred focusing position according to the thin focus image.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811050022.3A CN109116541A (en) | 2018-09-10 | 2018-09-10 | Microscope focusing method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811050022.3A CN109116541A (en) | 2018-09-10 | 2018-09-10 | Microscope focusing method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109116541A true CN109116541A (en) | 2019-01-01 |
Family
ID=64858987
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811050022.3A Pending CN109116541A (en) | 2018-09-10 | 2018-09-10 | Microscope focusing method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109116541A (en) |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109884032A (en) * | 2019-02-19 | 2019-06-14 | 中国科学院合肥物质科学研究院 | The pinpoint laser induced breakdown spectroscopy detection system of ablation point and method |
CN110031960A (en) * | 2019-05-30 | 2019-07-19 | 上海商汤智能科技有限公司 | Automatic adjustment method and device |
CN110244444A (en) * | 2019-05-21 | 2019-09-17 | 深圳市智影医疗科技有限公司 | Microscopical focusing method, device, terminal device and storage medium |
CN110794549A (en) * | 2019-11-11 | 2020-02-14 | 湖南伊鸿健康科技有限公司 | Automatic focusing method, blood cell analyzer, and computer-readable storage medium |
CN110927918A (en) * | 2019-12-27 | 2020-03-27 | 屏丽科技成都有限责任公司 | Long-stroke focusing lens rapid convergence focusing method and projector applying same |
CN110930363A (en) * | 2019-10-29 | 2020-03-27 | 北京临近空间飞行器系统工程研究所 | Method and device for determining sharpness evaluation value of curved-surface blurred image and storage medium |
CN110996002A (en) * | 2019-12-16 | 2020-04-10 | 深圳大学 | Microscope focusing method, device, computer equipment and storage medium |
CN111757014A (en) * | 2020-08-07 | 2020-10-09 | 深圳市爱普泰科电子有限公司 | Focal length adjusting method, device, equipment and storage medium of network camera |
CN112099217A (en) * | 2020-08-18 | 2020-12-18 | 宁波永新光学股份有限公司 | Automatic focusing method for microscope |
CN112285876A (en) * | 2020-11-04 | 2021-01-29 | 邱妙娜 | Camera automatic focusing method based on image processing and bubble detection |
CN112541939A (en) * | 2020-12-24 | 2021-03-23 | 安图实验仪器(郑州)有限公司 | Method and device for obtaining position of clear focal plane of sample |
CN113329183A (en) * | 2021-07-01 | 2021-08-31 | 珠海丽珠试剂股份有限公司 | Focusing method and device for shooting equipment and multiple liquid phase chip shooting equipment |
CN114040067A (en) * | 2021-11-05 | 2022-02-11 | 东方晶源微电子科技(北京)有限公司 | Automatic focusing method and device based on electron beam measuring equipment, equipment and storage medium |
CN114185164A (en) * | 2021-12-17 | 2022-03-15 | 重庆切克威科技有限公司 | Quick automatic focusing method of microscope |
CN115308876A (en) * | 2022-08-04 | 2022-11-08 | 苏州深捷信息科技有限公司 | Reference focal plane-based microscope rapid focusing method, device, medium and product |
CN116320748A (en) * | 2023-05-22 | 2023-06-23 | 深圳明锐理想科技有限公司 | Automatic focusing method and device, electronic equipment and automatic optical detection equipment |
WO2023133729A1 (en) * | 2022-01-12 | 2023-07-20 | 东方晶源微电子科技(北京)有限公司 | Automatic focusing method, apparatus and device based on electron beam measurement device, and storage medium |
-
2018
- 2018-09-10 CN CN201811050022.3A patent/CN109116541A/en active Pending
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109884032A (en) * | 2019-02-19 | 2019-06-14 | 中国科学院合肥物质科学研究院 | The pinpoint laser induced breakdown spectroscopy detection system of ablation point and method |
CN110244444A (en) * | 2019-05-21 | 2019-09-17 | 深圳市智影医疗科技有限公司 | Microscopical focusing method, device, terminal device and storage medium |
CN110244444B (en) * | 2019-05-21 | 2021-09-03 | 深圳市智影医疗科技有限公司 | Microscope focusing method and device, terminal equipment and storage medium |
CN110031960B (en) * | 2019-05-30 | 2021-06-22 | 上海商汤智能科技有限公司 | Automatic adjustment method and device |
CN110031960A (en) * | 2019-05-30 | 2019-07-19 | 上海商汤智能科技有限公司 | Automatic adjustment method and device |
CN110930363A (en) * | 2019-10-29 | 2020-03-27 | 北京临近空间飞行器系统工程研究所 | Method and device for determining sharpness evaluation value of curved-surface blurred image and storage medium |
CN110794549A (en) * | 2019-11-11 | 2020-02-14 | 湖南伊鸿健康科技有限公司 | Automatic focusing method, blood cell analyzer, and computer-readable storage medium |
CN110794549B (en) * | 2019-11-11 | 2022-02-11 | 湖南伊鸿健康科技有限公司 | Automatic focusing method, blood cell analyzer, and computer-readable storage medium |
CN110996002A (en) * | 2019-12-16 | 2020-04-10 | 深圳大学 | Microscope focusing method, device, computer equipment and storage medium |
CN110927918A (en) * | 2019-12-27 | 2020-03-27 | 屏丽科技成都有限责任公司 | Long-stroke focusing lens rapid convergence focusing method and projector applying same |
CN111757014A (en) * | 2020-08-07 | 2020-10-09 | 深圳市爱普泰科电子有限公司 | Focal length adjusting method, device, equipment and storage medium of network camera |
CN111757014B (en) * | 2020-08-07 | 2022-03-11 | 深圳市爱普泰科电子有限公司 | Focal length adjusting method, device, equipment and storage medium of network camera |
CN112099217A (en) * | 2020-08-18 | 2020-12-18 | 宁波永新光学股份有限公司 | Automatic focusing method for microscope |
CN112285876A (en) * | 2020-11-04 | 2021-01-29 | 邱妙娜 | Camera automatic focusing method based on image processing and bubble detection |
CN112541939A (en) * | 2020-12-24 | 2021-03-23 | 安图实验仪器(郑州)有限公司 | Method and device for obtaining position of clear focal plane of sample |
CN112541939B (en) * | 2020-12-24 | 2023-06-27 | 安图实验仪器(郑州)有限公司 | Method and device for acquiring clear focal plane position of sample |
CN113329183A (en) * | 2021-07-01 | 2021-08-31 | 珠海丽珠试剂股份有限公司 | Focusing method and device for shooting equipment and multiple liquid phase chip shooting equipment |
CN113329183B (en) * | 2021-07-01 | 2022-08-09 | 珠海丽珠试剂股份有限公司 | Focusing method and device for shooting equipment and multiple liquid phase chip shooting equipment |
CN114040067B (en) * | 2021-11-05 | 2023-02-24 | 东方晶源微电子科技(北京)有限公司 | Automatic focusing method and device based on electron beam measuring equipment, equipment and storage medium |
CN114040067A (en) * | 2021-11-05 | 2022-02-11 | 东方晶源微电子科技(北京)有限公司 | Automatic focusing method and device based on electron beam measuring equipment, equipment and storage medium |
CN114185164A (en) * | 2021-12-17 | 2022-03-15 | 重庆切克威科技有限公司 | Quick automatic focusing method of microscope |
WO2023133729A1 (en) * | 2022-01-12 | 2023-07-20 | 东方晶源微电子科技(北京)有限公司 | Automatic focusing method, apparatus and device based on electron beam measurement device, and storage medium |
CN115308876A (en) * | 2022-08-04 | 2022-11-08 | 苏州深捷信息科技有限公司 | Reference focal plane-based microscope rapid focusing method, device, medium and product |
CN116320748A (en) * | 2023-05-22 | 2023-06-23 | 深圳明锐理想科技有限公司 | Automatic focusing method and device, electronic equipment and automatic optical detection equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109116541A (en) | Microscope focusing method, device, computer equipment and storage medium | |
US10997696B2 (en) | Image processing method, apparatus and device | |
CN107087107B (en) | Image processing apparatus and method based on dual camera | |
CN103197491B (en) | The method of fast automatic focusing and image collecting device | |
US8600186B2 (en) | Well focused catadioptric image acquisition | |
CN107181918B (en) | A kind of dynamic filming control method and system for catching video camera of optics | |
US11245832B2 (en) | Video recording method and electronic device | |
CN110248097B (en) | Focus tracking method and device, terminal equipment and computer readable storage medium | |
JP2013531268A (en) | Measuring distance using coded aperture | |
CN105049695A (en) | Video recording method and device | |
US7627153B2 (en) | Repositioning inaccuracies in an automated imaging system | |
CN110248101B (en) | Focusing method and device, electronic equipment and computer readable storage medium | |
CN109862269A (en) | Image-pickup method, device, electronic equipment and computer readable storage medium | |
WO2021078041A1 (en) | Correction method and apparatus, and electronic device and voice coil motor | |
US20160248988A1 (en) | Method for Obtaining a Picture and Multi-Camera System | |
CN106791433B (en) | A kind of image processing method and electronic equipment | |
CN108875780A (en) | The acquisition methods and device of difference object between image based on view data | |
CN106101540A (en) | Focusing determines method and device | |
CN108200342A (en) | Auto focusing method, device, computer equipment and storage medium | |
CN112261292B (en) | Image acquisition method, terminal, chip and storage medium | |
CN106031148A (en) | Imaging device and method for automatic focus in an imaging device as well as a corresponding computer program | |
CN110490196A (en) | Subject detection method and apparatus, electronic equipment, computer readable storage medium | |
CN103297695B (en) | A kind of method of automatic camera and terminal | |
CN104601883B (en) | A kind of method and device of image taking | |
CN109068060A (en) | Image processing method and device, terminal device, computer readable storage medium |
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 |