CN109270066B - Scanning method and device for linear array camera - Google Patents
Scanning method and device for linear array camera Download PDFInfo
- Publication number
- CN109270066B CN109270066B CN201811137914.7A CN201811137914A CN109270066B CN 109270066 B CN109270066 B CN 109270066B CN 201811137914 A CN201811137914 A CN 201811137914A CN 109270066 B CN109270066 B CN 109270066B
- Authority
- CN
- China
- Prior art keywords
- scanning
- linear array
- shooting
- mark
- mark point
- 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
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/01—Arrangements or apparatus for facilitating the optical investigation
Landscapes
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Studio Devices (AREA)
- Automatic Focus Adjustment (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention discloses a scanning method of a linear array camera, which is used for a scanning system of the linear array camera and comprises the following steps: acquiring a target object image; selecting a plurality of mark points on the target object image; sequentially carrying out high-precision focusing on the plurality of marking points according to a first sequence to determine the focus position of each marking point; and scanning the target object by using the linear array camera according to the focus position of each mark point. The phenomenon that images in the area near a focus are not clear easily due to the fact that the definition of a single scanning line is used as the selection basis of the best focal length in the prior art is overcome, the shooting trigger signal of the linear array camera is generated by the movement trigger of the carrier, and therefore the shooting trigger signal can be sent after the carrier is stopped moving, the phenomenon that the linear array camera shoots when the carrier moves to cause image distortion or dislocation is avoided, the focusing accuracy of the linear array camera is improved, and the scanning accuracy is improved.
Description
Technical Field
The invention relates to the technical field of pathological section scanning imaging, in particular to a scanning method and a scanning device of a linear array camera.
Background
The linear array scanning camera collects at a high speed, moves to the next unit length after collecting one line each time, and continues to collect the next line, so that a two-dimensional picture is spliced after a period of time, and the two-dimensional picture is similar to the picture collected by the area array camera. In the working process of the linear array camera scanning system, due to the uneven surface of the target object and the inclination of a carrier for placing the target object (shot object/scanned object), the overall focus of the target object may be changed greatly, so that before the target object is scanned, a plurality of mark points are generally required to be selected for focusing in an area to be scanned.
In the prior art, the linear array camera scanning system has the problems of low accuracy and low scanning efficiency in a method for focusing and scanning a plurality of mark points.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art. Therefore, the invention aims to provide a linear array camera scanning method and a linear array camera scanning device which are higher in accuracy and scanning efficiency.
The technical scheme adopted by the invention is as follows:
a linear array camera scanning method is used for a linear array camera scanning system, the linear array camera scanning system comprises an area array camera and a linear array shooting component which are used for shooting a target object, and a carrier which is used for placing the target object, the linear array shooting component comprises a linear array camera and an objective lens, and the method comprises the following steps:
acquiring a target object image;
selecting a plurality of mark points on the target object image;
sequentially carrying out high-precision focusing on the plurality of marking points according to a first sequence to determine the focus position of each marking point;
and scanning the target object by using the linear array camera according to the focus position of each mark point.
Further, the selecting a plurality of marker points on the target object image specifically includes:
acquiring image edge and color information of a target object image;
selecting a mark point according to the image edge and the color information;
deleting or adding the marking points according to the density degree of the marking points;
the color information includes gray shade, and the acquiring of the image edge and the color information specifically includes:
extracting the image edge of the target object image through an image edge extraction algorithm;
obtaining a gray map by carrying out gray processing on the target object image, and extracting the gray value of the gray map to obtain the gray shade;
the mark points comprise edge mark points and central mark points, and the selecting the mark points according to the image edge and the color information specifically comprises the following steps:
selecting a plurality of edge mark points on the image edge according to a first selection rule according to the image edge;
selecting a plurality of central mark points in the central area of the image according to a second selection rule according to the gray shade;
the first selection rule is that the spacing distance between two adjacent selected mark points is a fixed value; the second selection rule is a preset gray value threshold value, and when the gray value of the pixel point is greater than the gray value threshold value, the pixel point is selected as a mark point;
the deleting or adding the mark points according to the density degree of the mark points specifically comprises the following steps:
presetting a low threshold value and a high threshold value of the spacing distance between adjacent marking points, and judging whether the spacing distance between each marking point and the adjacent marking point is greater than the low threshold value of the spacing distance and smaller than the high threshold value of the spacing distance;
if the spacing distance between the mark point and the adjacent mark point is greater than the spacing distance low threshold value and less than the spacing distance high threshold value, the mark point is reserved;
if the spacing distance between the mark point and the adjacent mark point is smaller than the spacing distance low threshold value, deleting the mark point;
if the spacing distance between the mark point and the adjacent mark point is higher than the spacing distance high threshold, the mark point is added between the mark point and the adjacent mark point.
Further, the high-precision focusing specifically includes an all-focusing process or a half-focusing process:
the full focusing process comprises a coarse focusing process and a fine focusing process;
the semi-focusing process specifically comprises the following steps: executing a fine focusing process when the focus position of the previous mark point is a second center position;
the rough focusing process specifically comprises the following steps:
shooting a target object at a plurality of shooting height positions by using a linear array shooting component;
controlling the carrier to move along the transverse direction at each shooting height position, shooting a plurality of scanning line images by the linear array camera in the carrier moving process according to the shooting trigger signal to form a reference image of the shooting height position, wherein the transverse direction is a direction perpendicular to the scanning lines of the linear array camera;
determining the height position corresponding to the first focus according to the definition of the reference images at different height positions;
the plurality of shooting height positions are located between a preset first starting height position and a first ending height position, and the objective lens moves from the first starting height position to the first ending height position along the vertical axis according to a first preset stepping distance to form a plurality of shooting height positions;
the focal position corresponding to the first starting height position is higher than the upper surface of the target object, and the focal position corresponding to the first ending height position is lower than the lower surface of the target object;
the fine focusing process specifically comprises the following steps:
selecting a height position corresponding to the first focus as a second central position, and taking the second central position as a center to obtain a second starting height position and a second ending height position;
the objective lens moves from a second starting height position to a second ending height position along the vertical axis according to a second preset stepping distance to form a plurality of secondary shooting height positions;
shooting a target object at a plurality of secondary shooting height positions by using a linear array shooting component;
controlling the carrier to move along the transverse direction at each secondary shooting height position, shooting a plurality of scanning line images by the linear array camera in the carrier moving process according to the shooting trigger signal to form a reference image of the shooting height position, wherein the transverse direction is a direction perpendicular to the scanning lines of the linear array camera;
and determining the height position corresponding to the second focus according to the definition of the reference images at different height positions.
Further, the vehicle moves along the transverse direction at each shooting height position, and the line camera shoots a plurality of scanning line images in the moving process of the vehicle according to the shooting trigger signal to form a reference image of the shooting height position, including two implementation modes:
the first embodiment specifically includes:
after the objective lens moves to the current shooting height position, the carrier moves from a first transverse position to a second transverse position along the transverse direction, and the linear array camera shoots a plurality of scanning line images in the carrier moving process according to the shooting trigger signal; then the objective lens moves to the next shooting height position, the carrier moves from the second transverse position to the first transverse position, and the linear array camera shoots a plurality of scanning line images in the carrier moving process according to the shooting trigger signal;
the second embodiment specifically includes:
after the objective lens moves to the current shooting height position, the carrier moves from a first transverse position to a second transverse position along the transverse direction, the linear array camera shoots a plurality of scanning line images in the moving process of the carrier according to the shooting trigger signal, and the carrier moves from the second transverse position back to the first transverse position; then the objective lens moves to the next shooting height position, the carrier moves from the first transverse position to the second transverse position along the transverse direction, and the linear array camera shoots a plurality of scanning line images in the moving process of the carrier according to the shooting trigger signal.
Furthermore, the linear array camera scanning system also comprises a controller and a Y-axis motor which are connected with the linear array camera, the carrier moves along the Y axis under the driving of the Y-axis motor, and a shooting trigger signal is generated by utilizing the transverse moving motor of the carrier;
providing a frame trigger signal to the linear array camera in advance;
when the preset initial position is reached, outputting a line trigger signal to drive the linear array camera to shoot;
the starting position is arranged after the frame trigger signal starts;
the pre-providing of the frame trigger signal to the line camera specifically includes: the controller provides a frame trigger signal to the linear array camera in advance, and the linear array camera enters a pre-shooting state;
the line trigger signal is a square wave signal, each rising edge or each falling edge of the line trigger signal triggers the linear array camera to shoot once, and when the shooting frequency of the linear array camera reaches a preset value, the linear array camera stops shooting.
Further, the first order refers to:
determining a first mark point as an all-focus mark point, and carrying out an all-focus process;
selecting a next mark point according to the first constraint condition as a semi-focusing mark point, and performing a semi-focusing process;
taking the mark points meeting the second constraint condition as full-focusing mark points again for focusing;
the first constraint includes:
c0, the distance between the last mark point and the last mark point is less than a preset distance threshold;
c1, the distance from the last marking point is minimum;
c2, the last marking point is positioned in the same communication area;
the second constraint condition is as follows: the distance between the mark point and the last mark point is larger than the preset distance or the definition of a plurality of reference images obtained by utilizing the semi-focusing process is smaller than the preset definition.
Furthermore, the scanning adopts a column scanning mode, the scanning is carried out according to a preset scanning width, and an image in each scanning column comprises at least one mark point.
And further, the method also comprises the step of splicing and fusing the strip scanning area images obtained by scanning after the scanning is finished.
And further comprising the step of detecting a blank area of the target image before scanning, and skipping the blank area during scanning when detecting that the width of the blank area is greater than a preset blank width.
In another aspect, the present invention further provides a scanning device for a line-array camera, including:
the target image acquisition module is used for acquiring a target object image;
the marking point acquisition module is used for selecting a plurality of marking points on the target object image;
the focusing module is used for sequentially carrying out high-precision focusing on the plurality of marking points according to a first sequence so as to determine the focus position of each marking point;
and the scanning module is used for scanning the target object according to the focus position of each marking point.
The invention has the beneficial effects that:
according to the invention, the objective lens and the carrier of the linear array camera move together, and the small-area reference images near the focusing mark points are obtained at different shooting height positions, so that the phenomenon that the image near the focus is not clear easily due to the fact that the definition of a single scanning line is used as the selection basis of the optimal focal length in the prior art is overcome, and a frame trigger signal is provided to the linear array camera in advance; when the preset initial position is reached, a line triggering signal is output to drive the linear array camera to shoot, the problem of image stretching or image distortion shot by the linear array camera in the prior art is solved, and the image shooting effect is improved.
In addition, the invention also selects a plurality of mark points on the target object image, carries out a full focusing process comprising a rough focusing process and a fine focusing process on some mark points to obtain the focus position of the corresponding mark point, carries out a semi-focusing process of the fine focusing process by taking the focus position of the previous mark point as a second central position on other mark points, and overcomes the defect of low focusing efficiency caused by the fact that the plurality of focus mark points need to be fully focused one by one when focusing in the prior art.
The invention can be widely applied to various linear array camera scanning systems.
Drawings
FIG. 1 is a flowchart of a linear array camera scanning method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a selected mark point in a linear array camera scanning method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a high-precision focusing process of a linear array camera scanning method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of carrier movement during high-precision focusing of a linear array camera scanning method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a scanning area in a high-precision focusing process of a linear array camera scanning method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating selection of a focus position during fine focusing in a high-precision focusing process of a scanning method of a line camera according to an embodiment of the present invention;
FIG. 7 is a timing waveform diagram of a trigger signal in a scanning method of a line camera according to the prior art;
FIG. 8 is a waveform diagram showing the timing of a frame trigger signal, a line trigger signal and a Y-axis drive signal during scanning of a line camera according to the prior art;
fig. 9 is a schematic diagram illustrating a trigger timing synchronization process in a line camera scanning method according to an embodiment of the present invention;
fig. 10 is a timing waveform diagram of a frame trigger signal, a position signal and a row trigger signal in the trigger timing synchronization process in the line camera scanning method according to an embodiment of the present invention;
FIG. 11 is a flowchart of a first sequential mark point selection process of a linear array camera scanning method according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of selecting a mark point in a high-precision focusing process of a linear array camera scanning method according to an embodiment of the present invention;
fig. 13 is a column scanning schematic diagram of a line camera scanning method according to an embodiment of the present invention;
fig. 14 is a scanning schematic diagram of a line camera scanning method according to an embodiment of the invention;
FIG. 15 is a schematic diagram of the focal length locus of an objective lens of the linear array camera scanning method according to an embodiment of the present invention;
fig. 16 is a block diagram of a scanning device of a line camera according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The invention is used for a linear array camera scanning system, which comprises an area array camera for shooting a target object, a linear array shooting component, a carrier for placing the target object and a Y-axis motor driver, wherein the carrier moves along a Y axis under the driving of the Y-axis motor driver, and the linear array shooting component comprises a linear array camera and an objective lens.
As shown in fig. 1, which is a flowchart of a scanning method of a line camera according to an embodiment of the present invention, the method includes the following steps: s1: acquiring a target object image; s2: selecting a plurality of mark points on the target object image; s3: sequentially carrying out high-precision focusing on the plurality of marking points according to a first sequence to determine the focus position of each marking point; s4: and scanning the target object according to the focus position of each marking point.
In one embodiment, an area-array camera is used for obtaining the image of the target object, the target object is photographed, and the image of the target object is obtained and used as a reference image for selecting the mark point.
As shown in fig. 2, which is a schematic diagram of selecting mark points in the line camera scanning method according to an embodiment of the present invention, a mark point one 2041, a mark point two 2042, a mark point three 2043, a mark point four 2044, and a mark point five 2045 are shown in the diagram.
The marking point selection method for selecting a plurality of marking points on the target object image specifically comprises the following steps:
1) acquiring image edge and color information of a target object image, wherein the color information comprises gray shade, and the acquiring of the image edge and the color information specifically comprises the following steps: and extracting the image edge of the target object image through an image edge extraction algorithm, obtaining a gray image through carrying out gray processing on the target object image, and extracting the gray value of the gray image to obtain the gray shade.
2) Selecting mark points according to the image edge and the color information, wherein the mark points comprise edge mark points and central mark points, and the selecting of the mark points according to the image edge and the color information specifically comprises the following steps:
selecting a plurality of edge mark points on the image edge according to a first selection rule according to the image edge;
selecting a plurality of central mark points in the central area of the image according to a second selection rule according to the gray shade;
the first selection rule is that the spacing distance between two adjacent selected mark points is a fixed value; the second selection rule is a preset gray value threshold value, and when the gray value of the pixel point is greater than the gray value threshold value, the pixel point is selected as a mark point;
3) deleting or adding the mark points according to the density degree of the mark points, which specifically comprises the following steps:
presetting a low threshold value and a high threshold value of the spacing distance between adjacent marking points, and judging whether the spacing distance between each marking point and the adjacent marking point is greater than the low threshold value of the spacing distance and smaller than the high threshold value of the spacing distance;
if the spacing distance between the mark point and the adjacent mark point is greater than the spacing distance low threshold value and less than the spacing distance high threshold value, the mark point is reserved;
if the spacing distance between the mark point and the adjacent mark point is smaller than the spacing distance low threshold value, deleting the mark point;
if the spacing distance between the mark point and the adjacent mark point is higher than the spacing distance high threshold, the mark point is added between the mark point and the adjacent mark point.
In this embodiment, graying the target image to obtain a grayscale image, extracting the grayscale value of the grayscale image to obtain the gray shade, where the graying specifically includes a weighted average method, and performing weighted average on R, G, B three components by different weights to obtain the grayscale image; or an average value method is adopted to obtain the average value of R, G, B three components of each pixel point, and then the average value in the original color image is given to the components of the three pixels; or adopting a maximum value method, and taking the maximum value of the R, G, B three-component brightness in the original color image as the gray value of the gray map.
According to a first selection rule, selecting a plurality of edge mark points on the edge of the image, wherein the spacing distance between any two adjacent edge mark points is a fixed value d. And selecting a plurality of central mark points in the central area of the image according to a second selection rule, and if the gray value range of the gray image is 0-255 and the preset gray value threshold is 133, selecting the mark points as the mark points when the gray value of the pixel points in the central area of the image is more than 133.
As shown in fig. 2, mark points are evenly distributed on the edge and the inside of the measurement area, according to the method for obtaining the mark points, the image edge of the image is extracted through an image edge extraction algorithm, according to the image edge, a plurality of edge mark points are selected on the image edge according to a first selection rule, wherein the first selection rule is that the spacing distance between two adjacent selected mark points is a fixed value, so that a mark point one 2041 and a mark point two 2042 are the image edge mark points, a gray scale image is obtained through the gray processing of the image, the gray value of the gray scale image is extracted to obtain the gray depth, according to the gray depth, a plurality of central mark points are selected in the image central area according to a second selection rule, the second selection rule is a preset gray value threshold, when the gray value of a pixel point is greater than the gray value threshold, the mark points are selected as mark points, a mark point three 2043, a mark point four 2044 and a mark point five 2045 are located inside the image, and marking according to the gray level depth.
Presetting the interval distance range between adjacent mark points as (a, b), judging whether the interval distance between each mark point and the adjacent mark point is within the interval distance range (a, b), if so, retaining the mark point, if the interval distance between the mark point and one adjacent mark point is less than a, deleting the mark point, if the interval distance between the mark point and one adjacent mark point is more than b, adding mark points between the mark point and the adjacent mark point.
The marked point three 2043 and the marked point four 2044 shown in fig. 2 should be deleted.
Compared with the prior art that the mark points are selected randomly or through simple mathematical operation, the selection of the image focal distance mark points is more reasonable, and the problem that the subsequent linear array camera scanning image is not clear is avoided.
The high-precision focusing method in the embodiment comprises two focusing steps: an all-focus process and a half-focus process.
The full focusing process comprises a coarse focusing process and a fine focusing process, and the semi-focusing process specifically comprises the following steps: and executing a fine focusing process by taking the focus position of the previous mark point as a second center position.
Wherein the coarse focusing process is as follows:
the method comprises the following steps: 1) shooting a target object at a plurality of shooting height positions (primary shooting height positions) by using a linear array shooting component; 2) and determining the height position corresponding to the first focus according to the definition of the reference images at different height positions.
The linear array camera shoots a target object at a plurality of shooting height positions at each shooting height position, the carrier is controlled to move along the transverse direction (Y-axis direction), the linear array camera shoots a plurality of scanning line images in the moving process of the carrier according to a shooting trigger signal to form a reference image of the shooting height position, and the transverse direction is a direction perpendicular to the scanning lines of the linear array camera;
the plurality of shooting height positions are located between a preset first starting height position and a first ending height position, and the objective lens moves from the first starting height position to the first ending height position along the vertical axis according to a first preset stepping distance to form the plurality of shooting height positions. In this embodiment, the objective lens is moved independently of the line camera (i.e., the line camera is stationary, and the objective lens moves along the Z-axis direction) to realize the focusing action of the line array shooting component, so that the operation of the line array shooting component is simple.
The focus position corresponding to the first starting height position is higher than the upper surface of the target object, and the focus position corresponding to the first ending height position is lower than the lower surface of the target object, so that the focusing position is set, the definition of the obtained image is ensured to be non-monotonicity in the focusing process, the process that the image obtained by the linear array camera is blurred, clear and then blurred can be ensured, namely the clearest focusing position can be shot in a covering mode.
The fine focusing process is as follows:
selecting a height position corresponding to the first focus as a second central position, and taking the second central position as a center to obtain a second starting height position and a second ending height position; the objective lens moves from a second starting height position to a second ending height position along the vertical axis according to a second preset stepping distance to form a plurality of secondary shooting height positions; shooting a target object at a plurality of secondary shooting height positions by using a linear array shooting component, controlling a carrier to move along a transverse direction at each secondary shooting height position, shooting a plurality of scanning line images by a linear array camera according to a shooting trigger signal in the moving process of the carrier so as to form a reference image of the shooting height position, wherein the transverse direction is a direction vertical to the scanning lines of the linear array camera; and determining the height position corresponding to the second focus according to the definition of the reference images at different height positions.
The focus determination method comprises the following steps: 1) selecting a shooting height position corresponding to a reference image with the highest definition as a focus position, 2) fitting a definition curve through the definitions of the reference images at different height positions, and selecting a position on a Z axis corresponding to the position with the highest definition as the focus position.
As shown in fig. 3, a schematic diagram of a high-precision focusing process of a line camera scanning method according to an embodiment of the present invention includes a line camera 102, an objective lens 101, an objective lens axis 103, a first starting height position 104, a first ending height position 105, an objective lens moving direction (Z-axis direction) 106, a carrier 201, an object 203, a focusing mark point 204, and a carrier moving direction (Y-axis direction) 205.
Firstly, an area-array camera is used for collecting an image of a target object, and a focusing mark point 204 is arranged on the collected image of the target object.
The object 203 is a slide glass loaded with a pathological section, and is placed on the carrier 201 to avoid contact with the objective lens 101 so as not to contaminate the objective lens 101, and the carrier 201 moves along a carrier moving direction (Y-axis direction) 205 in focusing.
The line camera 102 is connected with the objective lens 101, during focusing, the line camera 102 is fixed, the objective lens 101 moves along the objective lens moving direction (Z-axis direction) 106, the focusing position of the objective lens 101 moves from the focus position corresponding to the first starting height position 104 to the focus position corresponding to the first ending height position 105 by a first preset stepping distance, the focus position corresponding to the first starting height position 104 is higher than the upper surface of the target object, the focus position corresponding to the first ending height position 105 is lower than the lower surface of the target object, the range covers the focusing position with the clearest shooting, and in actual use, the first starting height position 104 and the first ending height position 105 are determined in the debugging process and are engineering preset values.
As shown in fig. 4, which is a schematic diagram of the movement of the carrier during the high-precision focusing process of the line camera scanning method according to an embodiment of the present invention, the schematic diagram includes a line camera 102, an objective lens 101, an axis 103 of the objective lens, a moving direction (Z-axis direction) 106 of the objective lens, an object 203, a focusing mark point 204, a moving direction (Y-axis direction) 205 of the carrier, a first lateral position 301, a second lateral position 302, a line camera scanning line direction 303, a line camera scanning line area width 304, and a focusing mark point moving track 305.
The line area width 304 is the distance from the first lateral position 301 to the second lateral position 302, when focusing, the carrier on which the target 203 is placed moves by a preset distance along the carrier moving direction (Y-axis direction) 205, the carrier moving direction (Y-axis direction) 205 is perpendicular to the line direction 303, and the first lateral position 301 of the target 203 is: the focus mark point 204 is centered at the first lateral position 301, and the object 203 is at the second lateral position 302: the focus mark point 204 is centered on the first lateral position 302.
The center of the focus mark point 204 moves between a first lateral position 301 and a second lateral position 302 during the movement, the movement track of which intersects the objective lens axis 103 perpendicularly.
At each shooting height position, the carrier moves along the transverse direction, and the linear array camera shoots a plurality of scanning line images in the moving process of the carrier according to the shooting trigger signal to form a reference image of the shooting height position, wherein the method comprises the following two implementation modes:
the first embodiment in one embodiment of the present invention refers to:
after the objective lens 101 moves one step along the objective lens moving direction (Z-axis direction) 106 to the current shooting height position, the carrier drives the target object 203 to effectively move from a first transverse position 301 to a second transverse position 302 by a preset distance, and the linear array camera shoots a plurality of scanning line images in the carrier moving process according to the shooting trigger signal; then the objective lens 101 continues to move step by step along the moving direction (Z-axis direction) 106 of the objective lens to the next shooting height position, the carrier drives the target object 203 to move from the second transverse position 302 to the first transverse position 301, and the linear array camera shoots a plurality of scanning line images in the moving process of the carrier according to the shooting trigger signal;
that is, the first embodiment refers to a linear array camera in which a carrier drives an object 203 to move back and forth between a first transverse position 301 and a second transverse position 302, and a camera trigger signal is generated by a carrier transverse movement motor during the movement.
In another embodiment of the present invention, the second embodiment refers to:
after the objective lens 101 moves one step along the objective lens moving direction (Z-axis direction) 106 to the current shooting height position, the carrier drives the target object 203 to effectively move from the first transverse position 301 to the second transverse position 302 by a preset distance, the line camera shoots a plurality of scanning line images in the carrier moving process according to the shooting trigger signal, and the carrier drives the target object 203 to move from the second transverse position 302 back to the first transverse position 301; then the objective lens 101 continues to move step by step along the moving direction (Z-axis direction) 106 of the objective lens to the next shooting height position, the carrier drives the target object 203 to move from the first transverse position 301 to the second transverse position 302, and the linear array camera shoots a plurality of scanning line images in the moving process of the carrier according to the shooting trigger signal;
that is, the second embodiment refers to that the vehicle drives the target 203 to move from the first lateral position 301 to the second lateral position 302, and the vehicle lateral movement motor is used to generate a photographing trigger signal to the line camera.
As shown in fig. 5, a schematic diagram of a scanning area during a high-precision focusing process of a line camera scanning method according to an embodiment of the present invention includes a first horizontal position 301, a second horizontal position 302, a line direction 303 of the line camera, a line area width 304 of the line camera, a scanning line 310, a target 203, and a moving direction (Y-axis direction) 205 of a carrier.
As shown in fig. 6, the scanning range of the line camera is a distance from a first transverse position 301 to a second transverse position 302 along the moving direction of the carrier, and a length along the scanning line direction, where the length is the length along the scanning line direction, and the scanning range of the line camera is obtained by scanning an area image.
For each movement of the objective lens, the object 203 is moved a predetermined distance in a direction perpendicular to the line camera scan line direction 303.
In one embodiment, the line camera scan line area width 304 is 16um (i.e. the distance the vehicle moves in the Y-axis direction at each camera height position), the line camera scan line direction length is 2000 pixels (i.e. along the line camera scan line direction 303), and the preset distance the object 203 moves between the first lateral position (X, Y1)301 and the second lateral position (X, Y2)302 is 0.25um or 0.5 um.
When the preset distance is 0.25um, it indicates that the objective lens moves once, and the object 203 moves between the first transverse position 301 and the second transverse position 302, 64 times of photographing trigger signals are sent, that is, 64 scan lines form a photographed image, and according to 2000pixel 0.25 um-500 um, 64 0.25 um-16 um, the scan area of the line image capturing component is 500um 16um or 2000pixel 64 pixel.
When the preset distance is 0.5um, it indicates that the objective lens moves once, and the object 203 moves between the first transverse position 301 and the second transverse position 302, 32 photographing trigger signals are sent, that is, 32 scanning lines constitute a photographed image, and according to 2000pixel 0.5 um-1000 um, 32pixel 0.5 um-16 um, the scanning area of the line array photographing component is 1000um 16um or 2000pixel 32 pixel.
The selection of the preset distance is related to the parameters of the linear array camera.
The objective lens moves from a first starting height position to a first ending height position along a vertical axis according to a first preset stepping distance, the linear array camera obtains a plurality of pictures, and the height position corresponding to the first focus is determined according to the definition of images at different height positions.
The focus determination method comprises the following steps: 1) selecting a shooting height position corresponding to a reference image with the highest definition as a focus position, 2) fitting a definition curve through the definitions of the reference images at different height positions, and selecting a position on a Z axis corresponding to the position with the highest definition as the focus position.
As shown in fig. 6, a schematic diagram of selecting a focal position during fine focusing of a high-precision focusing process of a line camera scanning method according to an embodiment of the present invention includes an objective lens axis 103, a first starting height position 104, a first ending height position 105, an objective lens moving direction (Z-axis direction) 106, a first preset step distance 309, a height position 401 corresponding to a first focal point, a second preset step distance 306, a second starting height position 307, a second ending position 308, and a height position 402 corresponding to a second focal point.
In this embodiment, the focus determination mode is to select the shooting height position corresponding to the reference image with the highest definition as the focus position, and it is assumed that setting the first preset step distance 309 is: the objective lens is moved 10 times between the first starting height position 104 and the first ending height position 105 by a first preset step distance 309 (e.g. the interval may be set to a range of 20um to 40um), and the setting of the second preset step 306 means that the objective lens is moved 12 times between the second starting height position 307 and the second ending position 308 by a second preset step distance 306 (e.g. the interval may be set to a range of 8um to 10um), wherein the height position 401 corresponding to the first focal point means: the height position corresponding to the shooting focus of the image with the highest definition in the images shot by the objective lens between the first starting height position 104 and the first ending height position 105, namely the second center position, the second starting height position 307 and the second ending position 308 are respectively provided with 6 moving intervals above and below by taking the height position 401 corresponding to the first focus as the center, the second preset stepping distance 306 is smaller than the first preset stepping distance 309, and finally the height position corresponding to the focus where the image with the highest definition is selected in the images shot and obtained by the line camera at the second starting height position 307 and the second ending position 308 is defined as the height position 402 corresponding to the second focus.
During the fine focusing process, the carrier moving mode and the shooting signal triggering mode are the same as those when the height position corresponding to the first focus is obtained.
The method is characterized in that the closest focus position is obtained through a large moving interval of the objective lens, then a small interval is set in the upper and lower ranges of the focus position on the basis of the closest focus position, so that a more accurate focus position is obtained, and the focusing accuracy is improved in a fine focusing mode.
FIG. 7 is a timing waveform diagram of a trigger signal in a scanning method of a line camera according to the prior art;
FIG. 8 is a waveform diagram showing the timing of a frame trigger signal, a line trigger signal and a Y-axis drive signal during scanning of a line camera according to the prior art;
as shown in fig. 7, when the frame trigger signal a is at a high level, the trigger signal b is photographed once per row pulse.
In the prior art, an object to be detected usually moves along a Y-axis direction along with a carrier, as shown in fig. 8, the carrier is driven by a Y-axis linear motor driver to provide a Y-axis driving signal c, and an encoder or a grating scale is used to continuously provide a line pulse trigger signal b for a line camera, and when scanning and shooting are required, a frame trigger high level signal is provided to drive the line camera to shoot. Thus, during scanning, if the frame trigger signal a of the line camera and the signal (Y-axis driving signal c) of the object start moving are not synchronized, the image captured by the camera will be stretched or distorted, for example, as shown in fig. 10, when the frame trigger signal a (high level is at trigger position 2) is earlier than the Y-axis driving signal c (the object starts moving at t-t 1), the object to be detected does not move, so that the actual object to be detected is captured multiple times at the same position, and an image stretching phenomenon occurs; when the frame trigger signal a (high level is at the trigger position 3) is triggered later than the Y-axis drive signal c (the detected object starts to move when t equals to t 1), the detected object moves for a certain distance, so that the actual detected object part is missed to be shot, and the image distortion phenomenon occurs.
Fig. 9 is a schematic diagram of a trigger timing synchronization process in a scanning method of a line camera according to an embodiment of the present invention, where the scanning system of the line camera further includes a controller and a Y-axis motor driver connected to the line camera, the carrier moves along the Y-axis under the driving of the Y-axis motor driver, and the trigger synchronization mode of the trigger signal is as follows:
s21, providing a frame trigger signal (high level) to the line camera in advance;
and S22, outputting a line trigger signal to drive the linear array camera to shoot when the preset initial position is reached.
Wherein the start position is set after the start of the frame trigger signal.
Step S21 specifically includes: the controller provides a frame trigger signal (high level) to the line camera in advance, and the line camera enters a pre-shooting state.
Step S22 specifically includes: when the carrier moves to reach the preset initial position, the Y-axis motor starts to output a line trigger signal to drive the linear array camera to shoot. The line trigger signals are square wave signals, each rising edge or each falling edge of the line trigger signals triggers the linear array camera to shoot once, and when the shooting frequency of the linear array camera reaches a preset value, the linear array camera stops shooting.
Fig. 10 is a timing waveform diagram of a frame trigger signal, a position signal and a line trigger signal during a trigger timing synchronization process in a line camera scanning method according to an embodiment of the present invention, referring to fig. 10, a controller sends a frame trigger signal a to the line camera, when the frame trigger signal a changes from a low level to a high level, i.e., when t is t1, the line camera detects a rising edge of the frame trigger signal, the line camera enters a pre-shooting state, a Y-axis motor starts to drive a carrier to move in a Y direction, when the carrier moves to a preset starting point Y is Y1, i.e., when the starting point is t2, the Y-axis motor synchronously sends a line trigger signal b to the line camera, the line trigger signal b is a square wave signal, the line camera starts to shoot, the Y-axis motor drives the carrier to move every preset interval distance, correspondingly, the Y-axis motor sends a square wave signal to the line camera, when the line trigger signal c changes from a low level to a high level, when t is t2, the line camera detects the rising edge of the line trigger signal, the line camera performs the first shooting, the line trigger signal triggers the line camera to shoot once every rising edge, and when the carrier moves to a preset end point y is y2, namely when the end position is t3, the shooting frequency of the line camera reaches a preset value, the line camera stops shooting. The starting position and the ending position can be determined according to the line trigger signal pulse width and the movement preset interval distance, namely the number of square waves of the line trigger signal sent by the Y-axis motor is determined, the linear array camera is triggered to shoot, and the shooting frequency of the linear array camera is controlled. Or presetting a starting point and an ending point according to the length of an actual object to be detected, setting the shooting times of the linear array camera according to the pulse width of the line trigger signal and the moving preset interval distance, calculating the shooting times by the linear array camera under the triggering of the line trigger signal, and stopping shooting by the linear array camera when the shooting times of the linear array camera reach the preset value. In this embodiment, the first rising edge signal of the line trigger signal is synchronized with the start position, and multiple times of shooting by the line camera are triggered between the start point y1 and the end point y2, so that stretching or distortion of a shot image is avoided, and the shooting effect is better.
As shown in fig. 11, a flow chart of selecting mark points in a first sequence of a focusing process of a linear array camera scanning method according to an embodiment of the present invention is shown, where the step of focusing a plurality of mark points is: s111: determining a first mark point as an all-focus mark point, and carrying out an all-focus process; s112: selecting a next mark point according to the first constraint condition as a semi-focusing mark point, and performing a semi-focusing process; s113: and taking the mark points meeting the second constraint condition as full-focusing mark points again for focusing.
Wherein the first constraint includes:
c0, the distance between the last mark point and the last mark point is less than a preset distance threshold;
c1, the distance from the last marking point is minimum;
c2, the last marking point is positioned in the same communication area;
the second constraint is: the distance between the mark point and the last mark point is larger than the preset distance or the definition of a plurality of reference images obtained by utilizing the semi-focusing process is smaller than the preset definition.
In this embodiment, a distance threshold d is preset, a mark point to be focused whose distance from a previous mark point is smaller than the preset distance threshold d is selected, then a mark point to be focused whose distance from the previous mark point is the smallest is selected from the selected mark points to be focused meeting the condition of C0, and whether the mark point and the previous mark point are located in the same communication area is determined, if the mark point to be focused is located in the same communication area, the mark point to be focused is selected as a next mark point, and focusing is performed on the mark point according to a semi-focusing manner, and if the mark point to be focused is not located in the same communication area, the next mark point to be focused meeting the first constraint condition is searched as the next mark point. The focusing efficiency is higher by respectively adopting an all-focusing mode or a semi-focusing mode to focus different mark points.
In another embodiment, the mark point whose distance from the last mark point is greater than the preset distance or the mark points obtained by the semi-focusing process and whose reference image definition is less than the preset definition are used as the full-focusing mark points for focusing again.
The condition of the mark point with the distance from the last mark point greater than the preset distance refers to that: if the distance between the current mark point and the previous mark point is greater than the preset distance, the point belongs to an all-focus mark point, an all-focus process is required, and the mark points in the subsequent sequence take the mark point as a reference to perform a semi-focus process.
Fig. 12 is a schematic diagram illustrating selection of mark points in a high-precision focusing process of a line camera scanning method according to an embodiment of the present invention, and the mark points six 2046, seven mark points 2047, eight mark points 2048, and nine mark points nine 2049 are exemplified in the diagram.
When the distance between the eight 2048 mark point and the nine 2049 mark point is greater than a preset distance, and the nine 2049 mark point uses the height position corresponding to the second focus of the eight 2048 mark point as a reference to perform fine focusing, a large error is generated, so that the nine 2049 mark point is modified into a mark point for performing full focusing, and a full focusing process is performed, that is, a coarse focusing process and a fine focusing process need to be performed again.
And (3) selecting the mark points for full focusing: the condition that the definition of a plurality of reference images obtained by utilizing the semi-focusing process is less than the mark points with the preset definition refers to that: if the definition of a plurality of reference images obtained by the current mark point (semi-focusing mark point) by utilizing the semi-focusing process is smaller than the preset definition, the mark point is converted into a full-focusing mark point to carry out the full-focusing process, and the mark points in the subsequent sequence take the full-focusing mark point as the reference to carry out the semi-focusing process.
In one embodiment, the preset definition is 60, that is, when the definition of all the acquired images is less than 60 when the fine focusing is judged, the mark point needs to be converted into a full-focusing mark point, a coarse focusing process and a fine focusing process need to be performed again, and the adjacent mark points in the subsequent sequence are subjected to a semi-focusing process by taking the mark point as a reference, so that error accumulation caused by multiple times of focusing is avoided, dynamic correction can be performed in time, and the focusing accuracy is ensured.
As shown in fig. 13, which is a column scanning schematic diagram of a linear array camera scanning method according to an embodiment of the present invention, a column scanning manner is adopted for scanning according to a preset scanning width, each scanning column includes at least one mark point, the mark points have different Y positions and corresponding Z-axis positions are also different, after scanning is completed, the strip scanning area images obtained by scanning are spliced and fused, and it can be seen that the images are scanned column by scanning width 501 until the whole image to be detected is covered.
In one embodiment, the method further includes performing blank area detection on the image before scanning, skipping the blank area during scanning when detecting that the width of the blank area is greater than a preset blank width, as shown in the figure, skipping the blank area during scanning when the width 502 of the blank area is greater than the preset blank width, and filling a blank image or other reasonable images in the blank area during image stitching after scanning is completed.
As shown in fig. 14, which is a scanning schematic diagram of a line camera scanning method according to an embodiment of the present invention, the scanning schematic diagram includes a line camera 102, an objective lens 101, an objective lens moving direction 106, a carrier 201, an object 203, a carrier moving direction (Y-axis direction) 205, a scanning width 501, and a scanning direction 601, and as can be seen from the figure, the scanning is a column scanning manner, the scanning direction 601 perpendicularly intersects the objective lens moving direction (Z-axis direction) 106 and the carrier moving direction (Y-axis direction) 205, an image area to be measured is divided into column areas along the scanning direction 601 according to a preset scanning width 501, and a column scanning is performed sequentially, and each column scanning area includes at least one mark point.
As shown in fig. 15, a schematic diagram of the objective focal length track of the line camera scanning method according to an embodiment of the present invention includes a line camera 102, an objective lens 101, an objective lens moving direction (Z-axis direction) 106, a carrier 201, an object 203, a focus mark point 204, a second focus position 701 corresponding to the focus mark point, an objective focal length track 107, and a carrier moving direction (Y-axis direction) 205.
In this embodiment, it is assumed that a row of scanning areas includes six mark points, each mark point corresponds to a second focus position, which is the optimal focal position of the mark point, during scanning, the focal length of the objective lens is not constant, the surface of the object is uneven, different mark points are distributed at different positions, and the focal length of the objective lens is dynamically adjusted along the optimal focal positions of the mark points to achieve the optimal scanning resolution.
As shown in fig. 16, a block diagram of a scanning device of a line-array camera according to an embodiment of the present invention includes: the device comprises a target image acquisition module used for acquiring a target object image, a mark point acquisition module used for selecting a plurality of mark points on the target object image, a focusing module used for carrying out high-precision focusing on the mark points in sequence according to a first sequence so as to determine the focus positions of the mark points, and a scanning module used for scanning the target object according to the focus positions of the mark points. In some embodiments, the apparatus further includes an image stitching module, configured to stitch and fuse the scanned strip-shaped scanning area images after the scanning is completed, and the apparatus is configured to execute any of the above linear array camera scanning methods.
The invention obtains the small area reference image near the focusing mark point at different shooting height positions by moving the objective lens of the linear array camera and the carrier together, overcomes the defect that the image of the area near the focus is easy to be unclear because the definition of a single scanning line is taken as the selection basis of the optimal focal length in the prior art, and also can send the shooting trigger signal after the carrier stops moving by triggering the movement of the carrier through the shooting trigger signal of the linear array camera, thereby avoiding the image distortion or dislocation caused by the shooting of the linear array camera when the carrier moves, improving the focusing accuracy of the linear array camera and further improving the scanning accuracy.
In addition, the invention also selects a plurality of mark points on the target object image, carries out a full focusing process comprising a rough focusing process and a fine focusing process on some mark points to obtain the focus position of the corresponding mark point, carries out a semi-focusing process of the fine focusing process by taking the focus position of the previous mark point as a second central position on other mark points, and overcomes the defect of low focusing efficiency caused by the fact that the plurality of focus mark points need to be fully focused one by one when focusing in the prior art.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (8)
1. A linear array camera scanning method is used for a linear array camera scanning system, the linear array camera scanning system comprises an area array camera and a linear array shooting component which are used for shooting a target object, and a carrier which is used for placing the target object, the linear array shooting component comprises a linear array camera and an objective lens, and the method is characterized by comprising the following steps:
acquiring a target object image;
selecting a plurality of mark points on the target object image;
sequentially carrying out high-precision focusing on the plurality of marking points according to a first sequence to determine the focus position of each marking point;
scanning the target object by using the linear array camera according to the focal position of each mark point;
the scanning adopts a column scanning mode, scanning is carried out according to a preset scanning width, and an image in each scanning column comprises at least one mark point;
the selecting of the plurality of mark points on the target object image specifically comprises:
acquiring image edge and color information of a target object image;
selecting a mark point according to the image edge and the color information;
deleting or adding the marking points according to the density degree of the marking points;
the color information includes gray shade, and the acquiring of the image edge and the color information specifically includes:
extracting the image edge of the target object image through an image edge extraction algorithm;
obtaining a gray map by carrying out gray processing on the target object image, and extracting the gray value of the gray map to obtain the gray shade;
the mark points comprise edge mark points and central mark points, and the selecting the mark points according to the image edge and the color information specifically comprises the following steps:
selecting a plurality of edge mark points on the image edge according to a first selection rule according to the image edge;
selecting a plurality of central mark points in the central area of the image according to a second selection rule according to the gray shade;
the first selection rule is that the spacing distance between two adjacent selected mark points is a fixed value; the second selection rule is a preset gray value threshold value, and when the gray value of the pixel point is greater than the gray value threshold value, the pixel point is selected as a mark point;
the deleting or adding the mark points according to the density degree of the mark points specifically comprises the following steps:
presetting a low threshold value and a high threshold value of the spacing distance between adjacent marking points, and judging whether the spacing distance between each marking point and the adjacent marking point is greater than the low threshold value of the spacing distance and smaller than the high threshold value of the spacing distance;
if the spacing distance between the mark point and the adjacent mark point is greater than the spacing distance low threshold value and less than the spacing distance high threshold value, the mark point is reserved;
if the spacing distance between the mark point and the adjacent mark point is smaller than the spacing distance low threshold value, deleting the mark point;
if the spacing distance between the mark point and the adjacent mark point is higher than the spacing distance high threshold, the mark point is added between the mark point and the adjacent mark point.
2. The scanning method of the line-array camera according to claim 1, wherein the high-precision focusing specifically comprises an all-focusing process or a half-focusing process:
the full focusing process comprises a coarse focusing process and a fine focusing process;
the semi-focusing process specifically comprises the following steps: executing a fine focusing process when the focus position of the previous mark point is a second center position;
the rough focusing process specifically comprises the following steps:
shooting a target object at a plurality of shooting height positions by using a linear array shooting component;
controlling the carrier to move along the transverse direction at each shooting height position, shooting a plurality of scanning line images by the linear array camera in the carrier moving process according to the shooting trigger signal to form a reference image of the shooting height position, wherein the transverse direction is a direction perpendicular to the scanning lines of the linear array camera;
determining the height position corresponding to the first focus according to the definition of the reference images at different height positions;
the plurality of shooting height positions are located between a preset first starting height position and a first ending height position, and the objective lens moves from the first starting height position to the first ending height position along the vertical axis according to a first preset stepping distance to form a plurality of shooting height positions;
the focal position corresponding to the first starting height position is higher than the upper surface of the target object, and the focal position corresponding to the first ending height position is lower than the lower surface of the target object;
the fine focusing process specifically comprises the following steps:
selecting a height position corresponding to the first focus as a second central position, and taking the second central position as a center to obtain a second starting height position and a second ending height position;
the objective lens moves from a second starting height position to a second ending height position along the vertical axis according to a second preset stepping distance to form a plurality of secondary shooting height positions;
shooting a target object at a plurality of secondary shooting height positions by using a linear array shooting component;
controlling the carrier to move along the transverse direction at each secondary shooting height position, shooting a plurality of scanning line images by the linear array camera in the carrier moving process according to the shooting trigger signal to form a reference image of the shooting height position, wherein the transverse direction is a direction perpendicular to the scanning lines of the linear array camera;
and determining the height position corresponding to the second focus according to the definition of the reference images at different height positions.
3. The scanning method of claim 2, wherein at each photographing height position, the carrier moves along the transverse direction, and the line camera photographs a plurality of scanning line images during the movement of the carrier according to the photographing trigger signal to form a reference image of the photographing height position, including two embodiments:
the first embodiment specifically includes:
after the objective lens moves to the current shooting height position, the carrier moves from a first transverse position to a second transverse position along the transverse direction, and the linear array camera shoots a plurality of scanning line images in the carrier moving process according to the shooting trigger signal; then the objective lens moves to the next shooting height position, the carrier moves from the second transverse position to the first transverse position, and the linear array camera shoots a plurality of scanning line images in the carrier moving process according to the shooting trigger signal;
the second embodiment specifically includes:
after the objective lens moves to the current shooting height position, the carrier moves from a first transverse position to a second transverse position along the transverse direction, the linear array camera shoots a plurality of scanning line images in the moving process of the carrier according to the shooting trigger signal, and the carrier moves from the second transverse position back to the first transverse position; then the objective lens moves to the next shooting height position, the carrier moves from the first transverse position to the second transverse position along the transverse direction, and the linear array camera shoots a plurality of scanning line images in the moving process of the carrier according to the shooting trigger signal.
4. The linear array camera scanning method according to claim 3, wherein the linear array camera scanning system further comprises a controller and a Y-axis motor connected to the linear array camera, the carrier moves along the Y-axis under the driving of the Y-axis motor, and the carrier lateral movement motor is used to generate a photographing trigger signal;
providing a frame trigger signal to the linear array camera in advance;
when the preset initial position is reached, outputting a line trigger signal to drive the linear array camera to shoot;
the starting position is arranged after the frame trigger signal starts;
the pre-providing of the frame trigger signal to the line camera specifically includes: the controller provides a frame trigger signal to the linear array camera in advance, and the linear array camera enters a pre-shooting state;
the line trigger signal is a square wave signal, each rising edge or each falling edge of the line trigger signal triggers the linear array camera to shoot once, and when the shooting frequency of the linear array camera reaches a preset value, the linear array camera stops shooting.
5. The scanning method of claim 2, wherein the first sequence is:
determining a first mark point as an all-focus mark point, and carrying out an all-focus process;
selecting a next mark point according to the first constraint condition as a semi-focusing mark point, and performing a semi-focusing process;
taking the mark points meeting the second constraint condition as full-focusing mark points again for focusing;
the first constraint includes:
c0, the distance between the last mark point and the last mark point is less than a preset distance threshold;
c1, the distance from the last marking point is minimum;
c2, the last marking point is positioned in the same communication area;
the second constraint condition is as follows: the distance between the mark point and the last mark point is larger than the preset distance or the definition of a plurality of reference images obtained by utilizing the semi-focusing process is smaller than the preset definition.
6. The scanning method of claim 1, further comprising the step of splicing and fusing the scanned strip-like scanned area images after the scanning is completed.
7. The method as claimed in claim 1, further comprising the step of detecting a blank area of the target image before the scanning is started, and skipping the blank area when the width of the blank area is larger than a preset blank width.
8. A scanning device for a linear array camera, comprising:
the target image acquisition module is used for acquiring a target object image;
the marking point acquisition module is used for selecting a plurality of marking points on the target object image;
the focusing module is used for sequentially carrying out high-precision focusing on the plurality of marking points according to a first sequence so as to determine the focus position of each marking point;
the scanning module is used for scanning the target object according to the focus position of each marking point;
the scanning adopts a column scanning mode, scanning is carried out according to a preset scanning width, and an image in each scanning column comprises at least one mark point;
the selecting of the plurality of mark points on the target object image specifically comprises:
acquiring image edge and color information of a target object image;
selecting a mark point according to the image edge and the color information;
deleting or adding the marking points according to the density degree of the marking points;
the color information includes gray shade, and the acquiring of the image edge and the color information specifically includes:
extracting the image edge of the target object image through an image edge extraction algorithm;
obtaining a gray map by carrying out gray processing on the target object image, and extracting the gray value of the gray map to obtain the gray shade;
the mark points comprise edge mark points and central mark points, and the selecting the mark points according to the image edge and the color information specifically comprises the following steps:
selecting a plurality of edge mark points on the image edge according to a first selection rule according to the image edge;
selecting a plurality of central mark points in the central area of the image according to a second selection rule according to the gray shade;
the first selection rule is that the spacing distance between two adjacent selected mark points is a fixed value; the second selection rule is a preset gray value threshold value, and when the gray value of the pixel point is greater than the gray value threshold value, the pixel point is selected as a mark point;
the deleting or adding the mark points according to the density degree of the mark points specifically comprises the following steps:
presetting a low threshold value and a high threshold value of the spacing distance between adjacent marking points, and judging whether the spacing distance between each marking point and the adjacent marking point is greater than the low threshold value of the spacing distance and smaller than the high threshold value of the spacing distance;
if the spacing distance between the mark point and the adjacent mark point is greater than the spacing distance low threshold value and less than the spacing distance high threshold value, the mark point is reserved;
if the spacing distance between the mark point and the adjacent mark point is smaller than the spacing distance low threshold value, deleting the mark point;
if the spacing distance between the mark point and the adjacent mark point is higher than the spacing distance high threshold, the mark point is added between the mark point and the adjacent mark point.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811137914.7A CN109270066B (en) | 2018-09-28 | 2018-09-28 | Scanning method and device for linear array camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811137914.7A CN109270066B (en) | 2018-09-28 | 2018-09-28 | Scanning method and device for linear array camera |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109270066A CN109270066A (en) | 2019-01-25 |
CN109270066B true CN109270066B (en) | 2021-11-05 |
Family
ID=65198650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811137914.7A Active CN109270066B (en) | 2018-09-28 | 2018-09-28 | Scanning method and device for linear array camera |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109270066B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112399038B (en) * | 2019-08-15 | 2022-08-09 | 上海微电子装备(集团)股份有限公司 | Laser packaging equipment and laser packaging method |
CN113766131B (en) * | 2021-09-15 | 2022-05-13 | 广州市明美光电技术有限公司 | Multi-target point focusing method and digital slice scanner applying same |
CN115546172B (en) * | 2022-10-19 | 2023-06-30 | 广州纳动半导体设备有限公司 | Chip carrier plate-substrate near zero clearance measurement method based on machine vision |
CN117148477B (en) * | 2023-09-05 | 2024-06-25 | 中国人民解放军国防科技大学 | Precipitation particle multi-angle stereoscopic imaging measurement device and method |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008039968A2 (en) * | 2006-09-28 | 2008-04-03 | The Research Foundation Of State University Of New York | Apparatus, system, kit and method for heart mapping |
CN101335837A (en) * | 2007-06-28 | 2008-12-31 | 索尼株式会社 | Image pickup device, photographing control method and program |
CN106573336A (en) * | 2014-07-01 | 2017-04-19 | 奇欧瓦公司 | Micromachining method and system for patterning a material, and method for using one such micromachining system |
US9866916B1 (en) * | 2016-08-17 | 2018-01-09 | International Business Machines Corporation | Audio content delivery from multi-display device ecosystem |
CN108369331A (en) * | 2015-12-10 | 2018-08-03 | 佳能株式会社 | Microscopic system and its control method |
CN108572438A (en) * | 2017-03-07 | 2018-09-25 | 伊鲁米那股份有限公司 | The system and method for the focus tracking being improved using barrier structure |
CN108989690A (en) * | 2018-09-28 | 2018-12-11 | 深圳市盛世生物医疗科技有限公司 | A kind of line-scan digital camera multiple labeling point focusing method, device, equipment and storage medium |
CN109151319A (en) * | 2018-09-28 | 2019-01-04 | 深圳市盛世生物医疗科技有限公司 | A kind of processing method and processing device of multiple labeling point target substance markers point focusing sequence |
CN109286751A (en) * | 2018-09-28 | 2019-01-29 | 深圳市盛世智能装备有限公司 | A kind of line-scan digital camera focusing method, device, equipment and storage medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7728845B2 (en) * | 1996-02-26 | 2010-06-01 | Rah Color Technologies Llc | Color calibration of color image rendering devices |
AU9119098A (en) * | 1997-08-25 | 1999-03-16 | Richard A. Holub | A system for distributing and controlling color reproduction at multiple sites |
EP2353042A4 (en) * | 2008-10-14 | 2013-06-26 | Sanford Burnham Med Res Inst | Automated scanning cytometry using chromatic aberration for multiplanar image acquisition |
EP2244484B1 (en) * | 2009-04-22 | 2012-03-28 | Raytrix GmbH | Digital imaging method for synthesizing an image using data recorded with a plenoptic camera |
CN202017854U (en) * | 2010-12-31 | 2011-10-26 | 深圳市盛世天创传媒科技有限公司 | Camera auxiliary system |
CN102333171A (en) * | 2011-09-22 | 2012-01-25 | 山东易创电子有限公司 | Image scanning method and system based on linear array CCD (charge coupled device) system |
CN102724401B (en) * | 2012-05-18 | 2016-04-27 | 深圳大学 | A kind of linear array CCD camera multiple spot automatic focusing method |
CN102752511B (en) * | 2012-07-09 | 2016-07-27 | 宁波江丰生物信息技术有限公司 | The acquisition methods of linear array scanning system focus, device and linear array scanning system |
CN105701809B (en) * | 2016-01-11 | 2018-09-14 | 宁波江丰生物信息技术有限公司 | A kind of method for correcting flat field based on line-scan digital camera scanning |
-
2018
- 2018-09-28 CN CN201811137914.7A patent/CN109270066B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008039968A2 (en) * | 2006-09-28 | 2008-04-03 | The Research Foundation Of State University Of New York | Apparatus, system, kit and method for heart mapping |
CN101335837A (en) * | 2007-06-28 | 2008-12-31 | 索尼株式会社 | Image pickup device, photographing control method and program |
CN106573336A (en) * | 2014-07-01 | 2017-04-19 | 奇欧瓦公司 | Micromachining method and system for patterning a material, and method for using one such micromachining system |
CN108369331A (en) * | 2015-12-10 | 2018-08-03 | 佳能株式会社 | Microscopic system and its control method |
US9866916B1 (en) * | 2016-08-17 | 2018-01-09 | International Business Machines Corporation | Audio content delivery from multi-display device ecosystem |
CN108572438A (en) * | 2017-03-07 | 2018-09-25 | 伊鲁米那股份有限公司 | The system and method for the focus tracking being improved using barrier structure |
CN108989690A (en) * | 2018-09-28 | 2018-12-11 | 深圳市盛世生物医疗科技有限公司 | A kind of line-scan digital camera multiple labeling point focusing method, device, equipment and storage medium |
CN109151319A (en) * | 2018-09-28 | 2019-01-04 | 深圳市盛世生物医疗科技有限公司 | A kind of processing method and processing device of multiple labeling point target substance markers point focusing sequence |
CN109286751A (en) * | 2018-09-28 | 2019-01-29 | 深圳市盛世智能装备有限公司 | A kind of line-scan digital camera focusing method, device, equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
"电润湿法"使拍照手机实现无机械配件自动对焦;王丽英;《技术前沿》;20051208;第11卷(第11期);第33页 * |
Surface area-based focus criterion for multi-focus image fusion;Nejati Mansour;《Information Fusion》;20171231;第36卷(第36期);第284-295页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109270066A (en) | 2019-01-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109270066B (en) | Scanning method and device for linear array camera | |
US5912699A (en) | Method and apparatus for rapid capture of focused microscopic images | |
US7920182B2 (en) | Digital camera with non-uniform image resolution | |
CN101630061B (en) | Optical confocal three-dimensional data acquisition method of tool traces | |
EP1343332A2 (en) | Stereoscopic image characteristics examination system | |
CN109286751B (en) | Linear array camera focusing method, device, equipment and storage medium | |
CN113115027B (en) | Method and system for calibrating camera | |
CN112634376B (en) | Calibration method and device, calibration equipment and storage medium | |
CN1727983B (en) | Strobe illumination | |
KR20150135431A (en) | High-speed image capture method and high-speed image capture device | |
CN114113116B (en) | Accurate detection process method for surface microdefect of large-caliber element | |
CN102752511A (en) | Linear array scanning system, method and device for obtaining focal point of linear array scanning system | |
JP5668227B2 (en) | Image measuring device | |
CN109493418B (en) | Three-dimensional point cloud obtaining method based on LabVIEW | |
JP2012247743A (en) | Chart for checking resolution and method for checking resolution | |
CN112461853B (en) | Automatic focusing method and system | |
CN109151319B (en) | Method and device for processing focusing sequence of mark points of multi-mark-point target object | |
CN112710662B (en) | Generation method and device, generation system and storage medium | |
US20080008381A1 (en) | Coordinate acquisition apparatus for test of printed board, and coordinate acquisition method and program for test thereof | |
CN105651699A (en) | Dynamic focus following method based on area-array camera | |
JP2008014646A (en) | Substrate inspection method | |
CN109361854A (en) | A kind of video camera focus adjustment method, apparatus and system based on MTF | |
CN112584047B (en) | Control method for continuous scanning imaging of area-array camera | |
JP4062100B2 (en) | Shape measuring device | |
CN113777040A (en) | Focusing method and device of linear array camera and automatic optical detection equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: 518108 Huike Industrial Park, No. 1 Industrial Road, Shilong Community, Shiyan Street, Baoan District, Shenzhen City, Guangdong Province Patentee after: Shenzhen Shengshi Intelligent Equipment Co.,Ltd. Address before: 518108 Huike Industrial Park, No. 1 Industrial Road, Shilong Community, Shiyan Street, Baoan District, Shenzhen City, Guangdong Province Patentee before: SHENZHEN SUNSON INTELLIGENT EQUIPMENT Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder |