Imaging method and device
By acquiring and calculating the depth information of different areas of the photosensitive sensor, controlling the focus motor and exposure, a larger depth of field range in a single frame image is achieved, and the problem of small depth of field coverage in the prior art is solved.
Patent Information
- Application Number
- CN202210197196.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-03-01
AI Technical Summary
In the prior art, the depth of field coverage of a single frame image is small, making it difficult to clearly capture close-up and long-range images in one image.
By obtaining depth information of the imaged object on different areas of the photosensitive sensor, the focus motor moves to the motor focus position of each area, and controls the exposure of the photosensitive sensor when focusing until the complete image is obtained.
It achieves a larger depth of field range in a single frame image, solving the problem of small depth of field coverage.
Smart Images

Figure CN114650369B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of imaging, and specifically relates to an imaging method and device. Background Art
[0002] Currently, when taking images, due to the limited depth of field, if you want to capture both the near and distant views in one image and achieve a wide range of depth of field, you usually need to take multiple images with different depths of field, and then use software to extract the clear parts from the different images, and then fuse them into one image. That is, a full depth of field image is achieved by fusing multiple frames of images, and the depth of field coverage of a single frame image is still limited. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an imaging method and device that can solve the problem of small depth of field coverage of a single frame image in the related art.
[0004] In a first aspect, an embodiment of the present application provides an imaging method, the method comprising:
[0005] Obtaining depth information obtained by measuring the depth of an object imaged on different areas of the photosensitive sensor;
[0006] Based on the depth information of each area, the motor focus position of the corresponding area is calculated;
[0007] The focus motor is controlled to move to the motor focus position of each area, and when the focus motor moves to the motor focus position of each area, the photosensitive sensor of the corresponding area is controlled to expose and image until a complete image is obtained.
[0008] In a second aspect, an embodiment of the present application provides an imaging device, including:
[0009] An acquisition unit, used to acquire depth information obtained by measuring the depth of an object imaged in different areas of the photosensitive sensor;
[0010] A calculation unit, used for calculating a motor focus position of a corresponding area based on the depth information of each area;
[0011] The control unit controls the focus motor to move to the motor focus position of each area, and when the focus motor moves to the motor focus position of each area, controls the photosensitive sensor of the corresponding area to expose and image until a complete image is obtained.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0013] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0014] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0015] In an embodiment of the present application, by acquiring depth information obtained by measuring the depth of an object imaged in different areas of the photosensitive sensor, the motor focus position of the corresponding area can be calculated based on the depth information of each area, and then the focus motor is controlled to move to the motor focus position of each area. When the focus motor moves to the motor focus position of each area, the photosensitive sensor of the corresponding area is controlled to expose and image until a complete image is obtained. This allows a larger depth of field range to be achieved in a single-frame image, solving the problem of a small depth of field coverage range of a single-frame image in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of a flow chart of an imaging method provided in an embodiment of the present application;
[0017] Figure 2 It is a schematic diagram of the principle of an imaging method provided in an embodiment of the present application;
[0018] Figure 3 is a structural schematic diagram of an imaging device provided in an embodiment of the present application;
[0019] Figure 4 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0020] Figure 5 It is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0022] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0023] The imaging method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0024] like Figure 1 As shown, an imaging method provided in an embodiment of the present application may include the following steps:
[0025] Step 101 : acquiring depth information obtained by measuring the depth of an object imaged in different areas of a photosensitive sensor.
[0026] The photosensitive sensor is a photosensitive electronic component that senses the light entering the camera and is used to output the original image. The photosensitive sensor may include multiple photosensitive units, each of which corresponds to a pixel in the original image. It should be noted that the pixel refers to a physical pixel, which is a pixel in the original image. After image processing, the original image may have more or fewer digital pixels, and the embodiments of the present application do not limit this. In an application scenario, the photosensitive sensor may be a photosensitive array, including multiple rows and columns of photosensitive units, and the data output by the photosensitive sensor may be an original image in array form (e.g., raw format).
[0027] The imaging method provided in the embodiment of the present application can be executed by an electronic device that communicates with the camera module, or it can be executed by an electronic device configured with a camera module. The specific execution module can be a component such as a processor or a processing device in the electronic device. The execution module can communicate with the camera module to realize functions such as controlling the camera module and obtaining image data collected by the camera module. The embodiment of the present application does not impose specific restrictions on this.
[0028] It should be noted that in the embodiment of the present application, the camera module refers to a single-camera module, each of which includes a camera, a photosensitive sensor corresponding to the camera, and a focus motor module for controlling the movement of the camera. When controlling the camera module, each photosensitive unit of the corresponding photosensitive sensor can be notified to sense light, and the focus motor can also be controlled to move to adjust the distance between the camera and the photosensitive sensor, thereby achieving the purpose of adjusting the focal length.
[0029] In an embodiment of the present application, the photosensitive sensor may be pre-divided into different areas. For example, the photosensitive sensor may be evenly divided into n*n blocks, each block being an area. Optionally, each area may include only one photosensitive unit, that is, each area corresponds to one pixel, or, in the case where each area includes multiple photosensitive units, each area includes multiple pixels of the same number. In the case where each area of the photosensitive sensor includes more than one photosensitive unit, the depth information of the object imaged in each area may be the depth information of the photosensitive unit at a preset position (e.g., a center position) in the corresponding area.
[0030] Depth information is the distance information between the camera and the imaging object in physical space, and the imaging object refers to the object in space imaged on the photosensitive sensor. Optionally, the depth information can be the object distance in the imaging model, and the object distance is the physical space distance between the center of the camera lens in the imaging model and the imaging object (i.e., the spatial object imaged on the photosensitive sensor). Since the spatial objects imaged in different areas of the photosensitive sensor are different, the depth information of each area is also correspondingly different. By measuring the depth of the objects imaged in different areas (depth is related to object distance), the depth information of the corresponding area can be obtained.
[0031] When measuring depth, the ranging technology provided in the relevant technology can be used, such as the time of flight (TOF) method, binocular ranging method, monocular ranging method, etc. By using different ranging technologies, the camera module can be configured with a corresponding hardware structure.
[0032] For example, the TOF method is a method that uses the speed of light and the time difference to calculate the depth information (object distance) by emitting laser light from a laser transmitting end and receiving laser light from a laser receiving end, and timing the time difference between emitting laser light and receiving laser light. Then, when using the TOF method to measure distance, the camera module can be equipped with a laser module, and the laser transmitter and laser receiver in the laser module can be arranged near the camera, thereby achieving the purpose of measuring the distance between the camera and the spatial object. Similarly, the binocular ranging method requires the use of two cameras, so the electronic device can be equipped with at least two camera modules, which will not be repeated here.
[0033] When measuring the depth of different areas, binocular ranging method and monocular ranging method can measure the depth of the entire area of the photosensitive sensor by shooting once. For the TOF method, since the laser beam is directional and has an emission direction, the spatial directions corresponding to different areas on the photosensitive sensor (i.e., the imaging surface) can be calibrated in advance. In this way, when using the TOF method for ranging, the laser can be directly emitted in the calibrated direction corresponding to each area in turn, thereby achieving the purpose of measuring the depth information of different areas.
[0034] Step 102: Calculate the motor focus position of each area based on the depth information of each area.
[0035] After measuring the depth information of each area, the object distance between the camera and the imaging object in each area is also known. In this way, the imaging model parameters such as focal length and image distance for clear imaging of the corresponding area can be calculated, thereby obtaining the motor focus position of the corresponding area.
[0036] The motor focus position is the target position to which the movable focus motor drives the camera. When the camera moves, the focal length and / or image distance will change, thereby changing the focus, that is, changing the depth of field. The specific calculation method of the motor focus position can be calculated based on the imaging model formula, and the embodiments of this application will not be repeated here.
[0037] Step 103, controlling the focus motor to move to the motor focus position of each area, and when the focus motor moves to the motor focus position of each area, controlling the photosensitive sensor of the corresponding area to expose and image until a complete image is obtained.
[0038] Different areas of the photosensitive sensor can be turned on and off independently. During the period when the photosensitive unit in a region is turned on, each photosensitive unit can sense light and generate an electrical signal, which is exposure. When each divided area includes only one photosensitive unit, it is equivalent to exposing each pixel one by one. The exposure in the current related technology is usually to expose the pixels of the photosensitive array row by row.
[0039] The focus motor can drive the camera to move, and the specific structures of the focus motor and the camera can be designed into different implementations, which are not specifically limited in the embodiments of the present application. When the focus motor moves to the motor focus position of each area, it can control the electronic components of the photosensitive sensor in the corresponding area to turn on, thereby exposing the image. After all areas of the photosensitive sensor are exposed for imaging, a complete image is obtained, thereby achieving the effect of expanding the depth of field of the captured single-frame image.
[0040] In an application scenario, the embodiment of the present application can be executed by a mobile phone equipped with a camera module. After turning on the camera function of the mobile phone, the user can enter the camera function page. If the user turns on the single-frame full-depth shooting (example mode name), the mobile phone can measure the depth of the imaging object in different areas of the photosensitive sensor in real time. After the user clicks to shoot, the depth information of each area measured can be used to control the focus motor to move to the motor focus position of each area, and when moving to the motor focus position of each area, the corresponding area of the photosensitive sensor is turned on for exposure imaging. When all areas are exposed, a complete original image is obtained. In this way, it is possible to directly shoot a frame of images with different depths of field. The original image can be output directly, or it can be output and displayed on the mobile phone screen after certain image processing. The embodiment of the present application does not limit this.
[0041] In an embodiment of the present application, by acquiring depth information obtained by measuring the depth of different areas in the photosensitive sensor, the motor focus position of the corresponding area can be calculated based on the depth information of each area, and then the focus motor is controlled to move to the motor focus position of each area. When the focus motor moves to the motor focus position of each area, the photosensitive sensor of the corresponding area is controlled to expose and image until a complete image is obtained. This can achieve a larger depth of field range in a single-frame image, solving the problem of a small depth of field coverage range of a single-frame image in the related art.
[0042] Optionally, in one embodiment, the depth of different areas in the photosensitive sensor may be measured by a TOF method. Specifically, when obtaining depth information obtained by measuring the depth of an object imaged in different areas of the photosensitive sensor, the following steps may be included:
[0043] Step 1011, controlling the laser emitting end to emit laser in the spatial direction corresponding to each area.
[0044] The spatial direction corresponding to each area may be pre-calibrated, and the laser emitting end may be controlled to emit lasers in different spatial directions one by one.
[0045] Step 1012, obtaining the time interval for the laser receiving end to receive the laser reflected in the spatial direction corresponding to each area.
[0046] Optionally, the laser receiving end may be a photosensor. The time interval is the time difference between the laser emitting end emitting the laser and the laser receiving end receiving the laser.
[0047] Step 1013: Calculate the depth information of the corresponding area using each time interval.
[0048] Since the flying distance of the laser between the laser emitting end and the laser receiving end is twice the depth, the product of the time interval and the speed of light can be used to obtain twice the depth, thereby calculating the depth information.
[0049] Optionally, in another embodiment, the depth information can be obtained by binocular ranging method. Figure 2 The figure shows the principle diagram of binocular ranging method. The binocular ranging method requires two sets of camera modules, each camera module includes a camera. The optical centers of the two cameras are O R and O T , the imaging points of point P on the photosensors of the two cameras are P and P' respectively (the imaging plane of the photosensor is rotated and placed in front of the camera), f is the focal length, B is the center distance of the two cameras, and Z is the depth information to be obtained. Let the distance from point P to P' be distance, then
[0050] distance=B-(X R -X T )
[0051] X R and X T It is the distance between the two imaging points on the left and right image planes and the left edge of the image.
[0052] According to the similarity of triangles, we can get
[0053]
[0054] That is
[0055]
[0056] The focal length f and the camera center distance B can be obtained through calibration. Therefore, as long as d = X is obtained R -X T That is, the parallax can be used to obtain the depth information, that is, the object distance information of each pixel.
[0057] Assuming that the coordinates of the target point in the left view are (x, y), and the coordinates of the target point in the world coordinate system with the optical center of the left camera as the origin are (X, Y, Z), then there exists a transformation matrix Q as shown below so that
[0058] Q*[xyz 1]′=[XYZW]′
[0059] in
[0060]
[0061] In the above formula, the initial values of f, d, cx and cy can be obtained through stereo calibration. We only need to take the last variable: parallax d, to obtain the three-dimensional coordinates of any imaging point.
[0062] In order to obtain the disparity d, the two corresponding image points of the point on the left and right views can be matched. In one example, the epipolar constraint can be used to reduce the matching of corresponding points from a two-dimensional search to a one-dimensional search, so that any point on one image and its corresponding point on the other image must have the same row number, and the corresponding point can be matched by a one-dimensional search on the row. After completing the matching of the corresponding image points of the same object on the left and right views, the corresponding disparity d can be obtained. After obtaining the disparity d, the depth information of the full frame can be estimated.
[0063] Therefore, after the corresponding images are acquired by the two camera modules respectively (two images are obtained), the depth information of the object imaged at any pixel point can be calculated through the pre-calibrated parameters.
[0064] Specifically, a specific implementation method of implementing step 101 of obtaining depth information obtained by measuring the depth of an object imaged in different areas of a photosensitive sensor by a binocular ranging method may include the following steps:
[0065] Step 111, controlling the first camera module and the second camera module to measure the depth of the imaged object in different areas of the first photosensitive sensor based on a binocular ranging method to obtain depth information of the different areas.
[0066] Among them, the first camera module includes a first camera and a first photosensor, and the second camera module includes a second camera and a second photosensor.
[0067] The first camera module is the camera module used when finally taking the complete image. The second camera module can be regarded as a camera module for auxiliary distance measurement.
[0068] Accordingly, step 103 of controlling the focus motor to move to the motor focus position of each area may be controlling the focus motor to move the first camera to the motor focus position of each area.
[0069] Furthermore, step 111 of controlling the first camera module and the second camera module to measure the depth of the imaging object in different areas of the first photosensor based on the binocular ranging method may include the following steps:
[0070] Step 1111, controlling the first camera module and the second camera module to shoot simultaneously, to obtain a first image and a second image respectively;
[0071] Step 1112, matching corresponding image points in the first image and the second image;
[0072] Step 1113, calculating the disparity d of the corresponding image points in the first image and the second image according to the image coordinates of the corresponding image points in the first image and the second image;
[0073] Step 1114, based on the parallax of each pixel in the first image and the pre-calibrated parameters of the first camera and the second camera (such as f, d, cx and cy mentioned above), calculate the depth information of different areas in the first photosensitive sensor.
[0074] It should be noted that the imaging method provided in the embodiment of the present application can be executed by an imaging device or a control module in the imaging device for executing the imaging method. In the embodiment of the present application, the imaging device provided in the embodiment of the present application is described by taking the imaging device executing the imaging method as an example.
[0075] The present application embodiment provides an imaging device such as Figure 3 As shown, it includes an acquisition unit 11, a calculation unit 12 and a control unit 13.
[0076] The acquisition unit 11 is used to acquire depth information obtained by measuring the depth of the object imaged in different areas of the photosensitive sensor;
[0077] The calculation unit 12 is used to calculate the motor focus position of the corresponding area based on the depth information of each area;
[0078] The control unit 13 controls the focus motor to move to the motor focus position of each area, and when the focus motor moves to the motor focus position of each area, controls the photosensitive sensor of the corresponding area to expose and image until a complete image is obtained.
[0079] Optionally, the acquiring unit 11 may include:
[0080] A first control subunit is used to control the laser emitting end to emit laser light in a spatial direction corresponding to each area;
[0081] An acquisition subunit, used for acquiring a time interval for a laser receiving end to receive a laser reflected in a spatial direction corresponding to each area;
[0082] The calculation subunit is used to calculate the depth information of the corresponding area using each time interval.
[0083] Optionally, the acquiring unit 11 may include:
[0084] a second control subunit, configured to control the first camera module and the second camera module to measure the depth of the objects imaged in different areas of the first photosensitive sensor based on a binocular ranging method, and obtain the depth information of the objects imaged in different areas, wherein the first camera module includes a first camera and a first photosensitive sensor, and the second camera module includes a second camera and a second photosensitive sensor;
[0085] The control unit is also used to control the focus motor to move the first camera to the motor focus position of each area in the first photosensitive sensor.
[0086] Optionally, the depth information may be an object distance of an object imaged in a corresponding area, and the calculation unit 12 may also be configured to determine a focal length of a corresponding area based on the object distance of an object imaged in each area, and obtain a motor focus position.
[0087] Optionally, each area of the photosensitive sensor may be a photosensitive unit; or, each area of the photosensitive sensor includes more than one photosensitive unit, wherein, when each area of the photosensitive sensor includes more than one photosensitive unit, the depth information of each area is the depth information of the photosensitive unit at a preset position in the corresponding area.
[0088] In an embodiment of the present application, by acquiring depth information obtained by measuring the depth of an object imaged in different areas of the photosensitive sensor, the motor focus position of the corresponding area can be calculated based on the depth information of each area, and then the focus motor is controlled to move to the motor focus position of each area. When the focus motor moves to the motor focus position of each area, the photosensitive sensor of the corresponding area is controlled to expose and image until a complete image is obtained. This allows a larger depth of field range to be achieved in a single-frame image, solving the problem of a small depth of field coverage range of a single-frame image in the related art.
[0089] The imaging device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0090] The imaging device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0091] The imaging device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0092] Alternatively, if Figure 4 As shown, an embodiment of the present application further provides an electronic device 900, including a processor 901, a memory 902, and a program or instruction stored in the memory 902 and executable on the processor 901. When the program or instruction is executed by the processor 901, each process of the above-mentioned imaging method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0093] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0094] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0095] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.
[0096] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0097] The processor 1010 is used to perform the following steps:
[0098] Obtaining depth information obtained by measuring the depth of an object imaged on different areas of the photosensitive sensor;
[0099] Based on the depth information of each area, the motor focus position of the corresponding area is calculated;
[0100] The focus motor is controlled to move to the motor focus position of each area, and when the focus motor moves to the motor focus position of each area, the photosensitive sensor of the corresponding area is controlled to expose and image until a complete image is obtained.
[0101] Optionally, when the processor 1010 acquires the depth information obtained by measuring the depths of different areas in the photosensitive sensor, the processor 1010 may include executing the following steps:
[0102] Control the laser emitting end to emit laser in the spatial direction corresponding to each area;
[0103] Obtaining the time interval for the laser receiving end to receive the reflected laser in the spatial direction corresponding to each area;
[0104] The depth information of the corresponding area is calculated using each time interval.
[0105] In another optional implementation, when the processor 1010 acquires depth information obtained by measuring the depths of different areas in the photosensitive sensor, the processor 1010 may include executing the following steps:
[0106] Controlling the first camera and the second camera to measure the depth of different areas in the first photosensitive sensor based on a binocular ranging method to obtain depth information of the different areas, wherein the first camera includes the first photosensitive sensor;
[0107] Accordingly, the processor 1010 may control the focus motor to move to the motor focus position of each area, and the step may include: controlling the focus motor to move the first camera to the motor focus position of each area, wherein the first camera includes the first camera.
[0108] Optionally, when the processor 1010 acquires depth information obtained by measuring the depths of objects imaged on different areas of the photosensitive sensor, the processor 1010 may include executing the following steps:
[0109] Control the laser emitting end to emit laser in the spatial direction corresponding to each area;
[0110] Obtaining the time interval for the laser receiving end to receive the reflected laser in the spatial direction corresponding to each area;
[0111] The depth information of the corresponding area is calculated using each time interval.
[0112] Optionally, when the processor 1010 acquires depth information obtained by measuring the depths of objects imaged on different areas of the photosensitive sensor, the processor 1010 may include executing the following steps:
[0113] The first camera module and the second camera module are controlled to measure the depth of the objects imaged in different areas of the first photosensitive sensor based on the binocular ranging method to obtain the depth information of the objects imaged in different areas, wherein the first camera module includes a first camera and a first photosensitive sensor, and the second camera module includes a second camera and a second photosensitive sensor.
[0114] Accordingly, when the processor 1010 controls the focus motor to move to the motor focus position of each area, it can control the focus motor to move the first camera to the motor focus position of each area in the first photosensitive sensor.
[0115] Optionally, the depth information is the object distance of the object imaged on the corresponding area. When the processor 1010 calculates the motor focus position of the corresponding area based on the depth information of each area, it can determine the focal length of the corresponding area based on the object distance of the object imaged on each area to obtain the motor focus position.
[0116] Optionally, each area of the photosensitive sensor may be a photosensitive unit;
[0117] Alternatively, each area of the photosensitive sensor may include more than one photosensitive unit, wherein, when each area of the photosensitive sensor includes more than one photosensitive unit, the depth information of each area is the depth information of the photosensitive unit at a preset position in the corresponding area.
[0118] In an embodiment of the present application, by acquiring depth information obtained by measuring the depth of an object imaged in different areas of the photosensitive sensor, the motor focus position of the corresponding area can be calculated based on the depth information of each area, and then the focus motor is controlled to move to the motor focus position of each area. When the focus motor moves to the motor focus position of each area, the photosensitive sensor of the corresponding area is controlled to expose and image until a complete image is obtained. This allows a larger depth of field range to be achieved in a single-frame image, solving the problem of a small depth of field coverage range of a single-frame image in the related art.
[0119] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 1009 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1010.
[0120] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned imaging method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0121] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0122] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned imaging method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0123] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0124] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0126] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An imaging method, characterized in that: include: Control the laser emitting end to emit laser light in a spatial direction corresponding to each area in the photosensitive sensor, wherein each area is an area where an object imaged in the photosensitive sensor is located, and different areas have different imaged objects, and the spatial direction corresponding to each area is pre-calibrated; Obtaining the time interval for the laser receiving end to receive the reflected laser in the spatial direction corresponding to each area; Calculating the depth information of the corresponding area using each of the time intervals; Based on the depth information of each area, calculating the motor focus position of the corresponding area; Controlling the focus motor to move to the motor focus position of each area, and when the focus motor moves to the motor focus position of each area, controlling the photosensitive sensor of the corresponding area to expose and image until a complete image is obtained; Different areas of the photosensitive sensor can be turned on and off independently, and during the period when the photosensitive units in one area are turned on, each photosensitive unit can sense light and generate an electrical signal; Each area of the photosensitive sensor is a photosensitive unit, and one photosensitive unit corresponds to one pixel.
2. The method according to claim 1, characterized in that The depth information is the object distance of the object imaged on the corresponding area, and the motor focus position of the corresponding area is calculated based on the depth information of each area, including: Based on the object distance of the imaged object in each area, the focal length of the corresponding area is determined to obtain the motor focus position.
3. An imaging device, characterized in that: include: A first control subunit is used to control the laser emitting end to emit laser light in a spatial direction corresponding to each area in the photosensitive sensor, wherein each area is an area where an object imaged in the photosensitive sensor is located, and different areas have different imaged objects, and the spatial direction corresponding to each area is pre-calibrated; An acquisition subunit, used for acquiring a time interval for a laser receiving end to receive a laser reflected in a spatial direction corresponding to each area; A calculation subunit, used to calculate the depth information of the corresponding area using each of the time intervals; A calculation unit, used for calculating a motor focus position of a corresponding area based on the depth information of each area; A control unit, used to control the focus motor to move to the motor focus position of each area, and when the focus motor moves to the motor focus position of each area, control the photosensitive sensor of the corresponding area to expose and image until a complete image is obtained; Different areas of the photosensitive sensor can be turned on and off independently, and during the period when the photosensitive units in one area are turned on, each photosensitive unit can sense light and generate an electrical signal; Each area of the photosensitive sensor is a photosensitive unit, and one photosensitive unit corresponds to one pixel.
4. The device according to claim 3, characterized in that The depth information is the object distance of the object imaged in the corresponding area. The calculation unit is also used to determine the focal length of the corresponding area based on the object distance of the object imaged in each area to obtain the motor focus position.
Citation Information
Patent Citations
Image shooting method and device, electronic equipment and readable storage medium
CN112822402A