Image acquisition method and device, detection module, terminal and storage medium

By emitting detection light from the detection module and using the spectral sensor to obtain surface type information, the problem of camera laser focusing on the glass is solved, and the clear shooting and imaging quality of scenes on the outside of the glass is achieved.

CN114666509BActive Publication Date: 2025-01-07GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210369038.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-08
Publication Date
2025-01-07
Estimated Expiration
2042-04-08

AI Technical Summary

Technical Problem

In shooting scenes, the camera's laser focus is easily incorrectly focused on the glass, resulting in a decrease in the imaging quality of the scene outside the window shot.

Method used

By emitting detection light from the detection module, the spectral sensor is used to obtain the surface shape information of the object, and the camera is controlled to focus to avoid focusing on the glass.

Benefits of technology

Ensure that the camera can clearly capture scenes on the outside of the glass, improve imaging quality, and prevent the focus from falling on the glass.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114666509B_ABST
    Figure CN114666509B_ABST
Patent Text Reader

Abstract

The present application provides an image acquisition method, a detection module, an image acquisition device, a terminal and a storage medium. The image acquisition method includes: in response to the camera being turned on, controlling the detection module to be turned on, so that the light source in the detection module emits detection light, controlling the spectral sensor in the detection module to receive the detection light reflected by the object; controlling the spectral sensor to obtain the face information of the object according to the received detection light reflected by the object; and controlling the camera to focus according to the face information. In the image acquisition method, detection module, image acquisition device, terminal and storage medium of the present application, the face information of the object is obtained by using the detection light emitted by the detection module to realize glass detection before the camera focuses, and then the camera is controlled to focus according to the acquired face information to avoid the situation where the camera is easily focused on the glass and the scene outside the glass cannot be clearly captured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of imaging technology, and more specifically, to an image acquisition method, a detection module, an image acquisition device, a terminal, and a non-volatile computer-readable storage medium. Background Art

[0002] With the development of mobile terminal technology, smart phones and other mobile terminals have more and more functions, among which the acquisition of images based on laser focus technology is one of the most commonly used functions by users. Specifically, laser focus technology is: a laser emitting device emits light toward an object, and the light is received by a laser receiving device after being reflected by the surface of the object. According to the time difference between the emission and reception of the light, the distance between the object and the camera can be calculated, and then the best focus position of the camera can be calculated. The focus motor will drive the lens in the camera to the corresponding position to complete the focus.

[0003] However, in some special shooting scenarios, such as shooting the scenery outside the window through the glass, the laser focusing will output the distance between the camera and the glass, and the motor will focus according to this distance, causing the focus to fall on the glass, which will affect the imaging quality of the image of the scenery outside the window. Summary of the invention

[0004] The embodiments of the present application provide an image acquisition method, a detection module, an image acquisition device, a terminal and a non-volatile computer-readable storage medium, which are at least used to solve the problem that the camera laser focus is easily focused on the glass.

[0005] The image acquisition method of the embodiment of the present application includes: in response to the camera being turned on, controlling the detection module to be turned on, so that the light source in the detection module emits detection light, and controlling the spectral sensor in the detection module to receive the detection light reflected by the object; controlling the spectral sensor to obtain the face information of the object based on the received detection light reflected by the object; and controlling the camera to focus based on the face information.

[0006] The detection module of the embodiment of the present application includes a light source and a spectral sensor. The light source is used to emit detection light. The spectral sensor is used to receive the detection light reflected by an object and obtain the surface information of the object according to the received detection light reflected by the object.

[0007] The image acquisition device of the embodiment of the present application includes the detection module and the camera of the embodiment of the present application. The detection module includes a light source and a spectral sensor. The light source is used to emit detection light. The spectral sensor is used to receive the detection light reflected by the object, and obtain the face information of the object according to the received detection light reflected by the object. The camera is used to focus according to the face information obtained by the spectral sensor in the detection module.

[0008] The terminal of the embodiment of the present application includes one or more processors, a memory and one or more programs. Among them, one or more of the programs are stored in the memory and executed by one or more of the processors, and the program includes instructions for executing the image acquisition method of the embodiment of the present application, and the image acquisition method includes: in response to the camera being turned on, turning on the detection module, so that the light source in the detection module emits detection light, and the spectral sensor in the detection module receives the detection light reflected by the object; according to the detection light reflected by the object received by the spectral sensor, the face information of the object is obtained; and according to the face information, the camera is controlled to focus.

[0009] The non-volatile computer-readable storage medium of the embodiment of the present application includes a computer program. When the computer program is executed by one or more processors, the processors execute the following image acquisition method: in response to the camera being turned on, the detection module is turned on, so that the light source in the detection module emits detection light, and the spectral sensor in the detection module receives the detection light reflected by the object; based on the detection light reflected by the object received by the spectral sensor, the face information of the object is acquired; and the camera is controlled to focus according to the face information.

[0010] In the image acquisition method, detection module, image acquisition device, terminal and non-volatile computer-readable storage medium of the present application, the detection light emitted by the detection module is used to acquire the surface information of the object, thereby realizing glass detection before the camera focuses, and then the camera is controlled to focus according to the acquired surface information, so as to avoid the situation where the camera easily focuses on the glass and the scene outside the glass cannot be clearly captured.

[0011] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0013] Figure 1is a schematic flow chart of an image acquisition method of certain embodiments of the present application;

[0014] Figure 2 is a schematic diagram of the structure of a detection module of certain embodiments of the present application;

[0015] Figure 3 is a schematic diagram of the structure of an image acquisition device in some embodiments of the present application;

[0016] Figure 4 is a schematic diagram of the structure of a terminal in some implementation modes of the present application;

[0017] Figure 5 is a flow chart of an image acquisition method of a terminal in certain embodiments of the present application;

[0018] Figure 6 is a single-line output signal distribution diagram output by a spectral sensor according to certain embodiments of the present application;

[0019] Figure 7 It is a schematic diagram of the principle of detecting double-layer glass by a detection module in certain embodiments of the present application;

[0020] Figure 8 is a flow chart of an image acquisition method of a terminal in certain embodiments of the present application;

[0021] Fig. 9 It is a schematic diagram of the principle of detecting curved glass by a detection module according to certain embodiments of the present application;

[0022] Fig.10 and Fig.11 is a flow chart of an image acquisition method of a terminal in certain embodiments of the present application;

[0023] Fig.12 It is a connection diagram of a non-volatile computer-readable storage medium and a processor in certain embodiments of the present application. DETAILED DESCRIPTION

[0024] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.

[0025] See also Figure 1 , Figure 2 and Figure 4 The present application provides an image acquisition method, the image acquisition method comprising:

[0026] 01: In response to the camera 30 being turned on, the detection module 10 is turned on, so that the light source 11 in the detection module 10 emits detection light, and the spectrum sensor 12 in the detection module 10 receives the detection light reflected by the object;

[0027] 03: Obtaining the surface information of the object according to the detection light reflected by the object and received by the spectral sensor 12; and

[0028] 05: Control the camera 30 to focus according to the face shape information.

[0029] The embodiment of the present application further provides a detection module 10, which includes a light source 11 and a spectral sensor 12. The light source 11 is used to emit detection light. The spectral sensor 12 receives the detection light reflected by the object, and obtains the surface information of the object according to the received detection light reflected by the object.

[0030] Please combine Figure 3 The embodiment of the present application further provides an image acquisition device 100, which includes the detection module 10 and the camera 30 of the embodiment of the present application. The camera 30 is used to focus according to the surface information acquired by the spectral sensor 12 in the detection module 10.

[0031] The embodiment of the present application also provides a terminal 1000, which includes one or more processors 300, a memory 500 and one or more programs. Among them, one or more programs are stored in the memory 500 and executed by one or more processors 300. That is, when the processor 300 executes the program, the processor 300 can implement the methods in steps 01, 03 and 05. That is, the one or more processors 300 are used to: in response to the camera 30 being turned on, control the detection module 10 to turn on, so that the light source 11 in the detection module 10 emits detection light, control the spectral sensor 12 in the detection module 10 to receive the detection light reflected by the object; and control the spectral sensor 12 to obtain the face information of the object according to the received detection light reflected by the object; and control the camera 30 to focus according to the face information.

[0032] In step 01, when the processor 300 detects that the camera 30 is turned on, it controls the detection module 10 to turn on, so that the light source 11 in the detection module 10 emits detection light. The emitted detection light is reflected back to the spectral sensor 12 in the detection module 10 after passing through the object. The spectral sensor 12 analyzes the wavelength distribution of the received detection light.

[0033] The light source 11 is a line light source, which can emit linear detection light. The emitted linear detection light hits the surface of the object, and the spectral sensor 12 receives the linear detection light reflected from a certain point on the surface of the object to accurately obtain the wavelengths at at least three different positions on the object, thereby determining the surface information of the object based on multiple wavelengths to ensure the accuracy of the surface information.

[0034] If the spectrum sensor 12 receives at least three linear detection lights of different wavelengths within a preset time (for example, within 0.5 seconds or within 1 second after emitting the linear detection light), it can be preliminarily determined that there is glass (single-layer glass usually has two opposite surfaces) between the photographed object and the camera 30, and the three linear detection lights of different wavelengths are respectively: a linear detection light of a certain wavelength reflected by a beam of linear detection light at a certain point on the first surface of the glass; a linear detection light of another wavelength (the wavelength is longer than the wavelength of the linear detection light reflected on the first surface) reflected by a corresponding point on the second surface of the glass through the linear detection light of the first surface of the glass; and a linear detection light of other wavelengths reflected by a corresponding point on the photographed object. If the spectrum sensor 12 receives only one wavelength of linear detection light within the preset time, it is preliminarily determined that there is no other object between the photographed object and the camera 30.

[0035] In step 03 and step 05, the processor 300 controls the spectral sensor 12 to obtain the face information of the object according to the obtained wavelength distribution. If the object in front of the camera 30 includes both glass (if it is single-layer glass) and the object being photographed, the detection light emitted by the light source 11 will be reflected by the glass and reflected into the spectral sensor 12; the detection light will also be reflected by the glass and reflected into the spectral sensor 12. At this time, the processor 300 will obtain two face information according to the detection light received by the spectral sensor 12. If the object in front of the camera 30 only includes the object being photographed, the detection light emitted by the light source 11 will be reflected by the object being photographed, and the reflected detection light will be reflected into the spectral sensor 12. At this time, the processor 300 controls the spectral sensor 12 to obtain a face information according to the received detection light, and controls the camera 30 to focus according to the obtained face information.

[0036] In some special shooting scenarios, such as shooting the scenery outside the window through the glass, the laser focusing will output the distance between the camera and the glass. The motor will focus according to this distance, causing the focus to fall on the glass, which will affect the imaging quality of the image of the scenery outside the window.

[0037] In the image acquisition method of the present application, the detection light emitted by the detection module 10 is used to obtain the surface information of the object, and the glass detection is realized before the camera 30 focuses. Then, the camera 30 is controlled to focus according to the acquired surface information, so as to avoid the situation where the camera 30 is easily focused on the glass and the scene outside the glass cannot be clearly captured, thereby ensuring that the camera 30 can capture a clear image and thus ensuring the imaging quality of the image.

[0038] See also Figure 2 and Figure 5 In some embodiments, 03: obtaining the surface information of the object according to the detection light reflected by the object and received by the spectral sensor 12, including:

[0039] 031: Analyze the wavelength of the probe light reflected by the object;

[0040] 032: Obtain the distance of each point on the surface of the object according to the preset wavelength-distance correspondence relationship and the wavelength; and

[0041] 033: If the distance values ​​of each point belong to an even number of arrays consisting of the same values, and the values ​​in different arrays are different, then the surface shape of the object is determined to be a plane.

[0042] Please combine Figure 4 , the processor 300 is also used to execute the methods in 031, 032 and 033. That is, the processor 30 is also used to control the spectral sensor 12 to execute: analyzing the wavelength of the detection light reflected by the object; obtaining the distance of each point on the surface of the object according to the preset wavelength-distance correspondence and the wavelength; if the distance values ​​of each point belong to an even number of arrays composed of the same values, and the values ​​in different arrays are different, then it is determined that the surface shape of the object is a plane.

[0043] The image acquisition device 100 or the terminal 1000 stores information on the wavelength-distance correspondence relationship in advance. The spectral sensor 12 can obtain a single-line output signal distribution according to the received detection light, such as Figure 6 As shown, in the single-line output signal distribution output by the spectral sensor 12, the wavelength corresponding to the peak point of the spectral intensity is the wavelength of the detection light focused on the surface of the object. The image acquisition device 100 or the terminal 1000 can be preliminarily calibrated in the early stage, and the peak wavelength point can be matched with the distance one by one, and stored in the storage module in the image acquisition device 100 or the memory 500 in the terminal 1000.

