WO2016029465A1 - 一种图像处理方法、装置及电子设备 - Google Patents

一种图像处理方法、装置及电子设备 Download PDF

Info

Publication number
WO2016029465A1
WO2016029465A1 PCT/CN2014/085608 CN2014085608W WO2016029465A1 WO 2016029465 A1 WO2016029465 A1 WO 2016029465A1 CN 2014085608 W CN2014085608 W CN 2014085608W WO 2016029465 A1 WO2016029465 A1 WO 2016029465A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
unit
camera unit
determining
imaging unit
Prior art date
Application number
PCT/CN2014/085608
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 US15/507,190 priority Critical patent/US10908492B2/en
Priority to EP14900396.4A priority patent/EP3188468B1/en
Priority to PCT/CN2014/085608 priority patent/WO2016029465A1/zh
Priority to KR1020177008184A priority patent/KR101991754B1/ko
Priority to CN201480040022.9A priority patent/CN105637852B/zh
Publication of WO2016029465A1 publication Critical patent/WO2016029465A1/zh

Links

Classifications

    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B35/00Stereoscopic photography
    • G03B35/08Stereoscopic photography by simultaneous recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/45Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from two or more image sensors being of different type or operating in different modes, e.g. with a CMOS sensor for moving images in combination with a charge-coupled device [CCD] for still images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/90Arrangement of cameras or camera modules, e.g. multiple cameras in TV studios or sports stadiums
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing
    • 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/20172Image enhancement details
    • G06T2207/20208High dynamic range [HDR] image processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N2013/0074Stereoscopic image analysis

