CN105072330B - A kind of automatic focusing method of line-scan digital camera - Google Patents
A kind of automatic focusing method of line-scan digital camera Download PDFInfo
- Publication number
- CN105072330B CN105072330B CN201510423786.2A CN201510423786A CN105072330B CN 105072330 B CN105072330 B CN 105072330B CN 201510423786 A CN201510423786 A CN 201510423786A CN 105072330 B CN105072330 B CN 105072330B
- Authority
- CN
- China
- Prior art keywords
- image
- digital camera
- line
- scan digital
- carried out
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
- Automatic Focus Adjustment (AREA)
Abstract
The invention discloses a kind of automatic focusing methods of line-scan digital camera, belong to Image Acquisition field, in particular to a kind of focus adjustment method of line-scan digital camera.Change shooting the distance between object and camera first, while target image is acquired with line-scan digital camera;Collected each frame image is analyzed, is analyzed by the size of the value to image slices vegetarian refreshments, if image is completely black or complete white, image is undesirable, re-starts acquisition;Secondly entire distance change process is obtained all image mosaics is piece image;Gray processing processing, denoising, enhancing processing are carried out to stitching image;Finally calculate position clearest in the image, the corresponding object in the position be collected image when position be optimum photographing position.The present invention, which compares the prior art, that at low cost, speed is fast, calculation amount is small.
Description
Technical field
Belong to Image Acquisition field, in particular to a kind of focus adjustment method of line-scan digital camera.
Background technique
Require higher resolution ratio and precision at this stage so that the big image scanning field of elongated, belt-shaped more and more
Using line-scan digital camera.In order to guarantee measurement accuracy, wherein most critical be exactly line-scan digital camera automatic focusing, it will affect acquisition
The picture quality arrived can also make later image processing meet difficulty, or even can not carry out.
Traditional machine visual detection device based on line-scan digital camera needs to increase a face on the basis of line-scan digital camera
Array camera is used for auto-focusing, and this method problems faced has the following:
1. increasing equipment cost;
2. needing additionally to increase the space of an area array cameras in equipment, it is also required to carry out volume to area array cameras in debugging
Outer maintenance, the mechanical complications and debugging complexity of equipment all increase very much.
3. traditional face battle array focusing principle is in the case where defocus, mobile object lens, two pictures of acquisition carry out clarity
Comparison, then object lens are mobile to the high direction of clarity.This method needs to acquire plurality of pictures and carries out clarity analysis, focusing
Speed is slow and low efficiency.
Summary of the invention
The present invention is directed to the shortcoming of background technique, designs a kind of line-scan digital camera at low cost, speed is fast, calculation amount is small
Automatic focusing method.
The technical scheme is that a kind of automatic focusing method of line-scan digital camera, this method comprises:
Step 1: changing shooting the distance between object and camera, while target image is acquired with line-scan digital camera;
Step 2: the collected each frame image of analysis is analyzed by the size of the value to image slices vegetarian refreshments, if
For image to be completely black or complete white, then image is undesirable, re-starts acquisition;
Step 3: it is piece image that entire distance change process, which is obtained all image mosaics,;
Step 4: gray processing processing, denoising, enhancing processing are carried out to stitching image;
Step 5: calculating position clearest in the image, position when the corresponding object in the position is collected image is
Optimum photographing position.
The wherein specific steps of the step 5 are as follows:
Step 5.1: small picture segmentation is carried out to stitching image;
Step 5.2: preliminary definition judgment being carried out using the small picture that energy gradient function is split to 5.1, is found
More clearly divide picture in image out;
Step 5.3: the highest pixel of clarity in the segmentation picture that step 5.1 obtains is searched out using wavelet transformation.
The advantages of this method, has:
Collected picture uses energy gradient function and comes Primary Location articulation point position, avoids and uses at the very start
Wavelet transformation causes largely to calculate;It is entirely capable of keeping up with actual productive temp in arithmetic speed, finally using wavelet transformation essence
It determines that position also ensures accuracy rate, the automatic focusing of line-scan digital camera can be widely applied, big degree has saved production cost.
Detailed description of the invention
Fig. 1 is that a kind of automatic focusing method of line-scan digital camera of the present invention adopts drawing system schematic diagram;
Fig. 2 is that the collected automatic focusing with fuzzy-clear-fuzzy gradual change acquires image;
Fig. 3 is the articulation curve calculated with gradient function algorithm, and abscissa indicates image coordinate, ordinate table
Show clarity, the bigger be worth the more clear;
Fig. 4 is the articulation curve calculated with Wavelet Transformation Algorithm.
Specific embodiment
Step 1: object being placed on the position apart from camera certain distance, and light filling operation is carried out to object.Then subtract
Small shooting the distance between object and camera, while target image is acquired with line-scan digital camera;
Step 2: using the collected each frame image of multithread analyzing, carried out by the size of the value to image slices vegetarian refreshments
Analysis, if image is completely black or complete white, image is undesirable, re-starts acquisition;
Step 3: will distance reduction process acquisition image mosaic be entirely piece image;
Step 4: gray processing processing is carried out using floating-point arithmetic to stitching image, denoising is carried out based on median filtering,
Using the linear transformation in greyscale transformation, the gray scale interval where interested target is protruded, it is opposite that those is inhibited to lose interest in
Gray scale interval, increase the dynamic range of image, contrast is expanded, and keeps image streak feature more obvious;
Step 5: calculating position clearest in the image, position when the corresponding object in the position is collected image is
Optimum photographing position.
Step 5.1: obtaining image has fuzzy-clear-fuzzy progressive formation, and it is small that stitching image is horizontally divided into multiple
Picture.
Step 5.2: each small picture that step 5.1 obtains has obvious marginal band.It focuses good position
It sets, that is, has the image at more sharp edge, Ying Yougeng big gradient function value.Energy gradient function is first used, consecutive points are passed through
One point of Difference Calculation gradient value, which is characterized as the clarity numerical value of this position.It obtains in this approach each
The definition values of small image are opened, then which small picture the clearest point of Primary Location is located at.Such as Fig. 3, image is without point enough
Sharp wave crest, so only having the function that tentatively to focus, partial trace of the ordinate greater than 0.9, that is, centre are general
10 small pictures, this position of 10 small pictures in stitching image are exactly the articulation point position of Primary Location.
Step 5.3: treated that image can be with Primary Location articulation point position, then to the figure of this fraction for step 5.2
As carrying out articulation point accurate positioning.The segmentation of 5.1 steps is equally first carried out, wavelet transformation then is used to each small picture,
Clarity can further be asked to image.Image clearly or the degree of focusing mainly by the high fdrequency component in image number certainly
Fixed, when image is clearest, the high frequency coefficient energy after wavelet decomposition is maximum.Such as Fig. 4, because figure has obvious sharp wave
Peak, the crest location, that is, intermediate 6th small picture, corresponding image coordinate is exactly articulation point position.
Claims (1)
1. a kind of automatic focusing method of line-scan digital camera, this method comprises:
Step 1: changing shooting the distance between object and camera, while target image is acquired with line-scan digital camera;
Step 2: the collected each frame image of analysis is analyzed by the size of the value to image slices vegetarian refreshments, if image
To be completely black or complete white, then image is undesirable, re-starts acquisition;
Step 3: it is a sub-picture that entire distance change process, which is obtained all image mosaics,;
Step 4: gray processing processing being carried out using floating-point arithmetic to stitching image, denoising is carried out based on median filtering, is used
Linear transformation in greyscale transformation, the gray scale interval where prominent interested target are opposite to inhibit those uninterested ashes
Section is spent, increases the dynamic range of image, contrast is expanded, and keeps image streak feature more obvious;
Step 5: calculate position clearest in the image, the corresponding object in the position be collected image when position it is as best
Camera site;
Step 5.1: stitching image has fuzzy-clear-fuzzy gradual change, and stitching image is horizontally divided into multiple small pictures;
Step 5.2: each small picture that step 5.1 obtains has obvious marginal band;It focuses good position, i.e.,
There are the image at more sharp edge, Ying Yougeng big gradient function value;Energy gradient function is first used, the difference of consecutive points is passed through
The gradient value of a point is calculated, which is characterized as the clarity numerical value of this position;Each Zhang little Tu is obtained in this approach
The definition values of piece, then which small picture the clearest point of Primary Location is located at;
Step 5.3: step 5.2 treated image can with Primary Location articulation point position, then to the image of this fraction into
Articulation point accurate positioning is carried out after row splicing;The segmentation that spliced fraction image is carried out to 5.1 steps, then to each
Small picture uses wavelet transformation, can further seek clarity to image;Image clearly or the degree of focusing are mainly by image
High fdrequency component how much decisions, when image is clearest, the high frequency coefficient energy after wavelet decomposition is maximum.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510423786.2A CN105072330B (en) | 2015-07-17 | 2015-07-17 | A kind of automatic focusing method of line-scan digital camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510423786.2A CN105072330B (en) | 2015-07-17 | 2015-07-17 | A kind of automatic focusing method of line-scan digital camera |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105072330A CN105072330A (en) | 2015-11-18 |
CN105072330B true CN105072330B (en) | 2019-01-11 |
Family
ID=54501599
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510423786.2A Active CN105072330B (en) | 2015-07-17 | 2015-07-17 | A kind of automatic focusing method of line-scan digital camera |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105072330B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105635590B (en) * | 2016-02-29 | 2018-10-26 | 中国工程物理研究院流体物理研究所 | A kind of focusing method and device based on digital hologram restructing algorithm |
CN105892003B (en) * | 2016-06-15 | 2018-03-06 | 长安大学 | A kind of line-scan digital camera automatic focusing mechanism and method |
CN110602355A (en) * | 2018-05-25 | 2019-12-20 | 上海翌视信息技术有限公司 | Image acquisition method |
CN109286751B (en) * | 2018-09-28 | 2021-01-19 | 深圳市盛世智能装备有限公司 | Linear array camera focusing method, device, equipment and storage medium |
CN113382134B (en) * | 2021-04-28 | 2022-04-26 | 石家庄铁道大学 | Focusing debugging method of linear array industrial camera |
CN113805304B (en) * | 2021-11-16 | 2022-03-18 | 浙江双元科技股份有限公司 | Automatic focusing system and method for linear array camera |
CN115242982B (en) * | 2022-07-28 | 2023-09-22 | 业成科技(成都)有限公司 | Lens focusing method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102724401A (en) * | 2012-05-18 | 2012-10-10 | 深圳大学 | System and method of linear array CCD camera multi-point automatic focusing |
CN102752511A (en) * | 2012-07-09 | 2012-10-24 | 宁波江丰生物信息技术有限公司 | Linear array scanning system, method and device for obtaining focal point of linear array scanning system |
CN102914320A (en) * | 2012-10-22 | 2013-02-06 | 中国科学院西安光学精密机械研究所 | Linear array CCD (Charge Coupled Device) camera bidirectional modulation transfer function testing device and method |
CN103458158A (en) * | 2013-09-09 | 2013-12-18 | 电子科技大学 | Method and system for controlling time of exposure of line-scan digital camera |
-
2015
- 2015-07-17 CN CN201510423786.2A patent/CN105072330B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102724401A (en) * | 2012-05-18 | 2012-10-10 | 深圳大学 | System and method of linear array CCD camera multi-point automatic focusing |
CN102752511A (en) * | 2012-07-09 | 2012-10-24 | 宁波江丰生物信息技术有限公司 | Linear array scanning system, method and device for obtaining focal point of linear array scanning system |
CN102914320A (en) * | 2012-10-22 | 2013-02-06 | 中国科学院西安光学精密机械研究所 | Linear array CCD (Charge Coupled Device) camera bidirectional modulation transfer function testing device and method |
CN103458158A (en) * | 2013-09-09 | 2013-12-18 | 电子科技大学 | Method and system for controlling time of exposure of line-scan digital camera |
Also Published As
Publication number | Publication date |
---|---|
CN105072330A (en) | 2015-11-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105072330B (en) | A kind of automatic focusing method of line-scan digital camera | |
US11803964B2 (en) | Method and system for imaging a cell sample | |
CN104637064A (en) | Defocus blurred image definition detecting method based on edge strength weight | |
KR101784787B1 (en) | Imaging device and method for automatic focus in an imaging device as well as a corresponding computer program | |
US20110274420A1 (en) | Imaging apparatus and method for controlling same | |
EP3255888A3 (en) | Image processing apparatus, image capturing apparatus, image processing method, and image processing program | |
CN105430277B (en) | Autofocus control method and device | |
CN102520503A (en) | Method for quickly focusing high-definition image acquisition equipment | |
CN110363734B (en) | Thick sample microscopic fluorescence image reconstruction method and system | |
CN107911599B (en) | Infrared image global automatic focusing method and device | |
US9030591B2 (en) | Determining an in-focus position of a lens | |
CN106056532B (en) | Method and device for removing background image | |
Sun et al. | An improved Harris corner detection algorithm for low contrast image | |
KR101777696B1 (en) | Method For Subpixel Localization Of Edges Based on Areal Symmetry | |
Vasconcelos et al. | No-reference blur assessment of dermatological images acquired via mobile devices | |
CN105593635B (en) | Measuring method, measuring apparatus, and computer-readable recording medium | |
CN103369247A (en) | Camera unified focal length calibration method applied to multi-camera visual information processing | |
CN105651699A (en) | Dynamic focus following method based on area-array camera | |
EP3389254B1 (en) | Automatic focusing | |
US9800796B1 (en) | Apparatus and method for low dynamic range and high dynamic range image alignment | |
CN104112271A (en) | Detection method and system for housing side defect of mobile terminal | |
US9658444B2 (en) | Autofocus system and autofocus method for focusing on a surface | |
Dogan et al. | Auto-focusing with multi focus color image fusion based on curvelet transform on microscopic imaging | |
CN105043722A (en) | Reflector reflectivity measuring method | |
CN105243660A (en) | Quality evaluation method of light source scene-containing automatic focusing image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |