WO2019104670A1 - 深度值确定方法和装置 - Google Patents

深度值确定方法和装置 Download PDF

Info

Publication number
WO2019104670A1
WO2019104670A1 PCT/CN2017/114020 CN2017114020W WO2019104670A1 WO 2019104670 A1 WO2019104670 A1 WO 2019104670A1 CN 2017114020 W CN2017114020 W CN 2017114020W WO 2019104670 A1 WO2019104670 A1 WO 2019104670A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
depth value
depth
determining
images
Prior art date
Application number
PCT/CN2017/114020
Other languages
English (en)
French (fr)
Inventor
卢振波
曹子晟
胡攀
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2017/114020 priority Critical patent/WO2019104670A1/zh
Priority to CN201780014861.7A priority patent/CN108701361A/zh
Publication of WO2019104670A1 publication Critical patent/WO2019104670A1/zh
Priority to US16/887,942 priority patent/US20200296259A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/2224Studio circuitry; Studio devices; Studio equipment related to virtual studio applications
    • H04N5/2226Determination of depth image, e.g. for foreground/background separation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/571Depth or shape recovery from multiple images from focus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/10Image enhancement or restoration using non-spatial domain filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20056Discrete and fast Fourier transform, [DFT, FFT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N2013/0074Stereoscopic image analysis
    • H04N2013/0081Depth or disparity estimation from stereoscopic image signals

Definitions

  • the present invention relates to the field of image technologies, and in particular, to a depth value determining method, a depth value determining device, and a machine readable storage medium, and a removable device.
  • the distance from the object to the lens can be obtained, that is, the object distance d o , the lens focal length f and the imaging distance d i satisfy the following relationship: That is
  • the point-to-lens distance in the scene is not equal to the focusing distance object distance d o , the point will form a diffuse spot on the imaging plane.
  • the opening angle of the diffuse spot is smaller than the limit angle resolution of the human eye, the human eye does not feel the unclear phenomenon of the corresponding point, and the diffuse spot at this time is called the limit diffusing circle.
  • the angle of the diffuse spot relative to the human eye is not less than the limit angle resolution of the human eye, the human eye will be able to feel the phenomenon of scene blurring.
  • the radius of the limit circle is R l
  • the size of the speckle is not perceived by the human eye.
  • the foreground is deep d o, f is satisfied.
  • the depth of the speckle is not recognized by the human eye .
  • A is the aperture value of the camera
  • is the out-of-focus distance
  • d i, f and d i, b is the image distance.
  • the photographer manually adjusts the focal length, the aperture and the object distance, and changes the depth of field of the imaged object, thereby taking photos with different blurring effects on the same scene.
  • the depth of the scene cannot be extracted, and there may be an error in the artificial focus.
  • the present invention provides a depth value determining method, a depth value determining device, and a machine readable storage medium, and a mobile device to solve the technical problems in the prior art.
  • a depth value determining method is provided, which is suitable for an image capturing device, the image capturing device comprising a lens and an image sensor, the method comprising:
  • N is an integer less than or equal to M
  • a target depth value of a pixel point of a preset position in the image is determined according to a depth value of a pixel point in each image.
  • a depth value determining apparatus suitable for an image capturing apparatus, the image collecting apparatus comprising a lens and an image sensor, the depth value determining apparatus comprising a processor, wherein the processor is configured to perform the following step:
  • N is an integer less than or equal to M
  • a target depth value of a pixel point of a preset position in the image is determined according to a depth value of a pixel point in each image.
  • a machine readable storage medium suitable for use in an image capture device, the image capture device comprising a lens and an image sensor, the machine readable storage medium having a plurality of computer instructions stored thereon
  • the computer instructions are used to implement the steps in the method of any of the above embodiments.
  • a mobile device comprising a lens and an image sensor, further comprising one or more processors operating alone or in cooperation, the one or more processors for performing the following steps:
  • N is an integer less than or equal to M
  • a target depth value of a pixel point of a preset position in the image is determined according to a depth value of a pixel point in each image.
  • the depth value of each position in the scene corresponding to the collected image can be determined without manual participation, the degree of automation is improved, and the image is adjusted according to the depth value later. Depth of field and other parameters.
  • there is no need to move and change the shooting position during the shooting process which not only reduces the complexity of the operation, but also ensures that the parameters of the image capturing device and the like are fixed, thereby ensuring accurate determination of the depth value.
  • since the structure of the sensor in the image acquisition device is generally not complicated, it is easy to move, so that the technical solution corresponding to the embodiment is convenient to implement.
  • FIG. 1 is a schematic diagram of a deep foreground in the related art
  • FIG. 3 is a schematic flow chart of a depth value determining method according to an embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of calculating a depth value according to an embodiment of the present invention.
  • FIG. 5 is a schematic flow chart for calculating a radius of a speckle according to an embodiment of the present invention
  • Figure 6 is a schematic illustration of a depth value in accordance with one embodiment of the present invention.
  • Figure 7 is a schematic illustration of another depth value in accordance with one embodiment of the present invention.
  • FIG. 3 is a schematic flow chart of a depth value determining method according to an embodiment of the present invention.
  • the depth value determining method shown in this embodiment may be applied to an image capturing device such as a camera, an aerial drone, a mobile phone, etc., and the image capturing device includes a lens and an image sensor.
  • the depth value determining method in this embodiment includes the following steps:
  • Step S1 adjusting the image sensor and the lens by moving the image sensor
  • image sensor movement may be controlled by a motor, such as a piezoelectric motor, wherein a control signal may be sent to the piezoelectric motor by the SOC (system chip) such that the piezoelectric motor drives the image sensor to move.
  • a motor such as a piezoelectric motor
  • SOC system chip
  • the process of moving the image sensor may be such that the imaging distance is from a maximum imaging distance to a minimum imaging distance, or may be such that the imaging distance is from a minimum imaging distance to a maximum imaging distance.
  • the adjustable distance of each moving image sensor may be the same or different, and may be set as needed.
  • step S2 in the N times of the M times, an image is acquired each time the adjustable distance is adjusted, where N is an integer less than or equal to M.
  • the shutter of the image capture device can be controlled by the SOC.
  • the SOC can control the shutter to be in a closed state.
  • the SOC can control the shutter after each movement process ends. Turn on to take exposure shots and get the picture at the current object distance.
  • N may be an integer of a small M, that is, in the process of moving the image sensor M times, not every time the image sensor is moved, an image is acquired, but in which the image sensor is moved N times. Images are collected only after the end.
  • N may be an integer equal to M, that is, during the movement of the image sensor M times, the image is acquired each time the image sensor is moved.
  • step S3 the depth value of the pixel points in the collected N images is calculated.
  • Step S4 determining a target depth value of the pixel point of the preset position in the image according to the depth value of the pixel point in each image.
  • a depth value for each pixel in the image can be calculated, and then N images can be separately calculated for each pixel in the image.
  • the average of the depth values of the pixels in the position is the target depth value of the pixel at the position.
  • a depth value of a portion of the pixel points in the image may be calculated, and then for the pixel point at which the depth value is calculated, the pixel points of the position in the N image may be separately calculated. The average of the depth values as the target depth value for the pixel at that location.
  • the diffusion spot radius of the pixel position of the preset position in the image may be calculated first, and then the calculation formula corresponding to the relationship is used to calculate the depth value according to the relationship between the depth value and the diffusion spot radius. .
  • a specific embodiment of calculating the depth value is shown later.
  • the depth value of each position in the scene corresponding to the acquired image can be determined without manual participation, the degree of automation is improved, and the parameters such as the depth of field of the image are adjusted according to the depth value later.
  • there is no need to move and change the shooting position during the shooting process which not only reduces the complexity of the operation, but also ensures that the parameters of the image capturing device and the like are fixed, thereby ensuring accurate determination of the depth value.
  • since the structure of the sensor in the image acquisition device is generally not complicated, it is easy to move, so that the technical solution corresponding to the embodiment is convenient to implement.
  • the adjusting the adjustable distance between the image sensor and the lens by M times comprises:
  • the adjustable distance is adjusted M times according to the same and/or different step values.
  • the adjustable distance of each moving image sensor may be the same or different, and may be set as needed.
  • the calculating the depth values of the pixel points in the collected N images includes:
  • Step S31 calculating a diffusion spot radius of the pixel point of the preset position in the image
  • Step S32 setting a sequence number for the N images according to the collection order of the N images
  • Step S33 determining a minimum diffusion spot radius of the diffusion spot radius, and a first serial number of the corresponding image in the N images;
  • Step S34 based on the diffusion speckle radius, for images and sequences whose sequence numbers are smaller than the first serial number An image whose number is greater than the first serial number respectively calculates a depth value of a pixel point in the image.
  • the N images are acquired during the process of moving the image sensor, and the images acquired before the image reaching the minimum diffusion spot radius, and the image acquired after reaching the image of the minimum diffusion spot radius,
  • the relationship between the pixel depth value and the diffusion spot radius in the image is different, so the N numbers can be sequentially set in the order of acquisition, and the relationship between the serial number of each image and the first serial number of the image corresponding to the minimum diffusion spot radius can be The image acquired before the image of the minimum divergence radii and the image acquired after the image of the minimum divergence radii are determined, thereby ensuring an accurate determination of the relationship between the astigmatism radius and the depth value.
  • setting the sequence number according to the collection order includes setting the sequence number in the order of the acquisition sequence, and further including setting the sequence number in reverse order according to the collection order.
  • Figure 5 is a schematic flow diagram for calculating the radius of a speckle according to one embodiment of the present invention. As shown in FIG. 5, on the basis of the embodiment shown in FIG. 4, the radius of the speckle of the pixel at the preset position in the image is calculated as follows:
  • Step S311 pairing the N images into two pairs.
  • the N images are paired pairwise to obtain 0.5N (N-1) image pairs (I i , I j ), and I i and I j are respectively any of the N images.
  • i and j are integers, and i ⁇ N, j ⁇ N.
  • Step S312 acquiring a first partial image in a first image of the paired image centering on the pixel point of the preset position, and acquiring a second partial image in the second image of the paired image.
  • a partial image of length W pixels may be acquired in I i centering on the pixel of the preset position. Obtain a partial image of length W pixels in I j
  • Step S313 according to the ratio of the Fourier transform of the first partial image and the Fourier transform of the second partial image, and the Fourier transform of the pixel point blur function in the first image and the first
  • the relationship between the ratios of the Fourier transforms of the pixel point blurring functions in the two images determines at least one diffuse spot radius.
  • Equation 1 can be calculated first:
  • F() denotes a Fourier transform
  • S W denotes an accurate in-focus image of the original image corresponding to the image
  • h i (x, y) denotes a fuzzy function of the pixel point (x, y) in I i
  • h j (x, y) represents a fuzzy function of pixel points in I j ;
  • the formula 2 is calculated:
  • R i (x, y) is the diffusion spot radius of the pixel point (x, y) in I i
  • R j (x, y) is the diffusion spot radius of the pixel point (x, y) in I j
  • (u , v) represents the coordinates of the pixel point (x, y) in the frequency domain
  • At least one R i (x, y) can be determined.
  • the determining the at least one diffuse radii includes:
  • the coordinates of the pixel points in the relationship in the frequency domain are assigned to determine the diffusion spot radius.
  • u and v can be assigned values, each new (u, v) is determined by the assignment, and by solving the second formula, a new R i (x, y) can be obtained, which is specifically assigned. The number of times can be set as needed.
  • the determining the at least one diffuse radii includes:
  • the fringe spot radius is determined by solving a least squares relationship of coordinates of the pixel points in the frequency domain in the relationship with the paired image.
  • 0.5N (N-1) image pairs (I i , I j ) and W ⁇ W (x, y) corresponding W ⁇ W (u, v) least squares can be constructed relationship:
  • This formula involves quadratic programming problems, which can be solved by using the mathematical tool library in the related art, and then squared to determine the diffusion spot radius of the pixel in each image, that is, That is: get R i (x, y) of any image.
  • the pixel as the center is preset or selected in real time.
  • the preset position corresponding to the pixel point may be selected by the user in real time, or may be preset, for example, preset.
  • the center position of the image may be selected by the user in real time, or may be preset, for example, preset.
  • the determining, according to the diffusion spot radius, the depth value of the pixel in the image for the image whose sequence number is smaller than the first serial number and the image whose serial number is greater than the first serial number respectively:
  • the depth value of the pixel in the image is determined according to the aperture radius of the image, the aperture value of the image acquisition device, the focal length, and the object distance of the pixel in the image.
  • the image based on the diffusion angle and the image having a serial number smaller than the first serial number and an image whose serial number is greater than the first serial number respectively Calculating the depth values of the pixels in the image includes:
  • Figure 6 is a schematic illustration of a depth value in accordance with one embodiment of the present invention.
  • the depth value can be calculated according to the above formula.
  • Figure 7 is a schematic illustration of another depth value in accordance with one embodiment of the present invention.
  • the depth value can be calculated according to the above formula.
  • D i (x, y) is the depth value of the pixel point (x, y) in the i-th image I i of the N images
  • the focus distance of the i-th image I i in the N images, that is, the object distance, f is the common focal length
  • A is the aperture value
  • R i (x, y) is the pixel point in the i-th image in the N images (
  • the divergence radius of x, y), i is a positive integer less than or equal to N.
  • the image based on the diffusion spot radius is smaller than the image whose sequence number is smaller than the first serial number and the image whose serial number is greater than the first serial number respectively.
  • D i (x, y) is the depth value of the pixel point (x, y) in the i-th image I i of the N images
  • the focus distance of the i-th image I i in the N images, that is, the object distance, f is the common focal length
  • A is the aperture value
  • R i (x, y) is the pixel point in the ith image in the N images (
  • the divergence radius of x, y), i is a positive integer less than or equal to N.
  • calculating the depth value of the pixel in the image according to the above two methods, firstly distinguishing the adjustable distance from the maximum imaging distance to the minimum imaging distance, and adjusting the adjustable distance from the minimum imaging distance to the maximum imaging distance.
  • the image with the serial number greater than the first serial number and the image with the serial number smaller than the first serial number may be further distinguished, thereby ensuring comprehensive and accurate calculation of the depth value of the pixel point in the image.
  • the method before calculating the divergence radius of the pixel in the image, the method further includes:
  • the image is processed linearly.
  • the linear processing may include processing such as demosaicing, white balance, etc., such that the linearly processed picture retains only linear characteristics, and the processed N images are correspondingly recorded as The common focal length is recorded as f, the aperture is recorded as A, and the focus distance is recorded as
  • the method further includes:
  • the target image is sharpened, and/or subjected to blur compensation and/or weakening processing.
  • an image in the N images, an image may be selected by the user as the target image, or an image may be automatically determined by the image capturing device in the N images according to a preset rule as a target image, and then the target is The image is sharpened to sharpen portions of the image, and/or to perform blur compensation and/or weakening processing to blur portions of the image.
  • the determining, by the received instruction, the target image in the N images comprises:
  • the user can perform a click operation on the touch screen displaying the picture, and the position corresponding to the click operation is the target position, and then the target depth value of the pixel obtained by the embodiment shown in FIG. 1 can be used. Determining a target depth value of the pixel of the position, and then comparing a depth value of the pixel point of the position in each image of the N image with a target depth value of the pixel point of the position, and determining an image corresponding to the depth value with the smallest difference For the target image.
  • performing the sharpening process on the target image includes:
  • the user can clearly see the pattern formed by the pixel points of the pixel, and thus can Sharpen it to make it more sharp, thus highlighting the difference between this type of pixel and other pixels.
  • the calculating the foreground depth and the back depth of field comprises:
  • d o,j is the focusing distance of the pixel points (x, y) in the preset image in the N images, that is, the object distance
  • f is the common focal length
  • A is the aperture value
  • R l is the preset limit circle radius .
  • performing the sharpening process on the first type of pixel points includes:
  • the first type of pixels are sharpened by frequency domain inverse filtering.
  • the method before determining the first type of pixel points, the method further includes:
  • the determining, according to the depth value, the first type of pixel points in the image between the foreground depth and the back depth of field includes:
  • a first type of pixel point located between the foreground depth and the back depth of field in the in-focus image is determined according to the depth value.
  • a pixel point having a small difference is determined according to a difference between the depth value and the object distance, and then the partial image is determined centering on the pixel point, and then the partial image in the N image is synthesized.
  • the resulting composite image with a high degree of focus is convenient for subsequent sharpening of the composite image.
  • the performing blur compensation and/or weakening processing on the target image includes:
  • the second type of pixel is subjected to blur compensation and/or weakening processing.
  • the user cannot clearly see the pattern formed by the pixel-like points of the pixel, and thus It can be subjected to blur compensation and/or weakening processing to further blur it, thereby highlighting the difference between such pixel points and other pixel points.
  • the performing fuzzy compensation and/or weakening processing on the second type of pixel points includes:
  • d o,j is the focusing distance of the pixel points (x, y) in the preset image in the N image, that is, the object distance
  • f is the common focal length
  • A is the aperture value
  • A' is the virtual aperture value
  • R l is The preset limit is the radius of the circle.
  • the true circle radius R(x, y) is brought into Equation 3:
  • F() denotes a Fourier transform and F -1 () denotes an inverse Fourier transform;
  • F -1 () denotes an inverse Fourier transform;
  • a spatially variable convolution operation is performed to achieve fuzzy compensation and/or weakening of pixels.
  • the method before determining the second type of pixel points, the method further includes:
  • the determining, according to the depth value, the second type of pixel points in the image that are not located between the foreground depth and the back depth of field includes:
  • a pixel point having a small difference is determined according to a difference between the depth value and the object distance, and then the partial image is determined centering on the pixel point, and then the partial image in the N image is synthesized.
  • the obtained composite image with high focusing degree is convenient for the blur compensation and/or weakening processing of the composite image.
  • the imaging distance corresponding to the first image in the N images is less than or equal to one focal length, and the imaging distance corresponding to the Nth image is greater than or equal to twice the focal length;
  • the imaging distance corresponding to the first image in the N images is equal to one focal length, and the imaging distance corresponding to the second image is equal to twice the focal length.
  • the imaging distance of the acquired image can cover at least one focal length and two times the focal length, thereby ensuring the accuracy of the subsequent calculation of the target depth value.
  • the method further includes:
  • the focal length of the image acquisition device may be preset to perform the steps of the embodiment shown in FIG. 1 in the case of determining the focal length, to ensure that the focal length of each acquired image is unchanged, thereby ensuring subsequent calculation of the target depth value. The accuracy.
  • the image sensor is moved by a piezoelectric motor.
  • the piezoelectric motor is driven based on the piezoelectric inverse effect, has little effect on external electromagnetic interference and noise, is small in size, and is relatively inexpensive to manufacture. Helps reduce product costs and improve endurance.
  • the above embodiment may be applied to the case of first focusing and then acquiring an image; or applying the image first and then focusing.
  • the depth value may be determined according to the above embodiment, and then the focus is set for the image after determining the depth value of the pixel to perform focusing.
  • the embodiment of the present invention further provides a depth value determining apparatus, which is suitable for an image capturing device, the image capturing device includes a lens and an image sensor, and the depth value determining device includes a processor, and the processor is configured to perform the following steps:
  • N is an integer less than or equal to M
  • a target depth value of a pixel point of a preset position in the image is determined according to a depth value of a pixel point in each image.
  • the processor is further configured to:
  • the adjustable distance is adjusted M times according to the same or different step values.
  • the processor is further configured to:
  • the image and the serial number whose serial number is smaller than the first serial number is greater than
  • the images of the first serial number respectively calculate the depth values of the pixels in the image.
  • the processor is further configured to:
  • a ratio of a Fourier transform of the first partial image and a Fourier transform of the second partial image, and a Fourier transform of the pixel point blur function in the first image and the second image determines at least one diffusion spot radius.
  • the processor is further configured to:
  • the coordinates of the pixel points in the relationship in the frequency domain are assigned to determine the diffusion spot radius.
  • the processor is further configured to:
  • the fringe spot radius is determined by solving a least squares relationship of coordinates of the pixel points in the frequency domain in the relationship with the paired image.
  • the pixel as the center is preset or selected in real time.
  • the processor is further configured to:
  • a depth value of a pixel point in the image is determined based on a speckle radius of the image, an aperture value of the image capture device, a focal length, and an object distance of a pixel in the image.
  • the processor is further configured to:
  • the image is linearly processed prior to calculating a speckle radius of the pixel in the image.
  • the processor is further configured to:
  • the target image is sharpened, and/or subjected to blur compensation and/or weakening processing.
  • the processor is further configured to:
  • Determining pixel points of the target position in the N images according to the input target position An image corresponding to a depth value in which a difference between the depth value and the target depth value is the smallest is the target image.
  • the processor is further configured to:
  • the processor is further configured to:
  • the first type of pixels are sharpened by frequency domain inverse filtering.
  • the processor is further configured to:
  • the processor is further configured to:
  • the second type of pixel is subjected to blur compensation and/or weakening processing.
  • the processor is further configured to:
  • the processor is further configured to:
  • the determining, according to the depth value, the second type of pixel points in the image that are not located between the foreground depth and the back depth of field includes:
  • a second type of pixel point in the in-focus image that is not located between the foreground depth and the back depth of field is determined according to the depth value.
  • the imaging distance corresponding to the first image in the N images is less than or equal to one focal length, and the imaging distance corresponding to the Nth image is greater than or equal to twice the focal length;
  • the imaging distance corresponding to the first image in the N images is equal to one focal length, and the imaging distance corresponding to the second image is equal to twice the focal length.
  • the processor is further configured to:
  • the focal length of the image capture device is set prior to adjusting the adjustable distance.
  • the processor is further configured to:
  • the image sensor is moved by a piezoelectric motor.
  • Embodiments of the present invention also provide a machine readable storage medium suitable for use in an image capture device, the image capture device comprising a lens and an image sensor, the machine readable storage medium having a plurality of computer instructions stored thereon, the computer instructions When executed, is used to implement the steps in the method described in any of the above embodiments.
  • N is an integer less than or equal to M
  • a target depth value of a pixel point of a preset position in the image is determined according to a depth value of a pixel point in each image.
  • the adjustable distance is adjusted M times according to the same or different step values.
  • a ratio of a Fourier transform of the first partial image and a Fourier transform of the second partial image, and a Fourier transform of the pixel point blur function in the first image and the second image determines at least one diffusion spot radius.
  • the coordinates of the pixel points in the relationship in the frequency domain are assigned to determine the diffusion spot radius.
  • the fringe spot radius is determined by solving a least squares relationship of coordinates of the pixel points in the frequency domain in the relationship with the paired image.
  • the pixel as the center is preset or selected in real time.
  • the computer instructions are executed as follows:
  • a depth value of a pixel point in the image is determined based on a speckle radius of the image, an aperture value of the image capture device, a focal length, and an object distance of a pixel in the image.
  • the image is linearly processed prior to calculating a speckle radius of the pixel in the image.
  • the target image is sharpened, and/or subjected to blur compensation and/or weakening processing.
  • the first type of pixels are sharpened by frequency domain inverse filtering.
  • the second type of pixel is subjected to blur compensation and/or weakening processing.
  • the determining, according to the depth value, the second type of pixel points in the image that are not located between the foreground depth and the back depth of field includes:
  • a second type of pixel point in the in-focus image that is not located between the foreground depth and the back depth of field is determined according to the depth value.
  • the imaging distance corresponding to the first image in the N images is less than or equal to one focal length, and the imaging distance corresponding to the Nth image is greater than or equal to twice the focal length;
  • the imaging distance corresponding to the first image in the N images is equal to one focal length
  • the imaging distance corresponding to the second image is equal to twice the focal length
  • the focal length of the image capture device is set prior to adjusting the adjustable distance.
  • the image sensor is moved by a piezoelectric motor.
  • Embodiments of the present invention also provide a removable device, including a lens and an image sensor, and further comprising one or more processors operating separately or in concert, the one or more processors for performing the following steps:
  • N is an integer less than or equal to M
  • a target depth value of a pixel point of a preset position in the image is determined according to a depth value of a pixel point in each image.
  • the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • the above devices are described separately by function into various units.
  • the functions of each unit may be implemented in the same software or software and/or hardware when implementing the present application.
  • Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

一种深度值确定方法,所述方法适用于图像采集设备,所述图像采集设备包括镜头和图像传感器,所述方法包括:通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数(S1);在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数(S2);计算采集到的N个图像中像素点的深度值(S3);根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值(S4)。根据所述方法,可以在无人工参与的情况下确定采集的图像对应的场景中每个位置的深度值,并且保证准确地确定深度值。

Description

深度值确定方法和装置 技术领域
本发明涉及图像技术领域,尤其涉及深度值确定方法、深度值确定装置和机器可读存储介质以及可移动设备。
背景技术
相机进行成像时,其镜头焦距和图像传感器平面到镜头的距离(成像距离)是固定的。根据凸透镜成像原理,可以得到物体到镜头的距离,也即物距do、镜头焦距f和成像距离di满足如下关系:
Figure PCTCN2017114020-appb-000001
也即
Figure PCTCN2017114020-appb-000002
当场景中的点与镜头距离不等于对焦距离物距do时,该点会在成像平面上会形成弥散斑。当弥散斑相对人眼的张角小于人眼的极限角分辨率时,人眼不会感觉到相应点存在不清晰现象,此时的弥散斑称为极限弥散圆。而当弥散斑相对人眼的张角不小于人眼的极限角分辨率时,人眼将能感受到场景虚化的现象。
如图1所示,设极限弥散圆半径为Rl,弥散斑大小不会被人眼感知的极限前景深do,f满足
Figure PCTCN2017114020-appb-000003
如图2所示,弥散斑大小不会被人眼感知的极限后景深do,b满足
Figure PCTCN2017114020-appb-000004
其中,A为相机的光圈值,δ为失焦距,di,f和di,b为像距。
为了针对场景拍摄出具有不同深度效果的图像,现有技术主要通过以下方式实现。
其一,由拍摄者人为调节焦距、光圈和物距,改变被拍摄物体成像的景深,从而对同一场景拍摄出具有不同虚化效果的照片。根据这种方式无法提取出场景的深度,并且人工对焦可能存在误差。
其二,通过一部相机在从不同方向对同一场景进行拍摄,再利用已知的相机内部参数,结合特征匹配等技术标定出各张照片对应的相机姿态信息,进而利用多张图片的视角差对场景进行三维重建,得出场景的深度图,最后根据深度图可以对拍摄的图像进行调整。根据这种方式,由于相机在不同方位的相对姿态变化是不确定的,而对相机姿态的估计往往存在较大偏差,从而直接影响到后续深度的计算,最终影响对图像调整的精确度。
发明内容
本发明提供深度值确定方法、深度值确定装置和机器可读存储介质以及可移动设备,以解决现有技术中的技术问题。
根据本发明的第一方面,提出一种深度值确定方法,适用于图像采集设备,所述图像采集设备包括镜头和图像传感器,所述方法包括:
通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数;
在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数;
计算采集到的N个图像中像素点的深度值;
根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
根据本发明的第二方面,提出一种深度值确定装置,适用于图像采集设备,所述图像采集设备包括镜头和图像传感器,所述深度值确定装置包括处理器,所述处理器用于执行如下步骤:
通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数;
在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数;
计算采集到的N个图像中像素点的深度值;
根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
根据本发明的第三方面,提出一种机器可读存储介质,适用于图像采集设备,所述图像采集设备包括镜头和图像传感器,所述机器可读存储介质上存储有若干计算机指令,所述计算机指令被执行时用于实现上述任一实施例所述方法中的步骤。
根据本发明的第四方面,提出一种可移动设备,包括镜头和图像传感器,还包括单独或者协同工作的一个或者多个处理器,所述一个或者多个处理器用于执行以下步骤:
通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数;
在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数;
计算采集到的N个图像中像素点的深度值;
根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
由以上本发明实施例提供的技术方案可见,一方面可以在无人工参与的情况下确定采集的图像对应的场景中每个位置的深度值,提高自动化程度,并且便于后期根据深度值调整图像的景深等参数。另一方面拍摄过程中无需移动改变拍摄位置,不仅降低操作的复杂度,还可以保证图像采集设备的姿态等参数固定,进而保证准确地确定深度值。再一方面,由于传感器在图像采集设备中结构一般并不复杂,因此便于移动,使得本实施例对应的技术方案便于实现。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是相关技术中极限前景深的示意图;
图2是相关技术中极限后景深的示意图;
图3是根据本发明一个实施例的一种深度值确定方法的示意流程图;
图4是根据本发明一个实施例的一种计算深度值的示意流程图;
图5是根据本发明一个实施例的一种计算弥散斑半径的示意流程图;
图6是根据本发明一个实施例的一种深度值的示意图;
图7是根据本发明一个实施例的另一种深度值的示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。另外,在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
图3是根据本发明一个实施例的一种深度值确定方法的示意流程图。本实施例所示的深度值确定方法可以适用于图像采集设备,例如相机、航拍无人机、手机等,所述图像采集设备包括镜头和图像传感器。如图1所示,本实施例中的深度值确定方法包括以下步骤:
步骤S1,通过移动所述图像传感器,调整所述图像传感器与所述镜头之 间的可调距离M次,其中,M为大于1的整数。
在一个实施例中,可以通过马达,例如压电马达控制图像传感器移动,其中,可以通过SOC(***芯片)向压电马达发送控制信号,使得压电马达驱动图像传感器移动。
在一个实施例中,移动图像传感器的过程可以是使得成像距离从最大成像距离到最小成像距离,也可以是使得成像距离从最小成像距离到最大成像距离。
在一个实施例中,每次移动图像传感器的可调距离可以相同,也可以不同,具体可以根据需要设置。
步骤S2,在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数。
在一个实施例中,可以通过SOC控制图像采集设备的快门,在移动距离传感器的过程中,SOC可以控制快门处于关闭状态,在所述N次中,每次移动过程结束后,SOC可以控制快门开启,从而进行曝光拍摄,获得当前物距下的图片。
在一个实施例中,N可以为小M的整数,也即在M次移动图像传感器的过程中,并非每次移动图像传感器后都采集图像,而是在其中N次移动图像传感器每次移动过程结束后才采集图像。
在一个实施例中,N可以为等于M的整数,也即在M次移动图像传感器的过程中,每次移动图像传感器后都采集图像。
以下实施例主要在M等于N的情况下进行示例性说明。
步骤S3,计算采集到的N个图像中像素点的深度值。
步骤S4,根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
在一个实施例中,针对N个图像中的每个图像,可以计算图像中每个像素点的深度值,进而针对图像中每个位置的像素点,可以分别计算N幅图像 中该位置的像素点的深度值的平均值,作为该位置像素点的目标深度值。
在一个实施例中,针对N个图像中的每个图像,可以计算图像中部分像素点的深度值,继而针对计算了深度值的像素点,可以分别计算N幅图像中该位置的像素点的深度值的平均值,作为该位置像素点的目标深度值。
在一个实施例中,可以先计算所述图像中所述预设位置的像素点的弥散斑半径,然后根据深度值与弥散斑半径之间的关系,选择与该关系对应的计算公式计算深度值。计算深度值的具体实施例在后续示出。
根据本发明的实施例,一方面可以在无人工参与的情况下确定采集的图像对应的场景中每个位置的深度值,提高自动化程度,并且便于后期根据深度值调整图像的景深等参数。另一方面拍摄过程中无需移动改变拍摄位置,不仅降低操作的复杂度,还可以保证图像采集设备的姿态等参数固定,进而保证准确地确定深度值。再一方面,由于传感器在图像采集设备中结构一般并不复杂,因此便于移动,使得本实施例对应的技术方案便于实现。
可选地,所述调整所述图像传感器与所述镜头之间的可调距离M次包括:
按照相同和/或不同的步进值调整所述可调距离M次。
在一个实施例中,每次移动图像传感器的可调距离可以相同,也可以不同,具体可以根据需要设置。
图4是根据本发明一个实施例的一种计算深度值的示意流程图。如图4所示,在图1所示实施例的基础上,所述计算采集到的N个图像中像素点的深度值包括:
步骤S31,计算所述图像中所述预设位置的像素点的弥散斑半径;
步骤S32,根据所述N个图像的采集顺序为所述N个图像设置序号;
步骤S33,确定所述弥散斑半径中的最小弥散斑半径,以及对应的图像在所述N个图像中的第一序号;
步骤S34,基于所述弥散斑半径,针对序号小于所述第一序号的图像和序 号大于所述第一序号的图像分别计算图像中像素点的深度值。
在一个实施例中,由于N个图像是在移动图像传感器的过程中获取的,而对于在达到最小弥散斑半径的图像之前获取的图像,和在达到最小弥散斑半径的图像之后获取的图像,图像中像素点深度值与弥散斑半径的关系有所不同,因此可以对N个图像按照采集顺序顺序设置序号,并且每个图像的序号与最小弥散斑半径对应的图像的第一序号的关系,来确定在最小弥散斑半径的图像之前获取的图像,和在最小弥散斑半径的图像之后获取的图像,进而保证准确地确定弥散斑半径与深度值之间的关系。
需要说明的是,按照采集顺序设置序号除了包括按照采集顺序顺序设置序号,还包括按照采集顺序逆序设置序号。
图5是根据本发明一个实施例的一种计算弥散斑半径的示意流程图。如图5所示,在图4所示实施例的基础上,所述算所述图像中所述预设位置的像素点的弥散斑半径包括:
步骤S311,将所述N幅图像两两配对。
在一个实施例中,将所述N幅图像两两配对,得到0.5N(N-1)个图像对(Ii,Ij),Ii和Ij分别为所述N幅图像中的任一幅图像,i和j为整数,且i≤N,j≤N。
步骤S312,以所述预设位置的像素点为中心在配对图像的第一图像中获取第一局部图像,在配对图像的第二图像中获取第二局部图像。
在一个实施例中,可以以所述预设位置的像素点为中心,在Ii中获取长度为W个像素点的局部图像
Figure PCTCN2017114020-appb-000005
在Ij中获取长度为W个像素点的局部图像
Figure PCTCN2017114020-appb-000006
步骤S313,根据所述第一局部图像的傅里叶变换和所述第二局部图像的傅里叶变换的比值,与所述第一图像中像素点模糊函数的傅里叶变换和所述第二图像中像素点模糊函数的傅里叶变换的比值的关系,确定至少一个弥散斑半径。
在一个实施例中,可以先计算计算式一:
Figure PCTCN2017114020-appb-000007
其中,F()表示傅里叶变换,SW表示所述图像对应的原始图像的准确对焦图像,hi(x,y)表示Ii中像素点(x,y)的模糊函数,hj(x,y)表示Ij中像素点的模糊函数;
根据所述式一,以及模糊函数和弥散斑半径之间的高斯模型关系,计算式二:
Figure PCTCN2017114020-appb-000008
其中,Ri(x,y)为Ii中像素点(x,y)的弥散斑半径,Rj(x,y)为Ij中像素点(x,y)的弥散斑半径,(u,v)表示像素点(x,y)在频域上对应的坐标;
进而通过求解所述式二,可以确定至少一个Ri(x,y)。
可选地,所述确定至少一个弥散斑半径包括:
为所述关系中的像素点在频域上的坐标赋值,以确定所述弥散斑半径。
在一个实施例中,可以为u和v赋值,通过赋值每确定一个新的(u,v),通过解所述式二,就可以得到一个新的Ri(x,y),具体赋值的次数可以根据需要设置。
可选地,所述确定至少一个弥散斑半径包括:
通过求解所述关系中的像素点在频域上的坐标与所述配对的图像的最小二乘关系,确定所述弥散斑半径。
在一个实施例中,可以构建0.5N(N-1)个图像对(Ii,Ij)和W×W个(x,y)对应的W×W个(u,v)的最小二乘关系:
Figure PCTCN2017114020-appb-000009
该式涉及二次规划问题,可以利用相关技术中的数学工具库求解,然后开平方之后即可确 定每个图像中像素点的弥散斑半径,也即
Figure PCTCN2017114020-appb-000010
即:得到任一图像的Ri(x,y)。
可选地,所述作为中心的像素点为预先设定的或被实时选定的。
在一个实施例中,作为中心的像素点,也即所述预设位置的像素点,该像素点对应的预设位置可以是用户实时选择的,也可以是预先设定的,例如预先设定为图像的中心位置。
可选地,所述基于所述弥散斑半径,针对序号小于所述第一序号的图像和序号大于所述第一序号的图像分别计算图像中像素点的深度值包括:
根据图像的弥散斑半径,所述图像采集设备的光圈值、焦距和所述图像中像素点的物距,确定所述图像中像素点的深度值。
其中,在所述可调距离从最大成像距离到最小成像距离的情况下,所述基于所述弥散斑半径,针对序号小于所述第一序号的图像和序号大于所述第一序号的图像分别计算图像中像素点的深度值包括:
针对序号i小于第一序号的图像,计算图像中像素点(x,y)的深度值
Figure PCTCN2017114020-appb-000011
图6是根据本发明一个实施例的一种深度值的示意图。
在一个实施例中,如图6所示,若图像的序号小于第一序号,那么其中像素点的深度大于
Figure PCTCN2017114020-appb-000012
因此可以根据上式计算深度值。
针对序号i大于第一序号的图像,计算图像中像素点(x,y)的深度值
Figure PCTCN2017114020-appb-000013
图7是根据本发明一个实施例的另一种深度值的示意图。
在一个实施例中,如图7所示,若图像的序号大于第一序号,那么其中像素点的深度小于
Figure PCTCN2017114020-appb-000014
因此可以根据上式计算深度值。
其中,Di(x,y)为N幅图像中第i幅图像Ii中像素点(x,y)的深度值,
Figure PCTCN2017114020-appb-000015
为N幅图像中第i幅图像Ii的对焦距离,即物距,f为共同焦距,A为光圈值,Ri(x,y) 为N幅图像中的第i幅图像中像素点(x,y)的弥散斑半径,i为小于等于N的正整数。
其中,在所述可调距离从最小成像距离到最大成像距离的情况下,所述基于所述弥散斑半径,针对序号小于所述第一序号的图像和序号大于所述第一序号的图像分别计算图像中像素点的深度值包括:
针对序号i小于第一序号的图像,计算图像中像素点(x,y)的深度值
Figure PCTCN2017114020-appb-000016
针对序号i大于第一序号的图像,计算图像中像素点(x,y)的深度值
Figure PCTCN2017114020-appb-000017
其中,Di(x,y)为N幅图像中第i幅图像Ii中像素点(x,y)的深度值,
Figure PCTCN2017114020-appb-000018
为N幅图像中第i幅图像Ii的对焦距离,即物距,f为共同焦距,A为光圈值,Ri(x,y)为N幅图像中的第i幅图像中像素点(x,y)的弥散斑半径,i为小于等于N的正整数。
在一个实施例中,根据上述两种方式计算图像中像素点的深度值,首先可以区分可调距离从最大成像距离到最小成像距离,以及可调距离从最小成像距离到最大成像距离两种情况,还可以在这种情况下分别进一步区分序号大于第一序号的图像以及序号小于第一序号的图像,从而保证对于图像中像素点的深度值能够进行全面且准确的计算。
可选地,在计算所述图像中所述像素点的弥散斑半径之前,还包括:
对所述图像进行线性处理。
在一个实施例中,线性处理可以包括去马赛克、白平衡等处理,从而使得线性处理后的图片仅保留线性特性,处理后的N张图像对应记为
Figure PCTCN2017114020-appb-000019
共同焦距记为f,光圈记为A,对焦距离记为
Figure PCTCN2017114020-appb-000020
可选地,在图1所示实施例的基础上,所述方法还包括:
根据接收的指令在所述N幅图像中确定目标图像,或根据预设规则在所 述N幅图像中确定目标图像;
对所述目标图像进行进行锐化处理,和/或进行模糊补偿和/或弱化处理。
在一个实施例中,在N幅图像中,可以由用户选择一幅图像作为目标图像,也可以由图像采集设备根据预设规则在N幅图像中自动确定一幅图像作为目标图像,然后对目标图像进行锐化处理,从而使得图像中的部分区域清晰化,和/或进行模糊补偿和/或弱化处理,从而使得图像中的部分区域模糊化。
可选地,所述根据接收的指令在所述N幅图像中确定目标图像包括:
根据输入的目标位置,在所述N幅图像中确定所述目标位置的像素点的深度值与所述目标深度值差异最小的深度值对应的图像为所述目标图像。
在一个实施例中,用户可以在显示图片的触控屏幕上执行点击操作,点击操作所对应的位置即为目标位置,进而可以根据通过图1所示实施例得到的像素点的目标深度值,确定该位置的像素点的目标深度值,然后将N幅图像中每个图像该位置的像素点的深度值与该位置的像素点的目标深度值比较,确定其中差异最小的深度值对应的图像为目标图像。
可选地,所述对所述目标图像进行进行锐化处理包括:
针对所述目标图像计算前景深和后景深;
确定所述目标图像中目标深度值位于所述前景深和所述后景深之间的第一类像素点;
对所述第一类像素点进行锐化处理。
在一个实施例中,针对目标图像中目标深度值位于所述前景深和所述后景深之间的第一类像素点,用户可以清晰看到由该类像素带点所构成的图案,因此可以对其进行锐化处理,使其进一步清晰化,从而凸显该类像素点与其他像素点的差异。
可选地,所述计算前景深和后景深包括:
计算前景深
Figure PCTCN2017114020-appb-000021
计算后景深
Figure PCTCN2017114020-appb-000022
其中,do,j为N幅图像中预设图像中像素点(x,y)的对焦距离,即物距,f为共同焦距,A为光圈值,Rl为预设的极限弥散圆半径。
可选地,所述对所述第一类像素点进行锐化处理包括:
对所述第一类像素采用频域逆滤波进行锐化。
可选地,在确定所述第一类像素点之前,还包括:
确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
其中,所述根据所述深度值确定所述图像中位于所述前景深和所述后景深之间的第一类像素点包括:
根据所述深度值确定所述对焦图像中位于所述前景深和所述后景深之间的第一类像素点。
在一个实施例中,根据深度值和物距的差异确定差异较小(小于预设值)的像素点,然后以该像素点为中心确定局部图像,再将N幅图像中的局部图像合成,得到的即对焦度很高的合成图像,便于接下来再对合成图像进行锐化处理。
可选地,所述对所述目标图像进行模糊补偿和/或弱化处理包括:
针对所述目标图像计算前景深和后景深;
确定所述目标图像中目标深度值不位于所述前景深和所述后景深之间的第二类像素点;
对所述第二类像素点进行模糊补偿和/或弱化处理。
在一个实施例中,针对目标图像中目标深度值不位于所述前景深和所述后景深之间的第二类像素点,用户不能清晰看到由该类像素带点所构成的图案,因此可以对其进行模糊补偿和/或弱化处理,使其进一步模糊化,从而凸显该类像素点与其他像素点的差异。
可选地,所述对所述第二类像素点进行模糊补偿和/或弱化处理包括:
针对所述第二类像素点计算真实弥散圆半径R(x,y)以及虚拟弥散圆半径R'(x,y);
Figure PCTCN2017114020-appb-000023
其中,D(x,y)<do,j
Figure PCTCN2017114020-appb-000024
其中,D(x,y)>do,j
Figure PCTCN2017114020-appb-000025
其中,D(x,y)<do,j
Figure PCTCN2017114020-appb-000026
其中,D(x,y)>do,j
其中,do,j为N幅图像中预设图像中像素点(x,y)的对焦距离,即物距,f为共同焦距,A为光圈值,A’为虚拟光圈值,Rl为预设的极限弥散圆半径。
根据所述真实弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关系确定真实模糊函数;
根据所述虚拟弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关系确定虚拟模糊函数;
在一个实施例中,将真实弥散圆半径R(x,y)带入式三:
Figure PCTCN2017114020-appb-000027
得到真实模糊函数h(x,y),其中,hi(x,y)为N幅图像中第i幅图像Ii的模糊函数,i≤N,且i为整数;
将虚拟弥散圆半径R'(x,y)带入所述式三得到虚拟模糊函数h'(x,y);
计算所述第二类像素点的虚拟模糊函数的傅里叶变换与真实模糊函数的傅里叶变换的比值的傅里叶逆变换的值,与所述目标图像的可变卷积操作的值。
在一个实施例中,计算
Figure PCTCN2017114020-appb-000028
其中,F()表示傅里叶变换, F-1()表示傅里叶逆变换;然后计算
Figure PCTCN2017114020-appb-000029
Figure PCTCN2017114020-appb-000030
表示空间可变卷积操作,即可实现对像素点的模糊补偿和/或弱化处理。
可选地,在确定所述第二类像素点之前,还包括:
确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
其中,所述根据所述深度值确定所述图像中不位于所述前景深和所述后景深之间的第二类像素点包括:
所述根据所述深度值确定所述对焦图像中不位于所述前景深和所述后景深之间的第二类像素点。
在一个实施例中,根据深度值和物距的差异确定差异较小(小于预设值)的像素点,然后以该像素点为中心确定局部图像,再将N幅图像中的局部图像合成,得到的即对焦度很高的合成图像,便于接下来再对合成图像进行模糊补偿和/或弱化处理。
可选地,若N>2,所述N幅图像中的第一幅图像对应的成像距离小于或等于一倍焦距,第N幅图像对应的成像距离大于或等于二倍焦距;
若N=2,所述N幅图像中的第一幅图像对应的成像距离等于一倍焦距,第二幅图像对应的成像距离等于二倍焦距。
根据本实施例,可以保证采集的图像的成像距离至少能够覆盖一倍焦距和二倍焦距,进而保证后续计算目标深度值的准确性。而在N=2的情况下,可以极大地减少采集图像的数目,从而降低计算目标深度值的复杂度。
可选地,在调整所述可调距离之前,还包括:
设置所述图像采集设备的焦距。
在一个实施例中,可以预先设置图像采集设备的焦距,以便在确定焦距的情况下执行图1所示实施例的步骤,保证每次获取的图像的焦距不变,进而保证后续计算目标深度值的准确性。
可选地,通过压电马达移动所述图像传感器。
在一个实施例中,压电马达是基于压电逆效应进行驱动的,对外界的电磁干扰和噪声影响很小,体积较小,并且制造成本也较小。有利于降低产品成本,并提升续航能力。
需要说明的是,以上实施例可以应用于先对焦,后采集图像的情况;也可以应用先采集图像,后对焦的情况。在先采集图像,后对焦的情况下,对于采集到的图像中的所有像素点,都可以根据上述实施例确定深度值,然后针对确定了像素点的深度值之后的图像设置焦距进行对焦。
本发明的实施例还提出一种深度值确定装置,适用于图像采集设备,所述图像采集设备包括镜头和图像传感器,所述深度值确定装置包括处理器,所述处理器用于执行如下步骤:
通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数;
在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数;
计算采集到的N个图像中像素点的深度值;
根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
可选地,所述处理器还用于执行:
按照相同或不同的步进值调整所述可调距离M次。
可选地,所述处理器还用于执行:
计算所述图像中所述预设位置的像素点的弥散斑半径;
根据所述N个图像的采集顺序确定所述N个图像设置序号;
确定所述弥散斑半径中的最小弥散斑半径,以及对应的图像在所述N个图像中的第一序号;
基于所述弥散斑半径,针对序号小于所述第一序号的图像和序号大于所 述第一序号的图像分别计算图像中像素点的深度值。
可选地,所述处理器还用于执行:
将所述N幅图像两两配对;
以所述预设位置的像素点为中心在配对图像的第一图像中获取第一局部图像,在配对图像的第二图像中获取第二局部图像;
根据所述第一局部图像的傅里叶变换和所述第二局部图像的傅里叶变换的比值,与所述第一图像中像素点模糊函数的傅里叶变换和所述第二图像中像素点模糊函数的傅里叶变换的比值的关系,确定至少一个弥散斑半径。
可选地,所述处理器还用于执行:
为所述关系中的像素点在频域上的坐标赋值,以确定所述弥散斑半径。
可选地,所述处理器还用于执行:
通过求解所述关系中的像素点在频域上的坐标与所述配对的图像的最小二乘关系,确定所述弥散斑半径。
可选地,所述作为中心的像素点为预先设定的或被实时选定的。
可选地,在所述可调距离从最大成像距离到最小成像距离的情况下,所述处理器还用于执行:
根据图像的弥散斑半径、所述图像采集设备的光圈值、焦距和所述图像中像素点的物距,确定所述图像中像素点的深度值。
可选地,所述处理器还用于执行:
在计算所述图像中所述像素点的弥散斑半径之前,对所述图像进行线性处理。
可选地,所述处理器还用于执行:
根据接收的指令在所述N幅图像中确定目标图像,或根据预设规则在所述N幅图像中确定目标图像;
对所述目标图像进行进行锐化处理,和/或进行模糊补偿和/或弱化处理。
可选地,所述处理器还用于执行:
根据输入的目标位置,在所述N幅图像中确定所述目标位置的像素点的 深度值与所述目标深度值差异最小的深度值对应的图像为所述目标图像。
可选地,所述处理器还用于执行:
针对所述目标图像计算前景深和后景深;
确定所述目标图像中目标深度值位于所述前景深和所述后景深之间的第一类像素点;
对所述第一类像素点进行锐化处理。
可选地,所述处理器还用于执行:
对所述第一类像素采用频域逆滤波进行锐化。
可选地,所述处理器还用于执行:
在确定所述第一类像素点之前,确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
以及根据所述深度值确定所述对焦图像中位于所述前景深和所述后景深之间的第一类像素点。
可选地,所述处理器还用于执行:
针对所述目标图像计算前景深和后景深;
确定所述目标图像中目标深度值不位于所述前景深和所述后景深之间的第二类像素点;
对所述第二类像素点进行模糊补偿和/或弱化处理。
可选地,所述处理器还用于执行:
针对所述第二类像素点计算真实弥散圆半径以及虚拟弥散圆半径;
根据所述真实弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关系确定真实模糊函数;
根据所述虚拟弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关系确定虚拟模糊函数;
计算所述第二类像素点的虚拟模糊函数的傅里叶变换与真实模糊函数的 傅里叶变换的比值的傅里叶逆变换的值,与所述目标图像的可变卷积操作的值。
可选地,所述处理器还用于执行:
在确定所述第二类像素点之前,确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
其中,所述根据所述深度值确定所述图像中不位于所述前景深和所述后景深之间的第二类像素点包括:
根据所述深度值确定所述对焦图像中不位于所述前景深和所述后景深之间的第二类像素点。
可选地,若N>2,所述N幅图像中的第一幅图像对应的成像距离小于或等于一倍焦距,第N幅图像对应的成像距离大于或等于二倍焦距;
若N=2,所述N幅图像中的第一幅图像对应的成像距离等于一倍焦距,第二幅图像对应的成像距离等于二倍焦距。
可选地,所述处理器还用于执行:
在调整所述可调距离之前,设置所述图像采集设备的焦距。
可选地,所述处理器还用于执行:
通过压电马达移动所述图像传感器。
本发明的实施例还提出一种机器可读存储介质,适用于图像采集设备,所述图像采集设备包括镜头和图像传感器,所述机器可读存储介质上存储有若干计算机指令,所述计算机指令被执行时用于实现上述任一实施例所述方法中的步骤。
可选地,所述计算机指令被执行时进行如下处理:
通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数;
在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数;
计算采集到的N个图像中像素点的深度值;
根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
可选地,所述计算机指令被执行时进行如下处理:
按照相同或不同的步进值调整所述可调距离M次。
可选地,所述计算机指令被执行时进行如下处理:
计算所述图像中所述预设位置的像素点的弥散斑半径;
根据所述N个图像的采集顺序确定所述N个图像设置序号;
确定所述弥散斑半径中的最小弥散斑半径,以及对应的图像在所述N个图像中的第一序号;
基于所述弥散斑半径,针对序号小于所述第一序号的图像和序号大于所述第一序号的图像分别计算图像中像素点的深度值。
可选地,所述计算机指令被执行时进行如下处理:
将所述N幅图像两两配对;
以所述预设位置的像素点为中心在配对图像的第一图像中获取第一局部图像,在配对图像的第二图像中获取第二局部图像;
根据所述第一局部图像的傅里叶变换和所述第二局部图像的傅里叶变换的比值,与所述第一图像中像素点模糊函数的傅里叶变换和所述第二图像中像素点模糊函数的傅里叶变换的比值的关系,确定至少一个弥散斑半径。
可选地,所述计算机指令被执行时进行如下处理:
为所述关系中的像素点在频域上的坐标赋值,以确定所述弥散斑半径。
可选地,所述计算机指令被执行时进行如下处理:
通过求解所述关系中的像素点在频域上的坐标与所述配对的图像的最小二乘关系,确定所述弥散斑半径。
可选地,所述作为中心的像素点为预先设定的或被实时选定的。
可选地,在所述可调距离从最大成像距离到最小成像距离的情况下,所述计算机指令被执行时进行如下处理:
根据图像的弥散斑半径、所述图像采集设备的光圈值、焦距和所述图像中像素点的物距,确定所述图像中像素点的深度值。
可选地,所述计算机指令被执行时还进行如下处理:
在计算所述图像中所述像素点的弥散斑半径之前,对所述图像进行线性处理。
可选地,所述计算机指令被执行时还进行如下处理:
根据接收的指令在所述N幅图像中确定目标图像,或根据预设规则在所述N幅图像中确定目标图像;
对所述目标图像进行进行锐化处理,和/或进行模糊补偿和/或弱化处理。
可选地,所述计算机指令被执行时进行如下处理:
根据输入的目标位置,在所述N幅图像中确定所述目标位置的像素点的深度值与所述目标深度值差异最小的深度值对应的图像为所述目标图像。
可选地,所述计算机指令被执行时进行如下处理:
针对所述目标图像计算前景深和后景深;
确定所述目标图像中目标深度值位于所述前景深和所述后景深之间的第一类像素点;
对所述第一类像素点进行锐化处理。
可选地,所述计算机指令被执行时进行如下处理:
对所述第一类像素采用频域逆滤波进行锐化。
可选地,所述计算机指令被执行时进行如下处理:
在确定所述第一类像素点之前,确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
以及根据所述深度值确定所述对焦图像中位于所述前景深和所述后景深 之间的第一类像素点。
可选地,所述计算机指令被执行时进行如下处理:
针对所述目标图像计算前景深和后景深;
确定所述目标图像中目标深度值不位于所述前景深和所述后景深之间的第二类像素点;
对所述第二类像素点进行模糊补偿和/或弱化处理。
可选地,所述计算机指令被执行时进行如下处理:
针对所述第二类像素点计算真实弥散圆半径以及虚拟弥散圆半径;
根据所述真实弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关系确定真实模糊函数;
根据所述虚拟弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关系确定虚拟模糊函数;
计算所述第二类像素点的虚拟模糊函数的傅里叶变换与真实模糊函数的傅里叶变换的比值的傅里叶逆变换的值,与所述目标图像的可变卷积操作的值。
可选地,所述计算机指令被执行时进行如下处理:
在确定所述第二类像素点之前,确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
其中,所述根据所述深度值确定所述图像中不位于所述前景深和所述后景深之间的第二类像素点包括:
根据所述深度值确定所述对焦图像中不位于所述前景深和所述后景深之间的第二类像素点。
可选地,若N>2,所述N幅图像中的第一幅图像对应的成像距离小于或等于一倍焦距,第N幅图像对应的成像距离大于或等于二倍焦距;
若N=2,所述N幅图像中的第一幅图像对应的成像距离等于一倍焦距, 第二幅图像对应的成像距离等于二倍焦距。
可选地,所述计算机指令被执行时还进行如下处理:
在调整所述可调距离之前,设置所述图像采集设备的焦距。
可选地,所述计算机指令被执行时还进行如下处理:
通过压电马达移动所述图像传感器。
本发明的实施例还提出一种可移动设备,包括镜头和图像传感器,还包括单独或者协同工作的一个或者多个处理器,所述一个或者多个处理器用于执行以下步骤:
通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数;
在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数;
计算采集到的N个图像中像素点的深度值;
根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
上述实施例阐明的***、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同 之处。尤其,对于***实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (42)

  1. 一种深度值确定方法,其特征在于,适用于图像采集设备,所述图像采集设备包括镜头和图像传感器,所述方法包括:
    通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数;
    在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数;
    计算采集到的N个图像中像素点的深度值;
    根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
  2. 根据权利要求1所述的方法,其特征在于,所述调整所述图像传感器与所述镜头之间的可调距离M次包括:
    按照相同或不同的步进值调整所述可调距离M次。
  3. 根据权利要求1所述的方法,其特征在于,所述计算采集到的N个图像中像素点的深度值包括:
    计算所述图像中所述预设位置的像素点的弥散斑半径;
    根据所述N个图像的采集顺序确定所述N个图像设置序号;
    确定所述弥散斑半径中的最小弥散斑半径,以及对应的图像在所述N个图像中的第一序号;
    基于所述弥散斑半径,针对序号小于所述第一序号的图像和序号大于所述第一序号的图像分别计算图像中像素点的深度值。
  4. 根据权利要求3所述的方法,其特征在于,所述算所述图像中所述预设位置的像素点的弥散斑半径包括:
    将所述N幅图像两两配对;
    以所述预设位置的像素点为中心在配对图像的第一图像中获取第一局部图像,在配对图像的第二图像中获取第二局部图像;
    根据所述第一局部图像的傅里叶变换和所述第二局部图像的傅里叶变换 的比值,与所述第一图像中像素点模糊函数的傅里叶变换和所述第二图像中像素点模糊函数的傅里叶变换的比值的关系,确定至少一个弥散斑半径。
  5. 根据权利要求4所述的方法,其特征在于,所述确定至少一个弥散斑半径包括:
    为所述关系中的像素点在频域上的坐标赋值,以确定所述弥散斑半径。
  6. 根据权利要求4所述的方法,其特征在于,所述确定至少一个弥散斑半径包括:
    通过求解所述关系中的像素点在频域上的坐标与所述配对的图像的最小二乘关系,确定所述弥散斑半径。
  7. 根据权利要求4所述的方法,其特征在于,所述作为中心的像素点为预先设定的或被实时选定的。
  8. 根据权利要求3所述的方法,其特征在于,所述基于所述弥散斑半径,针对序号小于所述第一序号的图像和序号大于所述第一序号的图像分别计算图像中像素点的深度值包括:
    根据图像的弥散斑半径、所述图像采集设备的光圈值、焦距和所述图像中像素点的物距,确定所述图像中像素点的深度值。
  9. 根据权利要求3所述的方法,其特征在于,在计算所述图像中所述像素点的弥散斑半径之前,还包括:
    对所述图像进行线性处理。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,还包括:
    根据接收的指令在所述N幅图像中确定目标图像,或根据预设规则在所述N幅图像中确定目标图像;
    对所述目标图像进行进行锐化处理,和/或进行模糊补偿和/或弱化处理。
  11. 根据权利要求10所述的方法,其特征在于,所述根据接收的指令在所述N幅图像中确定目标图像包括:
    根据输入的目标位置,在所述N幅图像中确定所述目标位置的像素点的深度值与所述目标深度值差异最小的深度值对应的图像为所述目标图像。
  12. 根据权利要求10所述的方法,其特征在于,所述对所述目标图像进行进行锐化处理包括:
    针对所述目标图像计算前景深和后景深;
    确定所述目标图像中目标深度值位于所述前景深和所述后景深之间的第一类像素点;
    对所述第一类像素点进行锐化处理。
  13. 根据权利要求12所述的方法,其特征在于,所述对所述第一类像素点进行锐化处理包括:
    对所述第一类像素采用频域逆滤波进行锐化。
  14. 根据权利要求12所述的方法,其特征在于,在确定所述第一类像素点之前,还包括:
    确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
    通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
    其中,所述根据所述深度值确定所述图像中位于所述前景深和所述后景深之间的第一类像素点包括:
    根据所述深度值确定所述对焦图像中位于所述前景深和所述后景深之间的第一类像素点。
  15. 根据权利要求10所述的方法,其特征在于,所述对所述目标图像进行模糊补偿和/或弱化处理包括:
    针对所述目标图像计算前景深和后景深;
    确定所述目标图像中目标深度值不位于所述前景深和所述后景深之间的第二类像素点;
    对所述第二类像素点进行模糊补偿和/或弱化处理。
  16. 根据权利要求15所述的方法,其特征在于,所述对所述第二类像素点进行模糊补偿和/或弱化处理包括:
    针对所述第二类像素点计算真实弥散圆半径以及虚拟弥散圆半径;
    根据所述真实弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关系确定真实模糊函数;
    根据所述虚拟弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关系确定虚拟模糊函数;
    计算所述第二类像素点的虚拟模糊函数的傅里叶变换与真实模糊函数的傅里叶变换的比值的傅里叶逆变换的值,与所述目标图像的可变卷积操作的值。
  17. 根据权利要求15所述的方法,其特征在于,在确定所述第二类像素点之前,还包括:
    确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
    通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
    其中,所述根据所述深度值确定所述图像中不位于所述前景深和所述后景深之间的第二类像素点包括:
    根据所述深度值确定所述对焦图像中不位于所述前景深和所述后景深之间的第二类像素点。
  18. 根据权利要求1至9中任一项所述的方法,其特征在于,若N>2,所述N幅图像中的第一幅图像对应的成像距离小于或等于一倍焦距,第N幅图像对应的成像距离大于或等于二倍焦距;
    若N=2,所述N幅图像中的第一幅图像对应的成像距离等于一倍焦距,第二幅图像对应的成像距离等于二倍焦距。
  19. 根据权利要求1至9中任一项所述的方法,其特征在于,在调整所述可调距离之前,还包括:
    设置所述图像采集设备的焦距。
  20. 根据权利要求1至9中任一项所述的方法,其特征在于,通过压电马达移动所述图像传感器。
  21. 一种深度值确定装置,其特征在于,适用于图像采集设备,所述图 像采集设备包括镜头和图像传感器,所述深度值确定装置包括处理器,所述处理器用于执行如下步骤:
    通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数;
    在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数;
    计算采集到的N个图像中像素点的深度值;
    根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
  22. 根据权利要求21所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    按照相同或不同的步进值调整所述可调距离M次。
  23. 根据权利要求21所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    计算所述图像中所述预设位置的像素点的弥散斑半径;
    根据所述N个图像的采集顺序确定所述N个图像设置序号;
    确定所述弥散斑半径中的最小弥散斑半径,以及对应的图像在所述N个图像中的第一序号;
    基于所述弥散斑半径,针对序号小于所述第一序号的图像和序号大于所述第一序号的图像分别计算图像中像素点的深度值。
  24. 根据权利要求23所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    将所述N幅图像两两配对;
    以所述预设位置的像素点为中心在配对图像的第一图像中获取第一局部图像,在配对图像的第二图像中获取第二局部图像;
    根据所述第一局部图像的傅里叶变换和所述第二局部图像的傅里叶变换的比值,与所述第一图像中像素点模糊函数的傅里叶变换和所述第二图像中 像素点模糊函数的傅里叶变换的比值的关系,确定至少一个弥散斑半径。
  25. 根据权利要求24所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    为所述关系中的像素点在频域上的坐标赋值,以确定所述弥散斑半径。
  26. 根据权利要求24所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    通过求解所述关系中的像素点在频域上的坐标与所述配对的图像的最小二乘关系,确定所述弥散斑半径。
  27. 根据权利要求24所述的深度值确定装置,其特征在于,所述作为中心的像素点为预先设定的或被实时选定的。
  28. 根据权利要求23所述的深度值确定装置,其特征在于,在所述可调距离从最大成像距离到最小成像距离的情况下,所述处理器还用于执行:
    根据图像的弥散斑半径、所述图像采集设备的光圈值、焦距和所述图像中像素点的物距,确定所述图像中像素点的深度值。
  29. 根据权利要求23所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    在计算所述图像中所述像素点的弥散斑半径之前,对所述图像进行线性处理。
  30. 根据权利要求21至29中任一项所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    根据接收的指令在所述N幅图像中确定目标图像,或根据预设规则在所述N幅图像中确定目标图像;
    对所述目标图像进行进行锐化处理,和/或进行模糊补偿和/或弱化处理。
  31. 根据权利要求30所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    根据输入的目标位置,在所述N幅图像中确定所述目标位置的像素点的深度值与所述目标深度值差异最小的深度值对应的图像为所述目标图像。
  32. 根据权利要求30所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    针对所述目标图像计算前景深和后景深;
    确定所述目标图像中目标深度值位于所述前景深和所述后景深之间的第一类像素点;
    对所述第一类像素点进行锐化处理。
  33. 根据权利要求32所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    对所述第一类像素采用频域逆滤波进行锐化。
  34. 根据权利要求32所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    在确定所述第一类像素点之前,确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
    通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
    以及根据所述深度值确定所述对焦图像中位于所述前景深和所述后景深之间的第一类像素点。
  35. 根据权利要求30所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    针对所述目标图像计算前景深和后景深;
    确定所述目标图像中目标深度值不位于所述前景深和所述后景深之间的第二类像素点;
    对所述第二类像素点进行模糊补偿和/或弱化处理。
  36. 根据权利要求35所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    针对所述第二类像素点计算真实弥散圆半径以及虚拟弥散圆半径;
    根据所述真实弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关 系确定真实模糊函数;
    根据所述虚拟弥散圆半径和所述N幅图像中任一幅图像的模糊函数的关系确定虚拟模糊函数;
    计算所述第二类像素点的虚拟模糊函数的傅里叶变换与真实模糊函数的傅里叶变换的比值的傅里叶逆变换的值,与所述目标图像的可变卷积操作的值。
  37. 根据权利要求36所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    在确定所述第二类像素点之前,确定所述图像中深度值和物距的差值小于预设值的最佳像素点,以所述最佳像素点为中心在所述图像中确定局部图像;
    通过加权掩膜将N幅所述图像中每幅图像中的局部图像合成对焦图像;
    其中,所述根据所述深度值确定所述图像中不位于所述前景深和所述后景深之间的第二类像素点包括:
    根据所述深度值确定所述对焦图像中不位于所述前景深和所述后景深之间的第二类像素点。
  38. 根据权利要求21至29中任一项所述的深度值确定装置,其特征在于,若N>2,所述N幅图像中的第一幅图像对应的成像距离小于或等于一倍焦距,第N幅图像对应的成像距离大于或等于二倍焦距;
    若N=2,所述N幅图像中的第一幅图像对应的成像距离等于一倍焦距,第二幅图像对应的成像距离等于二倍焦距。
  39. 根据权利要求21至29中任一项所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    在调整所述可调距离之前,设置所述图像采集设备的焦距。
  40. 根据权利要求21至29中任一项所述的深度值确定装置,其特征在于,所述处理器还用于执行:
    通过压电马达移动所述图像传感器。
  41. 一种机器可读存储介质,其特征在于,适用于图像采集设备,所述图像采集设备包括镜头和图像传感器,所述机器可读存储介质上存储有若干计算机指令,所述计算机指令被执行时用于实现权利要求1至20中任一项所述方法中的步骤。
  42. 一种可移动设备,其特征在于,包括镜头和图像传感器,还包括单独或者协同工作的一个或者多个处理器,所述一个或者多个处理器用于执行以下步骤:
    通过移动所述图像传感器,调整所述图像传感器与所述镜头之间的可调距离M次,其中,M为大于1的整数;
    在所述M次的N次中,每次调整所述可调距离后采集图像,其中,N为小于或等于M的整数;
    计算采集到的N个图像中像素点的深度值;
    根据每个图像中像素点的深度值确定所述图像中预设位置的像素点的目标深度值。
PCT/CN2017/114020 2017-11-30 2017-11-30 深度值确定方法和装置 WO2019104670A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2017/114020 WO2019104670A1 (zh) 2017-11-30 2017-11-30 深度值确定方法和装置
CN201780014861.7A CN108701361A (zh) 2017-11-30 2017-11-30 深度值确定方法和装置
US16/887,942 US20200296259A1 (en) 2017-11-30 2020-05-29 Method and apparatus for determining depth value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/114020 WO2019104670A1 (zh) 2017-11-30 2017-11-30 深度值确定方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/887,942 Continuation US20200296259A1 (en) 2017-11-30 2020-05-29 Method and apparatus for determining depth value

Publications (1)

Publication Number Publication Date
WO2019104670A1 true WO2019104670A1 (zh) 2019-06-06

Family

ID=63844771

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/114020 WO2019104670A1 (zh) 2017-11-30 2017-11-30 深度值确定方法和装置

Country Status (3)

Country Link
US (1) US20200296259A1 (zh)
CN (1) CN108701361A (zh)
WO (1) WO2019104670A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866370A (zh) * 2020-05-28 2020-10-30 北京迈格威科技有限公司 合成全景深图像方法、装置、设备、介质及摄像头阵列和组件
CN112793527A (zh) * 2021-01-07 2021-05-14 刘美红 车辆保险杠自适应调控***
CN112816967B (zh) * 2021-02-03 2024-06-14 成都康烨科技有限公司 图像距离测量方法、装置、测距设备和可读存储介质
CN112987008A (zh) * 2021-02-09 2021-06-18 上海眼控科技股份有限公司 一种相对深度测量方法、装置、设备及存储介质
CN113888614B (zh) * 2021-09-23 2022-05-31 合肥的卢深视科技有限公司 深度恢复方法、电子设备和计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634588A (zh) * 2012-08-27 2014-03-12 联想(北京)有限公司 一种影像构成方法及电子设备
CN105791662A (zh) * 2014-12-22 2016-07-20 联想(北京)有限公司 电子设备和控制方法
CN106651941A (zh) * 2016-09-19 2017-05-10 深圳奥比中光科技有限公司 一种深度信息的采集方法以及深度测量***
US20170155889A1 (en) * 2015-11-30 2017-06-01 Altek Semiconductor Corp. Image capturing device, depth information generation method and auto-calibration method thereof
CN106875435A (zh) * 2016-12-14 2017-06-20 深圳奥比中光科技有限公司 获取深度图像的方法及***

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104603796A (zh) * 2012-04-26 2015-05-06 纽约市哥伦比亚大学理事会 在图像中交互式调焦的***、方法和媒体
CN103049906B (zh) * 2012-12-07 2015-09-30 清华大学深圳研究生院 一种图像深度提取方法
CN103440662B (zh) * 2013-09-04 2016-03-09 清华大学深圳研究生院 Kinect深度图像获取方法与装置
CN105163042B (zh) * 2015-08-03 2017-11-03 努比亚技术有限公司 一种虚化处理深度图像的装置和方法
CN105282443B (zh) * 2015-10-13 2019-06-14 哈尔滨工程大学 一种全景深全景图像成像方法
CN106231177A (zh) * 2016-07-20 2016-12-14 成都微晶景泰科技有限公司 场景深度测量方法、设备及成像装置
CN106454318B (zh) * 2016-11-18 2020-03-13 成都微晶景泰科技有限公司 立体成像方法及立体成像装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634588A (zh) * 2012-08-27 2014-03-12 联想(北京)有限公司 一种影像构成方法及电子设备
CN105791662A (zh) * 2014-12-22 2016-07-20 联想(北京)有限公司 电子设备和控制方法
US20170155889A1 (en) * 2015-11-30 2017-06-01 Altek Semiconductor Corp. Image capturing device, depth information generation method and auto-calibration method thereof
CN106651941A (zh) * 2016-09-19 2017-05-10 深圳奥比中光科技有限公司 一种深度信息的采集方法以及深度测量***
CN106875435A (zh) * 2016-12-14 2017-06-20 深圳奥比中光科技有限公司 获取深度图像的方法及***

Also Published As

Publication number Publication date
US20200296259A1 (en) 2020-09-17
CN108701361A (zh) 2018-10-23

Similar Documents

Publication Publication Date Title
WO2019104670A1 (zh) 深度值确定方法和装置
JP5362087B2 (ja) 距離情報を決定するための方法、距離マップを決定するための方法、コンピュータ装置、撮影システム、コンピュータプログラム
CN105631851B (zh) 深度图生成
CN109451244B (zh) 一种基于液体镜头的自动调焦方法及***
CN103945118B (zh) 图像虚化方法、装置及电子设备
EP2526528B1 (en) Blur function modeling for depth of field rendering
CN109521547B (zh) 一种变步长的自动调焦方法及***
KR101233013B1 (ko) 화상 촬영 장치 및 그 거리 연산 방법과 합초 화상 취득 방법
KR101643607B1 (ko) 영상 데이터 생성 방법 및 장치
CN104079827B (zh) 一种光场成像自动重对焦方法
TWI538512B (zh) 調整對焦位置的方法及電子裝置
JP6862569B2 (ja) 仮想光線追跡方法および光照射野の動的リフォーカス表示システム
CN106031148A (zh) 成像设备,成像设备中自动对焦的方法以及对应计算机程序
Florea et al. Parametric logarithmic type image processing for contrast based auto-focus in extreme lighting conditions
CN106375651B (zh) 对焦方法和装置、图像采集设备
US8564712B2 (en) Blur difference estimation using multi-kernel convolution
CN106842496B (zh) 基于频域比较法的自动调节焦点的方法
US10638030B1 (en) Angular focus stacking
CN110475068B (zh) 图像处理方法及装置
van Zwanenberg et al. Camera system performance derived from natural scenes
AU2015202282A1 (en) Camera parameter optimisation for depth from defocus
Tung et al. Extending depth of field in noisy light field photography
GB2533450B (en) Settings of a digital camera for depth map refinement
Kang et al. Refocusing images and videos with a conventional compact camera

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17933633

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17933633

Country of ref document: EP

Kind code of ref document: A1