Definitions

  • Image processing method device and electronic device
  • the present application relates to the field of electronic technologies, and in particular, to an image processing method, apparatus, and electronic device. Background technique
  • the phone is equipped with a front camera and a rear camera.
  • the camera unit may be abnormal for various reasons. For example: There is dirt on the lens and the lens is blocked during the photo taking. The above anomalies will result in poor photo taking. However, there is no solution in the prior art to confirm whether the camera unit is normal. Summary of the invention
  • the embodiment of the present application provides an image processing method, device, and electronic device, which are used to solve the technical problem in the prior art that the camera unit is not confirmed to be normal.
  • the first aspect of the present application provides an image processing method, including:
  • the first image is obtained by acquiring an image of the first collection area by the first imaging unit
  • the second image is collected by the second imaging unit by the second imaging unit
  • Whether the first imaging unit and the second imaging unit are normal is determined based on the first image and the second image.
  • the first camera unit and the second camera unit are Two frames of images of two collection regions of an overlapping collection area collected by the unit at the same collection time A high dynamic range HDR image.
  • the determining the first according to the first image and the second image Whether the imaging unit and the second imaging unit are normal comprising: obtaining an offset between the first image and the second image; and shifting the first image according to the offset; The first image and the second image after the offset are respectively divided into block regions of n*m; wherein, n and m are positive integers greater than 1, and the first image and the image after the offset are determined a case where the block regions at the corresponding positions on the second image do not match each other; whether the first camera unit and the second camera unit are normal based on the mutual mismatch.
  • the method further includes:
  • the method includes:
  • Whether the first imaging unit and the second imaging unit are normal is determined based on the mutual mismatch and the similarity.
  • the obtaining the similarity between the first image and the second image includes: obtaining a combination or a difference between an image mean value between the first image and the second image and a difference in image variance between the first image and the second image as the similarity;
  • Determining whether the first camera unit and the second camera unit are normal based on the mutual mismatch and the similarity include:
  • the determining whether the first camera unit and the second camera unit are normal based on the mutual mismatch includes:
  • Whether the first imaging unit and the second imaging unit are normal is determined based on the mutual mismatch and the offset.
  • the determining, by the mutual mismatch, the first camera unit And whether the second camera unit is normal including:
  • the method further includes:
  • the method includes:
  • Whether the first imaging unit and the second imaging unit are normal is determined based on the similarity, the offset, and the mismatch.
  • the determining, by the mutual mismatch, the first camera unit and the second camera Whether the unit is normal including:
  • the determining the first according to the first image and the second image Whether the camera unit and the second camera unit are normal including:
  • the method further includes:
  • Determining that the current scene where the first camera unit and the second camera unit are located is an HDR scene.
  • the method when determining that the first camera unit and the second camera unit are normal, the method also includes:
  • the second aspect of the present application provides an image processing apparatus, including:
  • a obtaining unit configured to obtain a first image and a second image acquired at the same collection time, where the first image is obtained by acquiring an image of the first collection area by the first imaging unit, and the second image is collected by the second imaging unit The image of the second collection area is obtained, the parameters of the first imaging unit and the second imaging unit are the same, and the first collection area and the second collection area have an overlapping collection area;
  • a determining unit configured to determine, according to the first image and the second image, whether the first imaging unit and the second imaging unit are normal.
  • the device further includes a processing unit, configured to: when determining that the first camera unit and the second camera unit are normal, The first imaging unit and the second imaging unit synthesize a high dynamic range HDR image of two frames of two acquisition regions of the overlapping collection region collected at the same collection time.
  • the determining unit is specifically configured to: obtain the first image and the second Offset between images; shifting the first image according to the offset; dividing the offset first image and the second image into block regions of n*m; Where n and m are both a positive integer greater than 1; a case where the offset of the first image and the block regions at corresponding positions on the second image do not match each other; determining the first camera based on the mutual mismatch Whether the unit and the second camera unit are normal.
  • the determining unit is further configured to: obtain, between the first image and the second image Similarity; determining whether the first camera unit and the second camera unit are normal based on the mutual mismatch and the similarity.
  • the determining unit is specifically configured to: obtain, between the first image and the second image a combination or one of a difference between image mean values and a difference in image variance between the first image and the second image as the similarity;
  • the determining unit is specifically configured to: determine, according to the mutual mismatch, and the offset Whether the first imaging unit and the second imaging unit are normal.
  • the determining unit is specifically configured to: when the offset is greater than a second threshold, and do not match each other When the ratio is less than the third threshold, it is determined that the relative positional relationship between the first imaging unit and the second imaging unit is abnormal.
  • the determining unit is further configured to: calculate between the first image and the second image Similarity; determining whether the first camera unit and the second camera unit are normal based on the similarity, the offset, and the mismatch.
  • the determining unit is specifically configured to: when the positions of the block regions that do not match consecutively are the same, determine that the lens of the at least one of the first camera unit and the second camera unit is dirty Stained area i or.
  • the determining unit is specifically configured to: according to the first image and the second A combination or one of an offset between the images and a similarity between the first image and the second image determines whether the first camera unit and the second camera unit are normal.
  • the determining unit is further configured to: before determining whether the first imaging unit and the second imaging unit are normal according to the first image and the second image, determining the first imaging unit and the first The current scene in which the two camera units are located is an HDR scene.
  • the determining unit is further configured to: determine the first camera unit and the second camera When the unit is normal, the depth information of each object in the first image and the second image is separately calculated; and the number of objects whose depth information is greater than the threshold is determined to exceed a predetermined value.
  • the third aspect of the present application provides an electronic device, including:
  • a first imaging unit configured to acquire an image of the first collection area to obtain a first image
  • a second image capturing unit configured to collect an image of the second collection region at a same collection time as the first image of the first image to obtain a second image; wherein, parameters of the first imaging unit and the second imaging unit Similarly, there is an overlapping collection area between the first collection area and the second collection area;
  • a processor configured to determine, according to the first image and the second image, whether the first imaging unit and the second imaging unit are normal.
  • the processor is further configured to: when determining that the first camera unit and the second camera unit are normal, The camera unit and the second camera unit synthesize a high dynamic range HDR image of two frames of the two collected regions of the overlapping gather region collected at the same collection time.
  • the processor is specifically configured to: obtain the first image and the second Offset between images; shifting the first image according to the offset; dividing the offset first image and the second image into block regions of n*m; Where n and m are both positive integers greater than 1; determining that the offset of the first image and the corresponding block locations on the second image do not match each other; based on the mutual mismatch It is determined whether the first camera unit and the second camera unit are normal.
  • the processor is further configured to: obtain, between the first image and the second image Similarity; determining whether the first camera unit and the second camera unit are normal based on the mutual mismatch and the similarity.
  • the processor is specifically configured to: obtain, between the first image and the second image a combination or one of a difference between image mean values and a difference in image variance between the first image and the second image as the similarity;
  • the processor is specifically configured to: determine, according to the mutual mismatch, and the offset Whether the first imaging unit and the second imaging unit are normal.
  • the processor is specifically configured to: when the offset is greater than a second threshold, and do not match each other When the ratio is less than the third threshold, it is determined that the relative positional relationship between the first imaging unit and the second imaging unit is abnormal.
  • the processor is further configured to: calculate a similarity between the first image and the second image; determine, according to the similarity, the offset, and the mismatch Whether the first imaging unit and the second imaging unit are normal.
  • the processor is specifically configured to: when the locations of the block regions that do not match consecutive times are the same, determine The lens of at least one of the first imaging unit and the second imaging unit has a dirty area i or.
  • the processor is specifically configured to: according to the first image and the second A combination or one of an offset between the images and a similarity between the first image and the second image determines whether the first camera unit and the second camera unit are normal.
  • the processor is further configured to: determine, according to the first image and the second image, whether the first camera unit and the second camera unit are Before the normal, it is determined that the current scene where the first camera unit and the second camera unit are located is an HDR scene.
  • the processor is further configured to: determine the first camera unit and the second camera When the unit is normal, the depth information of each object in the first image and the second image is separately calculated; and the number of objects whose depth information is greater than the threshold is determined to exceed a predetermined value.
  • the electronic device can determine whether the two camera units are normal through images captured by the two camera units.
  • the embodiment of the present application provides a method for determining whether an imaging unit is normal, such that an image can be captured while the imaging unit is normal, and the effect of shooting is ensured.
  • FIG. 2 is a schematic diagram of setting a lens of an image capturing unit according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of performing block segmentation of a projection histogram in an embodiment of the present application
  • FIG. 4 is a diagram showing an example of an image processing method in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of "ghosting" in the prior art
  • FIG. 6 is a functional block diagram of an image processing apparatus according to an embodiment of the present application.
  • FIG. 7 is a system block diagram of an electronic device according to an embodiment of the present application. detailed description
  • the embodiment of the present application provides an image processing method, device, and electronic device, which solves the technical problem in the prior art that there is no solution for confirming whether the imaging unit is normal.
  • FIG. 1 it is a flowchart of the image processing method in the embodiment, and the method includes the following content.
  • the step 101 is represented by the steps of: obtaining the first image and the second image acquired at the same collection time.
  • the first image is obtained by acquiring the image of the first collection area by the first imaging unit
  • the second image is obtained by collecting the image of the second collection area by the second imaging unit, the first imaging unit and the second imaging.
  • the parameters of the unit are the same, and there is an overlapping collection area between the first collection area and the second collection area.
  • the first camera unit and the second camera unit are disposed on an electronic device.
  • electronic devices ⁇ mouth for mobile phones, tablet electric monthly acres, cameras.
  • the first lens of the first camera unit and the second lens of the second camera unit are disposed on the same side of the electronic device.
  • the first lens and the second lens are disposed on the same plane of the electronic device, for example, both are disposed on the rear case of the mobile phone.
  • the first lens may be a front lens and the second lens may be a rear lens.
  • the optical axis of the first imaging unit and the optical axis of the second imaging unit are parallel, and the motion between the captured first image and the second image is guaranteed to be a translational motion, so that the amount of correction is small.
  • the parameters of the first imaging unit and the second imaging unit are the same, for example: Both have the same focal length. It can be understood that the first camera unit and the second camera unit can also have the same focal length and the same image sensor; of course, the first camera unit and the second camera unit can also have the same lens and other identical hardware parameters.
  • first camera unit and the second camera unit have the same parameter. It can be understood that the parameters of the first camera unit and the second camera unit are the same; of course, the first camera unit and the second camera unit have the same plurality of parameters (for example, two parameters or three parameters are the same) It can also be understood that the parameters of the first imaging unit and the second imaging unit are the same. Preferably, the parameters of the first camera unit and the second camera unit are the same, that is, two identical camera units.
  • FIG. 2 a possible schematic diagram of the first camera unit 201 and the second camera unit 202 on the electronic device 20 is provided.
  • the first imaging unit 201 and the second imaging unit 202 are disposed on the same side of the electronic device, for example, the first imaging unit 201 and the second imaging unit 202 are disposed on the back cover side of the electronic device.
  • the first image is captured by the first camera unit 201 while the second image is captured by the second camera unit 202.
  • the first imaging unit 201 and the second imaging unit 202 perform imaging for the same acquisition area, because the first imaging unit 201 and the second imaging unit
  • the optical axis of the unit 202 has a certain distance in the horizontal direction, so the first collection area of the first imaging unit 201 and the second collection area of the second imaging unit 202 are not completely identical, but the first collection area and the second collection area There are overlapping collection areas between the areas.
  • the electronic device that captures the first image and the second image and the electronic device that performs the steps indicated by reference numeral 102 may be the same electronic device.
  • a charge coupled device English: Charge-coupled Device; CCD
  • a complementary metal oxide semiconductor device in the first camera unit and the second camera unit English: Complementary Metal Oxide Semiconductor; Abbreviation: CMOS
  • image signals and then transmit these image signals to an image signal processor (English: Image Signal Processor; ISP for short), and the image signal is preprocessed by the ISP to obtain the first image and the second image. image.
  • ISP Image Signal Processor
  • the electronic device that captures the first image and the second image and the electronic device that performs the steps indicated by reference numeral 102 may not be the same electronic device.
  • the electronic device for taking the first image and the second image is a mobile phone or a tablet or a SLR camera, and the shooting process is as described above.
  • the electronic device performing the steps indicated by reference numeral 102 is a notebook computer or other mobile phone or tablet computer, and then, after capturing the first image and the second image, transmitting the first image and the second image to a notebook or other mobile phone or tablet. Then for a laptop or other mobile phone or tablet, the first image and the second image are obtained.
  • the step indicated by reference numeral 102 specifically includes: combining or one according to an offset between the first image and the second image and a similarity between the first image and the second image It is determined whether the first camera unit and the second camera unit are normal.
  • the similarity between the first image and the second image can be obtained by the following steps: obtaining a difference between image mean values between the first image and the second image and an image between the first image and the second image A combination or one of the differences of the variances is taken as the similarity.
  • mean is the mean value of the image
  • / w is the coordinate value of the pixel on the image
  • i and j are positive integers
  • image Width is the width of the image
  • imageHeight is the height of the image.
  • the first image mean of the first image and the second image mean of the second image are obtained by the above formula.
  • the difference between the first image mean and the second image mean that is, the difference between the image averages of the first image and the second image is greater than the first threshold
  • the difference between the first image variance and the second image variance that is, the difference between the image variances of the first image and the second image
  • the difference between the image mean values is greater than the first threshold
  • the difference between the image variances is greater than the second threshold
  • the offset between the first image and the second image may be obtained by: obtaining a first projection histogram in a vertical direction of the first image and a second projection histogram in a horizontal direction; a third projection histogram in a vertical direction of the two images and a fourth projection histogram in a horizontal direction; determining a first offset and a second offset as the offset, wherein, the first projection is a histogram
  • the mapping is offset by the first offset in the vertical direction
  • the matching between the first projection histogram and the third projection histogram is better
  • the second projection histogram is shifted by the second offset in the horizontal direction
  • the second The matching between the projection histogram and the fourth projection histogram is better.
  • the acquisition of the projection histogram is well known to those skilled in the art, so it will not be described here.
  • the first offset can be passed through the formula
  • the second offset can be passed through the formula
  • verHistoDiff[offset] represents the first offset.
  • offset represents the trial offset.
  • leftVerHisto represents the first projection histogram.
  • rightVerHisto represents the third projection histogram.
  • j represents the number of straight bars of the histogram. Assuming that the number of bm of a histogram is N, then j takes values from 1 to N, where N is a positive integer.
  • the overlapping bin number in the first formula represents the number of overlapping bins of the first projection histogram and the third projection histogram after shifting the first projection histogram by offset bins.
  • horHistoDiff[offset] represents the second offset
  • leftHorHisto represents the second projection histogram
  • rightHorHisto represents the fourth projection histogram.
  • the overlapping bin number in the second formula represents the number of overlapping bins of the second projection histogram and the fourth projection histogram after the second projection histogram is offset by the offset bin.
  • the above two formulas indicate that the values of the formula are obtained by substituting different test offsets into the formula on the right side of the equation. In a number of tests, the test offset corresponding to the minimum value of the formula is the first offset and the second offset required on the left side of the equation. After the experimental offset corresponding to the minimum value of the offset formula, the matching effect of the two projection histograms is better than other experimental offsets.
  • first offset is greater than the third threshold
  • second offset is greater than the fourth threshold
  • first camera unit and the second camera unit are abnormal.
  • first offset is greater than the third threshold
  • second offset is greater than the fourth threshold
  • the first camera unit and the second camera unit are normal by only the similarity. It is also possible to determine whether the first camera unit and the second camera unit are normal by only the offset. It may also be determined by the similarity and the offset at the same time, and when both the similarity and the offset satisfy the condition, it is possible to determine that the first camera unit and the second camera unit are abnormal. It is also possible to first determine the similarity. When the similarity does not satisfy the condition, for example, the difference between the mean values of the images of the first image and the second image is less than the first threshold, the offset is determined.
  • the step indicated by reference numeral 102 includes: obtaining an offset between the first image and the second image; shifting the first image according to the offset; The first image and the second image are respectively divided into block regions of n*m; wherein, n and m are both positive integers greater than 1; determining the block regions at the corresponding positions on the first image and the second image after the offset Mutual The case of matching; determining whether the first camera unit and the second camera unit are normal based on the case of mutual mismatch.
  • the first image is then offset by the offset.
  • the first image is offset in the vertical direction by the first offset.
  • the first image is offset in the horizontal direction by a second offset.
  • the shifted first image and second image are respectively divided into block regions of n*m.
  • the first image 301 and the second image 302 are each divided into block regions 303 of 10*12.
  • the offset of the first image and the corresponding block locations on the second image do not match each other. Specifically, it is possible to determine whether the block regions at the corresponding positions match based on the average luminance difference of the block regions at the corresponding positions. For example: When the average brightness difference of the block area at the corresponding position is greater than a given threshold, it can be determined that the two block areas at the corresponding position do not match. For example, referring to FIG. 3, the average brightness of the first block area 3031 on the first image 301 is calculated. The average brightness of the second block area 3032 on the second image 302 is calculated, wherein the positions of the first block area 3031 and the second block area 3032 correspond.
  • the average luminance difference between the first block area 3031 and the second block area 3032 is then determined. It is then determined if the average luminance difference is greater than a given threshold, and if so, it is determined that the first block region 3031 and the second block region 3032 do not match. Otherwise, it is determined that the first block area 3031 and the second block area 3032 match each other.
  • the mutual mismatch may be the position of the block region that does not match, or may be a ratio that does not match each other. See the following specific embodiments for details.
  • first camera unit and the second camera unit are normal based on the mutual mismatch. Specifically, it may be: when the ratio of mutual mismatch is greater than the first threshold, it may be determined that the first camera unit and the second camera unit are abnormal, otherwise, it is determined that the first camera unit and the second camera unit are normal.
  • the setting of the value of the third threshold can set different values according to the situations of close-range shooting and distant shooting. For example, the focal length of the two camera units is greater than a predetermined value, which is considered to be a distant shot. If the focal length is less than or equal to the predetermined value, it is considered to be a close shot.
  • the third threshold can be set larger at this time.
  • the third threshold can be set smaller.
  • the offset is greater than the second threshold.
  • the first offset is greater than the third threshold, where the first offset is the offset, and the third threshold is the second threshold.
  • Threshold is greater than the fourth threshold, where the second offset is the offset, and the fourth threshold is the second threshold.
  • the second threshold includes a third threshold and a fourth threshold.
  • the method in the embodiment can also determine that the relative positional relationship between the camera units is abnormal, so that the user can quickly know the cause of the abnormality and make adjustments.
  • the post calibration may be performed.
  • the internal parameter is specifically, for example, a parameter of a lens of the imaging unit.
  • the external parameter is specifically, for example, the offset angle of the optical axis. This part is well known to those skilled in the art and will not be described again here.
  • the lens of at least one of the first imaging unit and the second imaging unit has a dirty area.
  • the matching result of the steps indicated by the reference numeral 102 is the first block area 3031 and the second block area 3032. If it does not match, it means that the first lens is dirty at a position corresponding to the first block area 3031 or the second lens is at a position corresponding to the second block area 3032. Further, the user can be prompted to have a dirty lens, and the user can quickly eliminate the abnormality.
  • the method may further be: determining the first camera unit based on the mutual mismatch and the similarity And whether the second camera unit is normal.
  • determining that the first camera unit and the second camera unit are abnormal when the difference between the image mean values is greater than the first threshold and/or the difference between the image variances is greater than the second threshold, and the ratio of the block regions at the corresponding positions does not match each other is greater than the first threshold, determining the first camera unit and the first The lens of at least one of the two camera units is blocked. At this point, the user can be prompted to have an occlusion, so the user can quickly eliminate the anomaly.
  • the similarity does not satisfy the condition, the determination is made according to the case of mutual mismatch.
  • the step indicated by reference numeral 102 includes: determining whether the first camera unit and the second camera unit are normal based on the similarity, the offset, and the mismatch. For example, referring to FIG. 4, calculating a similarity between the first image and the second image; determining whether the similarity is greater than a given threshold, and if yes, determining that the first camera unit and the second camera unit are abnormal If not, calculating an offset between the first image and the second image; determining whether the offset is greater than a given threshold, and if yes, determining that the first camera unit and the second camera unit are abnormal; if not, The first image is offset according to the offset, and the first image and the second image after the offset are respectively divided into block regions of n*m; and the corresponding positions on the first image and the second image after the offset are determined.
  • a ratio of the block regions that do not match each other determining whether the ratio of mutual mismatch is greater than the first threshold, and if so, determining that the first camera unit and the second camera unit are abnormal; if not, determining the first camera unit and the second camera The unit is normal.
  • the following is a specific application scenario in which the camera unit needs to be determined.
  • HDR High Dynamic Range
  • the algorithm is: ⁇ Collect multiple frames of images with different exposure settings, and process multiple frames of images by algorithm to generate a larger dynamic range image. HDR images provide a wider dynamic range, more image detail, and Better enough to reflect the visual effects in the real environment.
  • the HDR technology needs to use a camera unit to collect multiple frames of images at different times for the same scene, so there is a certain photographing time interval between the multi-frame images.
  • the position of the same object in the multi-frame image may change, for example
  • the character 1 moves quickly, the position of the character 1 is different on the multi-frame image of different exposures, and the image of the multi-frame image is fused to generate an HDR image along the trajectory distribution of the character 1, as shown in FIG. Shown, where the dotted line is called the "ghost" of the character 1, thus affecting the photographing effect.
  • the embodiment of the present application proposes to acquire two frames of two acquisition regions with overlapping collection regions at the same acquisition time by the first imaging unit and the second imaging unit, and then A method of synthesizing an HDR image from a frame image. Because in this method, the two frames of images are respectively collected by two camera units, so that the problem of "ghosting" which may be caused by acquiring two frames of images at different times by one camera unit in the prior art can be eliminated.
  • the first camera unit and the second camera unit may be located on the same side of the electronic device.
  • the two camera units are normal can be determined by the method described in the embodiment of the present application.
  • the multi-frame image captured by one camera unit at different times is combined into an HDR image.
  • the one camera unit may specifically be an image capturing unit capable of displaying a preview image on a display of the electronic device.
  • the two frames of the two sets of regions of the overlapping gather region that are collected by the first camera unit and the second camera unit at the same collection time are combined into HDR.
  • the method further includes: determining that the current scene is an HDR scene, because in the HDR scene, the HDR image needs to be synthesized by using multiple frames of images, so the first camera unit and the second camera need to be determined. Whether the unit is normal.
  • determining whether the current scene is an HDR scene may be performed in multiple manners. For example, after the user sets the current scene, the electronic device may determine the current scene by querying the value of the setting item. For another example: If the electronic device detects that it is in a night/low illumination scene, it determines that it needs to enter the HDR scene.
  • the method further includes: separately calculating depth information of each object in the first image and the second image; determining that the number of objects whose depth information is greater than a threshold exceeds Predetermined value. For example, when most of the objects are far away from the image capturing unit, the HDR image is synthesized from two frames of the two clustering regions of the overlapping collection region which are collected by the first camera unit and the second camera unit at the same collection time. Otherwise, the multi-frame image acquired by one camera unit at different times is combined into an HDR image. Because if it is a close-up shot, the difference between the images acquired by the two camera units is large, so the synthesized HDR image is inferior at this time.
  • the multi-frame image captured by one camera unit at different times is synthesized into the HDR image. better result. Therefore, whether the current scene is a distant scene can be determined by the method in this embodiment.
  • the current scene is a distant scene shooting
  • two of the overlapping collection areas collected by the first imaging unit and the second imaging unit at the same collection time may be used. Combine two frames of images in the collection area to synthesize HDR images for better shooting results.
  • an embodiment of the present application further provides an image processing apparatus.
  • FIG. 6 it is a functional block diagram of the image processing apparatus.
  • the device includes: an obtaining unit 401, configured to obtain a first image and a second image acquired at the same collection time, where the first image is obtained by collecting the image of the first collection area by the first imaging unit, and the second image is obtained by the second imaging
  • the unit acquires the image of the second collection area, the parameters of the first imaging unit and the second imaging unit are the same, and the first collection area and the second collection area have an overlapping collection area;
  • the determining unit 402 is configured to use the first image and The second image determines whether the first camera unit and the second camera unit are normal.
  • the parameters are the same, specifically, for example: Both have the same focal length. It can be understood that the first camera unit and the second camera unit can also have There are the same focal length and the same image sensor; of course, the first camera unit and the second camera unit can also have the same lens and other identical hardware parameters.
  • first camera unit and the second camera unit have the same parameter. It can be understood that the parameters of the first camera unit and the second camera unit are the same; of course, the first camera unit and the second camera unit have the same plurality of parameters (for example, two parameters or three parameters are the same) It can also be understood that the parameters of the first imaging unit and the second imaging unit are the same. Preferably, the parameters of the first camera unit and the second camera unit are the same, that is, two identical camera units.
  • the device further includes a processing unit 403, configured to: when determining that the first camera unit and the second camera unit are normal, stacking the first camera unit and the second camera unit at the same collection time with an overlapping collection area The two frames of the two acquisition regions synthesize a high dynamic range HDR image.
  • a processing unit 403 configured to: when determining that the first camera unit and the second camera unit are normal, stacking the first camera unit and the second camera unit at the same collection time with an overlapping collection area The two frames of the two acquisition regions synthesize a high dynamic range HDR image.
  • the determining unit 402 is specifically configured to: obtain an offset between the first image and the second image; offset the first image by an offset; and offset the first image and the second image a block region respectively divided into n*m; wherein, n and m are positive integers greater than 1; determining that the offset image of the first image and the corresponding region on the second image do not match each other; The case of mismatch determines whether the first camera unit and the second camera unit are normal.
  • the determining unit 402 is further configured to: obtain a similarity between the first image and the second image; determine whether the first camera unit and the second camera unit are normal based on a case of mutual mismatch and a similarity.
  • the determining unit 402 is specifically configured to: obtain a combination or a difference between the difference between the image mean values between the first image and the second image and the image variance between the first image and the second image as the similarity;
  • the lens of at least one of the two camera units is blocked.
  • the determining unit 402 is further configured to: determine whether the first camera unit and the second camera unit are normal based on a situation of mutual mismatch and an offset.
  • the determining unit 402 is specifically configured to: when the offset is greater than the second threshold, and are not mutually different When the proportion of the distribution is less than the third threshold, it is determined that the relative positional relationship between the first imaging unit and the second imaging unit is abnormal.
  • the determining unit 402 is further configured to: calculate a similarity between the first image and the second image; determine whether the first camera unit and the second camera unit are normal based on the similarity, the offset, and the mismatch.
  • the determining unit 402 is specifically configured to: when the positions of the block regions that do not match consecutively are consecutive, determine that the lens of the at least one of the first camera unit and the second camera unit has a dirty area.
  • the determining unit 402 is specifically configured to: determine, according to the offset between the first image and the second image, and a combination or similarity between the first image and the second image, the first camera unit and the first Is the second camera unit normal?
  • the determining unit 402 is further configured to: determine, before determining whether the first camera unit and the second camera unit are normal according to the first image and the second image, determining a current location of the first camera unit and the second camera unit The scene is an HDR scene.
  • the determining unit 402 is further configured to: when determining that the first imaging unit and the second imaging unit are normal, respectively calculating depth information of each object in the first image and the second image; determining that the depth information is greater than a threshold The number of objects exceeds a predetermined value.
  • the embodiment of the present application further provides an electronic device.
  • FIG. 2 it is a system block diagram of the electronic device in this embodiment.
  • the electronic device device includes: a first imaging unit 501, configured to acquire an image of the first collection area to obtain a first image; and a second imaging unit 502, configured to collect the second collection area at the same acquisition time as the first image is collected. Obtaining a second image; wherein the parameters of the first imaging unit 501 and the second imaging unit 502 are the same, and the first collection area and the second collection area have an overlapping collection area; the processor 503 is configured to First The two images determine whether the first imaging unit 501 and the second imaging unit 502 are normal.
  • the first imaging unit 501 includes a first lens and a first image sensor.
  • the first image sensor is, for example, a charge-coupled device (English: Charge-coupled Device; CCD) or a complementary metal oxide semiconductor (English: Complementary Metal Oxide Semiconductor; CM0S for short).
  • the second camera unit 502 includes a second lens and a second image sensor.
  • the processor 503 is further configured to: when determining that the first imaging unit 501 and the second imaging unit 502 are normal, the first imaging unit 501 and the second imaging unit 502 are collected at the same collection time with an overlapping collection area.
  • the two frames of the two acquisition regions synthesize a high dynamic range HDR image.
  • the processor 503 is specifically configured to: obtain an offset between the first image and the second image; offset the first image by an offset; and offset the first image and the second image a block region respectively divided into n*m; wherein, n and m are positive integers greater than 1; determining that the offset image of the first image and the corresponding region on the second image do not match each other; The case of mismatch determines whether the first imaging unit 501 and the second imaging unit 502 are normal.
  • the processor 503 is further configured to: obtain a similarity between the first image and the second image; determine whether the first camera unit 501 and the second camera unit 502 are normal based on a situation of mutual mismatch and similarity.
  • the processor 503 is specifically configured to: obtain a combination or a difference between the difference between the image mean values between the first image and the second image and the image variance between the first image and the second image as the similarity; When the difference between the mean values is greater than the combination of the first threshold and the image variance is greater than the second threshold, and the ratio of the block regions at the corresponding positions does not match each other is greater than the first threshold, determining the first camera unit 501 and the second The lens of at least one of the imaging units 502 is blocked.
  • the processor 503 is specifically configured to: determine whether the first camera unit 501 and the second camera unit 502 are normal based on a mutual mismatch condition and an offset.
  • the processor 503 is specifically configured to: when the offset is greater than the second threshold, and the ratio of the mutual mismatch is less than the third threshold, determine that the relative positional relationship between the first camera unit 501 and the second camera unit 502 is abnormal.
  • the processor 503 is further configured to: calculate a similarity between the first image and the second image; Whether the first imaging unit 501 and the second imaging unit 502 are normal is determined based on the similarity, the offset, and the mismatch.
  • the processor 503 is specifically configured to: when the positions of the block regions that do not match consecutive times are the same, determine that the lenses of the first camera unit 501 and the second camera unit 502 have dirty regions.
  • the processor 503 is specifically configured to: determine, according to an offset between the first image and the second image, and a combination or similarity between the first image and the second image, the first camera unit 501 and Whether the second imaging unit 502 is normal.
  • the processor 503 is further configured to: determine, before determining whether the first imaging unit 501 and the second imaging unit 502 are normal according to the first image and the second image, determining the first imaging unit 501 and the second imaging unit 502.
  • the current scene is the HDR scene.
  • the processor 503 is further configured to: when determining that the first imaging unit 501 and the second imaging unit 502 are normal, respectively calculating depth information of each object in the first image and the second image; determining that the depth information is greater than The number of objects of the threshold exceeds a predetermined value.
  • the electronic device further includes a display 504 for displaying images obtained by the first camera unit 501 and/or the second camera unit 502 or the processor 503.
  • the electronic device further includes a memory 505 for storing data used by the processor 503 when performing the operation; or temporary image data acquired by the first camera unit 501 and/or the second camera unit 502.
  • the processor 503 specifically includes: a central processing unit (CPU) and an IPS.
  • CPU central processing unit
  • IPS IPS
  • the processor 503 is a CPU, and the IPS is a physically independent chip.
  • the electronic device further includes a battery for powering the electronic device.
  • the electronic device can determine whether the two camera units are normal through the images captured by the two camera units.
  • the embodiment of the present application provides a method for determining whether an imaging unit is normal, such that an image can be captured while the imaging unit is normal, and the effect of shooting is ensured.
  • the computer program instructions can be stored in a readable memory that can boot a computer or other programmable data processing device, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device, the instruction device being implemented in a flowchart The function specified in a box or multiple blocks of a process or multiple processes or block diagrams.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in a block or blocks of a flow or a flow or block diagram of a flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Cameras In General (AREA)

Abstract

本申请提供一种图像处理方法、装置及电子设备。该方法包括:获得同一采集时刻采集的第一图像和第二图像,所述第一图像通过第一摄像单元采集第一采集区域的图像获得,所述第二图像通过第二摄像单元采集第二采集区域的图像获得,所述第一摄像单元和第二摄像单元的参数相同,所述第一采集区域和所述第二采集区域之间有重叠采集区域;根据所述第一图像和所述第二图像确定所述第一摄像单元和所述第二摄像单元是否正常。

Description

一种图像处理方法、 装置及电子设备 技术领域
本申请涉及电子技术领域, 尤其涉及一种图像处理方法、 装置及电子设 备。 背景技术
随着电子技术的发展, 智能手机、 功能手机、 平板电脑等电子设备上具 备了拍照功能。 有些电子设备上配置有一个摄像单元, 有些电子设备上配置 有两个摄像单元。 例如: 手机上设置有一个前置摄像头, 一个后置摄像头。
然而, 电子设备在用户使用的过程中, 摄像单元因为各种原因可能会出 现异常。 例如: 镜头上有脏污、 拍照过程中镜头被遮挡部分。 以上异常都会 造成拍照效果较差。 而现有技术中还没有确认摄像单元是否正常的方案。 发明内容
本申请实施例提供一种图像处理方法、 装置及电子设备, 用于解决现有 技术中没有确认摄像单元是否正常的方案的技术问题。
本申请第一方面提供了一种图像处理方法, 包括:
获得同一采集时刻采集的第一图像和第二图像, 所述第一图像通过第一 摄像单元采集第一釆集区域的图像获得, 所述第二图像通过第二摄像单元釆 集第二采集区域的图像获得, 所述第一摄像单元和第二摄像单元的参数相同, 所述第一采集区域和所述第二采集区域之间有重叠采集区域;
根据所述第一图像和所述第二图像确定所述第一摄像单元和所述第二摄 像单元是否正常。
结合第一方面, 在第一方面的第一种可能的实现方式中, 在确定所述第 一摄像单元和所述第二摄像单元正常时, 将所述第一摄像单元和所述第二摄 像单元在同一釆集时刻釆集的有重叠采集区域的两个釆集区域的两帧图像合 成高动态范围 HDR图像。
结合第一方面或第一方面的第一种可能的实现方式, 在第一方面的第二 种可能的实现方式中, 所述根据所述第一图像和所述第二图像确定所述第一 摄像单元和所述第二摄像单元是否正常, 包括: 获得所述第一图像和所述第 二图像之间的偏移量; 将所述第一图像按照所述偏移量进行偏移; 将偏移后 的所述第一图像和所述第二图像分别划分为 n*m的块区域; 其中, n和 m均为 大于 1的正整数; 确定偏移后的所述第一图像和所述第二图像上对应位置上的 块区域相互不匹配的情况; 基于所述相互不匹配的情况确定所述第一摄像单 元和所述第二摄像单元是否正常。
结合第一方面的第二种可能的实现方式, 在第一方面的第三种可能的实 现方式中, 所述方法还包括:
获得所述第一图像和所述第二图像之间的相似度;
所述基于所述相互不匹配的情况确定所述第一摄像单元和所述第二摄像 单元是否正常, 包括:
基于所述相互不匹配的情况和所述相似度确定所述第一摄像单元和所述 第二摄像单元是否正常。
结合第一方面的第三种可能的实现方式, 在第一方面的第四种可能的实 现方式中, 所述获得所述第一图像和所述第二图像之间的相似度, 包括: 获得所述第一图像和所述第二图像之间的图像均值之差和所述第一图像 和所述第二图像之间的图像方差之差的组合或之一作为所述相似度;
所述基于所述相互不匹配的情况和所述相似度确定所述第一摄像单元和 所述第二摄像单元是否正常, 包括:
当所述图像均值之差大于第一阔值和所述图像方差之差大于第二阈值的 组合或之一时, 且所述对应位置上的块区域相互不匹配的比例大于第一门限 时, 确定所述第一摄像单元和所述第二摄像单元中的至少一个摄像单元的镜 头被遮挡。
结合第一方面的第二种可能的实现方式, 在第一方面的第五种可能的实 现方式中, 所述基于所述相互不匹配的情况确定所述第一摄像单元和所述第 二摄像单元是否正常, 包括:
基于所述相互不匹配的情况和所述偏移量确定所述第一摄像单元和所述 第二摄像单元是否正常。
结合第一方面的第五种可能的实现方式, 在第一方面的第六种可能的实 现方式中, 所述基于所述相互不匹配的情况和所述偏移量确定所述第一摄像 单元和所述第二摄像单元是否正常, 包括:
当所述偏移量大于第二门限, 且相互不匹配的比例小于第三门限时, 确 定所述第一摄像单元和所述第二摄像单元之间的相对位置关系异常。
结合第一方面的第二种可能的实现方式, 在第一方面的第七种可能的实 现方式中,, 所述方法还包括:
计算所述第一图像和所述第二图像之间的相似度;
所述基于所述相互不匹配的情况确定所述第一摄像单元和所述第二摄像 单元是否正常, 包括:
基于所述相似度、 所述偏移量和所述不匹配的情况确定所述第一摄像单 元和所述第二摄像单元是否正常。
结合第一方面的第二种可能的实现方式, 在第一方面的第八种可能的实 现方式中, 所述基于所述相互不匹配的情况确定所述第一摄像单元和所述第 二摄像单元是否正常, 包括:
当连续多次不匹配的块区域的位置相同时, 确定所述第一摄像单元和所 述第二摄像单元中的至少一个摄像单元的镜头有脏污区域。
结合第一方面或第一方面的第一种可能的实现方式, 在第一方面的第九 种可能的实现方式中, 所述根据所述第一图像和所述第二图像确定所述第一 摄像单元和所述第二摄像单元是否正常, 包括:
根据所述第一图像和所述第二图像之间的偏移量和所述第一图像和所述 第二图像之间的相似度的组合或之一确定所述第一摄像单元和所述第二摄像 单元是否正常。 结合第一方面或第一方面的第一种可能的实现方式至第九种可能的实现 方式中的任意一种, 在第一方面的第十种可能的实现方式中, 在所述根据所 述第一图像和所述第二图像确定所述第一摄像单元和所述第二摄像单元是否 正常之前, 所述方法还包括:
确定所述第一摄像单元和所述第二摄像单元所处的当前场景为 HDR 场 景。
结合第一方面的第一种可能的实现方式, 在第一方面的第十一种可能的 实现方式中,, 在确定所述第一摄像单元和所述第二摄像单元正常时, 所述方 法还包括:
分别计算所述第一图像和所述第二图像中每个物体的深度信息; 确定深度信息大于阈值的物体的数量超过预定值。
本申请第二方面提供一种图像处理装置, 包括:
获得单元, 用于获得同一釆集时刻采集的第一图像和第二图像, 所述第 一图像通过第一摄像单元采集第一采集区域的图像获得, 所述第二图像通过 第二摄像单元采集第二采集区域的图像获得, 所述第一摄像单元和第二摄像 单元的参数相同, 所述第一釆集区域和所述第二釆集区域之间有重叠釆集区 域;
确定单元, 用于根据所述第一图像和所述第二图像确定所述第一摄像单 元和所述第二摄像单元是否正常。
结合第二方面, 在第二方面的第一种可能的实现方式中, 所述装置还包 括处理单元, 用于在确定所述第一摄像单元和所述第二摄像单元正常时, 将 所述第一摄像单元和所述第二摄像单元在同一釆集时刻釆集的有重叠釆集区 域的两个采集区域的两帧图像合成高动态范围 HDR图像。
结合第二方面或第二方面的第一种可能的实现方式, 在第二方面的第二 种可能的实现方式中, 所述确定单元具体用于: 获得所述第一图像和所述第 二图像之间的偏移量; 将所述第一图像按照所述偏移量进行偏移; 将偏移后 的所述第一图像和所述第二图像分别划分为 n*m的块区域; 其中, n和 m均 为大于 1 的正整数; 确定偏移后的所述第一图像和所述第二图像上对应位置 上的块区域相互不匹配的情况; 基于所述相互不匹配的情况确定所述第一摄 像单元和所述第二摄像单元是否正常。
结合第二方面的第二种可能的实现方式, 在第二方面的第三种可能的实 现方式中, 所述确定单元还用于: 获得所述第一图像和所述第二图像之间的 相似度; 基于所述相互不匹配的情况和所述相似度确定所述第一摄像单元和 所述第二摄像单元是否正常。
结合第二方面的第三种可能的实现方式, 在第二方面的第四种可能的实 现方式中, 所述确定单元具体用于: 获得所述第一图像和所述第二图像之间 的图像均值之差和所述第一图像和所述第二图像之间的图像方差之差的组合 或之一作为所述相似度;
当所述图像均值之差大于第一阈值和所述图像方差之差大于第二阈值的 组合或之一时, 且所述对应位置上的块区域相互不匹配的比例大于第一门限 时, 确定所述第一摄像单元和所述第二摄像单元中的至少一个摄像单元的镜 头被遮挡。
结合第二方面的第二种可能的实现方式, 在第二方面的第五种可能的实 现方式中, 所述确定单元具体用于: 基于所述相互不匹配的情况和所述偏移 量确定所述第一摄像单元和所述第二摄像单元是否正常。
结合第二方面的第五种可能的实现方式, 在第二方面的第六种可能的实 现方式中, 所述确定单元具体用于: 当所述偏移量大于第二门限, 且相互不 匹配的比例小于第三门限时, 确定所述第一摄像单元和所述第二摄像单元之 间的相对位置关系异常。
结合第二方面的第二种可能的实现方式, 在第二方面的第七种可能的实 现方式中, 所述确定单元还用于: 计算所述第一图像和所述第二图像之间的 相似度; 基于所述相似度、 所述偏移量和所述不匹配的情况确定所述第一摄 像单元和所述第二摄像单元是否正常。
结合第二方面的第二种可能的实现方式, 在第二方面的第八种可能的实 现方式中, 所述确定单元具体用于: 当连续多次不匹配的块区域的位置相同 时, 确定所述第一摄像单元和所述第二摄像单元中的至少一个摄像单元的镜 头有脏污区 i或。
结合第二方面或第二方面的第一种可能的实现方式, 在第二方面的第九 种可能的实现方式中, 所述确定单元具体用于: 根据所述第一图像和所述第 二图像之间的偏移量和所述第一图像和所述第二图像之间的相似度的组合或 之一确定所述第一摄像单元和所述第二摄像单元是否正常。
结合第二方面或第二方面的第一种可能的实现方式至第二方面的第九种 可能的实现方式中的任意一种, 在第二方面的第十种可能的实现方式中, 所 述确定单元还用于: 在所述根据所述第一图像和所述第二图像确定所述第一 摄像单元和所述第二摄像单元是否正常之前, 确定所述第一摄像单元和所述 第二摄像单元所处的当前场景为 HDR场景。
结合第二方面的第一种可能的实现方式, 在第二方面的第十一种可能的 实现方式中, 所述确定单元还用于: 在确定所述第一摄像单元和所述第二摄 像单元正常时, 分别计算所述第一图像和所述第二图像中每个物体的深度信 息; 确定深度信息大于阈值的物体的数量超过预定值。
本申请第三方面提供一种电子设备, 包括:
第一摄像单元, 用于采集第一采集区域的图像获得第一图像;
第二摄像单元, 用于在与釆集所述第一图像的同一釆集时刻釆集第二釆 集区域的图像获得第二图像; 其中, 所述第一摄像单元和第二摄像单元的参 数相同, 所述第一采集区域和所述第二采集区域之间有重叠采集区域;
处理器, 用于根据所述第一图像和所述第二图像确定所述第一摄像单元 和所述第二摄像单元是否正常。
结合第三方面, 在第三方面的第一种可能的实现方式中, 所述处理器还 用于: 在确定所述第一摄像单元和所述第二摄像单元正常时, 将所述第一摄 像单元和所述第二摄像单元在同一釆集时刻釆集的有重叠釆集区域的两个釆 集区域的两帧图像合成高动态范围 HDR图像。 结合第三方面或第三方面的第一种可能的实现方式, 在第三方面的第二 种可能的实现方式中, 所述处理器具体用于: 获得所述第一图像和所述第二 图像之间的偏移量; 将所述第一图像按照所述偏移量进行偏移; 将偏移后的 所述第一图像和所述第二图像分别划分为 n*m的块区域; 其中, n和 m均为 大于 1 的正整数; 确定偏移后的所述第一图像和所述第二图像上对应位置上 的块区域相互不匹配的情况; 基于所述相互不匹配的情况确定所述第一摄像 单元和所述第二摄像单元是否正常。
结合第三方面的第二种可能的实现方式, 在第三方面的第三种可能的实 现方式中, 所述处理器还用于: 获得所述第一图像和所述第二图像之间的相 似度; 基于所述相互不匹配的情况和所述相似度确定所述第一摄像单元和所 述第二摄像单元是否正常。
结合第三方面的第三种可能的实现方式, 在第三方面的第四种可能的实 现方式中, 所述处理器具体用于: 获得所述第一图像和所述第二图像之间的 图像均值之差和所述第一图像和所述第二图像之间的图像方差之差的组合或 之一作为所述相似度;
当所述图像均值之差大于第一阈值和所述图像方差之差大于第二阈值的 组合或之一时, 且所述对应位置上的块区域相互不匹配的比例大于第一门限 时, 确定所述第一摄像单元和所述第二摄像单元中的至少一个摄像单元的镜 头被遮挡。
结合第三方面的第二种可能的实现方式, 在第三方面的第五种可能的实 现方式中, 所述处理器具体用于: 基于所述相互不匹配的情况和所述偏移量 确定所述第一摄像单元和所述第二摄像单元是否正常。
结合第三方面的第五种可能的实现方式, 在第三方面的第六种可能的实 现方式中, 所述处理器具体用于: 当所述偏移量大于第二门限, 且相互不匹 配的比例小于第三门限时, 确定所述第一摄像单元和所述第二摄像单元之间 的相对位置关系异常。
结合第三方面的第二种可能的实现方式, 在第三方面的第七种可能的实 现方式中, 所述处理器还用于: 计算所述第一图像和所述第二图像之间的相 似度; 基于所述相似度、 所述偏移量和所述不匹配的情况确定所述第一摄像 单元和所述第二摄像单元是否正常。
结合第三方面的第二种可能的实现方式, 在第三方面的第八种可能的实 现方式中, 所述处理器具体用于: 当连续多次不匹配的块区域的位置相同时, 确定所述第一摄像单元和所述第二摄像单元中的至少一个摄像单元的镜头有 脏污区 i或。
结合第三方面或第三方面的第一种可能的实现方式, 在第三方面的第九 种可能的实现方式中, 所述处理器具体用于: 根据所述第一图像和所述第二 图像之间的偏移量和所述第一图像和所述第二图像之间的相似度的组合或之 一确定所述第一摄像单元和所述第二摄像单元是否正常。
结合第三方面或第三方面的第一种可能的实现方式至第三方面的第九种 可能的实现方式中的任意一种, 在第三方面的第十种可能的实现方式中, 在 第三方面的第三种可能的实现方式中, 所述处理器还用于: 在所述根据所述 第一图像和所述第二图像确定所述第一摄像单元和所述第二摄像单元是否正 常之前, 确定所述第一摄像单元和所述第二摄像单元所处的当前场景为 HDR 场景。
结合第三方面的第一种可能的实现方式, 在第三方面的第十一种可能的 实现方式中, 所述处理器还用于: 在确定所述第一摄像单元和所述第二摄像 单元正常时, 分别计算所述第一图像和所述第二图像中每个物体的深度信息; 确定深度信息大于阈值的物体的数量超过预定值。
本申请实施例中提供的一个或多个技术方案, 至少具有如下技术效果或 优点:
本申请实施例中, 根据第一图像和第二图像确定第一摄像单元和第二摄 像单元是否正常, 其中, 第一图像通过第一摄像单元采集第一采集区域的图 像获得, 第二图像通过第二摄像单元釆集第二釆集区域的图像获得, 第一釆 集区域和第二采集区域之间有重叠采集区域。 由此可以看出, 在本申请实施 例中, 电子设备可以通过两个摄像单元所拍摄的图像确定两个摄像单元是否 正常。 换言之, 本申请实施例提供一种确定摄像单元是否正常的方法, 这样 可以在摄像单元均正常的情况下拍摄图像, 保证拍摄的效果。 附图说明
图 1为本申请一实施例中的图像处理方法的流程图;
图 2为本申请一实施例中的摄像单元的镜头的设置示意图;
图 3为本申请一实施例中的投影直方图的进行分块的示意图;
图 4为本申请一实施例中的图像处理方法的实例图;
图 5为现有技术中 "鬼影" 的示意图;
图 6为本申请一实施例中图像处理装置的功能框图;
图 7为本申请一实施例中电子设备的系统框图。 具体实施方式
本申请实施例提供一种图像处理方法、 装置及电子设备, 解决现有技术 中没有确认摄像单元是否正常的方案的技术问题。
为使本申请实施例的目的、 技术方案和优点更加清楚, 下面将结合本申 请实施例中的附图, 对本申请实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本申请一部分实施例, 而不是全部的实施例。 基于 本申请中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本申请保护的范围。
首先介绍本申请实施例中的图像处理方法的实施过程, 请参考图 1所示, 为本实施例中图像处理方法的流程图, 该方法包括以下内容。
标号 101表示的步骤为: 获得同一釆集时刻采集的第一图像和第二图像。 其中, 第一图像通过第一摄像单元采集第一采集区域的图像获得, 第二图像 通过第二摄像单元釆集第二采集区域的图像获得, 第一摄像单元和第二摄像 单元的参数相同, 第一采集区域和第二采集区域之间有重叠采集区域。
其中, 第一摄像单元和第二摄像单元设置在一电子设备上。 电子设备例 ^口为手机、 平板电月亩、 相机。
可选的, 第一摄像单元的第一镜头和第二摄像单元的第二镜头设置在电 子设备的同一侧。 较佳的, 第一镜头和第二镜头设置在电子设备的同一平面 上, 例如均设置在手机的后壳上。
可选的, 第一镜头可以是前置镜头, 第二镜头为后置镜头。 在使用时, 可以将其中一个镜头翻转到与另一个镜头处于同一侧。
较佳的, 在获取图像时, 第一摄像单元的光轴和第二摄像单元的光轴平 行, 保证采集的第一图像和第二图像之间的运动为平移运动, 这样矫正的运 算量小。
进一步, 第一摄像单元和第二摄像单元的参数相同, 例如: 两者具有相 同的焦距。 可以理解的, 第一摄像单元和第二摄像单元也可以具有相同的焦 距和相同的图像传感器; 当然, 第一摄像单元和第二摄像单元也可以具有相 同的镜头以及其他相同的硬件参数。
需要说明的是, 第一摄像单元和第二摄像单元有一个参数相同可以理解 为第一摄像单元和第二摄像单元的参数相同; 当然第一摄像单元和第二摄像 单元有多个参数相同 (例如, 两个参数或三个参数相同) 也可以理解为第一 摄像单元和第二摄像单元的参数相同。 优选的, 第一摄像单元和第二摄像单 元的参数都相同, 即两个相同的摄像单元。
请参考图 2所示, 为第一摄像单元 201和第二摄像单元 202设置在电子 设备 20上的一种可能的示意图。其中,第一摄像单元 201和第二摄像单元 202 设置在电子设备的同一侧, 例如第一摄像单元 201和第二摄像单元 202设置 在电子设备的后盖侧。
当手持电子设备 20拍照时, 通过第一摄像单元 201拍摄第一图像, 同时 通过第二摄像单元 202拍摄第二图像。 虽然第一摄像单元 201和第二摄像单 元 202针对同一采集区域进行拍摄, 但是因为第一摄像单元 201和第二摄像 单元 202的光轴在水平方向上有一定距离, 所以第一摄像单元 201 的第一采 集区域和第二摄像单元 202 的第二釆集区域不完全相同, 但是第一釆集区域 和第二采集区域之间有重叠采集区域。
可选的, 拍摄第一图像和第二图像的电子设备和执行标号 102表示的步 骤的电子设备可以是同一个电子设备。 具体的, 当该电子设备通过第一摄像 单元和第二摄像单元中的电荷耦合元件(英文: Charge-coupled Device; 筒称: CCD ) 或互补金属氧 t物半导体 (英文: Complementary Metal Oxide Semiconductor; 简称: CMOS )等图像传感器获得图像信号, 然后将这些图像 信号传输给图像信号处理器 (英文: Image Signal Processor; 简称: ISP ), 由 ISP对图像信号进行预处理, 获得第一图像和第二图像。
可选的, 拍摄第一图像和第二图像的电子设备和执行标号 102表示的步 骤的电子设备也可以不是同一个电子设备。 例如: 拍摄第一图像和第二图像 的电子设备为手机或平板电脑或单反相机, 拍摄的过程如上述。执行标号 102 表示的步骤的电子设备为笔记本电脑或其他手机或平板电脑, 那么在拍摄获 得第一图像和第二图像之后, 将第一图像和第二图像传输给笔记本或其他手 机或平板电脑, 那么对于笔记本电脑或其他手机或平板电脑来说, 即获得了 第一图像和第二图像。
接下来介绍标号 102表示的步骤: 根据第一图像和第二图像确定第一摄 像单元和第二摄像单元是否正常。
在第一种可能的实施方式中, 标号 102表示的步骤具体包括: 根据第一 图像和第二图像之间的偏移量和第一图像和第二图像之间的相似度的组合或 之一确定第一摄像单元和第二摄像单元是否正常。
具体来说, 可以通过以下的步骤获得第一图像和第二图像之间的相似度: 获得第一图像和第二图像之间的图像均值之差和第一图像和第二图像之间的 图像方差之差的组合或之一作为所述相似度。
举例来说, 可以通过公式 mean - / ( imageWidth x imageHeight )来计算每 个图像的图像均值。 其中, mean表示图像均值, /w表示图像上的像素点坐标 值, i和 j为正整数; image Width表示图像的宽, imageHeight表示图像的高。 通过上述公式获得第一图像的第一图像均值, 第二图像的第二图像均值。
可 选 的 , 还 可 以 通 过 公 式 contrast = ^ (/; . - mean) x (/!■ j - mean) I {image Width x imageHeight)来计鼻每个图像 0 图像方差。 其中, co^ra^表示图像方差。 通过该公式获得第一图像的第一图 像方差, 第二图像的第二图像方差。
当第一图像均值和第二图像均值之差, 即第一图像和第二图像的图像均 值之差大于第一阈值时, 确定第一摄像单元和第二摄像单元异常。 当第一图 像方差和第二图像方差之差, 即第一图像和第二图像的图像方差之差大于第 二阈值时, 确定第一摄像单元和第二摄像单元异常。 或者, 当图像均值之差 大于第一阈值, 且图像方差之差大于第二阈值时, 确定第一摄像单元和第二 摄像单元异常。
具体来说, 可以通过以下步骤获得第一图像和第二图像之间的偏移量: 获得第一图像的垂直方向上的第一投影直方图和水平方向上的第二投影直方 图; 获得第二图像的垂直方向上的第三投影直方图和水平方向上的第四投影 直方图; 确定第一偏移量和第二偏移量作为所述偏移量, 其中, 在将第一投 影直方图在垂直方向偏移第一偏移量时, 第一投影直方图和第三投影直方图 的匹配比较好; 在将第二投影直方图在水平方向偏移第二偏移量时, 第二投 影直方图和第四投影直方图的匹配比较好。 其中, 投影直方图的获取为本领 域技术人员所熟知的内容, 所以在此不再赘述。
可 选 的 , 第 一 偏 移 量 可 以 通 过 公 式
Ί . · Ϊ!:Ί.
Figure imgf000013_0001
"、.丄一 . 、、、.. 、、 ^,ι ϋ o ssiap m bks a'iabsr 来确定 可 选 的 , 第 二 偏 移 量 可 以 通 过 公 式
¾¥eriapplng in numb r 定, 其中, 在上述两个公式中, verHistoDiff[offset]表示第一偏移量。 在两个 公式的等号右边, offset表示试验偏移量。 leftVerHisto表示第一投影直方图。 rightVerHisto表示第三投影直方图。 j表示直方图的直条(bin )数, 假设一个 直方图的 bm的数量是 N的话, 那么 j取值为 1至 N, 其中, N为正整数。 第 一个公式中的 overlapping bin number表示将第一投影直方图偏移 offset个 bin 之后, 第一投影直方图和第三投影直方图的重叠 bin数。 horHistoDiff[offset] 表示第二偏移量, leftHorHisto表示第二投影直方图, rightHorHisto表示第四 投影直方图。 第二个公式中的 overlapping bin number表示将第二投影直方图 偏移 offset个 bin之后, 第二投影直方图和第四投影直方图的重叠 bin数。 上 述两个公式表示, 采用不同的试验 offset代入等式右边的分子式中, 求取分子 式的值。 在多次的试验中, 其中分子式的最小值对应的试验 offset即为等式左 边所要求的第一偏移量和第二偏移量。 在偏移分子式的最小值对应的试验 offset之后, 两个投影直方图的匹配效果, 相较于其他试验 offset, 是最好的。
当第一偏移量大于第三阈值时, 确定第一摄像单元和第二摄像单元异常。 当第二偏移量大于第四阈值时, 确定第一摄像单元和第二摄像单元异常。 或 者, 当第一偏移量大于第三阈值时, 且第二偏移量大于第四阚值时, 确定第 一摄像单元和第二摄像单元异常。
在实际运用中, 可以只通过相似度来确定第一摄像单元和第二摄像单元 是否正常。 也可以只通过偏移量来确定第一摄像单元和第二摄像单元是否正 常。 也可以是同时通过相似度和偏移量来确定, 当相似度和偏移量两者均满 足条件, 那么就可以确定第一摄像单元和第二摄像单元异常。 也可以是先确 定相似度, 当相似度不满足条件, 例如第一图像和第二图像的图像均值之差 小于第一阈值时, 才通过偏移量来确定。
在第二种可能的实施方式中, 标号 102表示的步骤包括: 获得第一图像 和第二图像之间的偏移量; 将第一图像按照所述偏移量进行偏移; 将偏移后 的第一图像和第二图像分别划分为 n*m的块区域; 其中, n和 m均为大于 1 的正整数; 确定偏移后的第一图像和第二图像上对应位置上的块区域相互不 匹配的情况; 基于相互不匹配的情况确定第一摄像单元和第二摄像单元是否 正常。
其中, 获得第一图像和第二图像之间的偏移量的具体实施方式可以参照 前述所描述, 例如获得第一偏移量和第二偏移量。
然后将第一图像按照所述偏移量进行偏移。 例如: 将第一图像按照第一 偏移量在垂直方向上进行偏移。 将第一图像按照第二偏移量在水平方向上进 行偏移。
接下来, 将偏移后的第一图像和第二图像分别划分为 n*m的块区域。 举 例来说, 请参考图 3所示, 第一图像 301和第二图像 302均被划分为 10* 12 的块区域 303。
然后确定偏移后的第一图像和第二图像上对应位置上的块区域相互不匹 配的情况。 具体来说, 可以根据对应位置上的块区域的平均亮度差来确定对 应位置上的块区域是否匹配。 例如: 当对应位置上的块区域的平均亮度差大 于给定门限, 就可以确定对应位置上的两个块区域不匹配。 举例来说, 请继 续参考图 3所示, 计算第一图像 301上的第一块区域 3031的平均亮度。 计算 第二图像 302上的第二块区域 3032的平均亮度, 其中, 第一块区域 3031和 第二块区域 3032的位置对应。 然后确定第一块区域 3031和第二块区域 3032 的平均亮度差。 然后判断平均亮度差是否大于给定门限, 如果是, 则确定第 一块区域 3031和第二块区域 3032不匹配。 否则, 确定第一块区域 3031和第 二块区域 3032相互匹配。
其中, 在实际运用中, 相互不匹配的情况可以是不匹配的块区域的位置, 也可以是相互不匹配的比例。 具体参见下述几个具体的实施方式。
基于所述相互不匹配的情况确定第一摄像单元和第二摄像单元是否正 常。 具体来说, 可以是: 当相互不匹配的比例大于第一门限时, 可以确定第 一摄像单元和第二摄像单元异常, 否则, 确定第一摄像单元和第二摄像单元 正常。
还可以是: 基于所述相互不匹配的情况和所述偏移量确定第一摄像单元 和第二摄像单元是否正常。 具体来说, 当所述偏移量大于第二门限, 且相互 不匹配的比例小于第三门限时, 确定第一摄像单元和第二摄像单元之间的相 对位置关系异常。 其中, 第三门限的值的设定可以根据近景拍摄和远景拍摄 的情况设定不同的值。 举例来说, 在两个摄像单元的焦距大于预定值, 认为 是远景拍摄。 如果焦距小于等于预定值, 那么认为是近景拍摄。 因为在近景 拍摄时, 两个摄像单元之间的视差较大, 不匹配的比例较大, 所以此时第三 门限可以设置的较大一些。 而当在远景拍摄时, 不匹配的比例本来就较小, 那么此时第三门限可以设置的小一点。 其中, 所述偏移量大于第二门限, 具 体来说, 例如: 第一偏移量大于第三阈值, 此时第一偏移量即为所述偏移量, 第三阈值即为第二门限。 再例如: 第二偏移量大于第四阈值, 此时第二偏移 量即为所述偏移量, 第四阈值即为第二门限。 再例如: 如果同时考虑第一偏 移量和第二偏移量的话, 那么第二门限就包括第三阈值和第四阔值。
换言之, 通过本实施例中的方法还可以确定出摄像单元之间的相对位置 关系异常, 便于用户能够快速的获知异常的原因, 并进行调整。
可选的, 在确定出第一摄像单元和第二摄像单元之间的相对位置关系异 常时, 可以进行后期校准。 例如: 对两个摄像单元的内部参数和外部参数进 行校准。 其中, 内部参数具体例如是摄像单元的镜头的参数。 外部参数具体 例如是光轴的偏移角。 该部分为本领域技术人员所熟知的内容, 所以在此不 再赘述。
还可以是: 当连续多次不匹配的块区域的位置相同时, 确定第一摄像单 元和第二摄像单元中的至少一个摄像单元的镜头有脏污区域。 举例来说, 请 继续参考图 3所示, 假设在连续多次执行标号 101和标号 102所表示的步骤 时,标号 102表示的步骤的匹配结果均为第一块区域 3031和第二块区域 3032 不匹配, 那么就表示第一镜头在与第一块区域 3031对应的位置或第二镜头在 与第二块区域 3032对应的位置有脏污。 进一步, 可以提示用户镜头有脏污, 那么用户可以快速的消除异常。
还可以是: 基于所述相互不匹配的情况和所述相似度确定第一摄像单元 和第二摄像单元是否正常。 其中, 获取相似度的方法请参考前面所描述。 举 例来说, 例如: 当相似度大于给定阈值且相互不匹配的比例大于第一门限时, 确定第一摄像单元和第二摄像单元异常。 再例如: 当图像均值之差大于第一 阈值和 /或图像方差之差大于第二阈值时, 且对应位置上的块区域相互不匹配 的比例大于第一门限时, 确定第一摄像单元和第二摄像单元中的至少一个摄 像单元的镜头被遮挡。 此时, 可以提示用户镜头有遮挡, 那么用户可以快速 的消除异常。 再例如: 当相似度不满足条件时, 再根据相互不匹配的情况进 行确定。
还可以是: 基于所述相似度、 所述偏移量和所述不匹配的情况确定第一 摄像单元和第二摄像单元是否正常。 具体来说, 例如相似度、 偏移量和不匹 配的情况均满足条件时, 才确定第一摄像单元和第二摄像单元正常。
第三种可能的实施方式: 标号 102表示的步骤包括: 基于所述相似度、 所述偏移量和所述不匹配的情况确定第一摄像单元和第二摄像单元是否正 常。 举例来说, 请参考图 4 所示, 计算第一图像和第二图像之间的相似度; 判断所述相似度是否大于给定门限, 若是, 则确定第一摄像单元和第二摄像 单元异常; 若否, 计算第一图像和第二图像之间的偏移量; 判断所述偏移量 是否大于给定门限, 若是, 则确定第一摄像单元和第二摄像单元异常; 若否, 将第一图像按照所述偏移量进行偏移, 将偏移后的第一图像和第二图像分别 划分为 n*m的块区域; 确定偏移后的第一图像和第二图像上对应位置上的块 区域相互不匹配的比例; 判断相互不匹配的比例是否大于第一门限, 若是, 则确定第一摄像单元和第二摄像单元异常; 若否, 则确定第一摄像单元和第 二摄像单元正常。
以下举一个具体的需要确定摄像单元正常的应用场景。
为了获得更好的拍照效果, 现有技术中采用了多帧拍照算法优化拍照效 果。 例如: 高动态范围 (英文: High Dynamic Range; 筒称: HDR ) 算法为: 釆用不同曝光的设定釆集多帧图像, 通过算法处理多帧图像, 生成一张动态 范围更大的图像。 HDR图像提供更宽的动态范围, 更多的图像细节, 以及能 够更好地反映真实环境中的视觉效果。
HDR技术需要对同一场景利用一个摄像单元在不同时刻釆集多帧图像, 所以多帧图像之间存在一定的拍照时间间隔。 在该时间间隔内, 受到电子设 备的运动或者场景中物体运动的影响, 例如手抖, 风吹动树枝, 人的走动等 等, 那么同一物体在多帧图像中的位置可能会发生变化, 例如, 当人物 1 快 速移动时, 不同曝光度的多帧图像上, 人物 1 的位置是不同的, 沿着人物 1 的运动轨迹分布, 将多帧图像进行图像融合, 生成 HDR图像, 如图 5所示, 其中, 虚线所示就被称为人物 1的 "鬼影", 从而影响拍照效果。
为了解决所描述的 "鬼影" 问题, 本申请实施例提出了通过第一摄像单 元和第二摄像单元在同一采集时刻采集有重叠采集区域的两个采集区域的两 帧图像, 然后将这两帧图像合成 HDR图像的方法。 因为该方法中, 两帧图像 分别是两个摄像单元同时釆集的, 所以可以消除现有技术中一个摄像单元在 不同时刻采集两帧图像所可能导致的 "鬼影" 问题。 其中, 第一摄像单元和 第二摄像单元可以位于电子设备的同一侧。
然而, 在该方法中, 要利用两个摄像单元同时采集图像, 如果两个摄像 单元异常时, 例如其中一个摄像单元的镜头被遮挡, 或者镜头上有脏污, 或 者两个摄像单元的光轴不一致, 那么合成的 HDR图像的效果也会较差。
因此, 可以通过本申请实施例中描述的方法确定两个摄像单元是否正常。 在确定第一摄像单元和第二摄像单元正常时, 执行步骤: 将第一摄像单 元和第二摄像单元在同一采集时刻采集的有重叠采集区域的两个采集区域的 两帧图像合成 HDR图像, 以获得较好的拍照效果。
可选的, 当确定第一摄像单元和第二摄像单元异常时, 如前述所描述的, 将一个摄像单元在不同时刻拍摄的多帧图像合成 HDR图像。 可选的, 该一个 摄像单元具体可以是能够在电子设备的显示器上显示预览图像的摄像单元。
由以上描述可以看出, 在本申请实施例中, 在将第一摄像单元和第二摄 像单元在同一釆集时刻釆集的有重叠釆集区域的两个釆集区域的两帧图像合 成 HDR图像之前, 先确定两个摄像单元正常, 所以可以避免因为两个摄像单 元异常而导致的合成的 HDR图像效果差的问题。
可选的, 在标号 102表示的步骤之前, 该方法还包括: 确定当前场景为 HDR场景, 因为在 HDR场景时, 需要用多帧图像合成 HDR图像, 所以需要 确定第一摄像单元和第二摄像单元是否正常。
具体来说, 确定当前场景是否为 HDR场景, 可以有多种方式, 例如: 用 户设置当前场景之后, 电子设备可以通过查询该设置项的值来确定当前场景。 再例如: 电子设备检测到处于夜景 /低照度场景, 则确定当前需要进入 HDR 场景。
可选的, 在确定第一摄像单元和第二摄像单元正常时, 该方法还包括: 分别计算第一图像和第二图像中每个物体的深度信息; 确定深度信息大于阈 值的物体的数量超过预定值。 例如有大多数物体距离摄像单元较远时, 将第 一摄像单元和第二摄像单元在同一釆集时刻釆集的有重叠釆集区域的两个釆 集区域的两帧图像合成 HDR图像。 否则, 就将一个摄像单元在不同时刻采集 的多帧图像合成 HDR图像。 因为如果是近景拍摄的话, 两个摄像单元采集的 图像的差异就较大, 所以这时合成的 HDR图像效果较差, 此时将一个摄像单 元在不同时刻釆集的多帧图像合成 HDR图像的效果更好。 因此, 通过本实施 例中的方法可以确定当前场景是否是远景, 当当前场景为远景拍摄时, 就可 以将第一摄像单元和第二摄像单元在同一采集时刻采集的有重叠采集区域的 两个釆集区域的两帧图像合成 HDR图像, 获得更好的拍摄效果。
基于同一发明构思, 本申请实施例还提供一种图像处理装置, 请参考图 6 所示, 为该图像处理装置的功能框图。 该装置包括: 获得单元 401 , 用于获得 同一釆集时刻采集的第一图像和第二图像, 第一图像通过第一摄像单元釆集 第一采集区域的图像获得, 第二图像通过第二摄像单元采集第二采集区域的 图像获得, 第一摄像单元和第二摄像单元的参数相同, 第一采集区域和第二 采集区域之间有重叠采集区域; 确定单元 402, 用于根据第一图像和第二图像 确定第一摄像单元和第二摄像单元是否正常。 参数相同, 具体来说, 例如: 两者具有相同的焦距。 可以理解的, 第一摄像单元和第二摄像单元也可以具 有相同的焦距和相同的图像传感器; 当然, 第一摄像单元和第二摄像单元也 可以具有相同的镜头以及其他相同的硬件参数。
需要说明的是, 第一摄像单元和第二摄像单元有一个参数相同可以理解 为第一摄像单元和第二摄像单元的参数相同; 当然第一摄像单元和第二摄像 单元有多个参数相同 (例如, 两个参数或三个参数相同) 也可以理解为第一 摄像单元和第二摄像单元的参数相同。 优选的, 第一摄像单元和第二摄像单 元的参数都相同, 即两个相同的摄像单元。
可选的, 装置还包括处理单元 403 , 用于在确定第一摄像单元和第二摄像 单元正常时, 将第一摄像单元和第二摄像单元在同一釆集时刻釆集的有重叠 采集区域的两个采集区域的两帧图像合成高动态范围 HDR图像。
可选的, 确定单元 402具体用于: 获得第一图像和第二图像之间的偏移 量; 将第一图像按照偏移量进行偏移; 将偏移后的第一图像和第二图像分别 划分为 n*m的块区域; 其中, n和 m均为大于 1的正整数; 确定偏移后的第 一图像和第二图像上对应位置上的块区域相互不匹配的情况; 基于相互不匹 配的情况确定第一摄像单元和第二摄像单元是否正常。
进一步, 确定单元 402还用于: 获得第一图像和第二图像之间的相似度; 基于相互不匹配的情况和相似度确定第一摄像单元和第二摄像单元是否正 常。
进一步, 确定单元 402具体用于: 获得第一图像和第二图像之间的图像均 值之差和第一图像和第二图像之间的图像方差之差的组合或之一作为相似 度;
当图像均值之差大于第一阈值和图像方差之差大于第二阔值的组合或之 一时, 且对应位置上的块区域相互不匹配的比例大于第一门限时, 确定第一 摄像单元和第二摄像单元中的至少一个摄像单元的镜头被遮挡。
可选的, 确定单元 402还用于: 基于相互不匹配的情况和偏移量确定第 一摄像单元和第二摄像单元是否正常。
进一步, 确定单元 402具体用于: 当偏移量大于第二门限, 且相互不匹 配的比例小于第三门限时, 确定第一摄像单元和第二摄像单元之间的相对位 置关系异常。
可选的, 确定单元 402还用于: 计算第一图像和第二图像之间的相似度; 基于相似度、 偏移量和不匹配的情况确定第一摄像单元和第二摄像单元是否 正常。
可选的, 确定单元 402具体用于: 当连续多次不匹配的块区域的位置相 同时, 确定第一摄像单元和第二摄像单元中的至少一个摄像单元的镜头有脏 污区域。
可选的, 确定单元 402具体用于: 根据第一图像和第二图像之间的偏移 量和第一图像和第二图像之间的相似度的组合或之一确定第一摄像单元和第 二摄像单元是否正常。
结合以上各实施例, 确定单元 402还用于: 在根据第一图像和第二图像 确定第一摄像单元和第二摄像单元是否正常之前, 确定第一摄像单元和第二 摄像单元所处的当前场景为 HDR场景。
结合以上各实施例, 确定单元 402还用于: 在确定第一摄像单元和第二 摄像单元正常时, 分别计算第一图像和第二图像中每个物体的深度信息; 确 定深度信息大于阈值的物体的数量超过预定值。
前述图 1-图 4 实施例中的图像处理方法中的各种变化方式和具体实例同 样适用于本实施例的图像处理装置, 通过前述对图像处理方法的详细描述, 本领域技术人员可以清楚的知道本实施例中图像处理装置的实施方法, 所以 为了说明书的简洁, 在此不再详述。
基于同一发明构思, 本申请实施例还提供一种电子设备, 请参考图 Ί 所 示, 为本实施例中电子设备的系统框图。 该电子设备设备包括: 第一摄像单 元 501 , 用于采集第一采集区域的图像获得第一图像; 第二摄像单元 502, 用 于在与采集第一图像的同一采集时刻采集第二采集区域的图像获得第二图 像; 其中, 第一摄像单元 501和第二摄像单元 502的参数相同, 第一采集区 域和第二采集区域之间有重叠采集区域; 处理器 503 , 用于根据第一图像和第 二图像确定第一摄像单元 501和第二摄像单元 502是否正常。
具体来说, 第一摄像单元 501 包括第一镜头和第一图像传感器。 第一图 像传感器例如为电荷耦合元件 (英文: Charge-coupled Device; 简称: CCD ) 或互补金属氧化物半导体 (英文: Complementary Metal Oxide Semiconductor; 简称: CM0S )。 第二摄像单元 502包括第二镜头和第二图像传感器。
可选的, 处理器 503还用于: 在确定第一摄像单元 501和第二摄像单元 502正常时,将第一摄像单元 501和第二摄像单元 502在同一采集时刻采集的 有重叠采集区域的两个采集区域的两帧图像合成高动态范围 HDR图像。
可选的, 处理器 503具体用于: 获得第一图像和第二图像之间的偏移量; 将第一图像按照偏移量进行偏移; 将偏移后的第一图像和第二图像分别划分 为 n*m的块区域; 其中, n和 m均为大于 1的正整数; 确定偏移后的第一图 像和第二图像上对应位置上的块区域相互不匹配的情况; 基于相互不匹配的 情况确定第一摄像单元 501和第二摄像单元 502是否正常。
可选的, 处理器 503还用于: 获得第一图像和第二图像之间的相似度; 基于相互不匹配的情况和相似度确定第一摄像单元 501 和第二摄像单元 502 是否正常。
进一步, 处理器 503具体用于: 获得第一图像和第二图像之间的图像均值 之差和第一图像和第二图像之间的图像方差之差的组合或之一作为相似度; 当图像均值之差大于第一阈值和图像方差之差大于第二阔值的组合或之 一时, 且对应位置上的块区域相互不匹配的比例大于第一门限时, 确定第一 摄像单元 501和第二摄像单元 502中的至少一个摄像单元的镜头被遮挡。
可选的, 处理器 503 具体用于: 基于相互不匹配的情况和偏移量确定第 一摄像单元 501和第二摄像单元 502是否正常。
进一步, 处理器 503 具体用于: 当偏移量大于第二门限, 且相互不匹配 的比例小于第三门限时, 确定第一摄像单元 501和第二摄像单元 502之间的 相对位置关系异常。
可选的, 处理器 503还用于: 计算第一图像和第二图像之间的相似度; 基于相似度、 偏移量和不匹配的情况确定第一摄像单元 501 和第二摄像单元 502是否正常。
可选的, 处理器 503 具体用于: 当连续多次不匹配的块区域的位置相同 时, 确定第一摄像单元 501和第二摄像单元 502的镜头有脏污区域。
可选的, 处理器 503 具体用于: 根据第一图像和第二图像之间的偏移量 和第一图像和第二图像之间的相似度的组合或之一确定第一摄像单元 501 和 第二摄像单元 502是否正常。
结合以上各实施例, 处理器 503 还用于: 在根据第一图像和第二图像确 定第一摄像单元 501和第二摄像单元 502是否正常之前, 确定第一摄像单元 501和第二摄像单元 502所处的当前场景为 HDR场景。
结合以上各实施例, 处理器 503还用于: 在确定第一摄像单元 501和第 二摄像单元 502正常时, 分别计算第一图像和第二图像中每个物体的深度信 息; 确定深度信息大于阈值的物体的数量超过预定值。
请继续参考图 7所示, 电子设备还包括显示器 504, 用于显示第一摄像单 元 501和 /或第二摄像单元 502或者处理器 503获得的图像。
可选的, 电子设备还包括存储器 505, 用于存储处理器 503在执行操作时 所使用的数据; 或者第一摄像单元 501和 /或第二摄像单元 502获取的临时图 像数据。
可选的, 处理器 503具体可以包括: 中央处理器 ( CPU )和 IPS。
可选的, 处理器 503为 CPU, 和 IPS为物理上相互独立的芯片。
可选的, 电子设备还包括电池, 用于为该电子设备供电。
前述图 1-图 4 实施例中的图像处理方法中的各种变化方式和具体实例同 样适用于本实施例的图像处理装置, 通过前述对图像处理方法的详细描述, 本领域技术人员可以清楚的知道本实施例中图像处理装置的实施方法, 所以 为了说明书的筒洁, 在此不再详述。
申请实施例中提供的一个或多个技术方案, 至少具有如下技术效果或优 点: 本申请实施例中, 根据第一图像和第二图像确定第一摄像单元和第二摄 像单元是否正常, 其中, 第一图像通过第一摄像单元釆集第一釆集区域的图 像获得, 第二图像通过第二摄像单元采集第二采集区域的图像获得, 第一采 集区域和第二采集区域之间有重叠采集区域。 由此可以看出, 在本申请实施 例中, 电子设备可以通过两个摄像单元所拍摄的图像确定两个摄像单元是否 正常。 换言之, 本申请实施例提供一种确定摄像单元是否正常的方法, 这样 可以在摄像单元均正常的情况下拍摄图像 , 保证拍摄的效果。
本领域内的技术人员应明白, 本申请的实施例可提供为方法和设备实施 例可釆用硬件或结合软件和硬件的方式实现。
本申请是参照根据本申请实施例的方法、 设备(系统)、 和计算机程序产 品的流程图或方框图来描述的。 应理解可由计算机程序指令实现流程图或方 框图中的每一流程或方框、 以及流程图或方框图中的流程或方框的结合。 可 提供这些计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他 可编程数据处理设备的处理器, 使得通过计算机或其他可编程数据处理设备 的处理器执行的指令产生用于实现在流程图一个流程或多个流程或方框图一 个方框或多个方框中指定的功能的装置。
这些计算机程序指令可存储在能引导计算机或其他可编程数据处理设备 的可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括指令装 置的制造品, 该指令装置实现在流程图一个流程或多个流程或方框图一个方 框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的 处理, 从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图 一个流程或多个流程或方框图一个方框或多个方框中指定的功能的步骤。
显然, 本领域的技术人员可以对本申请进行各种改动和变型而不脱离本 申请的精神和范围。 这样, 倘若本申请的这些修改和变型属于本申请权利要 求及其等同技术的范围之内, 则本申请也意图包含这些改动和变型在内。