[0044] The spectral sensor 12 outputs a single-line output signal distribution of the received detection light, analyzes the data in the single-line output signal distribution, and calculates the distance between a certain point on the object and the detection module 10 according to the pre-stored wavelength-distance correspondence. Among them, the spectral sensor 12 is a planar array sensor, which can output a single-line output signal distribution of multiple points on a surface, thereby obtaining the distance information corresponding to the multiple points. Specifically, the angle of the linear detection light emitted by the detection module 10 can be adjusted for mobile scanning, and the linear detection light can be irradiated to different positions on the object, so that the spectral sensor 12 can output a single-line output signal distribution of multiple points on a surface.

[0045] In practice, the object being photographed is usually opaque, and when the linear detection light emitted at the same time irradiates the surface of the object being photographed, the spectrum sensor 12 will only receive the linear detection light of one wavelength. In actual use, among the linear detection lights emitted at the same time by the spectrum sensor 12, only the linear detection lights of an odd number of wavelengths will be received, for example, the linear detection light of one wavelength will be received; or, the linear detection lights of three different wavelengths will be received; or, the linear detection lights of five different wavelengths will be received.

[0046] In one embodiment, the spectral sensor 12 determines whether the distances of the received multiple points belong to values ​​in an array of an even number of identical values ​​to determine the surface information of the object. Figure 2 For example, the distance values ​​of multiple points received by the spectrum sensor 12 are 10cm, 10cm, 10cm, 10cm, 12cm, 12cm, 12cm, 12cm, and these distances can form two arrays. The values ​​in the first array are all 10cm, and the values ​​in the second array are all 12cm. This means that there are multiple points located on the same plane, and the distances of multiple other points are located on another plane. It can be determined that the surface of the object is a plane and it is determined to be a single-layer flat glass. Please combine Figure 7 For example, the distance values ​​of multiple points received by the spectral sensor 12 are 10cm, 10cm, 10cm, 10cm, 12cm, 12cm, 12cm, 12cm, 13cm, 13cm, 13cm, 15cm, 15cm, 15cm, 15cm; these distances can form four arrays, the values ​​in the first array are all 10cm, the values ​​in the second array are all 12cm, the values ​​in the third array are all 13cm, and the values ​​in the fourth array are all 15cm, indicating that the multiple distances belong to four planes respectively, and it can be determined that the surface shape of the object is a plane and is double-layer flat glass. The processor 300 controls the camera 30 to focus on the object outside the object according to the plane object.

[0047] When the processor 300 determines that the surface information of the object is a plane, the processor 30 can construct the three-dimensional information of the object based on the distance data of the two planes of the object, so as to perform aberration correction on the image acquired by the camera 30 through subsequent algorithm compensation to obtain a clearer and more realistic image.

[0048] See also Figure 2 and Figure 8 In some embodiments, 03: obtaining the surface information of the object according to the detection light reflected by the object and received by the spectral sensor 12, including:

[0049] 034: Analyze the wavelength of the probe light reflected by the object;

[0050] 035: Obtaining the distance of each point on the surface of the object according to the preset wavelength-distance correspondence relationship and the wavelength; and

[0051] 036: If there are a predetermined number of points whose distance values ​​are within a first preset range, and / or there are a predetermined number of points whose distance values ​​are within a second preset range, and the upper limit value of the first preset range is less than the lower limit value of the second preset range, then it is determined that the surface shape of the object is a curved surface.

[0052] Please combine Figure 4 , the processor 300 is also used to execute the methods in 034, 035 and 036. That is, the processor 30 is also used to control the spectral sensor 12 to execute: analyzing the wavelength of the detection light reflected by the object; obtaining the distance of each point on the surface of the object according to the preset wavelength-distance correspondence and the wavelength; if there are a predetermined number of points whose distance values ​​are within the first preset range, and / or there are a predetermined number of points whose distance values ​​are within the second preset range, and the upper limit value of the first preset range is less than the lower limit value of the second preset range, then determining that the surface type of the object is a curved surface.

