Automatic focusing method and device for objective lens
1. An objective lens auto-focusing device, characterized in that: the device comprises a support frame, wherein a first camera is arranged on the support frame in a sliding manner, a first lens barrel is arranged at the irradiation end of the first camera, an objective lens is arranged at the end part of the first lens barrel, a second camera is also arranged on the support frame, a second lens barrel is arranged on the second camera, an opening is arranged on the side wall of the first lens barrel, and the end part of the second lens barrel is connected to the edge of the opening;
the second half mirror is obliquely arranged in the second lens cone, a red point laser irradiating the second half transmitting mirror is further arranged on the side wall of the second lens cone, the second half reflecting mirror can reflect red points emitted by the infrared laser to the first lens cone, a first half reflecting mirror is obliquely arranged at the position of the opening in the first lens cone, and the first half reflecting mirror and the second half reflecting mirror are parallel to each other.
2. An objective autofocus device according to claim 1, wherein: the support frame is provided with a guide rail, a slide rod is arranged on the side wall of the first lens barrel and is connected to the guide rail in a matched mode, a bolt is arranged on the slide rod, and the bolt penetrates through the slide rod and is abutted to the bottom of the guide rail.
3. An objective autofocus device according to claim 1, wherein: the second half-transmitting mirror and the side wall of the second lens cone form an angle of 45 degrees, and the red spot laser is vertically arranged on the side wall of the second lens cone.
4. An objective autofocus device according to claim 1, wherein: the second camera is an infrared camera.
5. An objective autofocus device according to claim 1, wherein: the second lens cone is provided with a mounting hole on the upper side wall of the red point laser, the red point laser is plugged into the mounting hole, a mounting sheet is arranged on the red point laser, and the mounting sheet is fixed on the side wall of the second lens cone.
6. An objective lens auto-focusing method for use in the objective lens auto-focusing apparatus of any one of claims 1 to 4, characterized in that: comprises the following steps of (a) carrying out,
s1, firstly, placing an experimental article in front of a first lens barrel, starting a red point laser, enabling a red point emitted by the red point laser to irradiate the experimental article through a second half mirror and a first half mirror, then, taking a picture by using a second camera, taking an image of a laser point of the experimental article through the second half mirror and the first half mirror, and recording the distance H1 between the corresponding objective lens of the image and the experimental article;
s2, relatively moving the position of the first lens barrel to change the distance between the objective lens and the experimental article, starting the red point laser again to make the red point emitted by the red point laser irradiate the experimental article through the second half mirror and the first half mirror, then taking a picture by using the second camera, taking the picture of the laser point of the experimental article through the second half mirror and the first half mirror, and recording the distance H2 between the objective lens and the experimental article corresponding to the picture;
s3, repeating the step S2, and under the condition that the distance between the objective lens and the experimental article is a plurality of groups of different distances, shooting by using a second camera, so as to record the distance Hn between the objective lens and the experimental article corresponding to the plurality of groups of images;
s4, adjusting the position of the first lens barrel again, moving the first lens barrel to the position focused by the first camera in combination with the shooting of the experimental article by the first camera, and recording the image shot by the second camera and the distance K from the objective lens to the experimental article when the first lens barrel is at the position;
s5, taking away the experimental article, placing the object to be shot in front of the objective lens, starting the red point laser, making the red point emitted by the red point laser irradiate on the object through the second half mirror and the first half mirror, then using the second camera to shoot the image of the laser point of the object to be shot through the second half mirror and the first half mirror;
s6, comparing the image shot in the step S5 with each group of recorded images in the steps S1-S3, finding one image which is closest to the image shot in the step S5 in the recorded images, and recording the distance Hh from the objective lens corresponding to the image to the experimental article;
s7, calculating the distance Z from the current objective lens position to the first camera focusing position, namely subtracting K from the distance Hh from the objective lens corresponding to the image found in the step S6 to the experimental article to obtain the distance Z from the current objective lens to the first camera focusing position;
s8, moving the first barrel by Z to move the first camera to a position close to focus, and finally fine-tuning the first camera to achieve focus.
Background
When utilizing down the camera to shoot some objects, need focus on, even be separated by certain distance between camera and the article that need shoot, so that the photo of shooing is more clear, but at present the in-process of shooing the object, people often are difficult to quick find the suitable distance between camera and the article, need constantly adjust the position of camera when focusing simultaneously, be like this at the in-process of shooing a plurality of not equidimension articles, all need refocus when shooing different article at every turn, thereby can waste certain time, and the process of focusing is also harder.
Disclosure of Invention
Therefore, embodiments of the present invention provide an objective lens auto-focusing method and apparatus to solve the problem in the prior art that a lot of time is wasted because a camera needs to be continuously focused when a camera is used to record and shoot different objects.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
according to a first aspect of an embodiment of the present invention, an objective lens auto-focusing device includes a support frame, a first camera is slidably disposed on the support frame, a first lens barrel is disposed at an irradiation end of the first camera, an objective lens is disposed at an end of the first lens barrel, a second camera is further disposed on the support frame, a second lens barrel is disposed on the second camera, an opening is disposed on a side wall of the first lens barrel, and an end of the second lens barrel is connected to an edge of the opening;
the second half mirror is obliquely arranged in the second lens cone, a red point laser irradiating the second half transmitting mirror is further arranged on the side wall of the second lens cone, the second half reflecting mirror can reflect red points emitted by the infrared laser to the first lens cone, a first half reflecting mirror is obliquely arranged at the position of the opening in the first lens cone, and the first half reflecting mirror and the second half reflecting mirror are parallel to each other.
Furthermore, the support frame is provided with a guide rail, the side wall of the first lens barrel is provided with a slide bar, the slide bar is connected to the guide rail in a matching mode, the slide bar is provided with a bolt, and the bolt penetrates through the slide bar and is abutted to the bottom of the guide rail.
Furthermore, the second half-emitting mirror and the side wall of the second lens barrel form an angle of 45 degrees, and the red spot laser is vertically arranged on the side wall of the second lens barrel.
Further, the second camera is an infrared camera.
Furthermore, the second lens cone is provided with a mounting hole on the upper side wall of the red point laser, the red point laser is plugged into the mounting hole, the red point laser is provided with a mounting sheet, and the mounting sheet is fixed on the side wall of the second lens cone.
An objective lens auto-focusing method according to a second aspect of an embodiment of the present invention, for the objective lens auto-focusing apparatus of any one of claims 1 to 4, includes the steps of,
s1, firstly, placing an experimental article in front of a first lens barrel, starting a red point laser, enabling a red point emitted by the red point laser to irradiate the experimental article through a second half mirror and a first half mirror, then, taking a picture by using a second camera, taking an image of a laser point of the experimental article through the second half mirror and the first half mirror, and recording the distance H1 between the corresponding objective lens of the image and the experimental article;
s2, relatively moving the position of the first lens barrel to change the distance between the objective lens and the experimental article, starting the red point laser again to make the red point emitted by the red point laser irradiate the experimental article through the second half mirror and the first half mirror, then taking a picture by using the second camera, taking the picture of the laser point of the experimental article through the second half mirror and the first half mirror, and recording the distance H2 between the objective lens and the experimental article corresponding to the picture;
s3, repeating the step S2, and under the condition that the distance between the objective lens and the experimental article is a plurality of groups of different distances, shooting by using a second camera, so as to record the distance Hn between the objective lens and the experimental article corresponding to the plurality of groups of images;
s4, adjusting the position of the first lens barrel again, moving the first lens barrel to the position focused by the first camera in combination with the shooting of the experimental article by the first camera, and recording the image shot by the second camera and the distance K from the objective lens to the experimental article when the first lens barrel is at the position;
s5, taking away the experimental article, placing the object to be shot in front of the objective lens, starting the red point laser, making the red point emitted by the red point laser irradiate on the object through the second half mirror and the first half mirror, then using the second camera to shoot the image of the laser point of the object to be shot through the second half mirror and the first half mirror;
s6, comparing the image shot in the step S5 with each group of recorded images in the steps S1-S3, finding one image which is closest to the image shot in the step S5 in the recorded images, and recording the distance Hh from the objective lens corresponding to the image to the experimental article;
s7, calculating the distance Z from the current objective lens position to the first camera focusing position, namely subtracting K from the distance Hh from the objective lens corresponding to the image found in the step S6 to the experimental article to obtain the distance Z from the current objective lens to the first camera focusing position;
s8, moving the first barrel by Z to move the first camera to a position close to focus, and finally fine-tuning the first camera to achieve focus.
The embodiment of the invention has the following advantages: through the setting of the first camera, the second camera and other structures, a plurality of photo images are shot in advance, the distance between the objective lens and the object when each image is shot is recorded, the distance between the objective lens and the object when the first camera is focused is recorded, then when other objects are shot, the second camera can be used for shooting the objects firstly, then the discharged images are compared with the original recorded images to find out the closest images, the distance between the objective lens and the object corresponding to the images is used for subtracting the distance between the objective lens and the object when the first camera is focused, so that the focusing position when the new object is shot is quickly found out, when different objects are shot, the focusing position of the first camera can be quickly found out and shot, and the use is more convenient.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
The structures, ratios, sizes, and the like shown in the present specification are only used for matching with the contents disclosed in the specification, so as to be understood and read by those skilled in the art, and are not used to limit the conditions that the present invention can be implemented, so that the present invention has no technical significance, and any structural modifications, changes in the ratio relationship, or adjustments of the sizes, without affecting the effects and the achievable by the present invention, should still fall within the range that the technical contents disclosed in the present invention can cover.
Fig. 1 is a schematic structural diagram of an objective autofocus device according to embodiment 1 of the present invention.
In the figure: 1. a first camera; 2. a first barrel; 3. an objective lens; 4. a second camera; 5. a second barrel; 6. a first half mirror; 7. a second half mirror; 8. a red spot laser.
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and features of the invention will become apparent to those skilled in the art from the following disclosure, and it is to be understood that the described embodiments are merely exemplary of the invention and that it is not intended to limit the invention to the particular embodiments disclosed. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
An objective lens automatic focusing device is shown in fig. 1 and comprises a support frame, wherein a first camera 1 is arranged on the support frame in a sliding mode, an irradiation end of the first camera 1 is connected with a first lens barrel 2, an objective lens 3 is arranged at the end portion of the first lens barrel 2, and when the first camera 1 shoots, objects needing to be shot can be shot through the first lens barrel 2 and the objective lens 3. Still be provided with second camera 4 on the support frame, the end of shining of second camera 4 is connected with second lens cone 5, be provided with the trompil on the lateral wall of first lens cone 2, the one end connection that second camera 4 was kept away from to second lens cone 5 is on the trompil edge, the fixedly connected with second semi-reflecting mirror 7 of slope in the second lens cone 5, still be equipped with on the lateral wall of second lens cone 5 and shine the red point laser instrument 8 to second semi-transmitting mirror, second semi-reflecting mirror 7 can reflect the red point that infrared laser instrument sent to first lens cone 2 in, be located the position slope of trompil in first lens cone 2 and be provided with first semi-reflecting mirror 6, first semi-reflecting mirror 6 is parallel to each other with the mirror surface of second semi-reflecting mirror 7.
When the red laser 8 is turned on, the irradiated red dots can penetrate out of the objective lens 3 through reflection of the second half mirror 7 and the first half mirror 6, when the second camera 4 shoots, an object outside can be shot through the second half mirror 7 and the first half mirror 6, and in addition, the first camera 1 can also shoot outside through the first half mirror 6.
Wherein the second half-transmitting mirror is 45 degrees angles with the lateral wall of second lens cone 5, and the perpendicular setting of red point laser 8 is to the lateral wall of second lens cone 5, like this when making red point laser 8 shine, can be accurate go out red point reflection.
The second camera 4 is an infrared camera, and after the red spot laser 8 is used for irradiating the object to be shot, the red spot on the object can be accurately captured by the infrared camera, so that the image can be better shot.
As shown in the drawing, a guide rail is fixedly connected to the support frame, a slide bar is fixedly connected to a side wall of the first barrel 2, and the slide bar is connected to the guide rail in a matching manner, so that when the slide bar moves on the guide rail, the first barrel 2 can be moved to move the position of the first camera 1. In addition, the sliding rod is provided with a bolt which penetrates through the sliding rod and is abutted to the bottom of the guide rail, and when the device is not required to be used, the bolt can be screwed down to fix the device.
The mounting hole has been seted up on the second lens cone 5 is equipped with red spot laser 8 on the lateral wall, and on red spot laser 8 pegged graft the mounting hole, be equipped with the installation piece on red spot laser 8, the installation piece accessible bonding adhesive bonds on the lateral wall of fixing to second lens cone 5 to with the stable second lens cone 5 of fixing of red spot laser 8.
Example 2
An objective lens auto-focusing method for use in the objective lens auto-focusing device of embodiment 1, comprising the steps of:
s1, firstly, placing an experimental article in front of the first lens barrel 2, starting the red point laser 8, enabling a red point emitted by the red point laser 8 to irradiate the experimental article through the second half mirror 7 and the first half mirror 6, then, taking a picture by using the second camera 4, shooting an image of a laser point of the experimental article through the second half mirror 7 and the first half mirror 6, and recording the distance H1 between the image and the experimental article corresponding to the objective lens 3;
s2, relatively moving the position of the first lens barrel 2, changing the distance between the objective lens 3 and the experimental article, starting the red point laser 8 again, making the red point emitted by the red point laser irradiate on the experimental article through the second half mirror 7 and the first half mirror 6, then using the second camera 4 to shoot the image of the laser point of the experimental article through the second half mirror 7 and the first half mirror 6, and recording the distance H2 between the objective lens 3 and the experimental article corresponding to the image;
s3, repeating the step S2, and under the condition that the distance between the objective lens 3 and the experimental article is a plurality of groups of different distances, shooting by using the second camera 4, so as to record the distance Hn between the objective lens 3 and the experimental article corresponding to a plurality of groups of images;
s4, adjusting the position of the first barrel 2 again, moving the first barrel 2 to the position focused by the first camera 1 in conjunction with the shooting of the experimental article by the first camera 1, and recording the image shot by the second camera 4 and the distance K from the objective lens 3 to the experimental article at this time when the first barrel 2 is at this position;
s5, taking away the experimental article, placing the object to be shot in front of the objective lens 3, then starting the red spot laser 8, making the red spot emitted by the red spot laser 8 irradiate the object through the second half mirror 7 and the first half mirror 6, then using the second camera 4 to shoot, and shooting the image of the laser spot of the object through the second half mirror 7 and the first half mirror 6;
s6, comparing the image shot in the step S5 with each group of recorded images in the steps S1-S3, finding one image closest to the image shot in the step S5 in the recorded images, and recording the distance Hh from the objective lens 3 corresponding to the image to the experimental article;
s7, calculating a distance Z from the current position of the objective lens 3 to the focusing position of the first camera 1, that is, subtracting K from the distance Hh from the objective lens 3 to the experimental article corresponding to the image found in step S6, to obtain the distance Z from the current position of the objective lens 3 to the focusing position of the first camera 1;
s8, moving the first barrel 2 by the distance Z moves the first camera 1 to a position close to focus, and finally fine-tunes the first camera 1 to achieve focus.
According to the invention, through setting structures such as the first camera 1 and the second camera 4, a plurality of photo images are shot in advance, the distance between the objective lens 3 and an article when each image is shot is recorded, the distance between the objective lens 3 and the article when the first camera 1 focuses is recorded, then when other articles are shot, the second camera 4 can be used for shooting the articles firstly, then the discharged image is compared with the original recorded image to find out the closest image, the distance between the objective lens 3 and the article when the first camera 1 focuses is subtracted from the distance between the objective lens 3 and the article corresponding to the image, so that the focusing position when a new article is shot can be quickly found out, and when different articles are shot, the focusing position of the first camera 1 can be quickly found out and shot, and the use is more convenient.
Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:成像镜头及摄像装置