Claims

权 利 要 求
1、 一种图像处理方法, 其特征在于, 包括:
获得同一采集时刻采集的第一图像和第二图像, 所述第一图像通过第一 摄像单元采集第一采集区域的图像获得, 所述第二图像通过第二摄像单元采 集第二采集区域的图像获得, 所述第一摄像单元和第二摄像单元的参数相同, 所述第一采集区域和所述第二釆集区域之间有重叠釆集区域;
根据所述第一图像和所述第二图像确定所述第一摄像单元和所述第二摄 像单元是否正常。
2、 如权利要求 1所述的方法, 其特征在于, 在确定所述第一摄像单元和 所述第二摄像单元正常时, 将所述第一摄像单元和所述第二摄像单元在同一 采集时刻采集的有重叠采集区域的两个采集区域的两帧图像合成高动态范围 HDR图像。
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述根据所述第一图像和 所述第二图像确定所述第一摄像单元和所述第二摄像单元是否正常, 包括: 获得所述第一图像和所述第二图像之间的偏移量;
将所述第一图像按照所述偏移量进行偏移;
将偏移后的所述第一图像和所述第二图像分别划分为 n*m的块区域; 其 中, n和 m均为大于 1的正整数;
确定偏移后的所述第一图像和所述第二图像上对应位置上的块区域相互 不匹配的情况;
基于所述相互不匹配的情况确定所述第一摄像单元和所述第二摄像单元 是否正常。
4、 如权利要求 3所述的方法, 其特征在于, 所述方法还包括:
获得所述第一图像和所述第二图像之间的相似度;
所述基于所述相互不匹配的情况确定所述第一摄像单元和所述第二摄像 单元是否正常, 包括: 基于所述相互不匹配的情况和所述相似度确定所述第一摄像单元和所述 第二摄像单元是否正常。
5、 如权利要求 4所述的方法, 其特征在于, 所述获得所述第一图像和所 述第二图像之间的相似度, 包括:
获得所述第一图像和所述第二图像之间的图像均值之差和所述第一图像 和所述第二图像之间的图像方差之差的组合或之一作为所述相似度;
所述基于所述相互不匹配的情况和所述相似度确定所述第一摄像单元和 所述第二摄像单元是否正常, 包括:
当所述图像均值之差大于第一阈值和所述图像方差之差大于第二阚值的 组合或之一时, 且所述对应位置上的块区域相互不匹配的比例大于第一门限 时, 确定所述第一摄像单元和所述第二摄像单元中的至少一个摄像单元的镜 头被遮挡。
6、 如权利要求 3所述的方法, 其特征在于, 所述基于所述相互不匹配的 情况确定所述第一摄像单元和所述第二摄像单元是否正常, 包括:
基于所述相互不匹配的情况和所述偏移量确定所述第一摄像单元和所述 第二摄像单元是否正常。
7、 如权利要求 6所述的方法, 其特征在于, 所述基于所述相互不匹配的 情况和所述偏移量确定所述第一摄像单元和所述第二摄像单元是否正常, 包 括:
当所述偏移量大于第二门限, 且相互不匹配的比例小于第三门限时, 确 定所述第一摄像单元和所述第二摄像单元之间的相对位置关系异常。
8、 如权利要求 3所述的方法, 其特征在于, 所述方法还包括: 计算所述第一图像和所述第二图像之间的相似度;
所述基于所述相互不匹配的情况确定所述第一摄像单元和所述第二摄像 单元是否正常, 包括:
基于所述相似度、 所述偏移量和所述不匹配的情况确定所述第一摄像单 元和所述第二摄像单元是否正常。
9、 如权利要求 3所述的方法, 其特征在于, 所述基于所述相互不匹配的 情况确定所述第一摄像单元和所述第二摄像单元是否正常, 包括:
当连续多次不匹配的块区域的位置相同时, 确定所述第一摄像单元和所 述第二摄像单元中的至少一个摄像单元的镜头有脏污区域。
10、 如权利要求 1或 2所述的方法, 其特征在于, 所述根据所述第一图 像和所述第二图像确定所述第一摄像单元和所述第二摄像单元是否正常, 包 括:
根据所述第一图像和所述第二图像之间的偏移量和所述第一图像和所述 第二图像之间的相似度的组合或之一确定所述第一摄像单元和所述第二摄像 单元是否正常。
11、 如权利要求 1-10任一项所述的方法, 其特征在于, 在所述根据所述 第一图像和所述第二图像确定所述第一摄像单元和所述第二摄像单元是否正 常之前, 所述方法还包括:
确定所述第一摄像单元和所述第二摄像单元所处的当前场景为 HDR 场 景。
12、 如权利要求 2 所述的方法, 其特征在于, 在确定所述第一摄像单元 和所述第二摄像单元正常时, 所述方法还包括:
分别计算所述第一图像和所述第二图像中每个物体的深度信息; 确定深度信息大于阈值的物体的数量超过预定值。
13、 一种图像处理装置, 其特征在于, 包括:
获得单元, 用于获得同一采集时刻采集的第一图像和第二图像, 所述第 一图像通过第一摄像单元采集第一采集区域的图像获得, 所述第二图像通过 第二摄像单元采集第二采集区域的图像获得, 所述第一摄像单元和第二摄像 单元的参数相同, 所述第一采集区域和所述第二采集区域之间有重叠采集区 域;
确定单元, 用于根据所述第一图像和所述第二图像确定所述第一摄像单 元和所述第二摄像单元是否正常。
14、 如权利要求 13的装置, 其特征在于, 所述装置还包括处理单元, 用 于在确定所述第一摄像单元和所述第二摄像单元正常时, 将所述第一摄像单 元和所述第二摄像单元在同一采集时刻采集的有重叠采集区域的两个采集区 域的两帧图像合成高动态范围 HDR图像。
15、 如权利要求 13或 14所述的装置, 其特征在于, 所述确定单元具体 用于: 获得所述第一图像和所述第二图像之间的偏移量; 将所述第一图像按 照所述偏移量进行偏移; 将偏移后的所述第一图像和所述第二图像分别划分 为 n*m的块区域; 其中, n和 m均为大于 1的正整数; 确定偏移后的所述第 一图像和所述第二图像上对应位置上的块区域相互不匹配的情况; 基于所述 相互不匹配的情况确定所述第一摄像单元和所述第二摄像单元是否正常。
16、 如权利要求 15所述的装置, 其特征在于, 所述确定单元还用于: 获 得所述第一图像和所述第二图像之间的相似度; 基于所述相互不匹配的情况 和所述相似度确定所述第一摄像单元和所述第二摄像单元是否正常。
17、 如权利要求 16所述的装置, 其特征在于, 所述确定单元具体用于: 获得所述第一图像和所述第二图像之间的图像均值之差和所述第一图像和所 述第二图像之间的图像方差之差的组合或之一作为所述相似度;
当所述图像均值之差大于第一阈值和所述图像方差之差大于第二阔值的 组合或之一时, 且所述对应位置上的块区域相互不匹配的比例大于第一门限 时, 确定所述第一摄像单元和所述第二摄像单元中的至少一个摄像单元的镜 头被遮挡。
18、 如权利要求 15所述的装置, 其特征在于, 所述确定单元具体用于: 基于所述相互不匹配的情况和所述偏移量确定所述第一摄像单元和所述第二 摄像单元是否正常。
19、 如权利要求 18所述的装置, 其特征在于, 所述确定单元具体用于: 当所述偏移量大于第二门限, 且相互不匹配的比例小于第三门限时, 确定所 述第一摄像单元和所述第二摄像单元之间的相对位置关系异常。
20、 如权利要求 15所述的装置, 其特征在于, 所述确定单元还用于: 计 算所述第一图像和所述第二图像之间的相似度; 基于所述相似度、 所述偏移 量和所述不匹配的情况确定所述第一摄像单元和所述第二摄像单元是否正 常。
21、 如权利要求 15所述的装置, 其特征在于, 所述确定单元具体用于: 当连续多次不匹配的块区域的位置相同时, 确定所述第一摄像单元和所述第 二摄像单元中的至少一个摄像单元的镜头有脏污区域。
22、 如权利要求 13或 14所述的装置, 其特征在于, 所述确定单元具体 用于: 根据所述第一图像和所述第二图像之间的偏移量和所述第一图像和所 述第二图像之间的相似度的组合或之一确定所述第一摄像单元和所述第二摄 像单元是否正常。
23、 如权利要求 13-22任一项所述的装置, 其特征在于, 所述确定单元还 用于: 在所述根据所述第一图像和所述第二图像确定所述第一摄像单元和所 述第二摄像单元是否正常之前, 确定所述第一摄像单元和所述第二摄像单元 所处的当前场景为 HDR场景。
24、 如权利要求 14所述的装置, 其特征在于, 所述确定单元还用于: 在 确定所述第一摄像单元和所述第二摄像单元正常时, 分别计算所述第一图像 和所述第二图像中每个物体的深度信息; 确定深度信息大于阈值的物体的数 量超过预定值。
25、 一种电子设备, 其特征在于, 包括:
第一摄像单元, 用于采集第一采集区域的图像获得第一图像;
第二摄像单元, 用于在与采集所述第一图像的同一采集时刻采集第二采 集区域的图像获得第二图像; 其中, 所述第一摄像单元和第二摄像单元的参 数相同, 所述第一釆集区域和所述第二采集区域之间有重叠采集区域;
处理器, 用于根据所述第一图像和所述第二图像确定所述第一摄像单元 和所述第二摄像单元是否正常。
26、 如权利要求 25的电子设备, 其特征在于, 所述处理器还用于: 在确 定所述第一摄像单元和所述第二摄像单元正常时, 将所述第一摄像单元和所 述第二摄像单元在同一采集时刻采集的有重叠采集区域的两个采集区域的两 帧图像合成高动态范围 HDR图像。
27、 如权利要求 25或 26所述的电子设备, 其特征在于, 所述处理器具 体用于: 获得所述第一图像和所述第二图像之间的偏移量; 将所述第一图像 按照所述偏移量进行偏移; 将偏移后的所述第一图像和所述第二图像分别划 分为 n*m的块区域; 其中, n和 m均为大于 1的正整数; 确定偏移后的所述 第一图像和所述第二图像上对应位置上的块区域相互不匹配的情况; 基于所 述相互不匹配的情况确定所述第一摄像单元和所述第二摄像单元是否正常。
28、 如权利要求 27所述的电子设备, 其特征在于, 所述处理器还用于: 获得所述第一图像和所述第二图像之间的相似度; 基于所述相互不匹配的情 况和所述相似度确定所述第一摄像单元和所述第二摄像单元是否正常。
29、 如权利要求 28所述的电子设备, 其特征在于, 所述处理器具体用于: 获得所述第一图像和所述第二图像之间的图像均值之差和所述第一图像和所 述第二图像之间的图像方差之差的组合或之一作为所述相似度;
当所述图像均值之差大于第一阈值和所述图像方差之差大于第二阈值的 组合或之一时, 且所述对应位置上的块区域相互不匹配的比例大于第一门限 时, 确定所述第一摄像单元和所述第二摄像单元中的至少一个摄像单元的镜 头被遮挡。
30、如权利要求 27所述的电子设备, 其特征在于, 所述处理器具体用于: 基于所述相互不匹配的情况和所述偏移量确定所述第一摄像单元和所述第二 摄像单元是否正常。
31、如权利要求 30所述的电子设备, 其特征在于, 所述处理器具体用于: 当所述偏移量大于第二门限, 且相互不匹配的比例小于第三门限时, 确定所 述第一摄像单元和所述第二摄像单元之间的相对位置关系异常。
32、 如权利要求 27所述的电子设备, 其特征在于, 所述处理器还用于: 计算所述第一图像和所述第二图像之间的相似度; 基于所述相似度、 所述偏 移量和所述不匹配的情况确定所述第一摄像单元和所述第二摄像单元是否正 常。
33、如权利要求 27所述的电子设备, 其特征在于, 所述处理器具体用于: 当连续多次不匹配的块区域的位置相同时, 确定所述第一摄像单元和所述第 二摄像单元中的至少一个摄像单元的镜头有脏污区域。
34、 如权利要求 25或 26所述的电子设备, 其特征在于, 所述处理器具 体用于: 根据所述第一图像和所述第二图像之间的偏移量和所述第一图像和 所述第二图像之间的相似度的组合或之一确定所述第一摄像单元和所述第二 摄像单元是否正常。
35、 如权利要求 25-34任一项所述的电子设备, 其特征在于, 所述处理器 还用于: 在所述根据所述第一图像和所述第二图像确定所述第一摄像单元和 所述第二摄像单元是否正常之前, 确定所述第一摄像单元和所述第二摄像单 元所处的当前场景为 HDR场景。
36、 如权利要求 26所述的电子设备, 其特征在于, 所述处理器还用于: 在确定所述第一摄像单元和所述第二摄像单元正常时, 分别计算所述第一图 像和所述第二图像中每个物体的深度信息; 确定深度信息大于阔值的物体的 数量超过预定值。
PCT/CN2014/085608 2014-08-29 2014-08-29 一种图像处理方法、装置及电子设备 WO2016029465A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US15/507,190 US10908492B2 (en) 2014-08-29 2014-08-29 Image processing method and apparatus, and electronic device
EP14900396.4A EP3188468B1 (en) 2014-08-29 2014-08-29 Image processing method and electronic device
PCT/CN2014/085608 WO2016029465A1 (zh) 2014-08-29 2014-08-29 一种图像处理方法、装置及电子设备
KR1020177008184A KR101991754B1 (ko) 2014-08-29 2014-08-29 이미지 처리 방법 및 장치, 그리고 전자 기기
CN201480040022.9A CN105637852B (zh) 2014-08-29 2014-08-29 一种图像处理方法、装置及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/085608 WO2016029465A1 (zh) 2014-08-29 2014-08-29 一种图像处理方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2016029465A1 true WO2016029465A1 (zh) 2016-03-03

