WO2018018771A1 - 基于双摄像头的拍照方法及系统 - Google Patents

基于双摄像头的拍照方法及系统 Download PDF

Info

Publication number
WO2018018771A1
WO2018018771A1 PCT/CN2016/103875 CN2016103875W WO2018018771A1 WO 2018018771 A1 WO2018018771 A1 WO 2018018771A1 CN 2016103875 W CN2016103875 W CN 2016103875W WO 2018018771 A1 WO2018018771 A1 WO 2018018771A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
exposure amount
image
foreground
preset
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2016/103875
Other languages
English (en)
French (fr)
Inventor
侯晓龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Publication of WO2018018771A1 publication Critical patent/WO2018018771A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio

Definitions

  • the present invention relates to the field of digital image processing technologies, and in particular, to a camera method and system based on dual cameras.
  • the functions of electronic devices are more and more, and the camera function is one of them.
  • the quality of the camera is an important indicator for evaluating the advantages and disadvantages of the electronic device. How to make a good image is especially important when the lighting conditions are not ideal, especially in a backlit environment.
  • a method for photographing based on a dual camera is applied to an electronic device, wherein a first camera and a second camera are mounted on the same side of the electronic device, and the method includes:
  • the first image and the second image are fused to generate a target image.
  • the acquiring the first exposure amount of the first camera and the second exposure amount of the second camera comprises:
  • Adjusting the first camera parameter of the first camera according to the first exposure amount includes:
  • the first photographing parameter includes an aperture, a shutter, and a sensitivity ;
  • Adjusting the second photographing parameter of the second camera according to the second exposure amount includes:
  • the second photographing parameter includes an aperture, a shutter, and a sensitivity .
  • Adjusting the first camera parameter of the first camera according to the first exposure amount includes:
  • the first photographing parameter comprising: an aperture, a shutter, and a sensitivity
  • Adjusting the second photographing parameter of the second camera according to the second exposure amount includes:
  • the second photographing parameter is adjusted to reduce the second exposure amount
  • the first photographing parameter includes an aperture, a shutter, and a sensitivity.
  • the method further comprises:
  • Trusing pixels in the foreground that have pixel values less than a first preset value Trusing pixels in the foreground that have pixel values less than a first preset value
  • Pixels in the background whose pixel values are greater than the second preset value are rejected.
  • a camera system based on a dual camera is installed in an electronic device, and a first camera and a second camera are mounted on the same side of the electronic device, and the system includes:
  • Obtaining a module configured to acquire a first exposure amount of the first camera and a second exposure amount of the second camera;
  • the adjusting module is configured to adjust a first photographing parameter of the first camera according to the first exposure amount, and adjust a second photographing parameter of the second camera according to the second exposure amount;
  • control module configured to: when the photographing instruction is received, control the first camera to capture a target object to obtain a first image, and control the second camera to capture the target object to obtain a second image;
  • the fusion module is configured to fuse the first image and the second image to generate a target image.
  • the obtaining, by the acquiring module, the first exposure amount of the first camera and the second exposure amount of the second camera include:
  • Adjusting, by the adjusting module, the first camera parameter of the first camera according to the first exposure amount includes:
  • the first photographing parameter includes an aperture, a shutter, and a sensitivity ;
  • Adjusting, by the adjusting module, the second camera parameter of the second camera according to the second exposure amount includes:
  • the second photographing parameter includes an aperture, a shutter, and a sensitivity .
  • Adjusting, by the adjusting module, the first camera parameter of the first camera according to the first exposure amount includes:
  • the first photographing parameter includes an aperture, a shutter, and a sensitivity
  • Adjusting, by the adjusting module, the second camera parameter of the second camera according to the second exposure amount includes:
  • the second photographing parameter is adjusted to reduce the second exposure amount
  • the first photographing parameter includes an aperture, a shutter, and a sensitivity.
  • the fusion module is further configured to:
  • Trusing pixels in the foreground that have pixel values less than a first preset value Trusing pixels in the foreground that have pixel values less than a first preset value
  • Pixels in the background whose pixel values are greater than the second preset value are rejected.
  • the invention is based on the camera method and system of the dual camera, and can effectively improve the background overexposure or the darkness of the foreground subject in the backlight scene, and obtain an accurate image of the full image, which can clearly distinguish the contour and depth of the foreground, and can make The effect of the bright spot is bright, while the dark place retains more detail features, which enhances the detail of the dark and bright parts of the image, thus improving the quality of the image.
  • FIG. 1 is a schematic structural view of a preferred embodiment of an electronic device that operates a dual camera-based photographing method according to the present invention.
  • FIG. 2 is a flow chart of a preferred embodiment of a dual camera based photographing method of the present invention.
  • FIG. 3 is a functional block diagram of a preferred embodiment of a dual camera based camera system of the present invention.
  • FIG. 1 is a schematic diagram of a hardware architecture of a preferred embodiment of an electronic device for operating a dual camera-based photographing method according to the present invention.
  • the electronic device 1 includes, but is not limited to, a dual camera based camera system 10, a storage device 20, a processing device 30, a first camera 40, and a second camera 50.
  • the dual camera based photographing method of the present invention is implemented by the dual camera based photographing system 10 in the electronic device 1.
  • the electronic device 1 includes an electronic device capable of automatically performing numerical calculation and/or information processing according to an instruction set or stored in advance, the hardware of which includes but is not limited to a microprocessor, an application specific integrated circuit, a programmable gate array, Digital processors, embedded devices, etc.
  • the electronic device 1 may also include a user device.
  • the user equipment includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, such as a tablet computer, a smart phone, a personal digital assistant, and others. Any imaging device with dual cameras (40, 50).
  • the network where the user equipment is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network, and the like.
  • user equipment is only an example, and other existing or future user equipments, such as may be adapted to the present invention, are also included in the scope of the present invention and are incorporated herein by reference.
  • the storage device 20 is configured to store software programs and data installed in the electronic device 1, such as the dual camera based camera system 10.
  • the storage device 20 may be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1.
  • the storage device 20 may also be an external storage device of the electronic device 1, such as a plug-in hard disk on the electronic device 1, a smart media card (SMC), and a secure digital card (Secure Digital Card, SD). ), flash memory card and other storage units.
  • the storage device 20 may also include an internal storage unit of the electronic device 1 or an external storage device.
  • the storage device 20 stores in advance a target detection algorithm, a first photographing parameter, a second photographing parameter, and the like.
  • the first photographing parameter includes: an aperture, a shutter, a sensitivity, and the like
  • the second photographing parameter includes: an aperture, a shutter, a sensitivity, and the like.
  • the processing device 30 is one or more central processing units (CPUs), microprocessors or other digital processing chips, and the like.
  • the processing device 30 is operative to execute software program code or operational data, such as to perform the dual camera based camera system 10.
  • the first camera 40 and the second camera 50 are located on the same side of the electronic device 1, and are respectively used for capturing images having foregrounds such as people and animals.
  • the first camera 40 and the second camera 50 are each provided with a charge-coupled device (CCD) type photosensitive element, which can be used to sense light entering the camera.
  • the first camera 40 and the second camera 50 may be a fixed camera or a rotatable camera.
  • FIG. 2 is a flow chart of a preferred embodiment of the image processing method of the present invention. The order of the steps in the flowchart may be changed according to different requirements, and some steps may be omitted.
  • the first camera 40 and the second camera 50 are arranged side by side on one side of the electronic device 1, and are mainly used for capturing an image including a target object and receiving a photographing instruction. Take a picture of the target object.
  • the first exposure amount of the first camera 40 may be acquired by the photosensitive element of the first camera 40; the second exposure amount of the second camera 50 may be obtained by the second camera 50 The photosensitive element is taken.
  • the first camera 40 can be used to measure the exposure amount of the foreground
  • the second camera 50 can be used to measure the exposure amount of the background.
  • the first camera 40 can be used to measure the amount of exposure of the background
  • the second camera 50 can be used to measure the amount of exposure of the foreground.
  • the exposure amount of the foreground measured by the first camera 40 or the second camera 50 may be preset by the camera system 10 based on the dual camera, or may be preset by the user according to personal preference or according to the first camera 40 and the camera.
  • the performance of the second camera 50 is set and modified by itself.
  • the first camera 40 measures the exposure amount of the foreground
  • the second camera 50 measures the exposure amount of the background as an example.
  • a target detection algorithm is stored in advance in the electronic device 1.
  • the target detection algorithm may be a foreground target detection algorithm or a background target detection algorithm, and the target detection algorithm includes, but is not limited to, an interframe difference method, a background subtraction method, an optical flow method, or a foreground target based on a Gaussian model.
  • Detection algorithm The dual camera-based photographing system 10 uses a pre-stored target detection algorithm to identify a foreground from an image including a target object captured by the first camera 40, and then senses an exposure amount on the foreground image.
  • the first exposure amount is described.
  • the foreground refers to a target object, such as a person, an animal, or a vehicle.
  • the first exposure amount is an exposure amount of each pixel on the foreground image.
  • the dual camera-based photographing system 10 uses the pre-stored target detection algorithm to recognize the background from the image including the target object captured by the second camera 50, and then sense the background image.
  • the exposure amount gives the second exposure amount.
  • the background refers to an image after the target object is removed.
  • the second exposure amount is an exposure amount of each pixel on the background image.
  • the dual camera based imaging system 10 compares the first exposure amount with a preset first threshold value to obtain a first result, compares the second exposure amount with a preset
  • the second threshold is determined to be a second result; the first camera parameter of the first camera 40 is adjusted according to the first result, and the second camera parameter of the second camera 50 is adjusted according to the second result.
  • the dual camera-based imaging system 10 After acquiring the first exposure amount, the dual camera-based imaging system 10 identifies each pixel of the foreground and calculates an average value of the foreground pixel, and then sets an average value of the foreground pixel with a preset value. The first threshold is compared, and the first camera parameter of the first camera 40 is adjusted according to the comparison result.
  • the first photographing parameters include: aperture, shutter, sensitivity, and the like.
  • the dual camera based imaging system 10 adjusts the first camera parameter to increase the first exposure amount.
  • the dual camera-based imaging system 10 can increase the first exposure amount or the like by increasing the aperture, or increasing the shutter speed, or increasing the exposure time to increase the sensitivity.
  • the dual camera based imaging system 10 does not need to adjust the first imaging parameters of the first camera 40.
  • the background pixels are identified and the average value of the background pixels is calculated, and then the average value of the background pixels is preset.
  • the determined second threshold is compared, and the second photographing parameter of the second camera 50 is adjusted according to the comparison result.
  • the second photographing parameters include: aperture, shutter, sensitivity, and the like.
  • the dual camera based imaging system 10 adjusts the second camera parameter to reduce the second amount of exposure.
  • the dual camera-based imaging system 10 can reduce the second exposure amount or the like by reducing the aperture, or decreasing the shutter speed, or reducing the exposure time to reduce the sensitivity.
  • the second exposure amount is normal, that is, the exposure amount of the background is normal, and the background brightness in the captured image is appropriate.
  • the dual camera based imaging system 10 does not need to adjust the second shooting parameters of the second camera 50.
  • the dual camera based imaging system 10 compares the first exposure amount with a preset first range to obtain a first result, compares the second exposure amount with a preset The second range is used to obtain a second result; the first camera parameter of the first camera 40 is adjusted according to the first result, and the second camera parameter of the second camera 50 is adjusted according to the second result.
  • the dual camera-based imaging system 10 After acquiring the first exposure amount, the dual camera-based imaging system 10 identifies each pixel value of the foreground, and then counts that the pixel value of the foreground satisfies a predetermined number of pixels in the first range. The percentage of the total pixels of the foreground adjusts the first camera parameter of the first camera 40 according to the statistical result.
  • the first photographing parameters include: aperture, shutter, sensitivity, and the like.
  • the double based The imaging system 10 of the camera adjusts the first photographing parameter to increase the first amount of exposure.
  • the dual camera-based imaging system 10 can increase the first exposure amount or the like by increasing the aperture, or increasing the shutter speed, or increasing the exposure time to increase the sensitivity.
  • the percentage is higher than or equal to the preset first percentage, it indicates that the first exposure amount is normal, that is, the exposure amount of the foreground is normal, and the target object in the captured image is suitable in brightness.
  • the dual camera based imaging system 10 does not need to adjust the first imaging parameters of the first camera 40.
  • each pixel value of the background is recognized, and then the pixel value of the background is counted to satisfy a preset second range of pixels.
  • the number of the pixels is a percentage of the total pixels of the foreground, and the second camera parameter of the second camera 50 is adjusted according to the statistical result.
  • the second photographing parameters include: aperture, shutter, sensitivity, and the like.
  • the double based The imaging system 10 of the camera adjusts the second camera parameter to reduce the second amount of exposure.
  • the dual camera-based imaging system 10 can reduce the second exposure amount or the like by reducing the aperture, or decreasing the shutter speed, or reducing the exposure time to reduce the sensitivity.
  • the percentage is higher than or equal to the preset second percentage, it indicates that the second exposure amount is normal, that is, the exposure amount of the background is normal, and the target object in the captured image is suitable in brightness.
  • the dual camera based imaging system 10 does not need to adjust the second imaging parameters of the second camera 50.
  • the first camera 40 is controlled to capture a target object to obtain a first image
  • the second camera 50 is controlled to capture the target object to obtain a second image.
  • the first camera 40 and the second camera 50 are controlled to respectively capture the target object.
  • the photographing instruction may be triggered by one or more of the following methods: clicking a photographing icon, clicking a photographing button, a Bluetooth transmission command, voice recognition (eg, "photographing" password or "OK” password, etc.), gesture recognition (eg, , "V” gesture or "OK” gesture, etc.), expression recognition (for example, smiley face, etc.).
  • the first camera 40 and the second camera 50 may simultaneously perform a shooting action for capturing the target object.
  • the photographing actions of the first camera 40 and the second camera 50 for capturing the target object may also be performed asynchronously.
  • the first camera 40 preferentially captures the target object, and After the time (for example, 1 second) is set, the second camera 50 captures the target object again.
  • the first image and the second image are merged to generate a target image.
  • an image fusion algorithm is pre-stored in the electronic device 1, and the image fusion algorithm includes: an image fusion method based on non-multi-scale transformation (eg, an average weighting method, a PCA-based image fusion method, and a modulation-based method) Image fusion method, etc., image fusion method based on multi-scale transformation (for example, image fusion method based on pyramid transform, fusion method based on wavelet transform, image fusion method based on curvelet transform, etc.).
  • the image fusion algorithm that can be employed in the present invention is not limited to the above-listed methods, and may include other existing or future possible methods suitable for merging images.
  • the enumerated image fusion algorithms are prior art, and the present invention is not explained here.
  • the dual camera-based imaging system 10 crops the foreground image captured by the first camera 40 and crops the background captured by the second camera 50 to obtain a suitable exposure image. .
  • the dual camera-based imaging method may further include: pre-processing the first image Obtaining a first processed image, preprocessing the second image to obtain a second processed image; and fusing the first processed image and the second processed image to obtain a target image.
  • the pre-processing the first image may include: culling pixels in the foreground that have pixel values smaller than a first preset value. Pixels in the foreground in which the pixel value is smaller than the first preset value are excluded to further ensure a small or very small number of pixels in the foreground that are underexposed.
  • Performing preprocessing on the second image may include culling pixels in the background whose pixel values are greater than a second preset value. Pixels in the background in which the pixel value is greater than the second preset value are excluded to further ensure that a small number or a very small number of pixels having an overexposure phenomenon in the background are ensured.
  • preprocessing the first image and the second image may further include: image enhancement, noise cancellation.
  • image enhancement and noise cancellation are prior art and will not be described herein.
  • the dual camera-based imaging method of the present invention is used to capture a target object by using a dual camera (the first camera 40 and the second camera 50), and the first camera 40 is acquired first when shooting. Adjusting the first photographing parameter of the first camera 40 and the second camera 50 according to the first exposure amount and the second exposure amount, respectively, an exposure amount and a second exposure amount of the second camera 50. a second photographing parameter, when the photographing instruction is received, controlling the first camera 40 and the second camera 50 to respectively capture an image including the target object to obtain a first image and a second image, and The first image and the second image are fused to generate a target image.
  • the invention can effectively improve the background overexposure or the darkness of the foreground subject in the backlight scene, obtain an accurate image of the full image, and clearly distinguish the contour and depth of the foreground, so that the effect of the foreground bright is clear, and Dark areas retain more detail and enhance the detail of the dark and bright parts of the image.
  • the dual camera-based imaging system 10 includes an acquisition module 100 , a setting module 101 , an adjustment module 102 , a control module 103 , and a fusion module 104 .
  • the module referred to in the fourth aspect of the present invention refers to a series of computer program segments that can be executed by the processing device 30 and that can perform fixed functions, which are stored in the storage device 20. In the present embodiment, the functions of the respective modules will be described in detail in the subsequent embodiments.
  • the acquiring module 100 is configured to acquire a first exposure amount of the first camera 40 and a second exposure amount of the second camera 50.
  • the first camera 40 and the second camera 50 are arranged side by side on one side of the electronic device 1, and are mainly used for capturing an image including a target object and receiving a photographing instruction. Take a picture of the target object.
  • the first exposure amount of the first camera 40 may be acquired by the photosensitive element of the first camera 40; the second exposure amount of the second camera 50 may be obtained by the second camera 50 The photosensitive element is taken.
  • the first camera 40 can be used to measure the exposure amount of the foreground
  • the second camera 50 can be used to measure the exposure amount of the background.
  • the first camera 40 can be used to measure the amount of exposure of the background
  • the second camera 50 can be used to measure the amount of exposure of the foreground.
  • the exposure amount of the foreground measured by the first camera 40 or the second camera 50 may be preset by the setting module 101 in advance, or may be performed by the user according to personal preference or according to the first camera 40 and the second camera. The performance of 50 is set and modified by itself.
  • the first camera 40 measures the exposure amount of the foreground
  • the second camera 50 measures the exposure amount of the background as an example.
  • a target detection algorithm is stored in advance in the electronic device 1.
  • the target detection algorithm may be a foreground target detection algorithm or a background target detection algorithm, and the target detection algorithm includes, but is not limited to, an interframe difference method, a background subtraction method, an optical flow method, or a foreground target based on a Gaussian model.
  • Detection algorithm The acquiring module 100 uses a pre-stored target detection algorithm to identify a foreground from an image including the target object captured by the first camera 40, and then senses an exposure amount on the foreground image to obtain the first exposure. the amount.
  • the foreground refers to a target object, such as a person, an animal, or a vehicle.
  • the first exposure amount is an exposure amount of each pixel on the foreground image.
  • the acquiring module 100 uses the pre-stored target detection algorithm to identify the background from the image including the target object captured by the second camera 50, and then sense the exposure amount on the background image.
  • the second exposure amount refers to an image after the target object is removed.
  • the second exposure amount is an exposure amount of each pixel on the background image.
  • the adjusting module 102 adjusts a first photographing parameter of the first camera 40 according to the first exposure amount, and adjusts a second photographing parameter of the second camera 50 according to the second exposure amount.
  • the adjustment module 102 compares the first exposure amount with a preset first threshold value to obtain a first result, and compares the second exposure amount with a preset second threshold value. And a second result; adjusting the first camera parameter of the first camera 40 according to the first result, and adjusting the second camera parameter of the second camera 50 according to the second result.
  • the acquiring module 100 After acquiring the first exposure amount, the acquiring module 100 identifies each pixel of the foreground and calculates an average value of the foreground pixel, and then the adjusting module 102 sets an average value of the foreground pixel with a preset value.
  • the first threshold is determined for comparison, and the first camera parameter of the first camera 40 is adjusted according to the comparison result.
  • the first photographing parameters include: aperture, shutter, sensitivity, and the like.
  • the adjustment module 102 adjusts the first photographing parameter to increase the first exposure amount.
  • the adjustment module 102 may increase the first exposure amount or the like by increasing the aperture, or increasing the shutter speed, or increasing the exposure time to increase the sensitivity.
  • the adjustment module 102 does not need to adjust the first shooting parameter of the first camera 40.
  • the acquiring module 100 identifies the background pixel and calculates an average value of the background pixels, and then the adjusting module 102 compares the average value of the background pixels with a preset The set second threshold is compared, and the second photographing parameter of the second camera 50 is adjusted according to the comparison result.
  • the second photographing parameters include: aperture, shutter, sensitivity, and the like.
  • the adjustment module 102 adjusts the second photographing parameter to reduce the second exposure amount.
  • the adjustment module 102 can reduce the second exposure amount or the like by reducing the aperture, or decreasing the shutter speed, or reducing the exposure time to reduce the sensitivity.
  • the second exposure amount is normal, that is, the exposure amount of the background is normal, and the background brightness in the captured image is appropriate.
  • the adjustment module 102 does not need to adjust the second shooting parameter of the second camera 50.
  • the adjusting module 102 compares the first exposure amount with a preset first range to obtain a first result, and compares the second exposure amount with a preset second range. And a second result; adjusting the first camera parameter of the first camera 40 according to the first result, and adjusting the second camera parameter of the second camera 50 according to the second result.
  • the acquiring module 100 After acquiring the first exposure amount, the acquiring module 100 identifies each pixel value of the foreground, and then the adjusting module 102 calculates that the pixel value of the foreground meets a preset number of pixels in the first range. The percentage of the foreground total pixels is adjusted, and the first camera parameter of the first camera 40 is adjusted according to the statistical result.
  • the first photographing parameters include: aperture, shutter, sensitivity, and the like.
  • the adjustment module 102 adjusts the first photographing parameter to increase the first exposure amount.
  • the adjustment module 102 may increase the first exposure amount or the like by increasing the aperture, or increasing the shutter speed, or increasing the exposure time to increase the sensitivity.
  • the adjustment module 102 does not need to adjust the first shooting parameter of the first camera 40.
  • the acquiring module 100 identifies each pixel value of the background, and then counts that the pixel value of the background satisfies a preset second range of pixels. The percentage of the total foreground pixels is adjusted, and the second photographing parameter of the second camera 50 is adjusted according to the statistical result.
  • the second photographing parameters include: aperture, shutter, sensitivity, and the like.
  • the second photographing parameter is adjusted based on the adjustment module 102 to reduce the second exposure amount.
  • the adjustment module 102 can reduce the second exposure amount or the like by reducing the aperture, or decreasing the shutter speed, or reducing the exposure time to reduce the sensitivity.
  • the adjustment module 102 does not need to adjust the second shooting parameter of the second camera 50.
  • the control module 103 when receiving the photographing instruction, controls the first camera 40 to capture a target object to obtain a first image and controls the second camera 50 to capture the target object to obtain a second image.
  • the first camera 40 and the second camera 50 are controlled to respectively capture the target object.
  • the photographing instruction may be triggered by one or more of the following methods: clicking a photographing icon, clicking a photographing button, a Bluetooth transmission command, voice recognition (eg, "photographing" password or "OK” password, etc.), gesture recognition (eg, , "V” gesture or "OK” gesture, etc.), expression recognition (for example, smiley face, etc.).
  • the first camera 40 and the second camera 50 may simultaneously perform a shooting action for capturing the target object.
  • the photographing actions of the first camera 40 and the second camera 50 for capturing the target object may also be performed asynchronously.
  • the first camera 40 preferentially captures the target object, and After the time (for example, 1 second) is set, the second camera 50 captures the target object again.
  • the fusion module 104 is configured to fuse the first image and the second image to generate a target image.
  • an image fusion algorithm is pre-stored in the electronic device 1, and the image fusion algorithm includes: an image fusion method based on non-multi-scale transformation (eg, an average weighting method, a PCA-based image fusion method, and a modulation-based method) Image fusion method, etc., image fusion method based on multi-scale transformation (for example, image fusion method based on pyramid transform, fusion method based on wavelet transform, image fusion method based on curvelet transform, etc.).
  • the image fusion algorithm that can be employed in the present invention is not limited to the above-listed methods, and may include other existing or future possible methods suitable for merging images.
  • the enumerated image fusion algorithms are prior art, and the present invention is not explained here.
  • the fusion module 104 may be configured to crop the foreground image captured by the first camera 40 and crop the background captured by the second camera 50, and if not, belong to the foreground or not.
  • the part of the background is spliced with the part after the splicing is completed to obtain an image with appropriate exposure.
  • the above cutting method may be to extract pixels and corresponding positions therein.
  • the fusion module 104 may further be configured to: preprocess the first image to obtain a Processing the image, preprocessing the second image to obtain a second processed image; and fusing the first processed image and the second processed image to obtain a target image.
  • the pre-processing the first image may include: culling pixels in the foreground that have pixel values smaller than a first preset value. Pixels in the foreground in which the pixel value is smaller than the first preset value are excluded to further ensure a small or very small number of pixels in the foreground that are underexposed.
  • Performing preprocessing on the second image may include culling pixels in the background whose pixel values are greater than a second preset value. Pixels in the background in which the pixel value is greater than the second preset value are excluded to further ensure that a small number or a very small number of pixels having an overexposure phenomenon in the background are ensured.
  • preprocessing the first image and the second image may further include: image enhancement, noise cancellation.
  • image enhancement and noise cancellation are prior art and will not be described herein.
  • the dual camera-based imaging system 10 of the present invention is configured to capture a target object by using a dual camera (the first camera 40 and the second camera 50).
  • the first photographing parameter and the second photographing parameter of the second camera 50, when receiving the photographing instruction, the control module 103 controls the first camera 40 and the second camera 50 to respectively include the target object
  • the inner image is captured to obtain a first image and a second image, and the fusion module 104 fuses the first image and the second image to generate a target image.
  • the invention can effectively improve the background overexposure or the darkness of the foreground subject in the backlight scene, obtain an accurate image of the full image, and clearly distinguish the contour and depth of the foreground, so that the effect of the foreground bright is clear, and Dark areas retain more detail and enhance the detail of the dark and bright parts of the image.
  • the processing device 30 can execute an operating system of the electronic device 1 and various installed applications, program codes, and the like, for example, each module described above, including the acquiring module. 100.
  • Program code is stored in the storage device 20, and the processing device 30 can invoke program code stored in the storage device 20 to perform related functions.
  • the various modules eg, the acquisition module 100, the setup module 101, etc.
  • FIG. 3 are program codes stored in the storage device 20 and are executed by the processing device 30, thereby Implement the functions of the various modules described.
  • the storage device 20 stores a plurality of instructions that are executed by the processing device 30 to implement a dual camera based photographing method.
  • performing, by the processing device 30, the multiple instructions includes: acquiring a first exposure amount of the first camera and a second exposure amount of the second camera; and adjusting according to the first exposure amount a first camera parameter of the first camera, and a second camera parameter of the second camera according to the second exposure amount; when receiving a camera command, controlling the first camera to capture a target object The first image and the second camera are controlled to capture the target object to obtain a second image; and the first image and the second image are fused to generate a target image.
  • the acquiring the first exposure amount of the first camera and the second exposure amount of the second camera comprises: using a pre-stored target detection algorithm from the image captured by the first camera Identifying a foreground, sensing an exposure amount on the foreground image to obtain the first exposure amount; and using the pre-stored target detection algorithm to identify a background from an image captured by the second camera, sensing the The exposure amount on the background image gives the second exposure amount.
  • the processing device 30 further: adjusting the first camera parameter of the first camera according to the first exposure amount comprises: identifying each pixel of the foreground and calculating an average of the foreground pixels a value; comparing an average value of the foreground pixel with a preset first threshold; and adjusting the first camera parameter when an average value of the foreground pixel is lower than the preset first threshold
  • the first photographing parameter includes an aperture, a shutter, and a sensitivity
  • adjusting the second photographing parameter of the second camera according to the second exposure amount includes: identifying each pixel of the background And calculating an average value of the background pixels; comparing an average value of the background pixels with a preset second threshold; and when an average value of the background pixels is higher than the preset second threshold And adjusting the second photographing parameter to reduce the second exposure amount, wherein the second photographing parameter comprises an aperture, a shutter, and a sensitivity.
  • the processing device 30 further: adjusting the first camera parameter of the first camera according to the first exposure amount comprises: identifying each pixel value of the foreground; and counting pixels of the foreground And a value that satisfies a preset first range of pixels as a percentage of the foreground total pixels; and when the percentage is lower than a preset first percentage, adjusting the first photographing parameter to increase Determining a first exposure amount, the first photographing parameter includes an aperture, a shutter, and a sensitivity; and adjusting the second photographing parameter of the second camera according to the second exposure amount includes: identifying each pixel value of the background; The pixel value of the background satisfies a preset second range of pixels as a percentage of the total background pixel; and when the percentage is lower than a preset second percentage, the second is adjusted Photographing parameters to reduce the second exposure amount, the first photographing parameters including an aperture, a shutter, and a sensitivity.
  • the processing device 30 further: culling pixels in the foreground whose pixel values are smaller than a first preset value; and/or culling pixels in the background whose pixel values are greater than a second preset value.
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software function modules.
  • the above-described integrated unit implemented in the form of a software function module can be stored in a computer readable storage medium.
  • the software function modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present invention. Part of the steps.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

一种基于双摄像头的拍照方法,应用于电子设备中,所述方法包括:获取第一摄像头的第一曝光量及第二摄像头的第二曝光量;根据所述第一曝光量调整所述第一摄像头的第一拍照参数,以及根据所述第二曝光量调整所述第二摄像头的第二拍照参数;当接收到拍照指令时,控制所述第一摄像头对目标对象进行拍摄得到第一图像以及控制所述第二摄像头对所述目标对象进行拍摄得到第二图像;及将所述第一图像及所述第二图像进行融合,生成目标图像。本发明还提供一种基于双摄像头的拍照系统。利用本发明可有效地改善逆光场景下背景过曝或者前景目标对象较暗的情况,得到全图曝光准确的图像,优化画质,提高成像效果,提升用户体验。

Description

基于双摄像头的拍照方法及系统
本申请要求于2016年7月29日提交中国专利局,申请号为201610619497.4、发明名称为“基于双摄像头的拍照方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数字图像处理技术领域,尤其涉及一种基于双摄像头的拍照方法及系统。
背景技术
现今,电子设备的功能越来越多,拍照功能便是其中之一,拍照效果的好坏是评价所述电子设备优劣的重要指标。在光照条件不理想的情况下,尤其是在逆光环境下,如何拍出好的图像显得尤为重要。
传统的电子设备,采用的都是单摄像头拍照图像。单摄像头由于本身测光的限制,在逆光环境下容易出现出现明亮区域因曝光过度成为白色,而黑暗区域因曝光不足成为黑色。如果拍照的图像出现背景过曝或者前景过暗的现象时,是会严重影响图像的视觉效果。比如,采用中心测光时,在逆光环境下就容易出现前景曝光正常,但背景过曝的现象;采用平均测光时,在逆光环境下就容易出现前景主体较暗,而背景又严重过曝的现象。此外,单摄像头处理逆光环境下拍照的图像时,主要是以拉亮前景为主,处理后的图像缺少细节。
发明内容
鉴于以上内容,有必要提供一种基于双摄像头的拍照方法及系统,可有效地改善逆光场景下背景过曝或者前景目标对象较暗的情况,得到全图曝光准确的图像,优化画质,提高成像效果,提升用户体验。
一种基于双摄像头的拍照方法,应用于电子设备中,所述电子设备的同一侧面上安装有第一摄像头以及第二摄像头,所述方法包括:
获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量;
根据所述第一曝光量调整所述第一摄像头的第一拍照参数,以及根据所述第二曝光量调整所述第二摄像头的第二拍照参数;
当接收到拍照指令时,控制所述第一摄像头对目标对象进行拍摄得到第一图像以及控制所述第二摄像头对所述目标对象进行拍摄得到第二图像;及
将所述第一图像及所述第二图像进行融合,生成目标图像。
根据本发明的一个优选实施例,所述获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量包括:
采用预先存储的目标检测算法从所述第一摄像头捕获的影像中识别出前景,感测所述前景影像上的曝光量得到所述第一曝光量;及
采用所述预先存储的目标检测算法从所述第二摄像头捕获的影像中识别出背景,感测所述背景影像上的曝光量得到所述第二曝光量。
根据本发明的一个优选实施例,
根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:
识别所述前景的各个像素并计算出所述前景像素的平均值;
将所述前景像素的平均值与预先设定的第一阈值进行比较;及
当所述前景像素的平均值低于所述预先设定的第一阈值时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括光圈、快门及感光度;
根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:
识别所述背景的各个像素并计算出所述背景像素的平均值;
将所述背景像素的平均值与预先设定的第二阈值进行比较;及
当所述背景像素的平均值高于所述预先设定的第二阈值时,调整所述第二拍照参数以减少所述第二曝光量,所述第二拍照参数包括光圈、快门及感光度。
根据本发明的一个优选实施例,
根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:
识别出所述前景的各个像素值;
统计所述前景的像素值满足预先设定的第一范围的像素个数占所述前景总像素的百分比;及
当所述百分比低于预先设定的第一百分比时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括:光圈、快门、及感光度;
根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:
识别出所述背景的各个像素值;
统计所述背景的像素值满足预先设定的第二范围的像素个数占所述背景总像素的百分比;及
当所述百分比低于预先设定的第二百分比时,调整所述第二拍照参数以减少所述第二曝光量,所述第一拍照参数包括光圈、快门及感光度。
根据本发明的一个优选实施例,所述方法还包括:
剔除所述前景中像素值小于第一预设值的像素;及/或
剔除所述背景中像素值大于第二预设值的像素。
一种基于双摄像头的拍照系统,安装于电子设备中,所述电子设备的同一侧面上安装有第一摄像头以及第二摄像头,所述系统包括:
获取模块,设置为获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量;
调整模块,设置为根据所述第一曝光量调整所述第一摄像头的第一拍照参数,以及根据所述第二曝光量调整所述第二摄像头的第二拍照参数;
控制模块,设置为当接收到拍照指令时,控制所述第一摄像头对目标对象进行拍摄得到第一图像以及控制所述第二摄像头对所述目标对象进行拍摄得到第二图像;及
融合模块,设置为将所述第一图像及所述第二图像进行融合,生成目标图像。
根据本发明的一个优选实施例,所述获取模块获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量包括:
采用预先存储的目标检测算法从所述第一摄像头捕获的影像中识别出前景,感测所述前景影像上的曝光量得到所述第一曝光量;及
采用所述预先存储的目标检测算法从所述第二摄像头捕获的影像中识别出背景,感测所述背景影像上的曝光量得到所述第二曝光量。
根据本发明的一个优选实施例,
所述调整模块根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:
识别所述前景的各个像素并计算出所述前景像素的平均值;
将所述前景像素的平均值与预先设定的第一阈值进行比较;及
当所述前景像素的平均值低于所述预先设定的第一阈值时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括光圈、快门及感光度;
所述调整模块根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:
识别所述背景的各个像素并计算出所述背景像素的平均值;
将所述背景像素的平均值与预先设定的第二阈值进行比较;及
当所述背景像素的平均值高于所述预先设定的第二阈值时,调整所述第二拍照参数以减少所述第二曝光量,所述第二拍照参数包括光圈、快门及感光度。
根据本发明的一个优选实施例,
所述调整模块根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:
识别出所述前景的各个像素值;
统计所述前景的像素值满足预先设定的第一范围的像素个数占所述前景总像素的百分比;及
当所述百分比低于预先设定的第一百分比时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括光圈、快门及感光度;
所述调整模块根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:
识别出所述背景的各个像素值;
统计所述背景的像素值满足预先设定的第二范围的像素个数占所述背景总像素的百分比;及
当所述百分比低于预先设定的第二百分比时,调整所述第二拍照参数以减少所述第二曝光量,所述第一拍照参数包括光圈、快门及感光度。
根据本发明的一个优选实施例,所述融合模块还设置为:
剔除所述前景中像素值小于第一预设值的像素;及/或
剔除所述背景中像素值大于第二预设值的像素。
本发明基于双摄像头的拍照方法及系统,可有效地改善逆光场景下背景过曝或者前景主体较暗的情况,得到全图曝光准确的图像,很好的分辨出前景的轮廓和深度,可让前景亮处的效果鲜明,而黑暗的地方又可保留更多的细节特征,提升了图像暗部和亮部的细节表现,从而提升了图像的品质。
附图说明
图1是本发明运行基于双摄像头的拍照方法的电子设备的较佳实施例的结构示意图。
图2是本发明基于双摄像头的拍照方法的较佳实施例的流程图。
图3是本发明基于双摄像头的拍照系统的较佳实施例的功能模块图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本发明进行详细描述。显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。此外,应当理解,本文所描述的具体实施例,仅用以解释本发明,并不用于限定本发明。
如图1所示,是本发明用于运行基于双摄像头的拍照方法的电子设备较佳实施例的硬件架构示意图。如该硬件架构示意图所示,电子设备1包括,但不限于,基于双摄像头的拍照系统10、存储设备20、处理设备30、第一摄像头40及第二摄像头50。
优选地,本发明的基于双摄像头的拍照方法通过所述电子设备1中的基于双摄像头的拍照系统10来实现。
所述电子设备1包括一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的电子设备,其硬件包括但不限于微处理器、专用集成电路、可编程门阵列、数字处理器、嵌入式设备等。所述电子设备1还可包括用户设备。所述用户设备包括但不限于任何一种可与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,平板电脑、智能手机、个人数字助理及其他任何具备双摄像头(40、50)的成像设备等。其中,所述用户设备所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络等。
需要说明的是,所述用户设备仅为举例,其他现有的或今后可能出现的用户设备如可适应于本发明,也应包含在本发明的保护范围以内,并以引用方式包含于此。
在本实施例中,所述存储设备20用于存储安裝于所述电子设备1中的软件程序及数据,例如所述基于双摄像头的拍照系统10。该存储设备20可以是所述电子设备1的内部存储单元,例如所述电子设备1的硬盘或者内存。该存储设备20也可以是所述电子设备1的外部存储设备,例如所述电子设备1上的插接式硬盘、智能媒体卡(Smart Media Card,SMC)、安全数字卡(Secure Digital Card,SD)、快闪存储器卡(flash card)等储存单元。进一步地,所述存储设备20还可以既包括所述电子设备1的内部存储单元,也可以包括外部存储设备。
本实施例中,所述存储设备20中预先存储有目标检测算法,第一拍照参数、第二拍照参数等。所述第一拍照参数包括:光圈、快门、及感光度等,所述第二拍照参数包括:光圈、快门、及感光度等。
在本实施例中,所述处理设备30是一个或者多个中央处理器(Central Processing unit,CPU)、微处理器或其他数字处理芯片等。该处理设备30用于执行软件程序代码或运算数据,例如执行所述的基于双摄像头的拍照系统10。在本实施例中,所述第一摄像头40及所述第二摄像头50位于所述电子设备1的同一侧面,分别用于拍摄包含人物、动物等具有前景的图像。所述第一摄像头40及第二摄像头50均设置有如电荷耦合(charge-coupled device,CCD)式的感光元件,所述感光元件可用于感测进入摄像头内的光线。在一些实施例中,所述第一摄像头40及所述第二摄像头50可以为固定式的摄像头,也可以为可旋转式的摄像头。
如图2所示,是本发明图片处理方法的较佳实施例的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。
S200,获取所述第一摄像头40的第一曝光量及所述第二摄像头50的第二曝光量。
在本实施例中,所述第一摄像头40和所述第二摄像头50并排靠近设置在所述电子设备1的一个侧面上,主要用于捕获包含目标对象在内的影像并在接收到拍照指令时对所述目标对象进行拍照。
在本实施例中,所述第一摄像头40的第一曝光量可以由所述第一摄像头40的感光元件获取;所述第二摄像头50的第二曝光量可以由所述第二摄像头50的感光元件获取。
在本实施例中,所述第一摄像头40可以用于测前景的曝光量,所述第二摄像头50可以用于测背景的曝光量。在其他实施例中,所述第一摄像头40可以用于测背景的曝光量,所述第二摄像头50可以用于测前景的曝光量。具体采用所述第一摄像头40或者所述第二摄像头50测前景的曝光量可以由所述基于双摄像头的拍照系统10事先进行默认设置,也可由用户根据个人喜好或根据第一摄像头40及所述第二摄像头50的性能自行设置、修改。
下面以所述第一摄像头40测前景的曝光量,所述第二摄像头50测背景的曝光量为例进行说明。
所述电子设备1中预先存储有目标检测算法。所述目标检测算法可以是前景目标检测算法,也可以是背景目标检测算法,所述目标检测算法包括,但不限于:帧间差分法、背景减除法、光流法或者基于高斯模型的前景目标检测算法。所述基于双摄像头的拍照系统10采用预先存储的目标检测算法从所述第一摄像头40捕获的包含目标对象在内的影像中识别出前景,然后感测所述前景影像上的曝光量得到所述第一曝光量。所述前景是指目标对象,例如,人,动物,或者车辆等。所述第一曝光量是所述前景影像上各个像素的曝光量。
同理,所述基于双摄像头的拍照系统10采用所述预先存储的目标检测算法从所述第二摄像头50捕获的包含目标对象在内的影像中识别出背景,然后感测所述背景影像上的曝光量得到所述第二曝光量。所述背景是指抠除掉所述目标对象后的影像。所述第二曝光量是所述背景影像上各个像素的曝光量。
S202,根据所述第一曝光量调整所述第一摄像头40的第一拍照参数,以及根据所述第二曝光量调整所述第二摄像头50的第二拍照参数。
在第一个实施例中,所述基于双摄像头的成像系统10比较所述第一曝光量与预先设定的第一阈值得出第一结果,比较所述第二曝光量与预先设定的第二阈值得出第二结果;根据所述第一结果调整所述第一摄像头40的第一拍照参数,根据所述第二结果调整所述第二摄像头50的第二拍照参数。
具体过程如下:
所述基于双摄像头的成像系统10获取到所述第一曝光量后,识别所述前景的各个像素并计算出所述前景像素的平均值,然后将所述前景像素的平均值与预先设定的第一阈值进行比较,根据比较结果调整所述第一摄像头40的第一拍照参数。所述第一拍照参数包括:光圈、快门及感光度等。
当所述前景像素的平均值低于所述预先设定的第一阈值时,说明所述第一曝光量不足,即所述前景的曝光量不足,拍摄出来的图像中的目标对象偏暗,所述基于双摄像头的成像系统10调整所述第一拍照参数以增加所述第一曝光量。在本实施例中,所述基于双摄像头的成像系统10可以通过加大光圈,或者提高快门速度,或者增加曝光时间提高感光度来增加所述第一曝光量等。
当所述前景像素的平均值高于或等于所述预先设定的第一阈值时,说明所述第一曝光量正常,即所述前景的曝光量正常,拍摄出来的图像中的目标对象亮度合适,所述基于双摄像头的成像系统10不用调整所述第一摄像头40的第一拍摄参数。
同理,所述基于双摄像头的成像系统10获取到所述第二曝光量后,识别所述背景像素并计算出所述背景像素的平均值,然后将所述背景像素的平均值与预先设定的第二阈值进行比较,根据比较结果调整所述第二摄像头50的第二拍照参数。所述第二拍照参数包括:光圈、快门及感光度等。
当所述背景像素的平均值高于所述预先设定的第二阈值时,说明所述第二曝光量过大,即所述背景的曝光量过大,拍摄出来的图像中的背景太亮,所述基于双摄像头的成像系统10调整所述第二拍照参数以减少所述第二曝光量。在本实施例中,所述基于双摄像头的成像系统10可以通过减小光圈,或者降低快门速度,或者减少曝光时间降低感光度来减少所述第二曝光量等。
当所述前景像素的平均值低于或等于所述预先设定的第二阈值时,说明所述第二曝光量正常,即所述背景的曝光量正常,拍摄出来的图像中的背景亮度合适,所述基于双摄像头的成像系统10不用调整所述第二摄像头50的第二拍摄参数。
在第二个实施例中,所述基于双摄像头的成像系统10比较所述第一曝光量与预先设定的第一范围得出第一结果,比较所述第二曝光量与预先设定的第二范围得出第二结果;根据所述第一结果调整所述第一摄像头40的第一拍照参数,根据所述第二结果调整所述第二摄像头50的第二拍照参数。
具体过程如下:
所述基于双摄像头的成像系统10获取到所述第一曝光量后,识别出所述前景的各个像素值,然后统计所述前景的像素值满足预先设定的第一范围的像素个数占所述前景总像素的百分比,根据所统计的结果调整所述第一摄像头40的第一拍照参数。所述第一拍照参数包括:光圈、快门及感光度等。
当所述百分比低于预先设定的第一百分比时,说明所述第一曝光量不足,即所述前景的曝光量不足,拍摄出来的图像中的目标对象偏暗,所述基于双摄像头的成像系统10调整所述第一拍照参数以增加所述第一曝光量。在本实施例中,所述基于双摄像头的成像系统10可以通过加大光圈,或者提高快门速度,或者增加曝光时间提高感光度来增加所述第一曝光量等。
当所述百分比高于或等于所述预先设定的第一百分比时,说明所述第一曝光量正常,即所述前景的曝光量正常,拍摄出来的图像中的目标对象亮度合适,所述基于双摄像头的成像系统10不用调整所述第一摄像头40的第一拍摄参数。
同理,所述基于双摄像头的成像系统10获取到所述第二曝光量后,识别出所述背景的各个像素值,然后统计所述背景的像素值满足预先设定的第二范围的像素个数占所述前景总像素的百分比,根据所统计的结果调整所述第二摄像头50的第二拍照参数。所述第二拍照参数包括:光圈、快门及感光度等。
当所述百分比低于预先设定的第二百分比时,说明所述第二曝光量不足,即所述背景的曝光量不足,拍摄出来的图像中的目标对象偏暗,所述基于双摄像头的成像系统10调整所述第二拍照参数以减少所述第二曝光量。在本实施例中,所述基于双摄像头的成像系统10可以通过减小光圈,或者降低快门速度,或者减少曝光时间降低感光度来减少所述第二曝光量等。
当所述百分比高于或等于所述预先设定的第二百分比时,说明所述第二曝光量正常,即所述背景的曝光量正常,拍摄出来的图像中的目标对象亮度合适,所述基于双摄像头的成像系统10不用调整所述第二摄像头50的第二拍摄参数。
S204,当接收到拍照指令时,控制所述第一摄像头40对目标对象进行拍摄得到第一图像以及控制所述第二摄像头50对所述目标对象进行拍摄得到第二图像。
在本实施例中,所述基于双摄像头的拍照系统10获取到用户的拍照指令后,控制所述第一摄像头40和所述第二摄像头50分别拍摄所述目标对象。所述拍照指令可以通过以下一种或多种组合的方式触发:点击拍照图标、点击拍照按键、蓝牙传输指令、语音识别(例如,“拍照”口令或者“OK”口令等)、手势识别(例如,“V”手势或者“OK”手势等)、表情识别(例如,笑脸等)等。
为了使得拍摄所述目标对象花费时间较少,所述第一摄像头40和所述第二摄像头50对于拍摄所述目标对象的拍摄动作可以同时进行。在其他实施例中,所述第一摄像头40和所述第二摄像头50对于拍摄所述目标对象的拍摄动作也可以异步进行,例如,所述第一摄像头40优先拍摄所述目标对象,经过预设时间(例如,1秒)后,所述第二摄像头50再拍摄所述目标对象。
S206,将所述第一图像和所述第二图像进行融合,生成目标图像。
在本实施例中,所述电子设备1中预先存储有图像融合算法,所述图像融合算法包括:基于非多尺度变换的图像融合方法(例如平均加权方法、基于PCA的图像融合方法、基于调制的图像融合方法等),基于多尺度变换的图像融合方法(例如基于金字塔变换的图像融合方法、基于小波变换的融合方法、基于曲波变换的图像融合方法等)。本发明可以采用的图像融合算法并不限于上述列举的方法,还可以包括其他现有的或今后可能出现的适合于对图像进行融合的方法。另外,所列举的图像融合算法为现有技术,本发明在此不一一解释。
在本实施例中,所述基于双摄像头的成像系统10将由所述第一摄像头40拍摄的前景裁剪出来与由所述第二摄像头50拍摄的背景裁剪出来进行拼接,得到一张曝光合适的图像。
进一步地,为了提高融合后的目标图像的质量,使所述目标图像视觉效果更加理想,在其他实施方式中,所述基于双摄像头的成像方法还可以包括:对所述第一图像进行预处理得到第一处理图像,对所述第二图像进行预处理得到第二处理图像;将所述第一处理图像和所述第二处理图像进行融合,得到目标图像。
在本实施例中,对所述第一图像进行预处理可以包括:剔除所述前景中像素值小于第一预设值的像素。剔除所述前景中像素值小于所述第一预设值的像素是为了进一步保证所述前景中少量或者极个别的出现欠曝现象的像素。对所述第二图像进行预处理可以包括:剔除所述背景中像素值大于第二预设值的像素。剔除所述背景中像素值大于所述第二预设值的像素是为了进一步保证所述背景中少量或者极个别的出现过曝现象的像素。
在其他实施例中,对所述第一图像和所述第二图像进行预处理还可以包括:图像增强、噪声消除。所述图像增强和噪声消除属于现有技术,本文不做相关说明。
综上所述,本发明所述的基于双摄像头的成像方法用于采用双摄像头(第一摄像头40及第二摄像头50)对目标对象进行拍摄,拍摄时先获取所述第一摄像头40的第一曝光量及所述第二摄像头50的第二曝光量,根据所述第一曝光量及所述第二曝光量分别调整所述第一摄像头40的第一拍照参数及所述第二摄像头50的第二拍照参数,当接收到拍照指令时,控制所述第一摄像头40和所述第二摄像头50分别对包含所述目标对象在内的影像进行拍摄得到第一图像及第二图像,及将所述第一图像和所述第二图像进行融合,生成目标图像。通过本发明可有效地改善逆光场景下背景过曝或者前景主体较暗的情况,得到全图曝光准确的图像,很好的分辨出前景的轮廓和深度,可让前景亮处的效果鲜明,而黑暗的地方又可保留更多的细节特征,提升了图像暗部和亮部的细节表现。
如图3所示,所述基于双摄像头的成像系统10包括获取模块100、设置模块101、调整模块102、控制模块103及融合模块104。本发明所4称的模块是指一种能够被处理设备30所执行并且能够完成固定功能的一系列计算机程序段,其存储在存储设备20中。在本实施例中,关于各模块的功能将在后续的实施例中详述。
所述获取模块100,设置为获取所述第一摄像头40的第一曝光量及所述第二摄像头50的第二曝光量。
在本实施例中,所述第一摄像头40和所述第二摄像头50并排靠近设置在所述电子设备1的一个侧面上,主要用于捕获包含目标对象在内的影像并在接收到拍照指令时对所述目标对象进行拍照。
在本实施例中,所述第一摄像头40的第一曝光量可以由所述第一摄像头40的感光元件获取;所述第二摄像头50的第二曝光量可以由所述第二摄像头50的感光元件获取。
在本实施例中,所述第一摄像头40可以用于测前景的曝光量,所述第二摄像头50可以用于测背景的曝光量。在其他实施例中,所述第一摄像头40可以用于测背景的曝光量,所述第二摄像头50可以用于测前景的曝光量。具体采用所述第一摄像头40或者所述第二摄像头50测前景的曝光量可以由所述设置模块101事先进行默认设置,也可由用户根据个人喜好或根据第一摄像头40及所述第二摄像头50的性能自行设置、修改。
下面以所述第一摄像头40测前景的曝光量,所述第二摄像头50测背景的曝光量为例进行说明。
所述电子设备1中预先存储有目标检测算法。所述目标检测算法可以是前景目标检测算法,也可以是背景目标检测算法,所述目标检测算法包括,但不限于:帧间差分法、背景减除法、光流法或者基于高斯模型的前景目标检测算法。所述获取模块100采用预先存储的目标检测算法从所述第一摄像头40捕获的包含目标对象在内的影像中识别出前景,然后感测所述前景影像上的曝光量得到所述第一曝光量。所述前景是指目标对象,例如,人,动物,或者车辆等。所述第一曝光量是所述前景影像上各个像素的曝光量。
同理,所述获取模块100采用所述预先存储的目标检测算法从所述第二摄像头50捕获的包含目标对象在内的影像中识别出背景,然后感测所述背景影像上的曝光量得到所述第二曝光量。所述背景是指抠除掉所述目标对象后的影像。所述第二曝光量是所述背景影像上各个像素的曝光量。
所述调整模块102,根据所述第一曝光量调整所述第一摄像头40的第一拍照参数,以及根据所述第二曝光量调整所述第二摄像头50的第二拍照参数。
在第一个实施例中,所述调整模块102比较所述第一曝光量与预先设定的第一阈值得出第一结果,比较所述第二曝光量与预先设定的第二阈值得出第二结果;根据所述第一结果调整所述第一摄像头40的第一拍照参数,根据所述第二结果调整所述第二摄像头50的第二拍照参数。
具体过程如下:
所述获取模块100获取到所述第一曝光量后,识别所述前景的各个像素并计算出所述前景像素的平均值,然后所述调整模块102将所述前景像素的平均值与预先设定的第一阈值进行比较,根据比较结果调整所述第一摄像头40的第一拍照参数。所述第一拍照参数包括:光圈、快门及感光度等。
当所述前景像素的平均值低于所述预先设定的第一阈值时,说明所述第一曝光量不足,即所述前景的曝光量不足,拍摄出来的图像中的目标对象偏暗,所述调整模块102调整所述第一拍照参数以增加所述第一曝光量。在本实施例中,所述调整模块102可以通过加大光圈,或者提高快门速度,或者增加曝光时间提高感光度来增加所述第一曝光量等。
当所述前景像素的平均值高于或等于所述预先设定的第一阈值时,说明所述第一曝光量正常,即所述前景的曝光量正常,拍摄出来的图像中的目标对象亮度合适,所述调整模块102不用调整所述第一摄像头40的第一拍摄参数。
同理,所述获取模块100获取到所述第二曝光量后,识别所述背景像素并计算出所述背景像素的平均值,然后所述调整模块102将所述背景像素的平均值与预先设定的第二阈值进行比较,根据比较结果调整所述第二摄像头50的第二拍照参数。所述第二拍照参数包括:光圈、快门及感光度等。
当所述背景像素的平均值高于所述预先设定的第二阈值时,说明所述第二曝光量过大,即所述背景的曝光量过大,拍摄出来的图像中的背景太亮,所述调整模块102调整所述第二拍照参数以减少所述第二曝光量。在本实施例中,所述调整模块102可以通过减小光圈,或者降低快门速度,或者减少曝光时间减少感光度来降低所述第二曝光量等。
当所述前景像素的平均值低于或等于所述预先设定的第二阈值时,说明所述第二曝光量正常,即所述背景的曝光量正常,拍摄出来的图像中的背景亮度合适,所述调整模块102不用调整所述第二摄像头50的第二拍摄参数。
在第二个实施例中,所述调整模块102比较所述第一曝光量与预先设定的第一范围得出第一结果,比较所述第二曝光量与预先设定的第二范围得出第二结果;根据所述第一结果调整所述第一摄像头40的第一拍照参数,根据所述第二结果调整所述第二摄像头50的第二拍照参数。
具体过程如下:
所述获取模块100获取到所述第一曝光量后,识别出所述前景的各个像素值,然后调整模块102统计所述前景的像素值满足预先设定的第一范围的像素个数占所述前景总像素的百分比,根据所统计的结果调整所述第一摄像头40的第一拍照参数。所述第一拍照参数包括:光圈、快门及感光度等。
当所述百分比低于预先设定的第一百分比时,说明所述第一曝光量不足,即所述前景的曝光量不足,拍摄出来的图像中的目标对象偏暗,所述调整模块102调整所述第一拍照参数以增加所述第一曝光量。在本实施例中,所述调整模块102可以通过加大光圈,或者提高快门速度,或者增加曝光时间提高感光度来增加所述第一曝光量等。
当所述百分比高于或等于所述预先设定的第一百分比时,说明所述第一曝光量正常,即所述前景的曝光量正常,拍摄出来的图像中的目标对象亮度合适,所述调整模块102不用调整所述第一摄像头40的第一拍摄参数。
同理,所述获取模块100获取到所述第二曝光量后,识别出所述背景的各个像素值,然后统计所述背景的像素值满足预先设定的第二范围的像素个数占所述前景总像素的百分比,根据所统计的结果调整所述第二摄像头50的第二拍照参数。所述第二拍照参数包括:光圈、快门及感光度等。
当所述百分比低于所述预先设定的第二百分比时,说明所述第二曝光量不足,即所述背景的曝光量不足,拍摄出来的图像中的目标对象偏暗,所述基于调整模块102调整所述第二拍照参数以减少所述第二曝光量。在本实施例中,所述调整模块102可以通过减小光圈,或者降低快门速度,或者减少曝光时间降低感光度来减少所述第二曝光量等。
当所述百分比高于或等于所述预先设定的第二百分比时,说明所述第二曝光量正常,即所述背景的曝光量正常,拍摄出来的图像中的目标对象亮度合适,所述调整模块102不用调整所述第二摄像头50的第二拍摄参数。
所述控制模103,当接收到拍照指令时,控制所述第一摄像头40对目标对象进行拍摄得到第一图像以及控制所述第二摄像头50对所述目标对象进行拍摄得到第二图像。
在本实施例中,所述控制模103获取到用户的拍照指令后,控制所述第一摄像头40和所述第二摄像头50分别拍摄所述目标对象。所述拍照指令可以通过以下一种或多种组合的方式触发:点击拍照图标、点击拍照按键、蓝牙传输指令、语音识别(例如,“拍照”口令或者“OK”口令等)、手势识别(例如,“V”手势或者“OK”手势等)、表情识别(例如,笑脸等)等。
为了使得拍摄所述目标对象花费时间较少,所述第一摄像头40和所述第二摄像头50对于拍摄所述目标对象的拍摄动作可以同时进行。在其他实施例中,所述第一摄像头40和所述第二摄像头50对于拍摄所述目标对象的拍摄动作也可以异步进行,例如,所述第一摄像头40优先拍摄所述目标对象,经过预设时间(例如,1秒)后,所述第二摄像头50再拍摄所述目标对象。
所述融合模块104,设置为将所述第一图像和所述第二图像进行融合,生成目标图像。
在本实施例中,所述电子设备1中预先存储有图像融合算法,所述图像融合算法包括:基于非多尺度变换的图像融合方法(例如平均加权方法、基于PCA的图像融合方法、基于调制的图像融合方法等),基于多尺度变换的图像融合方法(例如基于金字塔变换的图像融合方法、基于小波变换的融合方法、基于曲波变换的图像融合方法等)。本发明可以采用的图像融合算法并不限于上述列举的方法,还可以包括其他现有的或今后可能出现的适合于对图像进行融合的方法。另外,所列举的图像融合算法为现有技术,本发明在此不一一解释。
在本实施例中,所述融合模块104可以是将由所述第一摄像头40拍摄的前景裁剪出来与由所述第二摄像头50拍摄的背景裁剪出来进行拼接,如果存在既不属于前景也不属于背景的部分,则上述拼接完成后再与该部分拼接,得到一张曝光合适的图像。上述裁剪方式可以是提取其中的像素及相应的位置。
进一步地,为了提高融合后的目标图像的质量,使所述目标图像视觉效果更加理想,在其他实施方式中,所述融合模块104还可以设置为:对所述第一图像进行预处理得到第一处理图像,对所述第二图像进行预处理得到第二处理图像;将所述第一处理图像和所述第二处理图像进行融合,得到目标图像。
在本实施例中,对所述第一图像进行预处理可以包括:剔除所述前景中像素值小于第一预设值的像素。剔除所述前景中像素值小于所述第一预设值的像素是为了进一步保证所述前景中少量或者极个别的出现欠曝现象的像素。对所述第二图像进行预处理可以包括:剔除所述背景中像素值大于第二预设值的像素。剔除所述背景中像素值大于所述第二预设值的像素是为了进一步保证所述背景中少量或者极个别的出现过曝现象的像素。
在其他实施例中,对所述第一图像和所述第二图像进行预处理还可以包括:图像增强、噪声消除。所述图像增强和噪声消除属于现有技术,本文不做相关说明。
综上所述,本发明所述的基于双摄像头的成像系统10用于采用双摄像头(第一摄像头40及第二摄像头50)对目标对象进行拍摄,拍摄时所述获取模块100先获取所述第一摄像头40的第一曝光量及所述第二摄像头50的第二曝光量,所述调整模块102根据所述第一曝光量及所述第二曝光量分别调整所述第一摄像头40的第一拍照参数及所述第二摄像头50的第二拍照参数,当接收到拍照指令时,所述控制模块103控制所述第一摄像头40和所述第二摄像头50分别对包含所述目标对象在内的影像进行拍摄得到第一图像及第二图像,及所述融合模块104将所述第一图像和所述第二图像进行融合,生成目标图像。通过本发明可有效地改善逆光场景下背景过曝或者前景主体较暗的情况,得到全图曝光准确的图像,很好的分辨出前景的轮廓和深度,可让前景亮处的效果鲜明,而黑暗的地方又可保留更多的细节特征,提升了图像暗部和亮部的细节表现。
在进一步的实施例中,结合图1,所述处理设备30可执行所述电子设备1的操作系统以及安装的各类应用程序、程序代码等,例如,上述的各个模块,包括所述获取模块100、所述设置模块101等。
所述存储设备20中存储有程序代码,且所述处理设备30可调用所述存储设备20中存储的程序代码以执行相关的功能。例如,图3中所述的各个模块(例如,所述获取模块100、所述设置模块101等)是存储在所述存储设备20中的程序代码,并由所述处理设备30所执行,从而实现所述各个模块的功能。
在本发明的一个实施例中,所述存储设备20存储多个指令,所述多个指令被所述处理设备30所执行以实现基于双摄像头的拍照方法。具体而言,所述处理设备30对所述多个指令的执行包括:获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量;根据所述第一曝光量调整所述第一摄像头的第一拍照参数,以及根据所述第二曝光量调整所述第二摄像头的第二拍照参数;当接收到拍照指令时,控制所述第一摄像头对目标对象进行拍摄得到第一图像以及控制所述第二摄像头对所述目标对象进行拍摄得到第二图像;及将所述第一图像及所述第二图像进行融合,生成目标图像。
在进一步的实施例中,所述获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量包括:采用预先存储的目标检测算法从所述第一摄像头捕获的影像中识别出前景,感测所述前景影像上的曝光量得到所述第一曝光量;及采用所述预先存储的目标检测算法从所述第二摄像头捕获的影像中识别出背景,感测所述背景影像上的曝光量得到所述第二曝光量。
在进一步的实施例中,所述处理设备30进一步:根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:识别所述前景的各个像素并计算出所述前景像素的平均值;将所述前景像素的平均值与预先设定的第一阈值进行比较;及当所述前景像素的平均值低于所述预先设定的第一阈值时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括光圈、快门及感光度;根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:识别所述背景的各个像素并计算出所述背景像素的平均值;将所述背景像素的平均值与预先设定的第二阈值进行比较;及当所述背景像素的平均值高于所述预先设定的第二阈值时,调整所述第二拍照参数以减少所述第二曝光量,所述第二拍照参数包括光圈、快门及感光度。
在进一步的实施例中,所述处理设备30进一步:根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:识别出所述前景的各个像素值;统计所述前景的像素值满足预先设定的第一范围的像素个数占所述前景总像素的百分比;及当所述百分比低于预先设定的第一百分比时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括光圈、快门及感度;根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:识别出所述背景的各个像素值;统计所述背景的像素值满足预先设定的第二范围的像素个数占所述背景总像素的百分比;及当所述百分比低于预先设定的第二百分比时,调整所述第二拍照参数以减少所述第二曝光量,所述第一拍照参数包括光圈、快门及感光度。
在进一步的实施例中,所述处理设备30进一步:剔除所述前景中像素值小于第一预设值的像素;及/或剔除所述背景中像素值大于第二预设值的像素。
具体地,所述处理设备30对上述指令的具体实现方法可参考图2对应实施例中相关步骤的描述,在此不赘述。
在本发明所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
上述以软件功能模块的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。
对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本发明内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或等同替换,而不脱离本发明技术方案的精神和范围。

Claims (10)

  1. 一种基于双摄像头的拍照方法,应用于电子设备中,所述电子设备的同一侧面上安装有第一摄像头以及第二摄像头,其特征在于,所述方法包括:
    获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量;
    根据所述第一曝光量调整所述第一摄像头的第一拍照参数,以及根据所述第二曝光量调整所述第二摄像头的第二拍照参数;
    当接收到拍照指令时,控制所述第一摄像头对目标对象进行拍摄得到第一图像以及控制所述第二摄像头对所述目标对象进行拍摄得到第二图像;及
    将所述第一图像及所述第二图像进行融合,生成目标图像。
  2. 如权利要求1所述的基于双摄像头的拍照方法,其特征在于,所述获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量包括:
    采用预先存储的目标检测算法从所述第一摄像头捕获的影像中识别出前景,感测所述前景影像上的曝光量得到所述第一曝光量;及
    采用所述预先存储的目标检测算法从所述第二摄像头捕获的影像中识别出背景,感测所述背景影像上的曝光量得到所述第二曝光量。
  3. 如权利要求2所述的基于双摄像头的拍照方法,其特征在于,
    根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:
    识别所述前景的各个像素并计算出所述前景像素的平均值;
    将所述前景像素的平均值与预先设定的第一阈值进行比较;及
    当所述前景像素的平均值低于所述预先设定的第一阈值时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括光圈、快门及感光度;
    根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:
    识别所述背景的各个像素并计算出所述背景像素的平均值;
    将所述背景像素的平均值与预先设定的第二阈值进行比较;及
    当所述背景像素的平均值高于所述预先设定的第二阈值时,调整所述第二拍照参数以减少所述第二曝光量,所述第二拍照参数包括光圈、快门及感光度。
  4. 如权利要求2所述的基于双摄像头的拍照方法,其特征在于,
    根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:
    识别出所述前景的各个像素值;
    统计所述前景的像素值满足预先设定的第一范围的像素个数占所述前景总像素的百分比;及
    当所述百分比低于预先设定的第一百分比时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括光圈、快门及感光度;
    根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:
    识别出所述背景的各个像素值;
    统计所述背景的像素值满足预先设定的第二范围的像素个数占所述背景总像素的百分比;及
    当所述百分比低于预先设定的第二百分比时,调整所述第二拍照参数以减少所述第二曝光量,所述第一拍照参数包括光圈、快门及感光度。
  5. 如权利要求2至4中任意一项所述的基于双摄像头的拍照方法,其特征在于,所述方法还包括:
    剔除所述前景中像素值小于第一预设值的像素;及/或
    剔除所述背景中像素值大于第二预设值的像素。
  6. 一种基于双摄像头的拍照系统,安装于电子设备中,所述电子设备的同一侧面上安装有第一摄像头以及第二摄像头,其特征在于,所述系统包括:
    获取模块,设置为获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量;
    调整模块,设置为根据所述第一曝光量调整所述第一摄像头的第一拍照参数,以及根据所述第二曝光量调整所述第二摄像头的第二拍照参数;
    控制模块,设置为当接收到拍照指令时,控制所述第一摄像头对目标对象进行拍摄得到第一图像以及控制所述第二摄像头对所述目标对象进行拍摄得到第二图像;及
    融合模块,设置为将所述第一图像及所述第二图像进行融合,生成目标图像。
  7. 如权利要求6所述的基于双摄像头的拍照系统,其特征在于,所述获取模块获取所述第一摄像头的第一曝光量及所述第二摄像头的第二曝光量包括:
    采用预先存储的目标检测算法从所述第一摄像头捕获的影像中识别出前景,感测所述前景影像上的曝光量得到所述第一曝光量;及
    采用所述预先存储的目标检测算法从所述第二摄像头捕获的影像中识别出背景,感测所述背景影像上的曝光量得到所述第二曝光量。
  8. 如权利要求7所述的基于双摄像头的拍照系统,其特征在于,
    所述调整模块根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:
    识别所述前景的各个像素并计算出所述前景像素的平均值;
    将所述前景像素的平均值与预先设定的第一阈值进行比较;及
    当所述前景像素的平均值低于所述预先设定的第一阈值时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括光圈、快门及感光度;
    所述调整模块根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:
    识别所述背景的各个像素并计算出所述背景像素的平均值;
    将所述背景像素的平均值与预先设定的第二阈值进行比较;及
    当所述背景像素的平均值高于所述预先设定的第二阈值时,调整所述第二拍照参数以减少所述第二曝光量,所述第二拍照参数包括光圈、快门及感光度。
  9. 如权利要求7所述的基于双摄像头的拍照系统,其特征在于,
    所述调整模块根据所述第一曝光量调整所述第一摄像头的第一拍照参数包括:
    识别出所述前景的各个像素值;
    统计所述前景的像素值满足预先设定的第一范围的像素个数占所述前景总像素的百分比;及
    当所述百分比低于预先设定的第一百分比时,调整所述第一拍照参数以增加所述第一曝光量,所述第一拍照参数包括光圈、快门及感光度;
    所述调整模块根据所述第二曝光量调整所述第二摄像头的第二拍照参数包括:
    识别出所述背景的各个像素值;
    统计所述背景的像素值满足预先设定的第二范围的像素个数占所述背景总像素的百分比;及
    当所述百分比低于预先设定的第二百分比时,调整所述第二拍照参数以减少所述第二曝光量,所述第一拍照参数包括光圈、快门及感光度。
  10. 如权利要求7至9中任意一项所述的基于双摄像头的拍照系统,其特征在于,所述融合模块还设置为:
    剔除所述前景中像素值小于第一预设值的像素;及/或
    剔除所述背景中像素值大于第二预设值的像素。
PCT/CN2016/103875 2016-07-29 2016-10-29 基于双摄像头的拍照方法及系统 Ceased WO2018018771A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610619497.4 2016-07-29
CN201610619497.4A CN106161980A (zh) 2016-07-29 2016-07-29 基于双摄像头的拍照方法及系统

Publications (1)

Publication Number Publication Date
WO2018018771A1 true WO2018018771A1 (zh) 2018-02-01

Family

ID=57328162

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/103875 Ceased WO2018018771A1 (zh) 2016-07-29 2016-10-29 基于双摄像头的拍照方法及系统

Country Status (2)

Country Link
CN (1) CN106161980A (zh)
WO (1) WO2018018771A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209782A (zh) * 2018-11-22 2020-05-29 中国银联股份有限公司 一种机房设备异常灯的识别方法以及识别系统
CN112614083A (zh) * 2020-12-18 2021-04-06 北京迈格威科技有限公司 图像融合方法、装置及电子系统
CN112887612A (zh) * 2021-01-27 2021-06-01 维沃移动通信有限公司 一种拍摄方法、装置和电子设备
CN113411498A (zh) * 2021-06-17 2021-09-17 深圳传音控股股份有限公司 图像拍摄方法、移动终端及存储介质
CN113794829A (zh) * 2021-08-02 2021-12-14 维沃移动通信(杭州)有限公司 拍摄方法、装置及电子设备
CN114885104A (zh) * 2022-05-06 2022-08-09 北京银河方圆科技有限公司 摄像机自适应调节的方法、可读存储介质和导航系统
WO2023071933A1 (zh) * 2021-10-28 2023-05-04 维沃移动通信有限公司 相机拍摄参数调整方法、装置及电子设备
CN117395515A (zh) * 2022-06-30 2024-01-12 深圳市光鉴科技有限公司 一种自动调节曝光的非同源双目相机及支付设备

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375679A (zh) * 2016-11-30 2017-02-01 努比亚技术有限公司 一种曝光方法及装置
CN108460395B (zh) * 2017-02-17 2023-04-07 北京三星通信技术研究有限公司 目标检测方法和装置以及模糊处理方法和装置
CN106851063A (zh) * 2017-02-27 2017-06-13 努比亚技术有限公司 一种基于双摄像头的曝光调节终端及方法
CN106851124B (zh) * 2017-03-09 2021-03-02 Oppo广东移动通信有限公司 基于景深的图像处理方法、处理装置和电子装置
CN106878625B (zh) * 2017-04-19 2019-10-11 宇龙计算机通信科技(深圳)有限公司 双摄像头同步曝光方法及系统
CN107248137B (zh) * 2017-04-27 2021-01-15 努比亚技术有限公司 一种实现图像处理的方法及移动终端
CN107358593B (zh) * 2017-06-16 2020-06-26 Oppo广东移动通信有限公司 成像方法和装置
CN107241557A (zh) * 2017-06-16 2017-10-10 广东欧珀移动通信有限公司 图像曝光方法、装置、摄像设备及存储介质
CN107197169B (zh) * 2017-06-22 2019-12-06 维沃移动通信有限公司 一种高动态范围图像拍摄方法及移动终端
WO2018233373A1 (zh) * 2017-06-23 2018-12-27 华为技术有限公司 一种图像处理方法、装置与设备
CN107295256A (zh) 2017-06-23 2017-10-24 华为技术有限公司 一种图像处理方法、装置与设备
CN107592473A (zh) * 2017-10-31 2018-01-16 广东欧珀移动通信有限公司 曝光参数调整方法、装置、电子设备和可读存储介质
CN107948538B (zh) * 2017-11-14 2020-02-21 Oppo广东移动通信有限公司 成像方法、装置、移动终端和存储介质
CN108156366A (zh) * 2017-11-30 2018-06-12 维沃移动通信有限公司 一种基于双摄像头的图像拍摄方法和移动装置
CN107948519B (zh) * 2017-11-30 2020-03-27 Oppo广东移动通信有限公司 图像处理方法、装置及设备
CN108377341A (zh) * 2018-05-14 2018-08-07 Oppo广东移动通信有限公司 拍照方法、装置、终端及存储介质
CN108900778A (zh) * 2018-06-27 2018-11-27 努比亚技术有限公司 一种拍摄方法、移动终端及计算机可读存储介质
CN109005367B (zh) * 2018-10-15 2020-10-13 Oppo广东移动通信有限公司 一种高动态范围图像的生成方法、移动终端及存储介质
CN110049240B (zh) * 2019-04-03 2021-01-26 Oppo广东移动通信有限公司 摄像头控制方法、装置、电子设备和计算机可读存储介质
CN112752030A (zh) * 2019-10-30 2021-05-04 北京小米移动软件有限公司 拍摄方法、拍摄装置及存储介质
CN115100040A (zh) * 2022-06-30 2022-09-23 影石创新科技股份有限公司 图片的拼接方法、装置、存储介质和电子设备
CN115460355B (zh) * 2022-08-31 2024-03-29 青岛海信移动通信技术有限公司 一种图像采集方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780840A (zh) * 2014-01-21 2014-05-07 上海果壳电子有限公司 一种高品质成像的双摄像成像装置及其方法
CN105227837A (zh) * 2015-09-24 2016-01-06 努比亚技术有限公司 一种图像合成方法和装置
CN105657286A (zh) * 2015-07-29 2016-06-08 宇龙计算机通信科技(深圳)有限公司 一种基于双摄像头的拍照方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118563A (zh) * 2009-12-30 2011-07-06 比亚迪股份有限公司 一种自动曝光装置及其方法
CN102629988A (zh) * 2012-03-31 2012-08-08 博康智能网络科技股份有限公司 一种摄像头自动控制方法及装置
JP2015033107A (ja) * 2013-08-07 2015-02-16 ソニー株式会社 画像処理装置および画像処理方法、並びに、電子機器
CN105049726B (zh) * 2015-08-05 2018-09-04 广东欧珀移动通信有限公司 一种移动终端拍照方法及移动终端
CN105611187A (zh) * 2015-12-22 2016-05-25 歌尔声学股份有限公司 一种基于双摄像头的图像宽动态补偿方法及系统
CN105450932B (zh) * 2015-12-31 2018-11-09 华为技术有限公司 逆光拍照方法和装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780840A (zh) * 2014-01-21 2014-05-07 上海果壳电子有限公司 一种高品质成像的双摄像成像装置及其方法
CN105657286A (zh) * 2015-07-29 2016-06-08 宇龙计算机通信科技(深圳)有限公司 一种基于双摄像头的拍照方法及装置
CN105227837A (zh) * 2015-09-24 2016-01-06 努比亚技术有限公司 一种图像合成方法和装置

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209782A (zh) * 2018-11-22 2020-05-29 中国银联股份有限公司 一种机房设备异常灯的识别方法以及识别系统
CN111209782B (zh) * 2018-11-22 2024-04-16 中国银联股份有限公司 一种机房设备异常灯的识别方法以及识别系统
CN112614083A (zh) * 2020-12-18 2021-04-06 北京迈格威科技有限公司 图像融合方法、装置及电子系统
CN112887612B (zh) * 2021-01-27 2022-10-04 维沃移动通信有限公司 一种拍摄方法、装置和电子设备
CN112887612A (zh) * 2021-01-27 2021-06-01 维沃移动通信有限公司 一种拍摄方法、装置和电子设备
CN113411498A (zh) * 2021-06-17 2021-09-17 深圳传音控股股份有限公司 图像拍摄方法、移动终端及存储介质
CN113794829B (zh) * 2021-08-02 2023-11-10 维沃移动通信(杭州)有限公司 拍摄方法、装置及电子设备
CN113794829A (zh) * 2021-08-02 2021-12-14 维沃移动通信(杭州)有限公司 拍摄方法、装置及电子设备
WO2023071933A1 (zh) * 2021-10-28 2023-05-04 维沃移动通信有限公司 相机拍摄参数调整方法、装置及电子设备
US12511906B2 (en) 2021-10-28 2025-12-30 Vivo Mobile Communication Co., Ltd. Camera shooting parameter adjustment method and apparatus, and electronic device
CN114885104A (zh) * 2022-05-06 2022-08-09 北京银河方圆科技有限公司 摄像机自适应调节的方法、可读存储介质和导航系统
CN114885104B (zh) * 2022-05-06 2024-04-26 北京银河方圆科技有限公司 摄像机自适应调节的方法、可读存储介质和导航系统
CN117395515A (zh) * 2022-06-30 2024-01-12 深圳市光鉴科技有限公司 一种自动调节曝光的非同源双目相机及支付设备

Also Published As

Publication number Publication date
CN106161980A (zh) 2016-11-23

Similar Documents

Publication Publication Date Title
WO2018018771A1 (zh) 基于双摄像头的拍照方法及系统
WO2017014415A1 (en) Image capturing apparatus and method of operating the same
WO2017010695A1 (en) Three dimensional content generating apparatus and three dimensional content generating method thereof
WO2019050360A1 (en) ELECTRONIC DEVICE AND METHOD FOR AUTOMATICALLY SEGMENTING TO BE HUMAN IN AN IMAGE
WO2017204596A1 (ko) 얼굴 윤곽 보정 방법 및 장치
WO2018040444A1 (zh) 一种双摄像头拍照控制方法、拍照控制装置及终端
WO2017206456A1 (zh) 一种视频通话中视频图像展示方法及装置
US11004214B2 (en) Image processing apparatus, image processing method, and storage medium
EP3320676A1 (en) Image capturing apparatus and method of operating the same
WO2017124792A1 (zh) 动态捕捉人脸摄像的方法、系统及移动终端
WO2017090848A1 (en) Photographing device and operating method of the same
WO2022225102A1 (ko) Ai 기반 객체인식을 통한 감시 카메라의 셔터값 조절
WO2021091161A1 (en) Electronic device and method of controlling the same
WO2022225105A1 (ko) Ai 기반 객체인식을 통한 감시 카메라 영상의 노이즈 제거
WO2020207038A1 (zh) 基于人脸识别的人数统计方法、装置、设备及存储介质
WO2018040269A1 (zh) 一种图像处理方法及终端
WO2017008320A1 (zh) 一种多晶硅薄膜的质量检测方法和系统
WO2021025285A1 (ko) 얼굴이 포함된 영상의 노출 값을 조절하는 전자 장치
WO2020111750A1 (ko) 이미지 처리 방법 및 이를 지원하는 전자 장치
WO2023282662A1 (en) Method and electronic device for producing media file with blur effect
CN108259767B (zh) 图像处理方法、装置、存储介质及电子设备
WO2023132633A1 (ko) 복수의 카메라를 이용하여 3차원 이미지를 생성하는 방법 및 장치
WO2023277472A1 (ko) 반려 동물의 식별을 위한 객체를 촬영하기 위한 방법 및 전자 장치
WO2020027584A1 (en) Method and an apparatus for performing object illumination manipulation on an image
CN109068060B (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: 16910350

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

Country of ref document: EP

Kind code of ref document: A1