[0053] Specifically, there are a predetermined number of points whose distance values ​​are within a first preset range, and there are a predetermined number of points whose distance values ​​are the same. Alternatively, there are a predetermined number of points whose distance values ​​are the same, and there are a predetermined number of points whose distance values ​​are within a second preset range. Alternatively, there are a predetermined number of points whose distance values ​​are within a first preset range, and there are a predetermined number of points whose distance values ​​are within a second preset range. In all of the above cases, the surface type of the object is determined to be a curved surface.

[0054] Please combine Figure 2 and Figure 6In the embodiment of the present application, the preset number is the number of times the light source 11 emits the linear detection light, and the number of distance values ​​obtained by the processor 300 is a multiple of the preset number. For example, when the light source 11 emits the linear detection light four times, the number of single-line output signal distribution diagrams obtained by the spectral sensor 12 is a multiple of four. If the camera 30 only includes the photographed object, since the photographed object is usually opaque, the spectral sensor 12 only obtains one single-line output signal distribution diagram each time the light source 11 emits the linear detection light. If a single-layer glass and the photographed object are sequentially arranged in front of the camera 30, the spectral sensor 12 will obtain three different single-line output signal distribution diagrams within a preset time each time the light source 11 emits the linear detection light, and the distances of the four points on a surface of the single-layer glass close to the light source 11 are all smaller than the distances of the four points on a surface of the single-layer glass far from the light source 11. The spectral sensor 12 can determine whether the surface of the object is a curved surface by determining whether the distances of the predetermined number of points are within the first preset range, and / or whether the distances of the predetermined number of points are within the second preset range.

[0055] Please combine Fig. 9 For example, the light source 11 emits four linear detection lights, and the distance values ​​of the multiple points obtained by the spectral sensor 12 are 7.0cm, 7.0cm, 14.0cm, 23.3cm, 13.0cm, 7.0cm, 24.0cm, 13.5cm, 13.6cm, 7.6cm, 23.5cm, and 23.8cm respectively. There are four points whose distance values ​​are equal to 7.0cm (i.e., the first preset range), there are four points whose distance values ​​are all within the range of [13.0cm, 14.0cm] (i.e., the second preset range), and there are four points whose distance values ​​are all within the range of [23.3cm, 24.0cm]. It is determined that there is an object with a hyperbolic surface in front of the camera 30.

[0056] When the spectral sensor 12 determines that the surface information of the object is a curved surface, the spectral sensor 12 obtains the curvature information of the object according to a preset number of distances and constructs the three-dimensional information of the object, so as to perform aberration correction on the image obtained by the camera 30 through subsequent algorithm compensation to obtain a clearer and more realistic image.

[0057] See also Figure 4 and Fig.10 In some embodiments, 05: controlling the camera 30 to focus according to the face shape information includes:

[0058] 051: If the surface information is a plane or a curved surface, and there are a preset number of points whose distance values ​​are greater than the distance values ​​of the remaining multiple points, the camera 30 is controlled to focus according to the distance values ​​of the preset number of points that are greater than the distance values ​​of the remaining multiple points.

[0059] Please combine Figure 4 , the processor 300 is further used to execute the method in 051. That is, the processor 300 is further used to: if the surface information is a plane or a curved surface, and there are a preset number of points whose distance values ​​are greater than the distance values ​​of the other multiple points, control the camera 30 to focus according to the distance values ​​of the preset number of points that are greater than the distance values ​​of the other multiple points.

[0060] Since the number of distance values ​​received by the processor 300 is a multiple of the number of times the light source 11 emits linear detection light, when the surface type of the object determined by method 033 and method 036 is a plane or a curved surface, the processor 300 determines that there is a glass object between the camera 30 and the object being photographed. Since glass can pass through the linear detection light, at this time, the processor 300 receives at least three groups of distance values. The processor 300 controls the focus of the camera 30 according to the largest group of distance data values, so that the camera 30 can accurately focus on the surface of the object being photographed, avoiding the camera 30 from focusing on the glass.

[0061] When the processor 300 controls the camera 30 to focus according to the largest set of values ​​of the distance data, the camera 30 can be controlled to focus on the surface of the object through the Phase Detection Auto-focus (PDAF) method.

[0062] See also Figure 4 and Fig.11 In some embodiments, the image acquisition method further comprises:

[0063] 07: Perform image deconvolution processing based on the initial image and face information acquired by the camera 30 to obtain a target image.

