Visual collection method, system and device and storage medium
By setting up a motor, spring and camera in the vision acquisition system of the stereo microscope, and using the processor to control the camera adjustment and rotation, the problem of poor imaging effect caused by the back gap during the angle adjustment of the stereo microscope is solved, and higher angle accuracy and imaging stability are achieved.
Patent Information
- Application Number
- CN202510097441.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing stereomicroscopes have poor imaging effects due to backlash problems when adjusting angles.
By setting a motor, a spring, a first camera and a second camera in the vision acquisition system, the camera is controlled to adjust to a preset angle by a processor, and the camera is controlled to rotate by a motor, so that the angle between its optical path and the symmetrical plane reaches the target angle, thereby outputting a stereoscopic image.
The rotation error caused by gear backlash is avoided, the accuracy of angle adjustment is improved, and the stability of imaging is improved.
Smart Images

Figure CN119922293A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of stereo microscopes, and in particular to a visual acquisition method, system, device and storage medium. Background Art
[0002] A stereo microscope, also known as a stereo microscope or an anatomical microscope, is a visual instrument with a three-dimensional sense of an upright image. It uses a dual-channel optical path, and the left and right light beams in the binocular tube are not set in parallel, but have a certain angle (stereoscopic angle, generally 12°-15°), thus providing a three-dimensional image for the left and right eyes.
[0003] At present, in some designs, the lens barrel of the stereo microscope is set at a fixed angle that cannot be adjusted, and there is a problem of poor output stereoscopic visual imaging effect for objects at different observation distances. In other designs, the lens barrel of the stereo microscope is set at an adjustable angle, and the two lens barrels are mainly adjusted by the rotation of the turbine to adjust the angle of the two lens barrels.
[0004] However, due to the backlash between the turbine and the worm, the angle adjustment may be inaccurate, affecting the imaging effect. Summary of the invention
[0005] The present application provides a visual acquisition method, system, device and storage medium, which are used to solve the problem of poor imaging effect caused by backlash when adjusting the angle of the existing stereo microscope.
[0006] In a first aspect, the present application provides a visual acquisition method, which is applied to a processor in a visual acquisition system, wherein the visual acquisition system includes a processor, a camera assembly, and a loading device; the camera assembly includes a motor, a spring, a first camera, and a second camera; the first camera and the second camera are symmetrically arranged relative to a symmetry plane, the first camera can be rotatably arranged around a first rotation axis, the second camera can be rotatably arranged around a second rotation axis, the first rotation axis is parallel to the second rotation axis and is symmetrically arranged relative to the symmetry plane, the intersection of the optical path of the first camera and the optical path of the second camera is located on the symmetry plane, the motor can drive the first camera and the second camera to rotate in opposite directions, and the spring is arranged between the first camera and the second camera; the method includes:
[0007] Acquire the object distance from the camera assembly to the object-carrying device;
[0008] determining a target angle according to the object distance and a distance between the first rotation axis and the second rotation axis;
[0009] Adjusting the first camera and the second camera to a preset angle;
[0010] Controlling the first camera and the second camera to rotate from the preset angle by the motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are both equal to the target angle;
[0011] A first image of an observation object is acquired through the first camera, and a second image of the observation object is acquired through the second camera, and a stereoscopic image is output based on the first image and the second image.
[0012] Optionally, the method comprises:
[0013] Determining a new object distance after the camera assembly is rotated;
[0014] determining a new target angle according to the new object distance and the distance between the first rotation axis and the second rotation axis;
[0015] Controlling the first camera and the second camera to adjust to the preset angle;
[0016] The motor controls the first camera and the second camera to rotate from a preset angle so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are equal to a new target angle.
[0017] Optionally, before controlling the first camera and the second camera to adjust to the preset angle, the method further includes:
[0018] Determining a difference between the new target angle and the target angle;
[0019] Determining whether the difference is greater than the preset difference threshold;
[0020] If the difference is less than the preset difference threshold, there is no need to adjust the angles of the first camera and the second camera.
[0021] Optionally, the method further includes:
[0022] Obtaining the magnification of the camera assembly;
[0023] The preset difference threshold is determined according to the magnification factor.
[0024] Optionally, the method further includes:
[0025] Determining whether the target angle is within a preset stereoscopic viewing angle threshold range;
[0026] If the target angle is not within the stereoscopic viewing angle threshold range, controlling the object-carrying device to move;
[0027] The target angle is recalculated according to the moved object distance until the target angle is within the stereoscopic viewing angle threshold range.
[0028] Optionally, controlling the object carrying device to move includes:
[0029] If the target angle is greater than the upper limit of the stereoscopic viewing angle threshold range, controlling the object-carrying device to move downward by a first preset distance;
[0030] If the target angle is smaller than the lower limit of the stereoscopic viewing angle threshold range, the object carrying device is controlled to move upward by a second preset distance.
[0031] Optionally, the method further includes:
[0032] The first preset distance or the second preset distance is determined according to the magnification of the camera assembly.
[0033] In a second aspect, the present application provides a visual acquisition system, the visual acquisition system comprising: a processor, a camera assembly, and a loading device; the camera assembly comprises a motor, a spring, a first camera, and a second camera;
[0034] The first camera and the second camera are symmetrically arranged with respect to a symmetric plane, the first camera can be rotatably arranged around a first rotation axis, the second camera can be rotatably arranged around a second rotation axis, the first rotation axis is parallel to the second rotation axis and is symmetrically arranged with respect to the symmetric plane, and the intersection point of the optical path of the first camera and the optical path of the second camera is located on the symmetric plane;
[0035] The output shaft of the motor is connected to the worm gear, and the two sides of the worm gear are connected to the first worm wheel and the second worm wheel respectively. The first rotating shaft coincides with the rotating shaft of the first worm wheel, and the second rotating shaft coincides with the rotating shaft of the second worm wheel. The motor can drive the first camera and the second camera to rotate in opposite directions.
[0036] The spring is arranged between the first camera and the second camera, and is used to eliminate the backlash between the worm and the first turbine when the first camera is at a preset angle, and to eliminate the backlash between the worm and the second turbine when the second camera is at a preset angle.
[0037] In a third aspect, the present application provides a visual acquisition device, the visual acquisition device comprising:
[0038] An acquisition module, used for acquiring the object distance from the camera assembly to the object carrying device;
[0039] a determination module, configured to determine a target angle according to the object distance and a distance between the first rotation axis and the second rotation axis;
[0040] A first control module, used for adjusting the first camera and the second camera to a preset angle;
[0041] A second control module, used for controlling the first camera and the second camera to rotate from a preset angle through the motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are both equal to a target angle;
[0042] An output module is used to capture a first image of the observed object through the first camera, capture a second image of the observed object through the second camera, and output a stereoscopic image based on the first image and the second image.
[0043] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0044] The present application provides a visual acquisition method, system, device and storage medium, the method comprising: obtaining the object distance from the camera assembly to the object-carrying device; determining the target angle according to the object distance and the spacing between the first rotating shaft and the second rotating shaft; adjusting the first camera and the second camera to a preset angle; controlling the first camera and the second camera to rotate from the preset angle by a motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are equal to the target angle; acquiring the first image of the object by the first camera, and acquiring the second image of the object by the second camera, and outputting a stereoscopic image based on the first image and the second image. By this method, the rotation error caused by the gear backlash can be avoided, the accuracy of the adjustment angle can be improved, and the stability during imaging can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0046] Figure 1 A schematic diagram of the backlash between the worm wheel and the worm provided for this application;
[0047] Figure 2 is a schematic diagram of an application scenario of a visual acquisition system according to some embodiments of this specification;
[0048] Figure 3It is a schematic diagram of a module of a visual acquisition system according to some embodiments of the present application specification;
[0049] Figure 4 is a schematic diagram of an initial state of a visual acquisition system according to some embodiments of this specification;
[0050] Figure 5 is another schematic diagram of an initial state of a visual acquisition system according to some embodiments of this specification;
[0051] Figure 6 is a schematic diagram of the state of the visual acquisition system during imaging according to some embodiments of this specification;
[0052] Figure 7 is a schematic diagram of the structure of a camera assembly according to some embodiments of this specification;
[0053] Figure 8 is a schematic diagram of the structure of a camera assembly according to some embodiments of this specification;
[0054] Fig. 9 is a schematic diagram of the internal structure of a camera assembly according to some embodiments of this specification;
[0055] Fig.10 A schematic diagram of a flow chart of a first embodiment of a visual acquisition method provided by the present application;
[0056] Fig.11 A schematic diagram of a flow chart of a second embodiment of a visual acquisition method provided in the present application;
[0057] Fig.12 A schematic diagram of a flow chart of a third embodiment of a visual acquisition method provided in the present application;
[0058] Fig.13 A flowchart of a fourth embodiment of a visual acquisition method provided by the present application;
[0059] Fig.14 This is a structural schematic diagram of a first embodiment of a visual acquisition device provided in the present application.
[0060] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0062] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0063] A stereo microscope, also known as a stereo microscope or an anatomical microscope, is a visual instrument with a stereoscopic sense of an upright image. It uses a dual-channel optical path, and the left and right light beams in the binocular tube are not set in parallel, but have a certain angle (stereoscopic angle, generally 12°-15°), thereby providing a stereoscopic image for the left and right eyes. When a stereo microscope observes an object to output a stereoscopic image, in order to enhance the effect of the output stereoscopic image, the center points of the fields of view observed by the two tubes cannot be too far apart. In order to adapt to objects at different observation distances, the observation field of at least one tube needs to be adjusted so that the center points of the two observation fields are close to each other to enhance the stereoscopic effect of the image.
[0064] In some designs, the lens barrel of the stereo microscope is set at a fixed angle that cannot be adjusted, and there is a problem of poor output stereoscopic visual imaging effects for objects at different observation distances. In other designs, the lens barrel of the stereo microscope is set at an adjustable angle, and the two lens barrels are mainly adjusted by the rotation of a worm gear.
[0065] Figure 1 The schematic diagram of the backlash between the worm wheel and the worm provided for this application is that the backlash between the worm wheel and the worm will cause errors when adjusting the angle of the lens barrel. For example, the lens is currently at a 6° position and wants to adjust to a 6.5° position, but the backlash will cause an invalid rotation of 0.1°, and only 0.4° is actually adjusted. After adjusting to a certain angle, the lens barrel is prone to slight shaking due to the presence of backlash, and for a stereo microscope, the rotation angle needs to be accurate to obtain a clear image. Therefore, this phenomenon will affect the image clarity.
[0066] In view of the above problems, the inventors found in the process of studying this field that Figure 1The size of the gear on the left side of the middle worm is larger than that of the gear on the right side, so the backlash is relatively small at the initial position. The initial position is used as the starting point for angle adjustment to prevent angle deviation caused by backlash. In this solution, the inventor also sets a spring between the two lens barrels, so that after reaching a certain angle, the shaking of the lens barrel due to backlash can be avoided. Therefore, this application proposes a visual acquisition method.
[0067] The executor of this solution is a processor in the visual acquisition system, or a controller including a processor, or a chip in the processor.
[0068] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0069] Some embodiments of the present specification provide a visual acquisition system, which includes a camera assembly and a processor, and the camera assembly includes a motor, a spring, a first camera and a second camera. Among them, the first camera and the second camera are symmetrically arranged relative to the symmetry plane, the first camera can be rotatably arranged around the first rotation axis, the second camera can be rotatably arranged around the second rotation axis, the first rotation axis is parallel to the second rotation axis and is symmetrically arranged relative to the symmetry plane, and the intersection of the optical path of the first camera and the optical path of the second camera is located on the symmetry plane. The target angle is determined by the object distance and the spacing between the first rotation axis and the second rotation axis, and the first camera and the second camera are rotated to a specified angle and then to the target angle by controlling the rotation of the first camera and the second camera, so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are equal to the target angle, and both cameras are rotated, which conforms to the observation habits of the human eye, so that the user experience when using the visual acquisition system for observation is better and more comfortable, and after rotation, the two lens barrels can be fixed more stably by the spring, and will not shake due to the problem of backlash.
[0070] Figure 2 It is a schematic diagram of an application scenario of a visual acquisition system according to some embodiments of this specification.
[0071] In some embodiments, the visual acquisition system application scenario may include a processor 220, a signal transmission device 120, a storage device 130, a visual acquisition system 200, and a terminal device 150. In some embodiments, the processor 220 may be connected to the storage device 130, the visual acquisition system 200, and / or the terminal device 150 via the signal transmission device 120 to access and / or receive data and information. For example, the processor 220 may receive relevant information of the visual acquisition system 200 (e.g., a stereoscopic image of an observed object, an initial image obtained by observing the object, etc.) via the signal transmission device 120. In the application scenario of the present application, the observed object may be imaged and output by implementing the methods and / or processes disclosed in this specification.
[0072] In some embodiments, the visual acquisition system 200 can be used to perform stereoscopic imaging of the observed object to output a stereoscopic image of the object. In some embodiments, the visual acquisition system 200 may include a camera assembly, which may include a motor, a spring, a first camera, and a second camera. The first camera and the second camera observe and image the object respectively, and form a first image and a second image of the object respectively, wherein the first image and the second image are the initial images of the object. In some embodiments, the processor 220 may be a part of the visual acquisition system 200, and after the processor 220 processes the first image and the second image, the visual acquisition system 200 can output a stereoscopic image of the object.
[0073] Figure 3 is a schematic diagram of a module of a visual acquisition system according to some embodiments of the present application specification, Figure 4 is a schematic diagram of the initial state of a visual acquisition system according to some embodiments of this specification, Figure 5 is another schematic diagram of the initial state of the visual acquisition system shown in some embodiments of this specification, Figure 6 is a schematic diagram of the state of the visual acquisition system during imaging according to some embodiments of this specification. Figure 4-Figure 6 is a view of the visual acquisition system 200 in a vertical plane. Figure 3-Figure 6 As shown, some embodiments of the present application specification provide a visual acquisition system 200 for observing and imaging external objects. The visual acquisition system 200 mainly includes a camera component 210 and a processor 220. Among them, the camera component 210 is mainly used to observe and image external objects, and the processor 220 is mainly used to control the camera component 210 and process and output the image output by the camera component 210.
[0074] In some embodiments, the camera assembly 210 includes a first camera 211 and a second camera 212. The first camera 211 and the second camera 212 can observe the object and form a first image and a second image respectively. In some embodiments, the first camera 211 and the second camera 212 are symmetrically arranged relative to the symmetry plane S1. The first camera 211 can be rotatably arranged around a first rotation axis, and the second camera 212 can be rotatably arranged around a second rotation axis. The first rotation axis is parallel to the second rotation axis and is symmetrically arranged relative to the symmetry plane S1. Figure 7 ,exist Figure 7 In the viewing angle, the first rotation axis is a fixed rotation axis parallel to the viewing angle and perpendicular to the paper surface, so adjusting the gear can make the first camera 211 rotate around the fixed rotation axis. Figure 7 Under the viewing angle, the second axis is a fixed axis parallel to the viewing angle and perpendicular to the paper surface. Therefore, adjusting the gear can make the second camera 212 rotate around the fixed axis. The first camera 211 can be rotatably arranged around the first axis, and the second camera 212 can be rotatably arranged around the second axis. This can make the field of view of the first camera 211 and the second camera 212 adjustable, thereby improving the imaging effect of the camera assembly 210 on objects at different observation distances. In some embodiments, when observing and imaging an object, the first optical path L1 of the first camera 211 intersects with the second optical path L2 of the second camera 212, and the intersection D of the two is located on the symmetry plane S1 (such as Figure 6 As shown), the stereoscopic effect of the output object image is enhanced, thereby improving the viewing experience of the user.
[0075] In some embodiments, the first rotating shaft is set at one end of the first camera 211 close to the object, and the second rotating shaft is set at one end of the second camera 212 close to the object, so that when the first camera 211 and the second camera 212 rotate, the first camera 211 and the second camera 212 will not collide and interfere with each other, thereby improving the rotation adjustment range of the first camera 211 and the second camera 212.
[0076] exist Figure 4-Figure 6 In the vertical plane shown, the vertical plane is the symmetry plane of the camera assembly 210, the first rotation axis and the second rotation axis are line segments perpendicular to the vertical plane, the first rotation axis intersects with the vertical plane at the first rotation axis point B1, and the second rotation axis intersects with the vertical plane at the second rotation axis point B2. The first rotation axis can intersect with the first optical path L1 at the first rotation axis point B1, and the second rotation axis can intersect with the second optical path L2 at the second rotation axis point B2. Through this setting, when the camera is rotated around the rotation axis point, the rotation of the optical path is synchronized with the rotation of the camera, so as to improve the control accuracy of the first optical path L1 and the second optical path L2 when the first camera 211 and the second camera 212 rotate, and reduce the control difficulty.
[0077] In some embodiments, in order to adapt to the pupil distance of the human eye and improve user comfort, the distance between the first rotating shaft and the second rotating shaft can be 40mm-80mm.
[0078] In some embodiments, the intersection point A1 of the first optical path L1 and the observation surface S2 is the center point of the field of view of the first camera 211 on the observation surface S2, and the intersection point A2 of the second optical path L2 and the observation surface S2 is the center point of the field of view of the second camera 212 on the observation surface S2. Figure 4-Figure 6 In the vertical plane shown, the symmetry plane S1 intersects the observation plane S2 at point E. In some embodiments, when the field of view center point A1 of the first camera 211 coincides or nearly coincides with the field of view center point A2 of the second camera 212, the intersection point D of the first optical path L1 and the second optical path L2 coincides or nearly coincides with the two field of view center points A1 and A2. Since the intersection point D of the first optical path L1 and the second optical path L2 is located on the symmetry plane S1 (as shown in FIG. Figure 6 As shown in Figure 2, the two viewing center points A1 and A2 are also located on or approximately on the symmetry plane S1 (as shown in Figure 2). Figure 6 As shown), the image effect of the object output by the visual acquisition system 200 is better and more in line with the usage habits of the human eye.
[0079] In some embodiments, in order to make the observation imaging effect of the first camera 211 and the second camera 212 on the object similar to improve the effect of the stereoscopic image finally output, the first camera 211 and the second camera 212 can be the same. Of course, in other embodiments, the first camera 211 and the second camera 212 can also be different, as long as the imaging effect of the output object can be guaranteed to be good.
[0080] In some embodiments, the first camera 211 and the second camera 212 both include a charge coupled device (CCD). The image clarity of the CCD is high, and the image has a high signal-to-noise ratio. In addition, the CCD has the advantages of small size, strong light resistance, vibration resistance, magnetic field resistance, small distortion, long life, and easy operation. The CCD has high applicability in the medical field.
[0081] In some embodiments, the camera assembly 210 may include a first motor and a second motor (not shown in the figure), the first motor is connected to the first rotating shaft of the first camera 211, and the second motor is connected to the second rotating shaft of the second camera 212. The first motor and the second motor control the rotation of the first camera 211 and the second camera 212 separately. At this time, the rotation of the first camera 211 and the second camera 212 are independent of each other, the rotation angles of the two can be the same or different, and the angles between the optical paths of the two and the symmetry plane S1 can be the same or different.
[0082] In some embodiments, the camera assembly 210 may include a motor (not shown in the figure), which simultaneously controls the rotation of the first camera 211 and the second camera 212. At this time, the first camera 211 and the second camera 212 rotate in opposite directions, the rotation angles of the two cameras may be the same, and the angles between the optical paths of the two cameras and the symmetry plane S1 may be the same.
[0083] Figure 7 is a schematic diagram of the structure of a camera assembly according to some embodiments of this specification, Figure 8 is a schematic diagram of the structure of a camera assembly according to some embodiments of this specification, Fig. 9 Schematic diagram of the internal structure of the camera assembly according to some embodiments of this specification. Figure 7 , Figure 8 and Fig. 9 As shown, in some embodiments, the camera assembly 210 may further include a motor 213 and a spring 230, the spring being arranged between the two lens barrels, and when the spring is in a natural state, the lens barrel angle is in a preset initial position. The output shaft of the motor 213 may be connected to the worm 214 in a transmission manner, and the two sides of the worm 214 may be connected to the first worm wheel 215 and the second worm wheel 216 in a transmission manner, and the first rotating shaft coincides with the rotating shaft of the first worm wheel 215, and the second rotating shaft coincides with the rotating shaft of the second worm wheel 216. Therefore, the motor 213 may simultaneously drive the first camera 211 and the second camera 212 to rotate, and since the first worm wheel 215 and the second worm wheel 216 rotate in opposite directions, the first camera 211 and the second camera 212 may synchronously approach or move away from the symmetry plane S1. In some embodiments, the number of teeth of the first worm wheel 215 and the second worm wheel 216 are both 60, the number of heads of the worm 214 is 1, and the speed ratio between the worm 214 and the first worm wheel 215 and the second worm wheel 216 is 60.
[0084] In some embodiments, the camera assembly 210 further includes a fixing member 217, and the first camera 211 and the second camera 212 are respectively connected to the rotating shaft of the corresponding worm gear through a fixing member 217. In some embodiments, the camera assembly 210 further includes a stopper 218, and the stopper 218 is configured such that when the first camera 211 and / or the second camera 212 is vertically downward, the stopper 218 abuts against the side surface of the corresponding fixing member 217 (i.e., the surfaces of the two fixing members 217 adjacent to each other in the rotation plane of the first camera 211 and / or the second camera 212), so that when the first camera 211 and / or the second camera 212 is vertically downward, the central axis of the first camera 211 and / or the second camera 212 is parallel to the output shaft (worm 214) of the motor 213.
[0085] In some embodiments, the distance between the first camera 211 and the first worm gear 215 is adjustable, and the distance between the second camera 212 and the second worm gear 216 is adjustable, so as to optimize the vertical parallax between the first camera 211 and the second camera 212 and enhance the stereoscopic effect of the imaging of the visual acquisition system 200. Fig. 9 In some embodiments, the fixing member 217 corresponding to the second camera 212 can be connected to the rotating shaft 216-1 of the second worm gear 216 by means of a top screw 219. When the top screw 219 is loosened, the second camera 212 and the rotating shaft 216-1 of the second worm gear 216 can slide relative to each other along the direction of the rotating shaft 216-1 of the second worm gear 216, and the distance between the two can be adjusted; when the top screw 219 is tightened, the distance between the second camera 212 and the rotating shaft 216-1 of the second worm gear 216 is fixed. The connection method between the first camera 211 and the first worm gear 215 can refer to the connection method between the second camera 212 and the second worm gear 216, and will not be repeated here. In some embodiments, the first camera 211 and / or the second camera 212 can be connected to the fixing member 217 by means of a snap ring (not shown in the figure), and the side of the fixing member 217 can also be provided with a top screw, which can be threadedly connected with the snap ring of the corresponding camera to prevent the first camera 211 and / or the second camera 212 from rotating around their respective central axes.
[0086] In some embodiments, the first camera 211 and the second camera 212 can be connected to the main body (not shown) of the visual acquisition system 200 using an FPC (flexible printed circuit). The FPC is fixed to the main body of the visual acquisition system 200 and is used to connect related cables (such as video output cables, control cables, power cables, etc.). The setting of the FPC can be used as a flexible connection part to reduce the resistance of the related cables when the first camera 211 and the second camera 212 rotate, thereby reducing the impact on the rotation angle accuracy of the first camera 211 and the second camera 212, and can also reduce the loss of the worm gear connection.
[0087] In some embodiments, the visual acquisition system 200 may further include a loading device, such as a loading platform (not shown). The loading platform may be used to load the observed object. The loading device may be connected to the processor of the visual acquisition system for communication, or may be a device that is not connected to the camera, processor, etc., such as a table or bed placed outside.
[0088] Applied to the above-mentioned visual acquisition system, the visual acquisition method is introduced with the processor as the execution body.
[0089] Fig.10 A flowchart of a visual acquisition method embodiment 1 provided in this application is shown in FIG. Fig.10 As shown, the method includes:
[0090] S101, obtaining the object distance from the camera assembly to the object loading device.
[0091] In this step, an object to be inspected is placed on the object carrier. The object refers to an object observed by the visual acquisition system 200, which may include but is not limited to an object, a biological tissue, and may include a liquid, a gas, a solid, or a combination or mixture thereof.
[0092] The camera assembly has a distance measuring device, which can measure the distance between the optical path exit point of the first camera 211 and / or the second camera 212 and the observation surface S2 of the object. The observation surface S2 of the object refers to the surface of the object that can be observed by the first camera 211 and / or the second camera 212. In some embodiments, the first optical path L1 of the first camera 211 and the second optical path L2 of the second camera 212 are respectively emitted along their corresponding central axes, and the optical path exit point of the first camera 211 and / or the second camera 212 refers to the intersection of the central axis of the first camera 211 and / or the second camera 212 and the end surface of the first camera 211 and / or the second camera 212 close to the object. In some embodiments, the exit point of the first optical path L1 of the first camera 211 can be the intersection of the first optical path L1 and the first rotation axis as the first rotation axis point B1, and the exit point of the second optical path L2 of the second camera 212 can be the intersection of the second optical path L2 and the second rotation axis as the second rotation axis point B2.
[0093] It should be noted that the object distance from the camera assembly to the loading device refers to the object distance from the camera assembly to the detection object on the loading device. If the detection objects of different heights are placed at the same height on the loading device, the obtained object distances will be different.
[0094] In some embodiments, Figure 4-Figure 6 In the vertical plane shown, a line connecting the first rotation axis point B1 and the second rotation axis point B2 has an intersection point C with the symmetry plane S1 , and the first object distance is the length of the line segment CE.
[0095] In some embodiments, the first object distance can be indirectly calculated by the distance between the exit point of the optical path of the first camera 211 and / or the second camera 212 and the corresponding center point of the field of view (for example, the length of the line segments A1B1 and A2B2). Specifically, in the vertical plane, the distance between the exit point B1 of the first optical path L1 of the first camera 211 and the corresponding center point A1 of the field of view is the length of the line segment A1B1, the distance between the exit point B2 of the second optical path L2 of the second camera 212 and the corresponding center point A2 of the field of view is the length of the line segment A2B2, and the first object distance is the length of the line segment CE.
[0096] like Figure 4As shown, when the initial state of the visual acquisition system 200 is that the first camera 211 and the second camera 212 are arranged vertically and parallel, the first object distance d1' can be equal to the distance d1 between the optical path exit point of the first camera 211 and / or the second camera 212 and the corresponding field of view center point.
[0097] like Figure 5 As shown, when the initial state of the visual acquisition system 200 is that the optical paths of the first camera 211 and the second camera 212 respectively have an initial angle with the symmetry plane S1, the first object distance d1' can be determined according to the distance between the optical path exit point and the corresponding field of view center point (e.g., the length d1 of the line segment A1B1) and the corresponding initial angle (e.g., the initial angle α0). Taking the first camera 211 as an example, a perpendicular line A1F to the line segment B1B2 is drawn through the field of view center point A1 of the first camera 211, and the length of the line segment A1F is the first object distance. In the right triangle A1FB1, the first object distance d1'=d1×cosα0.
[0098] Of course, in some embodiments, the first camera 211 and the second camera 212 may be adjusted to Figure 4 The initial state shown is then executed.
[0099] In some embodiments, the object distances corresponding to the first camera 211 and the second camera 212 may be different. In some embodiments, the object distance with a smaller value may be used as the first object distance to ensure that the camera assembly 210 can be preferentially focused on an area on the observation surface S2 that is relatively close to the camera assembly 210. In some embodiments, the average of the object distances corresponding to the two may also be used as the first object distance.
[0100] In some embodiments, the first camera 211 and the second camera 212 may be auto-focus cameras. The auto-focus camera may automatically focus the lens focus to the observation surface S2 of the object. At this time, the focal length of the auto-focus camera is the distance d1 between the optical path exit point of the corresponding camera and the center point of the corresponding field of view. Therefore, the processor 220 may determine the first object distance d1' according to the auto-focus focal length d1.
[0101] In some embodiments, the visual acquisition system 200 may further include a distance measuring mechanism (not shown in the figure), which may directly measure the distance d1 between the light path exit point and the corresponding field of view center point, and the processor 220 may calculate the first object distance d1' based on the measured d1. In some embodiments, the distance measuring mechanism may include but is not limited to a laser rangefinder, an ultrasonic rangefinder, an infrared rangefinder, etc.
[0102] S102: Determine a target angle according to the object distance and the distance between the first rotation axis and the second rotation axis.
[0103] The first angle α1 refers to the target angle between the optical path of the first camera 211 and / or the second camera 212 and the symmetry plane S1 when the intersection D of the first optical path L1 and the second optical path L2 falls on the observation plane S2. That is, when point D, point E, point A1, and point A2 coincide or approximately coincide, the target angle between the optical path of the first camera 211 and / or the second camera 212 and the symmetry plane S1. In some embodiments, the first angle α1 can be determined based on the first object distance d1' and the distance l between the first rotation axis point B1 and the second rotation axis point B2. Since the first rotation axis point B1 and the second rotation axis point B2 are symmetrical with respect to the symmetry plane S1, the length of the line segment B1C is equal to the length of the line segment B2C, which is l / 2. Please refer to Figure 4 and Figure 5 , in the right triangle B1CE, the first angle α1 is the angle of ∠B1EC. Therefore, the first angle α1 = arctan l / (2d1').
[0104] S103: Adjust the first camera and the second camera to a preset angle.
[0105] The preset angle may be the initial 0°, that is, Figure 4 As shown, the two camera devices are in a vertical downward position.
[0106] In some other embodiments, the preset angle can also be set to other angles, such as 0°, 5°, 7°, etc. The preset angle setting needs to be related to the gear setting of the worm wheel and the worm. At the preset angle, the gears of the worm wheel and the worm fit together to reduce backlash.
[0107] By setting a preset angle, the error can be reduced by rotating through this angle every time. Because the backlash at different angles may be different, not using a starting point as a standard will lead to error accumulation and make the error larger and larger.
[0108] S104, controlling the first camera and the second camera to rotate from a preset angle by a motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are equal to the target angle.
[0109] In this step, the motor can control the two cameras simultaneously, or the two cameras can be controlled separately by two motors. The motor controls the first camera 211 and the second camera 212 to rotate from a preset angle so that the angle between the first optical path L1 of the first camera 211 and the symmetry plane S1 and the angle between the second optical path L2 of the second camera 212 and the symmetry plane S1 are equal to the target angle (i.e., the first angle α1), as shown in FIG. Figure 6As shown. It should be noted that in some embodiments, in the initial state, the initial angle between the first optical path L1 of the first camera 211 and the symmetry plane S1 and the initial angle between the second optical path L2 of the second camera 212 and the symmetry plane S1 may be the same or different. Therefore, in order to make the angle between the first optical path L1 of the first camera 211 and the symmetry plane S1 after rotation and the angle between the second optical path L2 of the second camera 212 and the symmetry plane S1 after rotation equal to the target angle (i.e., the first angle α1), the rotation angles of the first camera 211 and the second camera 212 may be the same or different. In addition, due to factors such as mechanical matching errors and operational errors, the fact that the angle between the first optical path L1 of the first camera 211 and the symmetry plane S1 and the angle between the second optical path L2 of the second camera 212 and the symmetry plane S1 are equal to the target angle does not mean that they are absolutely equal, but they can be approximately equal.
[0110] After rotating to the preset angle, due to the action of the spring, there will be a force between the gears of the worm wheel and the worm, and no shaking will occur.
[0111] Because of the existence of the spring, at a certain angle, the force will cause one side of the gear at the intersection to have no backlash, while the backlash on the other side will increase. If the subsequent rotation does not rotate to the preset angle, but directly rotates in the direction of larger backlash, the error will increase, so it is necessary to rotate to the preset angle before performing subsequent rotation.
[0112] S105 , capturing a first image of the observed object through the first camera, capturing a second image of the observed object through the second camera, and outputting a stereoscopic image based on the first image and the second image.
[0113] A first image of the object is acquired through the first camera 211 , and a second image of the object is acquired through the second camera 212 , and a stereoscopic image of the object is output based on the first image and the second image.
[0114] In some embodiments, the first camera 211 may directly output the first image, and the second camera 212 may directly output the second image. In some embodiments, the first image and the second image may be output to different terminal devices 150 (without forming a stereoscopic image), or may be output to the same terminal device 150 (directly forming a stereoscopic image, such as VR glasses, etc.). In some embodiments, the number of terminal devices 150 to which the first camera 211 and the second camera 212 directly output may be one or more.
[0115] In some embodiments, the first image captured by the first camera 211 and the second image captured by the second camera 212 may be processed by the processor 220 to form a stereoscopic image and then output. In some embodiments, the number of terminal devices 150 to which the processor 220 outputs the stereoscopic image may be one or more.
[0116] This embodiment provides a visual acquisition method, which obtains the object distance from the camera assembly to the object-carrying device; determines the target angle according to the object distance and the spacing between the first rotating shaft and the second rotating shaft; adjusts the first camera and the second camera to a preset angle; controls the first camera and the second camera to rotate from the preset angle by a motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are equal to the target angle; acquires the first image of the object by the first camera, and acquires the second image of the object by the second camera, and outputs a stereoscopic image based on the first image and the second image. Through this method, the rotation error caused by the gear backlash can be avoided, the accuracy of the adjustment angle can be improved, and the stability during imaging can be improved.
[0117] After rotating to the target angle, the first camera 211 and the second camera 212 rotate, and the positions of the corresponding center points of the field of view change, and the observation areas of the first camera 211 and the second camera 212 change. Since the object may be three-dimensional, the observation surface S2 may not be a plane, and there are ups and downs. Therefore, before and after the rotation, the height of the observation surface S2 corresponding to the observation area of the first camera 211 and the second camera 212 may be different, and the second object distance between the first camera 211 and the second camera 212 and the object after the rotation may be different from the first object distance before the rotation. Therefore, it is necessary to reconfirm the second object distance to further determine whether the first camera 211 and the second camera 212 are in a suitable observation imaging position.
[0118] Fig.11 A schematic diagram of a flow chart of a second embodiment of a visual acquisition method provided in this application, such as Fig.11 As shown, the method includes:
[0119] S201, determining a new object distance after the camera assembly is rotated.
[0120] S202: Determine a new target angle according to the new object distance and the distance between the first rotation axis and the second rotation axis.
[0121] S203: Control the first camera and the second camera to adjust to a preset angle.
[0122] S204, controlling the first camera and the second camera to rotate from a preset angle by a motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are equal to a new target angle.
[0123] The method steps of the second embodiment are the same as those of the first embodiment, and will not be repeated here.
[0124] According to the position after rotation, the new object distance and then the new target angle are determined, which can further determine whether it is in a suitable observation and imaging position, thereby improving the accuracy of imaging.
[0125] Fig.12 This is a flow chart of a third embodiment of a visual acquisition method provided by the present application. Based on the second embodiment of the above method, if the field of view is greatly different after rotation, and the new target angle is too different from the previous target angle, it is necessary to rotate again. If the difference is not large, it is not necessary to rotate again. Therefore, before step S203, the following steps are also included:
[0126] S301: Determine the difference between the new target angle and the target angle.
[0127] In this step, after the first rotation to the target angle, a new target angle is determined according to the new object distance, and the difference between the new target angle and the previous target angle is obtained.
[0128] S302: Determine whether the difference is greater than a preset difference threshold.
[0129] In one implementation, a difference threshold is preset. If the difference is greater than the threshold, it means that the angle difference is too large and needs to be rotated again. If the difference is less than the threshold, it means that it does not need to be rotated again.
[0130] In another implementation, because the field of view seen at different magnifications is different, the greater the magnification, the more sensitive it is to angle changes. Therefore, it is necessary to set the angle difference thresholds corresponding to different magnifications. The magnification can be directly obtained from the camera component, and the difference threshold is determined according to the magnification, and then it is determined whether the difference is greater than the preset difference threshold.
[0131] In another implementation, the newly determined object distance is used as the independent variable x, and the magnification factor is used as the independent variable y, and the preset difference threshold value f(x, y)=ax^ 2 +bxy+cy^ 2 +d. Wherein, a, b, c, d are constants, which can be obtained through testing. Specifically, according to a certain second object distance x0 and magnification y0, the size of the field of view of the first camera 211 and / or the second camera 212 falling on the observation surface S2 can be determined, for example, the length of the field of view along the line connecting the first rotation axis point B1 and the second rotation axis point B2. Taking 1% of the length of the field of view as the length difference threshold, combined with the length difference threshold and the second object distance x0, the preset difference threshold f(x0, y0) of the corresponding angle can be calculated. Through multiple second object distances x1, x2...xn , and its corresponding magnification y1, y2...y n , calculate and obtain multiple corresponding preset difference thresholds f(x1,y1), f(x2,y2)...f(x n ,y n ), substitute the corresponding data into the formula f(x,y)=ax^ 2 +bxy+cy^ 2 +d, the values of constants a, b, c, and d can be calculated.
[0132] In some embodiments, the visual acquisition system 200 has a minimum working distance, at which time the magnification of the visual acquisition system 200 is maximum, and the corresponding preset difference threshold may be 0.1°.
[0133] In some embodiments, the preset difference threshold may also be determined by a machine learning model based on the adjusted object distance (i.e., the second object distance) and the magnification. The initial machine learning model may be stored in the processor 220 or other memory (e.g., the storage device 130). The processor 220 may obtain a plurality of training samples to train the initial machine learning model.
[0134] In some embodiments, the machine learning model can be a supervised learning model. A plurality of training samples can include exemplary inputs of the machine learning model and labels representing the desired outputs corresponding to the exemplary inputs. The process for training the supervised learning model can enable the machine learning model to learn general rules for mapping inputs to corresponding outputs. Exemplary algorithms that can be used to train supervised machine learning models can include gradient boosting decision tree (GBDT) algorithms, decision tree algorithms, random forest algorithms, logistic regression algorithms, support vector machine (SVM) algorithms, naive Bayesian algorithms, adaptive boosting algorithms, K nearest neighbor (KNN) algorithms, Markov chain algorithms, etc., or any combination thereof.
[0135] In some embodiments, the object distance and magnification after historical adjustment can be used as training samples. The identification of the training sample can be a preset difference threshold corresponding to the object distance and magnification after historical adjustment. The training sample with the identification is input into the initial machine learning model, and the parameters of the initial machine learning model are updated through training. When the trained machine learning model meets the preset conditions, the training ends and the trained machine learning model is obtained.
[0136] S303: If the difference is less than the preset difference threshold, there is no need to adjust the angles of the first camera and the second camera.
[0137] If the difference is greater than or equal to the preset difference threshold, steps S203 and S204 are executed.
[0138] Through this method, it is possible to dynamically determine whether further adjustment is required after rotating to the target angle based on a preset difference threshold. Through the above method, after determining the new target angle, further iterative judgment can be performed until the difference is less than the preset difference threshold.
[0139] Fig.13 This is a flow chart of a fourth embodiment of a visual acquisition method provided by the present application. Based on the first embodiment of the above method, the stereoscopic viewing angle of the stereo microscope is generally 12°-15°, and the imaging effect is better at this angle. Therefore, before step S103, the following steps are also included:
[0140] S401: Determine whether the target angle is within a preset stereoscopic viewing angle threshold range.
[0141] The stereoscopic viewing angle threshold range may be set to 12°-15°, or other angle ranges, and step S103 and step S104 are executed.
[0142] If the target angle is within the stereoscopic viewing angle threshold, it means that the angle is appropriate.
[0143] If the target angle is not within the stereoscopic viewing angle threshold range, it means that the angle will affect the imaging effect, and step S402 is executed.
[0144] S402, controlling the object carrying device to move.
[0145] In this step, when the target angle is not within the stereoscopic angle threshold range, it means that the position of the loading device is inappropriate and the loading device needs to be controlled to move, and the direction of movement of the loading device needs to be determined according to the target angle.
[0146] If the target angle is greater than the upper limit of the stereoscopic viewing angle threshold range, it means that the observed object needs to move downward, and the object carrying device is controlled to move downward by a first preset distance.
[0147] If the target angle is smaller than the lower limit of the stereoscopic viewing angle threshold range, it means that the observed object needs to move upward, and the object carrying device is controlled to move upward by a second preset distance.
[0148] The first preset distance or the second preset distance is determined according to the magnification of the camera assembly.
[0149] S403: recalculate the target angle according to the moved object distance until the target angle is within a stereoscopic viewing angle threshold range.
[0150] After the object-carrying device is moved, the target angle needs to be recalculated. If the newly calculated target angle is no longer within the stereoscopic viewing angle threshold range, it needs to continue to move until the target angle is within the stereoscopic viewing angle threshold range.
[0151] The method provided in this embodiment controls the object-carrying device to make the target angle within the stereoscopic viewing angle threshold range, and then performs subsequent target angle re-determination, rotation, and imaging operations.
[0152] Fig.14 This is a structural diagram of a first embodiment of a visual acquisition device provided by the present application. The visual acquisition device 1400 includes:
[0153] An acquisition module 1401 is used to acquire an object distance from the camera assembly to the object carrying device;
[0154] A determination module 1402, configured to determine a target angle according to the object distance and a distance between the first rotation axis and the second rotation axis;
[0155] A first control module 1403, used to adjust the first camera and the second camera to a preset angle;
[0156] A second control module 1404 is used to control the first camera and the second camera to rotate from a preset angle through the motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are equal to a target angle;
[0157] The output module 1405 is used to capture a first image of the observed object through the first camera, capture a second image of the observed object through the second camera, and output a stereoscopic image based on the first image and the second image.
[0158] Optionally, the determining module 1402 is further configured to:
[0159] Determining a new object distance after the camera assembly is rotated;
[0160] determining a new target angle according to the new object distance and the distance between the first rotation axis and the second rotation axis;
[0161] The first control module 1403 is further used to control the first camera and the second camera to adjust to the preset angle;
[0162] The second control module 1404 is also used to control the first camera and the second camera to rotate from a preset angle through the motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are both equal to the new target angle.
[0163] Optionally, the determining module 1402 is further configured to:
[0164] Determining a difference between the new target angle and the target angle;
[0165] Determining whether the difference is greater than the preset difference threshold;
[0166] If the difference is less than the preset difference threshold, there is no need to adjust the angles of the first camera and the second camera.
[0167] Optionally, the determining module 1402 is further configured to:
[0168] Obtaining the magnification of the camera assembly;
[0169] The preset difference threshold is determined according to the magnification factor.
[0170] Optionally, the device further includes a judgment module 1405, and the judgment module 1405 is used to:
[0171] Determining whether the target angle is within a preset stereoscopic viewing angle threshold range;
[0172] If the target angle is not within the stereoscopic viewing angle threshold range, controlling the object-carrying device to move;
[0173] The target angle is recalculated according to the moved object distance until the target angle is within the stereoscopic viewing angle threshold range.
[0174] Optionally, the first control module 1403 is further configured to:
[0175] If the target angle is greater than the upper limit of the stereoscopic viewing angle threshold range, controlling the object-carrying device to move downward by a first preset distance;
[0176] If the target angle is smaller than the lower limit of the stereoscopic viewing angle threshold range, the object carrying device is controlled to move upward by a second preset distance.
[0177] Optionally, the determining module 1402 is further configured to:
[0178] The first preset distance or the second preset distance is determined according to the magnification of the camera assembly.
[0179] The visual acquisition device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0180] The following is a description of the components in the visual acquisition system.
[0181] The processor 110 can be used to process data and / or information from at least one component of the application scenario 100 or an external data source (e.g., a cloud data center). The processor 110 can be connected to the storage device 130, the visual acquisition system 140, and / or the terminal device 150 via the signal transmission device 120 to access and / or receive data and information. For example, the processor 110 can receive relevant information output by the visual acquisition system 140 (e.g., the object distance between the camera component of the visual acquisition system 140 and the object, the initial image obtained by observing the object, etc.) via the signal transmission device 120. In other embodiments, the processor 110 can send parameters related to adjusting the visual acquisition system 140 (e.g., the distance between the first rotation axis of the first camera of the visual acquisition system 140 and the second rotation axis of the second camera, the angle between the optical path of the first camera and the symmetry plane of the two cameras, and the angle between the optical path of the second camera and the symmetry plane of the two cameras, etc.) to the terminal device 150 via the signal transmission device 120.
[0182] In some embodiments, processor 110 may include one or more processing engines (e.g., a single-chip processing engine or a multi-chip processing engine). By way of example only, processor 110 may include a central processing unit (CPU). Processor 110 may process data, information, and / or processing results obtained from other devices or system components, and execute program instructions based on these data, information, and / or processing results to perform one or more functions described in this specification.
[0183] The signal transmission device 120 can connect the components of the application scenario 100 (e.g., the storage device 130, the visual acquisition system 140, the terminal device 150, etc.) and / or connect the application scenario 100 with external resources. The signal transmission device 120 enables communication between the components and with other parts outside the application scenario 100 to facilitate the exchange of data and / or information. In some embodiments, the storage device 130 can be connected to the signal transmission device 120 to communicate with one or more components of the application scenario 100 (e.g., the processor 110, the visual acquisition system 140, the terminal device 150). In some embodiments, the signal transmission device 120 may also include a network. In some embodiments, the network may include a local area network (LAN), a wide area network (WAN), a wired network, a wireless network, etc. Figure 1 The signal transmission device 120 includes a network, which is only used for exemplary description and does not constitute a limitation on the embodiments of this specification. It can be understood that the signal transmission device 120 can transmit signals through other media. For example, the signal transmission device 120 can include a data transmission cable.
[0184] The storage device 130 may be used to store data and / or instructions. In some embodiments, the storage device 130 may store data and / or instructions that the processor 110 uses to execute or use to complete the exemplary methods described in this specification. For example, the storage device 130 may store image information (e.g., an initial image of an object, etc.) output by the visual acquisition system 140.
[0185] In some embodiments, the storage device 130 may be part of the processor 110. In some embodiments, the storage device 130 may include a mass storage device, a removable storage device, a volatile read-write memory, a read-only memory (ROM), etc. In some embodiments, the storage device 130 may be implemented on a cloud platform. In some embodiments, the storage device 130 may be connected to the signal transmission device 120 to communicate with one or more components of the application scenario 100 (e.g., the processor 110, the visual acquisition system 140, the terminal device 150).
[0186] In some embodiments, the visual acquisition system 140 can be used to perform stereoscopic imaging of the observed object to output a stereoscopic image of the object. In some embodiments, the visual acquisition system 140 can include a camera assembly, and the camera assembly can include a first camera and a second camera. The first camera and the second camera observe and image the object respectively, and form a first image and a second image of the object respectively, wherein the first image and the second image are the initial images of the object. In some embodiments, the processor 110 can be a part of the visual acquisition system 140, and after the processor 110 processes the first image and the second image, the visual acquisition system 140 can output a stereoscopic image of the object.
[0187] The terminal device 150 may include one or more terminal devices or software. In some embodiments, the terminal device 150 may include a mobile phone, a tablet computer, a laptop computer, VR glasses, a 2D display, a 3D display, etc. In some embodiments, a user may view information and / or input data and / or instructions through the terminal device 150. In some embodiments, the terminal device 150 may include a signal transmitter and a signal receiver, which are configured to communicate with the visual acquisition system 140 to obtain relevant information of the observed object and imaging.
[0188] In some embodiments, the terminal device 150 may be fixed and / or mobile. For example, the terminal device 150 may be directly mounted on the processor 110 and / or the visual acquisition system 140, and become a part of the processor 110 and / or the visual acquisition system 140. For another example, the terminal device 150 may be a movable device, and an operator may carry the terminal device 150 to a location far away from the processor 110 and the visual acquisition system 140, and the terminal device 150 may be connected and / or communicated with the processor 110 and the visual acquisition system 140 through the signal transmission device 120.
[0189] It should be noted that the above description of the visual acquisition system is only for convenience of description and does not limit the present specification to the scope of the embodiments. It is understandable that, after understanding the principle of the system, those skilled in the art may arbitrarily combine the components or form subcomponents to connect with other components without deviating from the principle. In some embodiments, Figure 1 The processor and storage device disclosed in the specification may be different units in a component, or a component may realize the functions of two or more of the above-mentioned components. For example, each component may share a storage unit, or each component may have its own storage unit. Such variations are within the scope of protection of this specification.
[0190] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0191] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0192] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0193] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0194] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0195] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0196] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0197] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0198] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A visual acquisition method, characterized in that: A processor applied to a visual acquisition system, the visual acquisition system comprising a processor, a camera assembly, and a loading device; the camera assembly comprising a motor, a spring, a first camera, and a second camera; the first camera and the second camera are symmetrically arranged relative to a symmetry plane, the first camera can be rotatably arranged around a first rotation axis, the second camera can be rotatably arranged around a second rotation axis, the first rotation axis is parallel to the second rotation axis and is symmetrically arranged relative to the symmetry plane, the intersection of the optical path of the first camera and the optical path of the second camera is located on the symmetry plane, the motor can drive the first camera and the second camera to rotate in opposite directions, and the spring is arranged between the first camera and the second camera; the method comprises: Acquire the object distance from the camera assembly to the object-carrying device; determining a target angle according to the object distance and a distance between the first rotation axis and the second rotation axis; Adjusting the first camera and the second camera to a preset angle; Controlling the first camera and the second camera to rotate from the preset angle by the motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are both equal to the target angle; A first image of an observation object is acquired through the first camera, and a second image of the observation object is acquired through the second camera, and a stereoscopic image is output based on the first image and the second image.
2. The method according to claim 1, characterized in that The method further comprises: Determining a new object distance after the camera assembly is rotated; determining a new target angle according to the new object distance and the distance between the first rotation axis and the second rotation axis; Controlling the first camera and the second camera to adjust to the preset angle; The motor controls the first camera and the second camera to rotate from a preset angle so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are equal to a new target angle.
3. The method according to claim 2, characterized in that Before controlling the first camera and the second camera to adjust to the preset angle, the method further includes: Determining a difference between the new target angle and the target angle; Determining whether the difference is greater than the preset difference threshold; If the difference is less than the preset difference threshold, there is no need to adjust the angles of the first camera and the second camera.
4. The method according to claim 3, characterized in that The method further comprises: Obtaining the magnification of the camera assembly; The preset difference threshold is determined according to the magnification factor.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Determining whether the target angle is within a preset stereoscopic viewing angle threshold range; If the target angle is not within the stereoscopic viewing angle threshold range, controlling the object-carrying device to move; The target angle is recalculated according to the moved object distance until the target angle is within the stereoscopic viewing angle threshold range.
6. The method according to claim 5, characterized in that The controlling the movement of the object carrying device comprises: If the target angle is greater than the upper limit of the stereoscopic viewing angle threshold range, controlling the object-carrying device to move downward by a first preset distance; If the target angle is smaller than the lower limit of the stereoscopic viewing angle threshold range, the object carrying device is controlled to move upward by a second preset distance.
7. The method according to claim 6, characterized in that The method further comprises: The first preset distance or the second preset distance is determined according to the magnification of the camera assembly.
8. A visual acquisition system, characterized in that: The visual acquisition system includes: a processor, a camera assembly, and a loading device; the camera assembly includes a motor, a spring, a first camera, and a second camera; The first camera and the second camera are symmetrically arranged with respect to a symmetric plane, the first camera can be rotatably arranged around a first rotation axis, the second camera can be rotatably arranged around a second rotation axis, the first rotation axis is parallel to the second rotation axis and is symmetrically arranged with respect to the symmetric plane, and the intersection point of the optical path of the first camera and the optical path of the second camera is located on the symmetric plane; The output shaft of the motor is connected to the worm gear, and the two sides of the worm gear are connected to the first worm wheel and the second worm wheel respectively. The first rotating shaft coincides with the rotating shaft of the first worm wheel, and the second rotating shaft coincides with the rotating shaft of the second worm wheel. The motor can drive the first camera and the second camera to rotate in opposite directions. The spring is arranged between the first camera and the second camera, and is used to eliminate the backlash between the worm and the first turbine when the first camera is at a preset angle, and to eliminate the backlash between the worm and the second turbine when the second camera is at a preset angle.
9. A visual acquisition device, characterized in that: The visual acquisition device comprises: An acquisition module, used for acquiring the object distance from the camera assembly to the object-carrying device; A determination module, configured to determine a target angle according to the object distance and a distance between the first rotation axis and the second rotation axis; A first control module, used for adjusting the first camera and the second camera to a preset angle; A second control module, used for controlling the first camera and the second camera to rotate from a preset angle through a motor so that the angle between the optical path of the first camera and the symmetry plane and the angle between the optical path of the second camera and the symmetry plane are both equal to the target angle; An output module is used to capture a first image of the observed object through the first camera, capture a second image of the observed object through the second camera, and output a stereoscopic image based on the first image and the second image.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.