Family

ID=55398671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/085608 WO2016029465A1 (zh) 2014-08-29 2014-08-29 一种图像处理方法、装置及电子设备

Country Status (5)

Country Link
US (1) US10908492B2 (zh)
EP (1) EP3188468B1 (zh)
KR (1) KR101991754B1 (zh)
CN (1) CN105637852B (zh)
WO (1) WO2016029465A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151336A (zh) * 2018-10-15 2019-01-04 长沙智能驾驶研究院有限公司 摄像头的同步方法、装置、系统、存储介质及计算机设备

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190013224A (ko) * 2017-08-01 2019-02-11 엘지전자 주식회사 이동 단말기
KR102338576B1 (ko) * 2017-08-22 2021-12-14 삼성전자주식회사 이미지를 이용하여 획득된 깊이 정보의 속성에 따라 이미지와 연관하여 깊이 정보를 저장하는 전자 장치 및 전자 장치 제어 방법
CN109934262B (zh) * 2019-01-31 2023-08-22 平安科技(深圳)有限公司 图片差异性判断方法、装置、计算机设备和存储介质
CN111080571B (zh) * 2019-11-15 2023-10-20 北京迈格威科技有限公司 摄像头遮挡状态检测方法、装置、终端和存储介质
CN111757097B (zh) * 2020-06-29 2022-03-25 歌尔光学科技有限公司 检测方法、检测装置及计算机可读存储介质
CN112351271A (zh) * 2020-09-22 2021-02-09 北京迈格威科技有限公司 一种摄像头的遮挡检测方法、装置、存储介质和电子设备
CN113542587B (zh) * 2021-05-25 2023-04-18 浙江大华技术股份有限公司 图像抓拍方法、装置、电子设备、计算机可读存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004040712A (ja) * 2002-07-08 2004-02-05 Minolta Co Ltd 撮像装置
JP2010114760A (ja) * 2008-11-07 2010-05-20 Fujifilm Corp 撮影装置、指がかり通知方法およびプログラム
JP2010154311A (ja) * 2008-12-25 2010-07-08 Fujifilm Corp 複眼撮像装置及び立体画像取得方法
CN101997981A (zh) * 2010-11-01 2011-03-30 惠州Tcl移动通信有限公司 一种基于手机摄像头的宽容度实现方法及手机
CN102036013A (zh) * 2009-10-02 2011-04-27 三洋电机株式会社 摄像装置
CN102156380A (zh) * 2010-02-04 2011-08-17 卡西欧计算机株式会社 摄像装置以及警告方法
CN102340631A (zh) * 2010-07-14 2012-02-01 日本胜利株式会社 控制装置、立体影像摄像装置以及控制方法
CN103685951A (zh) * 2013-12-06 2014-03-26 华为终端有限公司 一种图像处理方法、装置及终端

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5027817A (en) * 1989-06-22 1991-07-02 New York University Statistical based display for positron emission tomography scans
US6215892B1 (en) * 1995-11-30 2001-04-10 Chromavision Medical Systems, Inc. Method and apparatus for automated image analysis of biological specimens
CN103081483A (zh) * 2010-09-08 2013-05-01 日本电气株式会社 摄影设备和摄影方法
US9210322B2 (en) * 2010-12-27 2015-12-08 Dolby Laboratories Licensing Corporation 3D cameras for HDR
KR101824439B1 (ko) * 2011-02-16 2018-02-02 주식회사 스테레오피아 모바일 스테레오 카메라 장치 및 그 촬영방법
US9270875B2 (en) * 2011-07-20 2016-02-23 Broadcom Corporation Dual image capture processing
EP2667354B1 (en) * 2012-05-24 2015-07-08 Thomson Licensing Method and apparatus for analyzing stereoscopic or multi-view images
US10694106B2 (en) * 2013-06-14 2020-06-23 Qualcomm Incorporated Computer vision application processing
KR102356448B1 (ko) * 2014-05-05 2022-01-27 삼성전자주식회사 이미지 합성 방법 및 그 전자 장치

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004040712A (ja) * 2002-07-08 2004-02-05 Minolta Co Ltd 撮像装置
JP2010114760A (ja) * 2008-11-07 2010-05-20 Fujifilm Corp 撮影装置、指がかり通知方法およびプログラム
JP2010154311A (ja) * 2008-12-25 2010-07-08 Fujifilm Corp 複眼撮像装置及び立体画像取得方法
CN102036013A (zh) * 2009-10-02 2011-04-27 三洋电机株式会社 摄像装置
CN102156380A (zh) * 2010-02-04 2011-08-17 卡西欧计算机株式会社 摄像装置以及警告方法
CN102340631A (zh) * 2010-07-14 2012-02-01 日本胜利株式会社 控制装置、立体影像摄像装置以及控制方法
CN101997981A (zh) * 2010-11-01 2011-03-30 惠州Tcl移动通信有限公司 一种基于手机摄像头的宽容度实现方法及手机
CN103685951A (zh) * 2013-12-06 2014-03-26 华为终端有限公司 一种图像处理方法、装置及终端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3188468A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151336A (zh) * 2018-10-15 2019-01-04 长沙智能驾驶研究院有限公司 摄像头的同步方法、装置、系统、存储介质及计算机设备
CN109151336B (zh) * 2018-10-15 2020-11-13 长沙智能驾驶研究院有限公司 摄像头的同步方法、装置、系统、存储介质及计算机设备