[0064] Please combine Figure 4 The processor 300 is also used to execute the method in 07. That is, the processor 300 is also used to: perform image deconvolution processing according to the initial image and face information obtained by the camera 30 to obtain the target image.

[0065] Specifically, the processor 300 performs optical fitting calculations based on the surface information obtained by the spectral sensor 12, calculates the changes in the imaging surface after the camera 30 passes through the glass, and performs image deconvolution processing on the changed parameters and the initial image obtained by the camera 30 through the glass, corrects the chromatic aberration in the R channel and the B channel, stretches or shrinks the actual pixels of different color channels to the near-axial image height position of the same wavelength, and retrieves the blur and color fringing phenomena caused by chromatic aberration, thereby obtaining a high-quality target image.

[0066] See also Figure 2, the detection module 10 of the present application may also include a beam splitter 13, a dispersive lens 14, a first aperture 15 and a second aperture 16. The beam splitter 13 is arranged on the light-emitting side of the light source 11. The dispersive lens 14 is arranged on the side of the beam splitter 13 away from the light source 11, and is used to focus the light of different wavelengths in the detection light on different positions on the side of the dispersive lens 14 away from the beam splitter 13. The beam splitter 13 is used to transmit the detection light on the side close to the light source 11, and reflect the detection light on the side of the dispersive lens 14. The first aperture 15 is located between the light source 11 and the beam splitter 13, and is used to filter the detection light emitted by the light source 11. The second aperture 16 is located between the beam splitter 13 and the dispersive lens 14, and is used to filter the detection light reflected by the beam splitter 13.

[0067] Specifically, the detection light emitted by the light source 11 is filtered by the first aperture 15 located on the light exit side of the light source 11, and the stray light in the detection light emitted by the light source 11 is filtered to ensure that the light irradiated at a certain position on the object is a linear light source, so as to ensure the accuracy of the distance data obtained. The linear detection light passing through the first aperture 15 does not change the propagation direction of the linear detection light after passing through the beam splitter 13. After passing through the dispersion lens 14, the light of each wavelength is focused on different positions on the side of the dispersion lens 14 away from the beam splitter 13. Only the linear detection light of a specific wavelength focused on the object can be reflected back, and then reflected by the beam splitter 13, and irradiated on the spectrum sensor 12 through the second aperture 16. Among them, the second aperture 16 is arranged in front of the spectrum sensor 12 to filter the reflected detection light, ensuring that only the detection light focused on the surface of the object can reach the spectrum sensor 12. The spectrum sensor 12 can obtain the wavelength of the detection light focused on the object by analyzing the measured wavelength distribution, so as to calculate the distance between the object and the detection module 10 according to the wavelength-distance correspondence relationship.

[0068] The arrangement distance between the optical devices in the detection module 10 is designed according to the focal length of the dispersion lens 14 to ensure that the detection light reflected by the object can reach the spectrum sensor 12 .

[0069] In some embodiments, the first aperture 15 and / or the second aperture 16 include a linear aperture, and the through-hole size of the first aperture 15 and / or the second aperture 16 is positively correlated with the pixel size of the spectral sensor 12 .

[0070] For example, the first aperture 15 includes a linear aperture; or, the second aperture 16 includes a linear aperture; or, both the first aperture 15 and the second aperture 16 include a linear aperture. The through-hole size of the first aperture 15 is related to the pixel size of the spectrum sensor 12; or, the through-hole size of the second aperture 16 is related to the pixel size of the spectrum sensor 12; or, the through-hole sizes of the first aperture 15 and the second aperture 16 are positively correlated with the pixel size of the spectrum sensor 12. The smaller the through-hole sizes of the first aperture 15 and the second aperture 16 are, the steeper the distribution curve of the single-line output signal output by the spectrum sensor 12 is, and the higher the accuracy of the distance value is.

[0071] Preferably, the first aperture 15 and the second aperture 16 both include linear apertures, and the through-hole sizes of the first aperture 15 and the second aperture 16 are positively correlated with the pixel size of the spectrum sensor 12. Generally, when the through-hole sizes of the first aperture 15 and the second aperture 16 are equal to the pixel size, the wavelength information acquired by the spectrum sensor 12 is more accurate, ensuring that the wavelength acquired by the spectrum sensor 12 is the wavelength corresponding to a certain point irradiated on the object.

[0072] In some embodiments, the size of the through hole of the first aperture 15 and / or the second aperture 16 can be measured by the number of pixels, for example, the value range of the through hole size of the first aperture 15 and / or the second aperture 16 is [1pixel, 2pixel]. For example, the value range of the through hole size of the first aperture 15 is [1pixel, 2pixel]; or, the value range of the through hole size of the second aperture 16 is [1pixel, 2pixel]; or, the value range of the through hole size of the first aperture 15 and the second aperture 16 is [1pixel, 2pixel]. The value range of the through hole size of the first aperture 15 and the second aperture 16 is [1pixel, 2pixel], so that each pixel on the spectral sensor 12 corresponds to the complete linear detection light reflected back, ensuring that the output single-line output signal distribution has high accuracy.

[0073] In some embodiments, the wavelength of the detection light ranges from [760nm, 1500nm]. For example, the wavelength of the detection light emitted by the light source 11 is 760nm, 800nm, 850nm, 900nm, 950nm, 1000nm, 1050nm, 1120nm, 1200nm, 1280nm, 1320nm, 1400nm, or 1500nm. Among them, all optical devices in the detection module 10 (including the beam splitter 13 and the dispersion lens 14) have a transmittance of more than 90% for the detection light in the range of [760nm, 1500nm], which minimizes the loss of light energy of the detection light in the optical path and ensures the accuracy of the distance data.

[0074] See also Figure 3The image acquisition device 100 of the embodiment of the present application may further include a rotating table 50, which is connected to the detection module 10 and is used to control the detection module 10 to rotate within a predetermined angle range.

[0075] Please combine Figure 2 Specifically, the rotating table 50 is integrally rotatably connected to the detection module 10. The rotating table 50 can control the detection module 10 to rotate within a predetermined angle range according to the signal sent by the spectral sensor 12, thereby realizing linear scanning within a certain range, obtaining distance information of multiple points on the surface of the object, so as to construct the three-dimensional information of the object, and facilitate subsequent image correction processing. Among them, after the spectral sensor 12 receives the linear detection light emitted by the light source 11 at a certain moment within a certain period of time, it sends a signal to the rotating table 50, so that the rotating table 50 drives the detection module 10 to rotate to other angles, thereby obtaining distance information of other points on the surface of the object.

[0076] In some embodiments, the rotation angle of the rotating table 50 relative to the rotation axis oo1 is in the range of [-60°, +60°]. For example, the rotation angle of the rotating table 50 is any one of -60°, -50°, -40°, -30°, -10°, 0°, 15°, 30°, 40°, 50°, or 60°.

[0077] See also Figure 2 and Figure 4 In some embodiments, a hole is opened on the display screen 400 of the terminal 1000 at a position corresponding to the detection module 10, and the size of the hole in the display screen 400 is larger than the size of the rotation range of the rotating table 50, ensuring that the detection light emitted by the detection module 10 is not blocked, thereby preventing the detection light from irradiating the display screen 400 and being reflected.

[0078] See also Fig.12 The embodiment of the present application also provides a non-volatile computer-readable storage medium 200 storing a computer program 201. When the computer program 201 is executed by the processor 300, the processor 300 executes the image acquisition method of any of the above embodiments. The non-volatile computer-readable storage medium 200 can be set in the terminal 1000, or in a cloud server or other device. In this case, the terminal 1000 can communicate with the cloud server or other device to obtain the corresponding computer program 201.

[0079] Please combine Figure 1 For example, when the computer program 201 is executed by the processor 300, one or more processors 30 execute the methods in 01, 03, 05, 07, 031, 032, 033, 034, 035, 036 and 051. For example, the following image acquisition method is executed:

[0080] 01: In response to the camera being turned on, the detection module is controlled to be turned on, so that the light source in the detection module emits detection light, and the spectrum sensor in the detection module is controlled to receive the detection light reflected by the object;

[0081] 03: Control the spectral sensor to obtain the surface information of the object according to the received detection light reflected by the object; and

[0082] 05: Control the camera to focus based on the face information.