Also Published As

Publication number Publication date
EP3188468A1 (en) 2017-07-05
EP3188468A4 (en) 2017-08-16
CN105637852B (zh) 2019-03-01
KR20170045314A (ko) 2017-04-26
US20180231885A1 (en) 2018-08-16
KR101991754B1 (ko) 2019-09-30
US10908492B2 (en) 2021-02-02
EP3188468B1 (en) 2019-05-22
CN105637852A (zh) 2016-06-01

Similar Documents

Publication Publication Date Title
WO2016029465A1 (zh) 一种图像处理方法、装置及电子设备
JP6721065B2 (ja) 撮像装置、画像処理装置および方法
US9325899B1 (en) Image capturing device and digital zooming method thereof
KR101657039B1 (ko) 화상 처리 장치, 화상 처리 방법, 및 촬상 시스템
US9973672B2 (en) Photographing for dual-lens device using photographing environment determined using depth estimation
CN107396080B (zh) 产生深度信息的方法及系统
WO2016049889A1 (zh) 一种自动对焦方法、装置及电子设备
EP2350973A1 (en) Stereoscopic image processing device, method, recording medium and stereoscopic imaging apparatus
WO2016184131A1 (zh) 基于双摄像头拍摄图像的方法、装置及计算机存储介质
JP5843454B2 (ja) 画像処理装置、画像処理方法およびプログラム
CN111726521B (zh) 终端的拍照方法、拍照装置和终端
JP2019510234A (ja) 奥行き情報取得方法および装置、ならびに画像取得デバイス
WO2020029596A1 (zh) 镜头控制方法、装置及终端
CN115866394B (zh) 用于在第一镜头和第二镜头之间切换的方法和电子设备
US20170155889A1 (en) Image capturing device, depth information generation method and auto-calibration method thereof
WO2020134123A1 (zh) 全景拍摄方法及装置、相机、移动终端
JP2015046044A (ja) 画像処理装置、画像処理方法、プログラムおよび撮像システム
CN105472263B (zh) 影像撷取方法及使用此方法的影像撷取设备
TW201342303A (zh) 三維空間圖像的獲取系統及方法
TWI693577B (zh) 影像產生方法與電子裝置
JP2015046051A (ja) 画像処理装置、画像処理方法、プログラムおよび撮像システム
WO2023225825A1 (zh) 位置差异图生成方法及装置、电子设备、芯片及介质
TW201517623A (zh) 電子裝置及其影像調整方法
TWI621100B (zh) 影像處理方法及可攜式電子裝置
CN104349131B (zh) 一种信息处理方法及电子设备

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: 14900396

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15507190

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2014900396

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014900396

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20177008184

Country of ref document: KR

Kind code of ref document: A