[0083] In the description of this specification, the descriptions with reference to the terms "certain embodiments", "in an example", "exemplarily", etc., mean that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0084] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0085] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. An image acquisition method, characterized in that: include: In response to the camera being turned on, the detection module is controlled to be turned on, so that the light source in the detection module emits detection light, and the spectrum sensor in the detection module is controlled to receive the detection light reflected by the object; Controlling the spectral sensor to obtain the surface information of the object according to the received detection light reflected by the object; and Controlling the camera to focus according to the face shape information; The step of acquiring the surface information of the object according to the detection light reflected by the object and received by the spectral sensor comprises: analyzing the wavelength of the detection light reflected by the object; Obtaining the distance of each point on the surface of the object according to a preset wavelength-distance correspondence relationship and the wavelength; If there are a predetermined number of points whose distance values ​​are within a first preset range, and / or there are a predetermined number of points whose distance values ​​are within a second preset range, and the upper limit value of the first preset range is less than the lower limit value of the second preset range, then it is determined that the surface shape of the object is a curved surface.

2. The image acquisition method according to claim 1, characterized in that: The step of acquiring the surface information of the object according to the detection light reflected by the object and received by the spectral sensor comprises: analyzing the wavelength of the detection light reflected by the object; Obtaining the distance of each point on the surface of the object according to a preset wavelength-distance correspondence relationship and the wavelength; If the distance values ​​of the points belong to an even number of arrays consisting of the same values, and the values ​​in different arrays are different, it is determined that the surface shape of the object is a plane.

3. The image acquisition method according to claim 1, characterized in that: The step of controlling the camera to focus according to the face shape information comprises: If the surface information is a plane or a curved surface, and there are a preset number of points whose distance values ​​are greater than the distance values ​​of the remaining multiple points, the camera is controlled to focus according to the distance values ​​of the preset number of points that are greater than the distance values ​​of the remaining multiple points.

4. The image acquisition method according to claim 1, characterized in that: Also includes: Image deconvolution processing is performed according to the initial image acquired by the camera and the face information to obtain a target image.

5. A detection module, characterized in that: include: A light source, used for emitting detection light; and A spectral sensor, used for receiving the detection light reflected by the object, and obtaining the surface information of the object according to the received detection light reflected by the object; The spectral sensor is also used to analyze the wavelength of the detection light reflected by the object; The distance of each point on the surface of the object is obtained according to a preset wavelength-distance correspondence and the wavelength; if there are a predetermined number of points whose distance values ​​are within a first preset range, and / or there are a predetermined number of points whose distance values ​​are within a second preset range, and the upper limit value of the first preset range is less than the lower limit value of the second preset range, then it is determined that the surface type of the object is a curved surface.

6. The detection module according to claim 5, characterized in that: Also includes: A beam splitter, arranged on the light-emitting side of the light source; a dispersion lens, disposed on a side of the beam splitter away from the light source, and used to focus light of different wavelengths in the detection light at different positions on a side of the dispersion lens away from the beam splitter, wherein the beam splitter is used to transmit the detection light on a side close to the light source and reflect the detection light on a side of the dispersion lens; A first aperture, located between the light source and the beam splitter, and used for filtering the detection light emitted by the light source; and The second aperture is located between the beam splitter and the spectrum sensor and is used for filtering the detection light reflected by the beam splitter.

7. The detection module according to claim 6, characterized in that: The first aperture and / or the second aperture include a linear aperture, and a through-hole size of the first aperture and / or the second aperture is related to a pixel size of the spectral sensor.

8. The detection module according to claim 5, characterized in that: The wavelength of the detection light ranges from [760nm, 1500nm].

9. An image acquisition device, characterized in that: include: The detection module according to any one of claims 5 to 8; and The camera is used to focus according to the surface information obtained by the spectral sensor in the detection module.

10. The image acquisition device according to claim 9, characterized in that: The image acquisition device also includes a rotating table, which is connected to the detection module and is used to control the detection module to rotate within a predetermined angle range.

11. A terminal, characterized in that: include: One or more processors, memory; and One or more programs, wherein one or more of the programs are stored in the memory and executed by one or more of the processors, and the programs include instructions for executing the image acquisition method according to any one of claims 1 to 4.

12. A non-volatile computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by one or more processors, the processor implements the image acquisition method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Distance measuring device, distance measuring method, camera and electronic equipment

    CN112147622A

  • Image acquisition method, device and equipment and storage medium

    CN112702514A

  • Image shooting method and device, terminal and storage medium

    CN113191976A