[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2018112764A1 - Image processing method and apparatus, control method and apparatus, imaging apparatus, and electronic apparatus - Google Patents

Image processing method and apparatus, control method and apparatus, imaging apparatus, and electronic apparatus Download PDF

Info

Publication number
WO2018112764A1
WO2018112764A1 PCT/CN2016/111149 CN2016111149W WO2018112764A1 WO 2018112764 A1 WO2018112764 A1 WO 2018112764A1 CN 2016111149 W CN2016111149 W CN 2016111149W WO 2018112764 A1 WO2018112764 A1 WO 2018112764A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
focus
overexposed
focus image
image processing
Prior art date
Application number
PCT/CN2016/111149
Other languages
French (fr)
Chinese (zh)
Inventor
孙剑波
Original Assignee
广东欧珀移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Priority to PCT/CN2016/111149 priority Critical patent/WO2018112764A1/en
Priority to TW106139390A priority patent/TWI626620B/en
Priority to US15/814,791 priority patent/US10692199B2/en
Priority to PCT/CN2017/117289 priority patent/WO2018113685A1/en
Priority to JP2019533587A priority patent/JP6803473B2/en
Priority to EP17208506.0A priority patent/EP3340608B1/en
Priority to KR1020197018549A priority patent/KR102171625B1/en
Priority to ES17208506T priority patent/ES2761593T3/en
Priority to AU2017379019A priority patent/AU2017379019B2/en
Publication of WO2018112764A1 publication Critical patent/WO2018112764A1/en
Priority to ZA2019/04191A priority patent/ZA201904191B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • 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/71Circuitry for evaluating the brightness variation
    • 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
    • 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/20004Adaptive image processing
    • G06T2207/20012Locally adaptive
    • 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
    • H04N23/67Focus control based on electronic image sensor signals

Definitions

  • the present invention relates to image processing technology, and in particular, to an image processing method, a control method, an image processing device, a control device, an imaging device, and an electronic device.
  • the fuzzy algorithm is an average algorithm that averages the pixel brightness values of the light source when blurring the light source in the photo. The light source in the photo appears dim and the effect is not good.
  • Embodiments of the present invention aim to solve at least one of the technical problems existing in the prior art. To this end, embodiments of the present invention are required to provide an image processing method, a control method, an image processing device, a control device, an imaging device, and an electronic device.
  • the invention provides an image processing method, the image processing method comprising the following steps:
  • a blurred overexposed portion corresponding to the overexposed portion of the blurred focus image is replaced with the material portion to obtain a merged image.
  • the in-focus image is in a panoramic deep focus state.
  • the step of identifying whether there is an overexposed portion in the in-focus state in the in-focus image comprises:
  • the step of identifying whether there is an overexposed portion in the in-focus state in the in-focus image comprises:
  • the adjacent overexposed pixels When the adjacent overexposed pixels are present, it is determined that the adjacent overexposed pixels belong to the overexposed portion.
  • the predetermined pixel value is an upper limit of a range of pixel values of the expansive image.
  • the step of blurring the in-focus image to obtain a blurred focus image is implemented using a Gaussian blur algorithm.
  • the degree of blur of the material portion is substantially the same as the degree of blur of the blur exposed portion.
  • the image processing method comprises:
  • the blurred focus image is output when the overexposed portion is absent.
  • the present invention provides a control method for controlling an imaging device, the control method comprising the following steps:
  • the in-focus image and the virtual focus image are processed by the image processing method according to any of the above embodiments.
  • the step of controlling the imaging device to output a focused image and a virtual focus image of the same scene comprises the steps of:
  • the cached image having the same degree of blur as the blurred focus image is saved as the virtual focus image.
  • the present invention provides an image processing apparatus, the image processing apparatus comprising the following steps:
  • An identification module configured to identify whether an overexposed portion in an in-focus state exists in the in-focus image
  • a blurring module configured to blur the in-focus image to obtain a blurred focus image
  • a processing module configured to process a virtual focus image identical to the focused image scene to obtain a material portion corresponding to the overexposed portion when the overexposed portion is present;
  • a merging module configured to replace the imaginary overexposed portion corresponding to the overexposed portion in the blurred focus image with the material portion to obtain a merged image.
  • the in-focus image is in a panoramic deep focus state.
  • the identification module comprises:
  • a first determining sub-module configured to determine, according to a histogram of the in-focus image, whether the over-exposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the over-exposed pixel is greater than or equal to a predetermined pixel value;
  • the first determining submodule is configured to determine that the overexposed portion exists when the overexposed pixel is more than or equal to the first predetermined number.
  • the identification module further includes:
  • a second determining sub-module configured to determine, in the presence of the over-exposed portion, whether there is an adjacent over-exposed pixel in the in-focus image, the number of the adjacent over-exposed pixels being more than or equal to the second The predetermined number;
  • a second determining submodule configured to determine that the adjacent overexposed pixels belong to the overexposed portion when the adjacent overexposed pixels are present.
  • the predetermined pixel value is an upper limit of a range of pixel values of the expansive image.
  • the blurring module is configured to use a Gaussian blurring algorithm to blur the in-focus image to obtain a blurred focus image.
  • the degree of blur of the material portion is substantially the same as the degree of blur of the blur exposed portion.
  • the image processing apparatus comprises:
  • a first output module configured to output the merged image when the overexposed portion is present
  • a second output module configured to output the blurred focus image when the overexposed portion is absent.
  • the present invention provides a control device for controlling an imaging device, the control device comprising:
  • An image processing apparatus as described in any of the above embodiments and electrically connected to the control module.
  • control module comprises:
  • a focusing sub-module configured to control the imaging device to focus to obtain the in-focus image
  • a focusing sub-module for refocusing and processing a cached image output by the imaging device in different focusing states to obtain a corresponding degree of blur
  • a saving submodule configured to save the cached image having a degree of blurring substantially the same as the blurred focus image as the virtual focus image.
  • the invention provides an imaging device, the imaging device comprising:
  • control module electrically connected to the camera, configured to control the camera to output a focused image and a virtual focus image of the same scene
  • An image processing apparatus as described in any of the above embodiments and electrically connected to the control module.
  • control module comprises:
  • a focusing sub-module configured to control the imaging device to focus to obtain the in-focus image
  • a focusing sub-module for refocusing and processing a cached image output by the imaging device in different focusing states to obtain a corresponding degree of blur
  • a saving submodule configured to save the cached image having a degree of blurring substantially the same as the blurred focus image as the virtual focus image.
  • the present invention provides an electronic device comprising the imaging device according to any of the above embodiments.
  • the electronic device includes any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart bracelet, a smart helmet, and smart glasses.
  • the imaging device comprises a front camera or/and a rear camera.
  • the present invention provides an electronic device including a housing, a processor, a memory, a circuit board, and a power supply circuit.
  • the circuit board is disposed inside a space enclosed by the casing, and the processor and the memory are disposed on the circuit board.
  • the power circuit for supplying power to respective circuits or devices of the electronic device; the memory for storing executable program code; the processor running by reading executable program code stored in the memory
  • the program corresponding to the executable program code is used to execute the image processing method according to any of the above embodiments or to execute the control method described in any of the above embodiments.
  • the present invention provides a computer readable storage medium having instructions stored therein, when the processor of the electronic device executes the instructions, the electronic device executes the image processing method according to any one of the above embodiments or performs the above-described A control method according to an embodiment.
  • the image processing method, the image processing device, the control method, the control device, the imaging device and the electronic device provided by the invention take two images, one focused image, one virtual focus image, and the virtual focus image and the focused image are taken
  • the material part corresponding to the exposed part is combined into the blurred focus image to form a combined image with a real spot effect, and the spot effect is good.
  • FIG. 1 is a flow chart showing an image processing method according to a first embodiment of the present invention.
  • FIG. 2 is a functional block diagram of an image processing apparatus according to a first embodiment of the present invention.
  • FIG. 3 is a flow chart showing a control method of the first embodiment of the present invention.
  • FIG. 4 is a schematic diagram of functional blocks of a control device according to a first embodiment of the present invention.
  • Fig. 5 is a schematic diagram showing the functional blocks of the image forming apparatus of the first embodiment of the present invention.
  • FIG. 6 is a schematic diagram of functional blocks of an electronic device according to a first embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a physical object of the electronic device of FIG. 6.
  • FIG. 7 is a schematic diagram of a physical object of the electronic device of FIG. 6.
  • Figure 8 is a schematic view showing the operation of the electronic device of the present invention.
  • FIG. 9 is a flow chart showing an image processing method according to a second embodiment of the present invention.
  • Fig. 10 is a functional block diagram of an image processing apparatus according to a second embodiment of the present invention.
  • Figure 11 is a histogram of a focused image of the present invention.
  • Fig. 12 is a flow chart showing the control method of the second embodiment of the present invention.
  • Fig. 13 is a schematic diagram showing the functional blocks of the control device according to the second embodiment of the present invention.
  • Fig. 14 is a schematic diagram showing the functional blocks of an image forming apparatus according to a second embodiment of the present invention.
  • 15 is a schematic diagram of functional blocks of an electronic device according to a second embodiment of the present invention.
  • Fig. 16 is a flow chart showing an image processing method according to a third embodiment of the present invention.
  • Figure 17 is a diagram showing the functional blocks of an image processing apparatus according to a third embodiment of the present invention.
  • Fig. 18 is a flow chart showing the control method of the third embodiment of the present invention.
  • Fig. 19 is a schematic diagram showing the functional blocks of the control device according to the third embodiment of the present invention.
  • FIG. 20 is a schematic diagram of functional blocks of an image forming apparatus according to a third embodiment of the present invention.
  • 21 is a schematic diagram of functional blocks of an electronic device according to a third embodiment of the present invention.
  • Fig. 22 is a flow chart showing an image processing method according to a fourth embodiment of the present invention.
  • Figure 23 is a diagram showing the functional blocks of an image processing apparatus according to a fourth embodiment of the present invention.
  • Fig. 24 is a flow chart showing the control method of the fourth embodiment of the present invention.
  • Figure 25 is a diagram showing the functional blocks of a control device according to a fourth embodiment of the present invention.
  • Fig. 26 is a schematic diagram showing the functional blocks of an image forming apparatus according to a fourth embodiment of the present invention.
  • Figure 27 is a diagram showing the functional blocks of an electronic device according to a fourth embodiment of the present invention.
  • FIG. 28 is a flow diagram of controlling an imaging device to output a focused image and a virtual focus image of the same scene, in accordance with some embodiments of the present invention.
  • 29 is a functional block diagram of a control module of some embodiments of the present invention.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
  • features defining “first” or “second” may include one or more of the described features either explicitly or implicitly.
  • the meaning of "a plurality" is two or more unless specifically and specifically defined otherwise.
  • connection In the description of the present invention, it should be noted that the terms “installation”, “connected”, and “connected” are to be understood broadly, and may be fixed or detachable, for example, unless otherwise explicitly defined and defined. Connected, or connected in one piece; Therefore, they may be mechanically connected, or may be electrically connected or may communicate with each other; they may be directly connected or indirectly connected through an intermediate medium, and may be internal communication of two elements or an interaction relationship of two elements.
  • the specific meanings of the above terms in the present invention can be understood on a case-by-case basis.
  • the present invention provides an image processing method according to a plurality of embodiments, a control method of a plurality of embodiments, an image processing apparatus according to a plurality of embodiments, a control apparatus of a plurality of embodiments, an imaging apparatus of a plurality of embodiments, and a plurality of embodiments Electronic device.
  • the image processing methods of the plurality of embodiments are sequentially numbered
  • the control methods of the plurality of embodiments are sequentially numbered
  • the image processing apparatuses of the plurality of embodiments are sequentially numbered
  • the control apparatuses of the plurality of embodiments are described.
  • the sequential numbering will be described, the imaging devices of the plurality of embodiments will be sequentially numbered, and the electronic devices of the plurality of embodiments will be sequentially numbered.
  • the image processing method of each embodiment may correspond to a control method of one embodiment, an image processing device corresponding to one embodiment, a control device corresponding to one embodiment, an imaging device corresponding to one embodiment, and a corresponding embodiment.
  • Electronic device for example, the image processing method of the first embodiment may correspond to the control method of the first embodiment, the image processing device that can correspond to the first embodiment, the control device that can correspond to the first embodiment, and the imaging device that can correspond to the first embodiment.
  • the image processing method according to the second embodiment can correspond to the control method of the second embodiment, the image processing device according to the second embodiment, and the control device according to the second embodiment.
  • the imaging device according to the first embodiment and the electronic device according to the second embodiment can be used.
  • an image processing method includes the following steps:
  • the step of blurring the in-focus image to obtain the blurred focus image may be implemented by using a Gaussian blur algorithm.
  • the focus image is in panoramic deep focus.
  • the degree of blurring of the material part is basically the same as the degree of blurring of the blur exposed portion.
  • the image processing method of the first embodiment described above can be realized by the image processing apparatus 111 of the first embodiment of the present invention.
  • the image processing apparatus 111 of the first embodiment of the present invention includes an identification module 1111, a blurring module 1112, a processing module 1113, and a merging module 1114, which can be used to execute S1 to S4, respectively. That is, the identification module 1111 is configured to recognize whether there is an overexposed portion in the in-focus state in the in-focus image.
  • the blurring module 1112 is configured to blur the in-focus image to obtain a blurred focus image.
  • the processing module 1113 is configured to process the same virtual focus image as the focused image scene when there is an overexposed portion to obtain a material portion corresponding to the overexposed portion.
  • the merging module 1114 is configured to replace the imaginary overexposed portion corresponding to the overexposed portion in the blurred focus image with the material portion to obtain a merged image.
  • the blurring module 1112 uses a Gaussian blur algorithm to blur the in-focus image to obtain a blurred focus image.
  • the focus image is in panoramic deep focus.
  • the degree of blurring of the material part is basically the same as the degree of blurring of the blur exposed portion.
  • control method of the first embodiment of the present invention is used to control the imaging device 10.
  • the control method includes the following steps:
  • the step of blurring the in-focus image to obtain the blurred focus image may be implemented by using a Gaussian blur algorithm.
  • the focus image is in panoramic deep focus.
  • the degree of blurring of the material part is basically the same as the degree of blurring of the blur exposed portion.
  • the control method of the above-described first embodiment can be realized by the control device 11 of the first embodiment of the present invention.
  • the control device 11 includes the image processing device 111 in the first embodiment and a control module 112 electrically connected to the image processing device 111.
  • the image processing device 111 is configured to perform steps S1 to S4, and the control module 112 is configured to perform step S6.
  • the structure of the image processing apparatus 111 is as described in the first embodiment, and will not be described herein.
  • the control module 112 is for controlling the imaging device 10 (shown in FIGS. 5-7) to output a focused image and a virtual focus image of the same scene.
  • an image forming apparatus 10 includes a control device 11 of the first embodiment and a camera 12 electrically connected to the control device 11 of the first embodiment.
  • the imaging device 10 of the present embodiment includes the image processing device 111 of the first embodiment, the control module 112, and the camera 12.
  • Control module 112 is electrically connected to both the camera 12 and the image processing device 111.
  • an electronic device 100 includes the imaging device 10 of the first embodiment.
  • the electronic device 100 may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart wristband, a smart helmet, smart glasses, other virtual reality wearable devices, and other augmented reality wearable devices.
  • the imaging device 10 may be a front camera or a rear camera.
  • the two imaging devices 10 may be a front camera and a rear camera, respectively; or both imaging devices 10 are front cameras; or both imaging devices 10 are rear cameras .
  • the imaging device 10 may be a camera disposed at any position, and may be a top camera, a bottom camera, a side wall camera, or the like in addition to the front camera and the rear camera.
  • the camera 12 captures a focused image (shown in the upper left panel of FIG. 8) and a virtual focus image (shown in the upper right panel of FIG. 8) for the same scene.
  • the in-focus image is in the panoramic focus state.
  • the virtual focus image is processed to obtain a material portion (long strip light tube) corresponding to the overexposed portion.
  • the blurred overexposed portion corresponding to the overexposed portion in the blurred focus image is replaced with the material portion to obtain a merged image (shown in the lower right panel of FIG. 8).
  • the image processing method, the image processing device 111, the control method, the control device 11, the imaging device 10, and the electronic device 100 in the first embodiment of the present invention take two images, one focused image, one virtual focus image, and the virtual image is taken out.
  • the material part corresponding to the overexposed part in the focus image in the focus image is combined into the blurred focus image to synthesize a combined image with a real spot effect, and the spot effect is good.
  • the image processing method of the second embodiment of the present invention is substantially the same as the image processing method of the first embodiment. Further, the step of identifying whether there is an overexposed portion in the in-focus state in the focused image includes the following steps. :
  • S11 Determine, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, where the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image. , for example, a predetermined pixel value of 255;
  • the image processing method of the second embodiment described above can be realized by the image processing apparatus 111 of the second embodiment of the present invention.
  • the image processing device 111 of the second embodiment of the present invention has substantially the same structure as the image processing device 111 of the first embodiment, except that the identification module 1111 of the image processing device 111 of the second embodiment includes the first determination sub-module 11111.
  • the first determining sub-module 11112 can be used to perform steps S11 and S12, respectively. That is, the first judging sub-module 11111 is configured to judge according to the histogram of the in-focus image.
  • the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value
  • the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image, for example, a predetermined pixel value is 255.
  • the first determining sub-module 11112 is configured to determine that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number.
  • the horizontal axis of the histogram of the in-focus image represents the increment of the pixel value (gray value) from left to right, and the pixel of the pixel value (gray value) from the bottom to the top of the vertical axis.
  • the number is increasing.
  • the pixel value (gray value) ranges from 0 to 255, that is, from black to white, and the higher the peak at a certain point, the more pixels are indicated at the pixel value (gray value).
  • the first predetermined number should be the number of pixels in the histogram near the right border, that is, the number of overexposed pixels, and the first predetermined number can be set to be one third of the total pixels. It should be noted that one third is only It is a schematic illustration and is not a limitation of the invention.
  • control method of the second embodiment of the present invention is substantially the same as the control method of the first embodiment.
  • step of identifying whether there is an overexposed portion in the in-focus state in the focused image includes the following steps:
  • S11 Determine, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, where the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image. , for example, a predetermined pixel value of 255;
  • control method of the second embodiment described above can be realized by the control device 11 of the second embodiment of the present invention.
  • the control device 11 of the second embodiment of the present invention has substantially the same structure as the control device 11 of the first embodiment, except that the identification module 1111 of the control device 11 of the second embodiment includes a first determination sub-module 11111 and a first The determining sub-module 11112 can be used to perform steps S11 and S12, respectively.
  • the first determining sub-module 11111 is configured to determine, according to the histogram of the focused image, whether the overexposed pixel in the focused image is more than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, the predetermined pixel
  • the value is the upper limit of the range of pixel values of the in-focus image, for example, the predetermined pixel value is 255.
  • the first determining sub-module 11112 is configured to determine that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number.
  • the horizontal axis of the histogram of the in-focus image represents the increment of the pixel value (gradation value) from left to right
  • the vertical axis represents the pixel at a certain pixel value (gray value) from bottom to top.
  • the number is increasing.
  • the pixel value (gray value) ranges from 0 to 255, that is, from black to white, and the higher the peak at a certain point, the more pixels are indicated at the pixel value (gray value).
  • the first predetermined number should be the number of pixels in the histogram near the right border, that is, the number of overexposed pixels, and the first predetermined number can be set to be one third of the total pixels. It should be noted that one third is only It is a schematic illustration and is not a limitation of the invention.
  • an image forming apparatus 10 includes a control device 11 of the second embodiment and a camera 12 electrically connected to the control device 11 of the second embodiment.
  • the imaging device 10 of the present embodiment includes the image processing device 111, the control module 112, and the camera 12 of the second embodiment.
  • the control module 112 is electrically connected to both the camera 12 and the image processing device 111.
  • an electronic device 100 includes the imaging device 10 of the second embodiment.
  • the electronic device 100 may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart wristband, a smart helmet, smart glasses, other virtual reality wearable devices, and other augmented reality wearable devices.
  • the imaging device 10 may be a front camera or a rear camera.
  • the two imaging devices 10 may be a front camera and a rear camera, respectively; or both imaging devices 10 are front cameras; or both imaging devices 10 are rear cameras .
  • the imaging device 10 may be a camera disposed at any position, and may be a top camera, a bottom camera, a side wall camera, or the like in addition to the front camera and the rear camera.
  • the image processing method, the image processing device 111, the control method, the control device 11, the imaging device 10, and the electronic device 100 in the second embodiment of the present invention take two images, one focused image, one virtual focus image, and the virtual image is taken out.
  • the material part corresponding to the overexposed part in the focus image in the focus image is combined into the blurred focus image to synthesize a combined image with a real spot effect, and the spot effect is good.
  • the image processing method according to the third embodiment of the present invention is substantially the same as the image processing method of the first embodiment. Further, the step of identifying whether there is an overexposed portion in the in-focus state in the focused image includes the following steps. :
  • S11 Determine, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, where the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image. , for example, the predetermined pixel value is 255;
  • the image processing method of the third embodiment described above can be realized by the image processing apparatus 111 of the third embodiment of the present invention.
  • the image processing device 111 of the third embodiment of the present invention has substantially the same structure as the image processing device 111 of the first embodiment, except that the recognition module 1111 of the image processing device 111 of the third embodiment includes the first determination sub-module 11111.
  • the first determining sub-module 11112, the second determining sub-module 11113, and the second determining sub-module 11114 are respectively configured to perform steps S11, S12, S13, and S14.
  • the first determining sub-module 11111 is configured to determine, according to the histogram of the focused image, that the overexposed pixel in the focused image is No more than or equal to the first predetermined number, the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, and the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image, for example, the predetermined pixel value is 255.
  • the first determining sub-module 11112 is configured to determine that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number.
  • the second judging sub-module 11113 is configured to determine whether there is an adjacent over-exposed pixel in the in-focus image when there is an over-exposed portion, and the number of adjacent over-exposed pixels is greater than or equal to a second predetermined number.
  • the second determining sub-module 11114 is configured to determine that the adjacent over-exposed pixels belong to the over-exposed portion when there is an adjacent over-exposed pixel.
  • the second predetermined number should be smaller than the first predetermined number, because the first predetermined number may include noise, and even the in-focus image may include a plurality of adjacent overexposed pixels, for example, there are a plurality of discrete light sources, and the light sources are combined Overexposed part.
  • the horizontal axis of the histogram of the in-focus image represents the increment of the pixel value (gradation value) from left to right
  • the vertical axis represents the pixel at a certain pixel value (gray value) from bottom to top.
  • the number is increasing.
  • the pixel value (gray value) ranges from 0 to 255, that is, from black to white, and the higher the peak at a certain point, the more pixels are indicated at the pixel value (gray value).
  • the first predetermined number and the second predetermined number should be the number of pixels in the histogram near the right boundary, that is, the number of overexposed pixels, and the first predetermined number may be set to be one third of the total pixels, and the second predetermined number may be It is set to account for a quarter of the total pixels. It should be noted that one-third and one-quarter are only illustrative and are not intended to limit the invention.
  • control method of the third embodiment of the present invention is substantially the same as the control method of the first embodiment.
  • step of identifying whether there is an overexposed portion in the in-focus state in the focused image includes the following steps:
  • S11 Determine, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, where the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image. , for example, the predetermined pixel value is 255;
  • control device 11 of the third embodiment of the present invention has substantially the same structure as the control device 11 of the first embodiment, except that the identification module 1111 of the control device 11 of the third embodiment includes a first determination sub-module 11111, and a first The determining sub-module 11112, the second determining sub-module 11113, and the second determining sub-module 11114 are respectively configured to perform steps S11, S12, S13, and S14.
  • the first judgment sub-module 11111 And a method for determining whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number according to a histogram of the in-focus image, wherein the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, and the predetermined pixel value is an upper limit of a pixel value range of the in-focus image.
  • the predetermined pixel value is 255.
  • the first determining sub-module 11112 is configured to determine that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number.
  • the second judging sub-module 11113 is configured to determine whether there is an adjacent over-exposed pixel in the in-focus image when there is an over-exposed portion, and the number of adjacent over-exposed pixels is greater than or equal to a second predetermined number.
  • the second determining sub-module 11114 is configured to determine that the adjacent over-exposed pixels belong to the over-exposed portion when there is an adjacent over-exposed pixel.
  • the second predetermined number should be smaller than the first predetermined number, because the first predetermined number may include noise, and even the in-focus image may include a plurality of adjacent overexposed pixels, for example, there are a plurality of discrete light sources, and the light sources are combined Overexposed part.
  • the horizontal axis of the histogram of the in-focus image represents the increment of the pixel value (gradation value) from left to right
  • the vertical axis represents the pixel at a certain pixel value (gray value) from bottom to top.
  • the number is increasing.
  • the pixel value (gray value) ranges from 0 to 255, that is, from black to white, and the higher the peak at a certain point, the more pixels are indicated at the pixel value (gray value).
  • the first predetermined number and the second predetermined number should be the number of pixels in the histogram near the right boundary, that is, the number of overexposed pixels, and the first predetermined number may be set to be one third of the total pixels, and the second predetermined number may be It is set to account for a quarter of the total pixels. It should be noted that one-third and one-quarter are only illustrative and are not intended to limit the invention.
  • an electronic device 100 includes the imaging device 10 of the third embodiment.
  • the electronic device 100 may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart wristband, a smart helmet, smart glasses, other virtual reality wearable devices, and other augmented reality wearable devices.
  • the imaging device 10 may be a front camera or a rear camera.
  • the two imaging devices 10 may be a front camera and a rear camera, respectively; or both imaging devices 10 are front cameras; or both imaging devices 10 are rear cameras .
  • the imaging device 10 may be a camera disposed at any position, and may be a top camera, a bottom camera, a side wall camera, or the like in addition to the front camera and the rear camera.
  • the image processing method, the image processing device 111, the control method, the control device 11, the imaging device 10, and the electronic device 100 in the third embodiment of the present invention capture two images, one focused image, and one virtual focus image.
  • the material part corresponding to the overexposed part of the in-focus image in the virtual focus image is taken out, and is merged into the blurred focus image to synthesize a combined image with a real spot effect, and the spot effect is good.
  • the image processing method of the fourth embodiment of the present invention is substantially the same as the image processing method of the first embodiment. Further, the image processing method of the fourth embodiment further includes the following steps:
  • the image processing method of the fourth embodiment described above can be realized by the image processing apparatus 111 of the fourth embodiment of the present invention.
  • the image processing device 111 of the fourth embodiment of the present invention has substantially the same structure as the image processing device 111 of the first embodiment, except that the image processing device 111 of the fourth embodiment further includes a first output module 1117 and a second output.
  • Module 1118 can be used to perform steps S7 and S8, respectively. That is, the first output module 1117 is configured to output a merged image when there is an overexposed portion.
  • the second output module 1118 is configured to output a blurred focus image when there is no overexposed portion.
  • control method of the fourth embodiment of the present invention is substantially the same as the control method of the first embodiment.
  • the control method of the fourth embodiment further includes the following steps:
  • the control device 11 of the fourth embodiment of the present invention has basically the same configuration as the control device 11 of the first embodiment, except that the image processing device 111 of the control device 11 of the fourth embodiment further includes a first output module 1117 and a The two output modules 1118 can be used to perform steps S7 and S8, respectively. That is, the first output module 1117 is configured to output a merged image when there is an overexposed portion. The second output module 1118 is configured to output a blurred focus image when there is no overexposed portion.
  • an image forming apparatus 10 includes a control device 11 of a fourth embodiment and a camera 12 electrically connected to the control device 11 of the fourth embodiment.
  • the imaging device 10 of the present embodiment includes the image processing device 111, the control module 112, and the camera 12 of the fourth embodiment.
  • the control module 112 is electrically connected to both the camera 12 and the image processing device 111.
  • an electronic device 100 includes the imaging device 10 of the fourth embodiment.
  • the electronic device 100 may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart wristband, a smart helmet, smart glasses, other virtual reality wearable devices, and other augmented reality wearable devices.
  • the imaging device 10 may be a front camera or a rear camera.
  • the two imaging devices 10 may be a front camera and a rear camera, respectively; or both imaging devices 10 are front cameras; or both imaging devices 10 are rear cameras .
  • the imaging device 10 may be a camera disposed at any position, and may be a top camera, a bottom camera, a side wall camera, or the like in addition to the front camera and the rear camera.
  • the image processing method, the image processing device 111, the control method, the control device 11, the imaging device 10, and the electronic device 100 in the fourth embodiment of the present invention take two images, one focused image, one virtual focus image, and the virtual image is taken out.
  • the material part corresponding to the overexposed part in the focus image in the focus image is combined into the blurred focus image to synthesize a combined image with a real spot effect, and the spot effect is good.
  • steps S7 and S8 can also be applied to the image processing method of the second embodiment and the control method of the second embodiment.
  • the first output module 1117 and the second output module 1118 can also be applied to the second embodiment.
  • Steps S7 and S8 can also be applied to the image processing method of the third embodiment and the control method of the third embodiment.
  • the first output module 1117 and the second output module 1118 can also be applied to the image processing of the third embodiment.
  • step S6 may include the following steps:
  • the control module 112 in the control device 11 of the first to fourth embodiments includes a focus sub-module 1121, a focus sub-module 1122, and a save sub-module 1123, which can be used to perform step S61, respectively.
  • S62 and S63 the focusing sub-module 1121 is for controlling the imaging device to focus to obtain a focused image.
  • the focus sub-module 1122 is used to refocus and process the cached image output by the imaging device in different focus states to obtain a corresponding degree of blur.
  • the saving sub-module 1123 is configured to store a cache image having substantially the same degree of blur as the blurred focus image as a virtual focus image.
  • the imaging device 10 of the first to fourth embodiments and the control module 112 of the electronic device 100 may also include a focusing sub-module 1121, a focusing sub-module 1122, and a saving sub-module 1123.
  • the specific structure and function are the same as before. It will not be expanded in detail here.
  • Certain embodiments of the present invention also provide an electronic device including a housing, a processor, a memory, a circuit board, and a power supply circuit.
  • the circuit board is disposed inside a space enclosed by the casing, and the processor and the memory are disposed on the circuit board.
  • the power circuit for powering various circuits or devices of the electronic device; the memory for storing executable program code; the processor reading the memory by reading
  • the stored executable program code runs a program corresponding to the executable program code for executing the image processing method of any of the above embodiments or the control method of any of the above embodiments.
  • the electronic device may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart bracelet, a smart helmet, and smart glasses.
  • a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device.
  • computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

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

Abstract

Disclosed in the present invention is an image processing method, comprising: (S1) identifying whether an overexposed part in an in-focus state is present in a focused image; (S2) blurring the focused image to obtain a blurred focused image; (S3) when an overexposed part is present, processing an out-of-focus image of the same scene as the focused image to obtain a material part corresponding to the overexposed part; and (S4) substituting the material part for the blurred overexposed part corresponding to the overexposed part in the blurred focused image to obtain a merged image. Also disclosed in the present invention are an image processing apparatus (111), a control method, a control apparatus (11), an imaging apparatus (10), and an electronic apparatus (100).

Description

图像处理方法与装置、控制方法与装置、成像与电子装置Image processing method and device, control method and device, imaging and electronic device 技术领域Technical field
本发明涉及图像处理技术,特别涉及一种图像处理方法、一种控制方法、一种图像处理装置、一种控制装置、一种成像装置和一种电子装置。The present invention relates to image processing technology, and in particular, to an image processing method, a control method, an image processing device, a control device, an imaging device, and an electronic device.
背景技术Background technique
现有的虚化算法,比如人像照片的背景虚化,其软件虚化算法一般使用模糊算法,模糊算法是一种平均算法,在虚化照片中的光源时,会将光源的像素亮度值平均化,使照片中的光源显得暗淡,效果不好。Existing blurring algorithms, such as the background blur of portrait photos, generally use a fuzzy algorithm for the software blurring algorithm. The fuzzy algorithm is an average algorithm that averages the pixel brightness values of the light source when blurring the light source in the photo. The light source in the photo appears dim and the effect is not good.
发明内容Summary of the invention
本发明的实施方式旨在至少解决现有技术中存在的技术问题之一。为此,本发明的实施方式需要提供一种图像处理方法、一种控制方法、一种图像处理装置、一种控制装置、一种成像装置和一种电子装置。Embodiments of the present invention aim to solve at least one of the technical problems existing in the prior art. To this end, embodiments of the present invention are required to provide an image processing method, a control method, an image processing device, a control device, an imaging device, and an electronic device.
本发明提供一种图像处理方法,所述图像处理方法包括以下步骤:The invention provides an image processing method, the image processing method comprising the following steps:
识别对焦图像中是否存在处于对焦状态的过曝部分;Identifying whether there is an overexposed portion in the in-focus state in the in-focus image;
虚化所述对焦图像以得到虚化对焦图像;Bluning the in-focus image to obtain a blurred focus image;
在存在所述过曝部分时,处理与所述对焦图像场景相同的虚焦图像以得到与所述过曝部分对应的素材部分;和Processing the virtual focus image identical to the focused image scene to obtain a material portion corresponding to the overexposed portion when the overexposed portion is present; and
将所述虚化对焦图像中与所述过曝部分对应的虚化过曝部分替换为所述素材部分以得到合并图像。A blurred overexposed portion corresponding to the overexposed portion of the blurred focus image is replaced with the material portion to obtain a merged image.
在某些实施方式中,所述对焦图像处于全景深对焦状态。In some embodiments, the in-focus image is in a panoramic deep focus state.
在某些实施方式中,所述识别对焦图像中是否存在处于对焦状态的过曝部分的步骤包括:In some embodiments, the step of identifying whether there is an overexposed portion in the in-focus state in the in-focus image comprises:
根据所述对焦图像的直方图判断所述对焦图像中过曝像素是否多于或等于第一预定数目,所述过曝像素的像素值大于或等于预定像素值;和Determining, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is more than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value; and
在所述过曝像素多于或等于第一预定数目时确定存在所述过曝部分。It is determined that the overexposed portion exists when the overexposed pixel is more than or equal to the first predetermined number.
在某些实施方式中,所述识别对焦图像中是否存在处于对焦状态的过曝部分的步骤包括:In some embodiments, the step of identifying whether there is an overexposed portion in the in-focus state in the in-focus image comprises:
在存在所述过曝部分时,判断所述对焦图像中是否存在相邻接的过曝像素,所述相邻接的过曝像素的数目多于或等于第二预定数目;和 When there is the overexposed portion, determining whether there is an adjacent overexposed pixel in the in-focus image, the number of the adjacent overexposed pixels being more than or equal to a second predetermined number; and
在存在所述相邻接的过曝像素时,确定所述相邻接的过曝像素属于所述过曝部分。When the adjacent overexposed pixels are present, it is determined that the adjacent overexposed pixels belong to the overexposed portion.
在某些实施方式中,所述预定像素值为所述适曝图像的像素值范围的上限。In some embodiments, the predetermined pixel value is an upper limit of a range of pixel values of the expansive image.
在某些实施方式中,所述虚化所述对焦图像以得到虚化对焦图像的步骤是采用高斯模糊算法实现的。In some embodiments, the step of blurring the in-focus image to obtain a blurred focus image is implemented using a Gaussian blur algorithm.
在某些实施方式中,所述素材部分的虚化程度与所述虚化过曝部分的虚化程度基本相同。In some embodiments, the degree of blur of the material portion is substantially the same as the degree of blur of the blur exposed portion.
在某些实施方式中,所述图像处理方法包括:In some embodiments, the image processing method comprises:
在存在所述过曝部分时,输出所述合并图像;和Outputting the merged image when the overexposed portion is present; and
在不存在所述过曝部分时,输出所述虚化对焦图像。The blurred focus image is output when the overexposed portion is absent.
本发明提供一种控制方法,用于控制成像装置,所述控制方法包括以下步骤:The present invention provides a control method for controlling an imaging device, the control method comprising the following steps:
控制所述成像装置输出相同场景的对焦图像和虚焦图像;和Controlling the imaging device to output a focused image and a virtual focus image of the same scene; and
采用如上任意一实施方式所述的图像处理方法处理所述对焦图像和所述虚焦图像。The in-focus image and the virtual focus image are processed by the image processing method according to any of the above embodiments.
在某些实施方式中,所述控制所述成像装置输出相同场景的对焦图像和虚焦图像的步骤包括以下步骤:In some embodiments, the step of controlling the imaging device to output a focused image and a virtual focus image of the same scene comprises the steps of:
控制所述成像装置对焦以得到所述对焦图像;Controlling the imaging device to focus to obtain the in-focus image;
重新调焦并处理不同调焦状态下所述成像装置输出的缓存图像以得到对应的虚化程度;和Refocusing and processing the cached image output by the imaging device in different focusing states to obtain a corresponding degree of blur; and
保存虚化程度与所述虚化对焦图像基本相同的所述缓存图像作为所述虚焦图像。The cached image having the same degree of blur as the blurred focus image is saved as the virtual focus image.
本发明提供一种图像处理装置,所述图像处理装置包括以下步骤:The present invention provides an image processing apparatus, the image processing apparatus comprising the following steps:
识别模块,用于识别对焦图像中是否存在处于对焦状态的过曝部分;An identification module, configured to identify whether an overexposed portion in an in-focus state exists in the in-focus image;
虚化模块,用于虚化所述对焦图像以得到虚化对焦图像;a blurring module, configured to blur the in-focus image to obtain a blurred focus image;
处理模块,用于在存在所述过曝部分时,处理与所述对焦图像场景相同的虚焦图像以得到与所述过曝部分对应的素材部分;和a processing module, configured to process a virtual focus image identical to the focused image scene to obtain a material portion corresponding to the overexposed portion when the overexposed portion is present; and
合并模块,用于将所述虚化对焦图像中与所述过曝部分对应的虚化过曝部分替换为所述素材部分以得到合并图像。And a merging module, configured to replace the imaginary overexposed portion corresponding to the overexposed portion in the blurred focus image with the material portion to obtain a merged image.
在某些实施方式中,所述对焦图像处于全景深对焦状态。In some embodiments, the in-focus image is in a panoramic deep focus state.
在某些实施方式中,所述识别模块包括:In some embodiments, the identification module comprises:
第一判断子模块,用于根据所述对焦图像的直方图判断所述对焦图像中过曝像素是否多于或等于第一预定数目,所述过曝像素的像素值大于或等于预定像素值;和a first determining sub-module, configured to determine, according to a histogram of the in-focus image, whether the over-exposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the over-exposed pixel is greater than or equal to a predetermined pixel value; with
第一确定子模块,用于在所述过曝像素多于或等于第一预定数目时确定存在所述过曝部分。The first determining submodule is configured to determine that the overexposed portion exists when the overexposed pixel is more than or equal to the first predetermined number.
在某些实施方式中,所述识别模块还包括: In some embodiments, the identification module further includes:
第二判断子模块,用于在存在所述过曝部分时,判断所述对焦图像中是否存在相邻接的过曝像素,所述相邻接的过曝像素的数目多于或等于第二预定数目;和a second determining sub-module, configured to determine, in the presence of the over-exposed portion, whether there is an adjacent over-exposed pixel in the in-focus image, the number of the adjacent over-exposed pixels being more than or equal to the second The predetermined number; and
第二确定子模块,用于在存在所述相邻接的过曝像素时,确定所述相邻接的过曝像素属于所述过曝部分。a second determining submodule, configured to determine that the adjacent overexposed pixels belong to the overexposed portion when the adjacent overexposed pixels are present.
在某些实施方式中,所述预定像素值为所述适曝图像的像素值范围的上限。In some embodiments, the predetermined pixel value is an upper limit of a range of pixel values of the expansive image.
在某些实施方式中,所述虚化模块用于是采用高斯模糊算法来虚化对焦图像以得到虚化对焦图像。In some embodiments, the blurring module is configured to use a Gaussian blurring algorithm to blur the in-focus image to obtain a blurred focus image.
在某些实施方式中,所述素材部分的虚化程度与所述虚化过曝部分的虚化程度基本相同。In some embodiments, the degree of blur of the material portion is substantially the same as the degree of blur of the blur exposed portion.
在某些实施方式中,所述图像处理装置包括:In some embodiments, the image processing apparatus comprises:
第一输出模块,用于在存在所述过曝部分时,输出所述合并图像;和a first output module, configured to output the merged image when the overexposed portion is present; and
第二输出模块,用于在不存在所述过曝部分时,输出所述虚化对焦图像。And a second output module, configured to output the blurred focus image when the overexposed portion is absent.
本发明提供一种控制装置,用于控制成像装置,所述控制装置包括:The present invention provides a control device for controlling an imaging device, the control device comprising:
控制模块,用于控制所述成像装置输出相同场景的对焦图像和虚焦图像;和a control module, configured to control the imaging device to output a focused image and a virtual focus image of the same scene; and
如上任意一实施方式所述并与所述控制模块电连接的图像处理装置。An image processing apparatus as described in any of the above embodiments and electrically connected to the control module.
在某些实施方式中,所述控制模块包括:In some embodiments, the control module comprises:
对焦子模块,用于控制所述成像装置对焦以得到所述对焦图像;a focusing sub-module, configured to control the imaging device to focus to obtain the in-focus image;
调焦子模块,用于重新调焦并处理不同调焦状态下所述成像装置输出的缓存图像以得到对应的虚化程度;和a focusing sub-module for refocusing and processing a cached image output by the imaging device in different focusing states to obtain a corresponding degree of blur; and
保存子模块,用于保存虚化程度与所述虚化对焦图像基本相同的所述缓存图像作为所述虚焦图像。And a saving submodule, configured to save the cached image having a degree of blurring substantially the same as the blurred focus image as the virtual focus image.
本发明提供一种成像装置,所述成像装置包括:The invention provides an imaging device, the imaging device comprising:
摄像头;camera;
与所述摄像头电连接的控制模块,用于控制所述摄像头输出相同场景的对焦图像和虚焦图像;和a control module electrically connected to the camera, configured to control the camera to output a focused image and a virtual focus image of the same scene; and
如上任意一实施方式所述并与所述控制模块电连接的图像处理装置。An image processing apparatus as described in any of the above embodiments and electrically connected to the control module.
在某些实施方式中,所述控制模块包括:In some embodiments, the control module comprises:
对焦子模块,用于控制所述成像装置对焦以得到所述对焦图像;a focusing sub-module, configured to control the imaging device to focus to obtain the in-focus image;
调焦子模块,用于重新调焦并处理不同调焦状态下所述成像装置输出的缓存图像以得到对应的虚化程度;和a focusing sub-module for refocusing and processing a cached image output by the imaging device in different focusing states to obtain a corresponding degree of blur; and
保存子模块,用于保存虚化程度与所述虚化对焦图像基本相同的所述缓存图像作为所述虚焦图像。 And a saving submodule, configured to save the cached image having a degree of blurring substantially the same as the blurred focus image as the virtual focus image.
本发明提供一种电子装置,所述电子装置包括如上任意一实施方式所述的成像装置。The present invention provides an electronic device comprising the imaging device according to any of the above embodiments.
在某些实施方式中,所述电子装置包括手机、平板电脑、笔记本电脑、智能手表、智能手环、智能头盔、智能眼镜中的任意一种。In some embodiments, the electronic device includes any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart bracelet, a smart helmet, and smart glasses.
在某些实施方式中,所述成像装置包括前置相机或/和后置相机。In certain embodiments, the imaging device comprises a front camera or/and a rear camera.
本发明提供一种电子装置,该电子装置包括壳体、处理器、存储器、电路板和电源电路。所述电路板安置在所述壳体围成的空间内部,所述处理器和所述存储器设置在所述电路板上。所述电源电路,用于为所述电子装置的各个电路或器件供电;所述存储器用于存储可执行程序代码;所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行上述任一实施方式所述的图像处理方法或执行上述任一实施方式所述的控制方法。The present invention provides an electronic device including a housing, a processor, a memory, a circuit board, and a power supply circuit. The circuit board is disposed inside a space enclosed by the casing, and the processor and the memory are disposed on the circuit board. The power circuit for supplying power to respective circuits or devices of the electronic device; the memory for storing executable program code; the processor running by reading executable program code stored in the memory The program corresponding to the executable program code is used to execute the image processing method according to any of the above embodiments or to execute the control method described in any of the above embodiments.
本发明提供一种计算机可读存储介质,具有存储于其中的指令,当电子装置的处理器执行所述指令时,所述电子装置执行如上任意一实施方式所述的图像处理方法或执行上述任一实施方式所述的控制方法。The present invention provides a computer readable storage medium having instructions stored therein, when the processor of the electronic device executes the instructions, the electronic device executes the image processing method according to any one of the above embodiments or performs the above-described A control method according to an embodiment.
本发明提供的图像处理方法、图像处理装置、控制方法、控制装置、成像装置及电子装置通过拍摄两张图像,一张对焦图像,一张虚焦图像,取出虚焦图像中与对焦图像中过曝部分对应的素材部分,合入虚化后的对焦图像中,合成一张带有真实光斑效果的合并图像,光斑效果好。The image processing method, the image processing device, the control method, the control device, the imaging device and the electronic device provided by the invention take two images, one focused image, one virtual focus image, and the virtual focus image and the focused image are taken The material part corresponding to the exposed part is combined into the blurred focus image to form a combined image with a real spot effect, and the spot effect is good.
本发明的实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实施方式的实践了解到。The additional aspects and advantages of the embodiments of the present invention will be set forth in part in the description which follows.
附图说明DRAWINGS
本发明的上述和/或附加的方面和优点从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from
图1是本发明第一实施方式的图像处理方法的流程示意图。1 is a flow chart showing an image processing method according to a first embodiment of the present invention.
图2是本发明第一实施方式的图像处理装置的功能模块示意图。2 is a functional block diagram of an image processing apparatus according to a first embodiment of the present invention.
图3是本发明第一实施方式的控制方法的流程示意图。3 is a flow chart showing a control method of the first embodiment of the present invention.
图4是本发明第一实施方式的控制装置的功能模块示意图。4 is a schematic diagram of functional blocks of a control device according to a first embodiment of the present invention.
图5是本发明第一实施方式的成像装置的功能模块示意图。Fig. 5 is a schematic diagram showing the functional blocks of the image forming apparatus of the first embodiment of the present invention.
图6是本发明第一实施方式的电子装置的功能模块示意图。6 is a schematic diagram of functional blocks of an electronic device according to a first embodiment of the present invention.
图7是图6中电子装置的实物示意图。FIG. 7 is a schematic diagram of a physical object of the electronic device of FIG. 6. FIG.
图8是本发明电子装置的工作示意图。Figure 8 is a schematic view showing the operation of the electronic device of the present invention.
图9是本发明第二实施方式的图像处理方法的流程示意图。 9 is a flow chart showing an image processing method according to a second embodiment of the present invention.
图10是本发明第二实施方式的图像处理装置的功能模块示意图。Fig. 10 is a functional block diagram of an image processing apparatus according to a second embodiment of the present invention.
图11是本发明对焦图像的直方图。Figure 11 is a histogram of a focused image of the present invention.
图12是本发明第二实施方式的控制方法的流程示意图。Fig. 12 is a flow chart showing the control method of the second embodiment of the present invention.
图13是本发明第二实施方式的控制装置的功能模块示意图。Fig. 13 is a schematic diagram showing the functional blocks of the control device according to the second embodiment of the present invention.
图14是本发明第二实施方式的成像装置的功能模块示意图。Fig. 14 is a schematic diagram showing the functional blocks of an image forming apparatus according to a second embodiment of the present invention.
图15是本发明第二实施方式的电子装置的功能模块示意图。15 is a schematic diagram of functional blocks of an electronic device according to a second embodiment of the present invention.
图16是本发明第三实施方式的图像处理方法的流程示意图。Fig. 16 is a flow chart showing an image processing method according to a third embodiment of the present invention.
图17是本发明第三实施方式的图像处理装置的功能模块示意图。Figure 17 is a diagram showing the functional blocks of an image processing apparatus according to a third embodiment of the present invention.
图18是本发明第三实施方式的控制方法的流程示意图。Fig. 18 is a flow chart showing the control method of the third embodiment of the present invention.
图19是本发明第三实施方式的控制装置的功能模块示意图。Fig. 19 is a schematic diagram showing the functional blocks of the control device according to the third embodiment of the present invention.
图20是本发明第三实施方式的成像装置的功能模块示意图。20 is a schematic diagram of functional blocks of an image forming apparatus according to a third embodiment of the present invention.
图21是本发明第三实施方式的电子装置的功能模块示意图。21 is a schematic diagram of functional blocks of an electronic device according to a third embodiment of the present invention.
图22是本发明第四实施方式的图像处理方法的流程示意图。Fig. 22 is a flow chart showing an image processing method according to a fourth embodiment of the present invention.
图23是本发明第四实施方式的图像处理装置的功能模块示意图。Figure 23 is a diagram showing the functional blocks of an image processing apparatus according to a fourth embodiment of the present invention.
图24是本发明第四实施方式的控制方法的流程示意图。Fig. 24 is a flow chart showing the control method of the fourth embodiment of the present invention.
图25是本发明第四实施方式的控制装置的功能模块示意图。Figure 25 is a diagram showing the functional blocks of a control device according to a fourth embodiment of the present invention.
图26是本发明第四实施方式的成像装置的功能模块示意图。Fig. 26 is a schematic diagram showing the functional blocks of an image forming apparatus according to a fourth embodiment of the present invention.
图27是本发明第四实施方式的电子装置的功能模块示意图。Figure 27 is a diagram showing the functional blocks of an electronic device according to a fourth embodiment of the present invention.
图28是本发明某些实施方式控制成像装置输出相同场景的对焦图像和虚焦图像的流程示意图。28 is a flow diagram of controlling an imaging device to output a focused image and a virtual focus image of the same scene, in accordance with some embodiments of the present invention.
图29是本发明某些实施方式的控制模块的功能模块示意图。29 is a functional block diagram of a control module of some embodiments of the present invention.
具体实施方式detailed description
下面详细描述本发明的实施方式,所述实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals indicate the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
在本发明的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the present invention, it is to be understood that the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first" or "second" may include one or more of the described features either explicitly or implicitly. In the description of the present invention, the meaning of "a plurality" is two or more unless specifically and specifically defined otherwise.
在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可 以是机械连接,也可以是电连接或可以相互通信;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that the terms "installation", "connected", and "connected" are to be understood broadly, and may be fixed or detachable, for example, unless otherwise explicitly defined and defined. Connected, or connected in one piece; Therefore, they may be mechanically connected, or may be electrically connected or may communicate with each other; they may be directly connected or indirectly connected through an intermediate medium, and may be internal communication of two elements or an interaction relationship of two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood on a case-by-case basis.
下文的公开提供了许多不同的实施方式或例子用来实现本发明的不同结构。为了简化本发明的公开,下文中对特定例子的部件和设置进行描述。当然,它们仅仅为示例,并且目的不在于限制本发明。此外,本发明可以在不同例子中重复参考数字和/或参考字母,这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施方式和/或设置之间的关系。此外,本发明提供了的各种特定的工艺和材料的例子,但是本领域普通技术人员可以意识到其他工艺的应用和/或其他材料的使用。The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and arrangements of the specific examples are described below. Of course, they are merely examples and are not intended to limit the invention. In addition, the present invention may be repeated with reference to the numerals and/or reference numerals in the various examples, which are for the purpose of simplicity and clarity, and do not indicate the relationship between the various embodiments and/or arrangements discussed. Moreover, the present invention provides examples of various specific processes and materials, but one of ordinary skill in the art will recognize the use of other processes and/or the use of other materials.
本发明提供多个实施方式的图像处理方法、多个实施方式的控制方法、多个实施方式的图像处理装置、多个实施方式的控制装置、多个实施方式的成像装置、和多个实施方式的电子装置。下面将多个实施方式的图像处理方法顺序编号来说明、将多个实施方式的控制方法顺序编号来说明、将多个实施方式的图像处理装置顺序编号来说明、将多个实施方式的控制装置顺序编号来说明、将多个实施方式的成像装置顺序编号来说明、及将多个实施方式的电子装置顺序编号来说明。其中,每个实施方式的图像处理方法可对应一个实施方式的控制方法、对应一个实施方式的图像处理装置、对应一个实施方式的控制装置、对应一个实施方式的成像装置、及对应一个实施方式的电子装置。例如,第一实施方式的图像处理方法可对应第一实施方式的控制方法、可对应第一实施方式的图像处理装置、可对应第一实施方式的控制装置、可对应第一实施方式的成像装置、及可对应第一实施方式的电子装置;第二实施方式的图像处理方法可对应第二实施方式的控制方法、可对应第二实施方式的图像处理装置、可对应第二实施方式的控制装置、可对应第一实施方式的成像装置、及可对应第二实施方式的电子装置。The present invention provides an image processing method according to a plurality of embodiments, a control method of a plurality of embodiments, an image processing apparatus according to a plurality of embodiments, a control apparatus of a plurality of embodiments, an imaging apparatus of a plurality of embodiments, and a plurality of embodiments Electronic device. Hereinafter, the image processing methods of the plurality of embodiments are sequentially numbered, the control methods of the plurality of embodiments are sequentially numbered, the image processing apparatuses of the plurality of embodiments are sequentially numbered, and the control apparatuses of the plurality of embodiments are described. The sequential numbering will be described, the imaging devices of the plurality of embodiments will be sequentially numbered, and the electronic devices of the plurality of embodiments will be sequentially numbered. The image processing method of each embodiment may correspond to a control method of one embodiment, an image processing device corresponding to one embodiment, a control device corresponding to one embodiment, an imaging device corresponding to one embodiment, and a corresponding embodiment. Electronic device. For example, the image processing method of the first embodiment may correspond to the control method of the first embodiment, the image processing device that can correspond to the first embodiment, the control device that can correspond to the first embodiment, and the imaging device that can correspond to the first embodiment. And the electronic device according to the first embodiment; the image processing method according to the second embodiment can correspond to the control method of the second embodiment, the image processing device according to the second embodiment, and the control device according to the second embodiment. The imaging device according to the first embodiment and the electronic device according to the second embodiment can be used.
请参阅图1,本发明第一实施方式的图像处理方法包括以下步骤:Referring to FIG. 1, an image processing method according to a first embodiment of the present invention includes the following steps:
S1,识别对焦图像中是否存在处于对焦状态的过曝部分;S1, identifying whether there is an overexposed portion in the in-focus state in the in-focus image;
S2,虚化对焦图像以得到虚化对焦图像;S2, blur the in-focus image to obtain a blurred focus image;
S3,在存在过曝部分时,处理与对焦图像场景相同的虚焦图像以得到与过曝部分对应的素材部分;和S3, when there is an overexposed portion, processing the same virtual focus image as the focused image scene to obtain a material portion corresponding to the overexposed portion; and
S4,将虚化对焦图像中与过曝部分对应的虚化过曝部分替换为素材部分以得到合并图像。S4, replacing the blurred overexposed portion corresponding to the overexposed portion in the blurred focus image with the material portion to obtain a merged image.
其中,虚化对焦图像以得到虚化对焦图像的步骤可以是采用高斯模糊算法实现的。对焦图像处于全景深对焦状态。素材部分的虚化程度与虚化过曝部分的虚化程度基本相同。 The step of blurring the in-focus image to obtain the blurred focus image may be implemented by using a Gaussian blur algorithm. The focus image is in panoramic deep focus. The degree of blurring of the material part is basically the same as the degree of blurring of the blur exposed portion.
请参阅图2,上述第一实施方式的图像处理方法可以由本发明第一实施方式的图像处理装置111实现。具体地,本发明第一实施方式的图像处理装置111包括识别模块1111、虚化模块1112、处理模块1113及合并模块1114,可分别用于执行S1至S4。也就是说,识别模块1111用于识别对焦图像中是否存在处于对焦状态的过曝部分。虚化模块1112用于虚化对焦图像以得到虚化对焦图像。处理模块1113用于在存在过曝部分时,处理与对焦图像场景相同的虚焦图像以得到与过曝部分对应的素材部分。合并模块1114用于将虚化对焦图像中与过曝部分对应的虚化过曝部分替换为素材部分以得到合并图像。Referring to FIG. 2, the image processing method of the first embodiment described above can be realized by the image processing apparatus 111 of the first embodiment of the present invention. Specifically, the image processing apparatus 111 of the first embodiment of the present invention includes an identification module 1111, a blurring module 1112, a processing module 1113, and a merging module 1114, which can be used to execute S1 to S4, respectively. That is, the identification module 1111 is configured to recognize whether there is an overexposed portion in the in-focus state in the in-focus image. The blurring module 1112 is configured to blur the in-focus image to obtain a blurred focus image. The processing module 1113 is configured to process the same virtual focus image as the focused image scene when there is an overexposed portion to obtain a material portion corresponding to the overexposed portion. The merging module 1114 is configured to replace the imaginary overexposed portion corresponding to the overexposed portion in the blurred focus image with the material portion to obtain a merged image.
其中,虚化模块1112是采用高斯模糊算法来虚化对焦图像以得到虚化对焦图像。对焦图像处于全景深对焦状态。素材部分的虚化程度与虚化过曝部分的虚化程度基本相同。The blurring module 1112 uses a Gaussian blur algorithm to blur the in-focus image to obtain a blurred focus image. The focus image is in panoramic deep focus. The degree of blurring of the material part is basically the same as the degree of blurring of the blur exposed portion.
请参阅图3及图5-7,本发明第一实施方式的控制方法,用于控制成像装置10,所述控制方法包括以下步骤:Referring to FIG. 3 and FIG. 5-7, the control method of the first embodiment of the present invention is used to control the imaging device 10. The control method includes the following steps:
S6,控制成像装置10输出相同场景的对焦图像和虚焦图像;S6, controlling the imaging device 10 to output the in-focus image and the virtual focus image of the same scene;
S1,识别对焦图像中是否存在处于对焦状态的过曝部分;S1, identifying whether there is an overexposed portion in the in-focus state in the in-focus image;
S2,虚化对焦图像以得到虚化对焦图像;S2, blur the in-focus image to obtain a blurred focus image;
S3,在存在过曝部分时,处理与对焦图像场景相同的虚焦图像以得到与过曝部分对应的素材部分;和S3, when there is an overexposed portion, processing the same virtual focus image as the focused image scene to obtain a material portion corresponding to the overexposed portion; and
S4,将虚化对焦图像中与过曝部分对应的虚化过曝部分替换为素材部分以得到合并图像。S4, replacing the blurred overexposed portion corresponding to the overexposed portion in the blurred focus image with the material portion to obtain a merged image.
其中,虚化对焦图像以得到虚化对焦图像的步骤可以是采用高斯模糊算法实现的。对焦图像处于全景深对焦状态。素材部分的虚化程度与虚化过曝部分的虚化程度基本相同。The step of blurring the in-focus image to obtain the blurred focus image may be implemented by using a Gaussian blur algorithm. The focus image is in panoramic deep focus. The degree of blurring of the material part is basically the same as the degree of blurring of the blur exposed portion.
请参阅图4,上述第一实施方式的控制方法可以由本发明第一实施方式的控制装置11实现。具体地,在本发明第一实施方式的控制装置11中,控制装置11包括第一实施方式中的图像处理装置111及与图像处理装置111电连接的控制模块112。图像处理装置111用于执行步骤S1至S4,控制模块112用于执行步骤S6。图像处理装置111的结构如上第一实施方式所述,在此不再赘述。控制模块112用于控制成像装置10(图5-7所示)输出相同场景的对焦图像和虚焦图像。Referring to FIG. 4, the control method of the above-described first embodiment can be realized by the control device 11 of the first embodiment of the present invention. Specifically, in the control device 11 of the first embodiment of the present invention, the control device 11 includes the image processing device 111 in the first embodiment and a control module 112 electrically connected to the image processing device 111. The image processing device 111 is configured to perform steps S1 to S4, and the control module 112 is configured to perform step S6. The structure of the image processing apparatus 111 is as described in the first embodiment, and will not be described herein. The control module 112 is for controlling the imaging device 10 (shown in FIGS. 5-7) to output a focused image and a virtual focus image of the same scene.
请参阅图5,本发明第一实施方式的成像装置10包括第一实施方式的控制装置11及与第一实施方式的控制装置11电连接的摄像头12。换句话说,本实施方式的成像装置10包括第一实施方式的图像处理装置111、控制模块112、及摄像头12。控制模块 112与摄像头12及图像处理装置111均电连接。Referring to Fig. 5, an image forming apparatus 10 according to a first embodiment of the present invention includes a control device 11 of the first embodiment and a camera 12 electrically connected to the control device 11 of the first embodiment. In other words, the imaging device 10 of the present embodiment includes the image processing device 111 of the first embodiment, the control module 112, and the camera 12. Control module 112 is electrically connected to both the camera 12 and the image processing device 111.
请参阅图6及7,本发明第一实施方式的电子装置100包括第一实施方式的成像装置10。电子装置100可以是手机、平板电脑、笔记本电脑、智能手表、智能手环、智能头盔、智能眼镜、其他虚拟现实穿戴设备、其他增强现实穿戴设备等具有拍摄功能的终端中的任意一种。当成像装置10的数量为一个时,成像装置10可以是前置相机或后置相机。当成像装置10的数量为两个时,两个成像装置10可以分别是前置相机及后置相机;或两个成像装置10都是前置相机;或两个成像装置10都是后置相机。当然,成像装置10的数量大于等于两个时,成像装置10可以是设置在任意位置的相机,除了前置相机、后置相机,还可以是顶部相机、底部相机、侧壁相机等。Referring to FIGS. 6 and 7, an electronic device 100 according to a first embodiment of the present invention includes the imaging device 10 of the first embodiment. The electronic device 100 may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart wristband, a smart helmet, smart glasses, other virtual reality wearable devices, and other augmented reality wearable devices. When the number of imaging devices 10 is one, the imaging device 10 may be a front camera or a rear camera. When the number of imaging devices 10 is two, the two imaging devices 10 may be a front camera and a rear camera, respectively; or both imaging devices 10 are front cameras; or both imaging devices 10 are rear cameras . Of course, when the number of the imaging devices 10 is two or more, the imaging device 10 may be a camera disposed at any position, and may be a top camera, a bottom camera, a side wall camera, or the like in addition to the front camera and the rear camera.
举例来说,请结合图8,摄像头12针对相同场景拍摄对焦图像(图8左上幅所示)和虚焦图像(图8右上幅所示)。其中,对焦图像是处于全景对焦状态。经识别后,可以判断对焦图像中有过曝部分,即上方的长条形灯管。虚化对焦图像以得到虚化对焦图像(图8左下幅所示),其中,虚化对焦图像中的过曝部分(长条形灯管)被虚化得到虚化过曝部分(长条形灯管)。在存在过曝部分时,处理虚焦图像以得到与过曝部分对应的素材部分(长条形灯管)。将虚化对焦图像中与过曝部分对应的虚化过曝部分替换为素材部分以得到合并图像(图8右下幅所示)。For example, referring to FIG. 8, the camera 12 captures a focused image (shown in the upper left panel of FIG. 8) and a virtual focus image (shown in the upper right panel of FIG. 8) for the same scene. Among them, the in-focus image is in the panoramic focus state. After being identified, it can be judged that there is an overexposed portion in the in-focus image, that is, an elongated strip tube above. Blur the in-focus image to obtain a blurred focus image (shown in the lower left panel of Figure 8), wherein the overexposed portion (long strip light tube) in the blurred focus image is blurred to obtain a blurred overexposed portion (long strip shape) Light tube). When there is an overexposed portion, the virtual focus image is processed to obtain a material portion (long strip light tube) corresponding to the overexposed portion. The blurred overexposed portion corresponding to the overexposed portion in the blurred focus image is replaced with the material portion to obtain a merged image (shown in the lower right panel of FIG. 8).
本发明第一实施方式中的图像处理方法、图像处理装置111、控制方法、控制装置11、成像装置10及电子装置100通过拍摄两张图像,一张对焦图像,一张虚焦图像,取出虚焦图像中与对焦图像中过曝部分对应的素材部分,合入虚化后的对焦图像中,合成一张带有真实光斑效果的合并图像,光斑效果好。The image processing method, the image processing device 111, the control method, the control device 11, the imaging device 10, and the electronic device 100 in the first embodiment of the present invention take two images, one focused image, one virtual focus image, and the virtual image is taken out. The material part corresponding to the overexposed part in the focus image in the focus image is combined into the blurred focus image to synthesize a combined image with a real spot effect, and the spot effect is good.
请参阅图9,本发明第二实施方式的图像处理方法与第一实施方式的图像处理方法基本相同,进一步地,所述识别对焦图像中是否存在处于对焦状态的过曝部分的步骤包括以下步骤:Referring to FIG. 9, the image processing method of the second embodiment of the present invention is substantially the same as the image processing method of the first embodiment. Further, the step of identifying whether there is an overexposed portion in the in-focus state in the focused image includes the following steps. :
S11,根据对焦图像的直方图判断对焦图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为对焦图像的像素值范围的上限,例如预定像素值为255;和S11. Determine, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, where the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image. , for example, a predetermined pixel value of 255; and
S12,在过曝像素多于或等于第一预定数目时确定存在过曝部分。S12, determining that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number.
请参见图10,上述第二实施方式的图像处理方法可以由本发明第二实施方式的图像处理装置111实现。本发明第二实施方式的图像处理装置111与第一实施方式的图像处理装置111结构基本相同,不同之处在于:第二实施方式的图像处理装置111的识别模块1111包括第一判断子模块11111及第一确定子模块11112,可分别用于执行步骤S11及S12。也就是说,第一判断子模块11111用于根据对焦图像的直方图判断 对焦图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为对焦图像的像素值范围的上限,例如预定像素值为255。第一确定子模块11112用于在过曝像素多于或等于第一预定数目时确定存在过曝部分。Referring to Fig. 10, the image processing method of the second embodiment described above can be realized by the image processing apparatus 111 of the second embodiment of the present invention. The image processing device 111 of the second embodiment of the present invention has substantially the same structure as the image processing device 111 of the first embodiment, except that the identification module 1111 of the image processing device 111 of the second embodiment includes the first determination sub-module 11111. And the first determining sub-module 11112 can be used to perform steps S11 and S12, respectively. That is, the first judging sub-module 11111 is configured to judge according to the histogram of the in-focus image. Whether the overexposed pixel in the in-focus image is more than or equal to a first predetermined number, the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, and the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image, for example, a predetermined pixel value is 255. The first determining sub-module 11112 is configured to determine that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number.
请参阅图11,一般地,对焦图像的直方图的横轴从左至右表示像素值(灰度值)的递增,纵轴从下到上表示在某一像素值(灰度值)的像素数量的递增。像素值(灰度值)的范围为0-255,也即是表示由黑到白,在某一点的峰值越高,表示在该像素值(灰度值)下的像素越多。Referring to FIG. 11, in general, the horizontal axis of the histogram of the in-focus image represents the increment of the pixel value (gray value) from left to right, and the pixel of the pixel value (gray value) from the bottom to the top of the vertical axis. The number is increasing. The pixel value (gray value) ranges from 0 to 255, that is, from black to white, and the higher the peak at a certain point, the more pixels are indicated at the pixel value (gray value).
第一预定数目应当是直方图中靠近右侧边界的像素也即是过曝像素的数量,第一预定数目可以设置为占总像素的三分之一,需要说明的是,三分之一仅是示意性说明,并非对发明的限制。The first predetermined number should be the number of pixels in the histogram near the right border, that is, the number of overexposed pixels, and the first predetermined number can be set to be one third of the total pixels. It should be noted that one third is only It is a schematic illustration and is not a limitation of the invention.
请参阅图12,本发明第二实施方式的控制方法与第一实施方式的控制方法基本相同,进一步地,所述识别对焦图像中是否存在处于对焦状态的过曝部分的步骤包括以下步骤:Referring to FIG. 12, the control method of the second embodiment of the present invention is substantially the same as the control method of the first embodiment. Further, the step of identifying whether there is an overexposed portion in the in-focus state in the focused image includes the following steps:
S11,根据对焦图像的直方图判断对焦图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为对焦图像的像素值范围的上限,例如预定像素值为255;和S11. Determine, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, where the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image. , for example, a predetermined pixel value of 255; and
S12,在过曝像素多于或等于第一预定数目时确定存在过曝部分。S12, determining that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number.
请参见图13,上述第二实施方式的控制方法可以由本发明第二实施方式的控制装置11实现。本发明第二实施方式的控制装置11与第一实施方式的控制装置11结构基本相同,不同之处在于:第二实施方式的控制装置11的识别模块1111包括第一判断子模块11111及第一确定子模块11112,可分别用于执行步骤S11及S12。也就是说,第一判断子模块11111用于根据对焦图像的直方图判断对焦图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为对焦图像的像素值范围的上限,例如预定像素值为255。第一确定子模块11112用于在过曝像素多于或等于第一预定数目时确定存在过曝部分。Referring to Fig. 13, the control method of the second embodiment described above can be realized by the control device 11 of the second embodiment of the present invention. The control device 11 of the second embodiment of the present invention has substantially the same structure as the control device 11 of the first embodiment, except that the identification module 1111 of the control device 11 of the second embodiment includes a first determination sub-module 11111 and a first The determining sub-module 11112 can be used to perform steps S11 and S12, respectively. That is, the first determining sub-module 11111 is configured to determine, according to the histogram of the focused image, whether the overexposed pixel in the focused image is more than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, the predetermined pixel The value is the upper limit of the range of pixel values of the in-focus image, for example, the predetermined pixel value is 255. The first determining sub-module 11112 is configured to determine that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number.
请结合图11,一般地,对焦图像的直方图的横轴从左至右表示像素值(灰度值)的递增,纵轴从下到上表示在某一像素值(灰度值)的像素数量的递增。像素值(灰度值)的范围为0-255,也即是表示由黑到白,在某一点的峰值越高,表示在该像素值(灰度值)下的像素越多。Referring to FIG. 11, in general, the horizontal axis of the histogram of the in-focus image represents the increment of the pixel value (gradation value) from left to right, and the vertical axis represents the pixel at a certain pixel value (gray value) from bottom to top. The number is increasing. The pixel value (gray value) ranges from 0 to 255, that is, from black to white, and the higher the peak at a certain point, the more pixels are indicated at the pixel value (gray value).
第一预定数目应当是直方图中靠近右侧边界的像素也即是过曝像素的数量,第一预定数目可以设置为占总像素的三分之一,需要说明的是,三分之一仅是示意性说明,并非对发明的限制。 The first predetermined number should be the number of pixels in the histogram near the right border, that is, the number of overexposed pixels, and the first predetermined number can be set to be one third of the total pixels. It should be noted that one third is only It is a schematic illustration and is not a limitation of the invention.
请参阅图14,本发明第二实施方式的成像装置10包括第二实施方式的控制装置11及与第二实施方式的控制装置11电连接的摄像头12。换句话说,本实施方式的成像装置10包括第二实施方式的图像处理装置111、控制模块112、及摄像头12。控制模块112与摄像头12及图像处理装置111均电连接。Referring to Fig. 14, an image forming apparatus 10 according to a second embodiment of the present invention includes a control device 11 of the second embodiment and a camera 12 electrically connected to the control device 11 of the second embodiment. In other words, the imaging device 10 of the present embodiment includes the image processing device 111, the control module 112, and the camera 12 of the second embodiment. The control module 112 is electrically connected to both the camera 12 and the image processing device 111.
请参阅图15,本发明第二实施方式的电子装置100包括第二实施方式的成像装置10。电子装置100可以是手机、平板电脑、笔记本电脑、智能手表、智能手环、智能头盔、智能眼镜、其他虚拟现实穿戴设备、其他增强现实穿戴设备等具有拍摄功能的终端中的任意一种。当成像装置10的数量为一个时,成像装置10可以是前置相机或后置相机。当成像装置10的数量为两个时,两个成像装置10可以分别是前置相机及后置相机;或两个成像装置10都是前置相机;或两个成像装置10都是后置相机。当然,成像装置10的数量大于等于两个时,成像装置10可以是设置在任意位置的相机,除了前置相机、后置相机,还可以是顶部相机、底部相机、侧壁相机等。Referring to FIG. 15, an electronic device 100 according to a second embodiment of the present invention includes the imaging device 10 of the second embodiment. The electronic device 100 may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart wristband, a smart helmet, smart glasses, other virtual reality wearable devices, and other augmented reality wearable devices. When the number of imaging devices 10 is one, the imaging device 10 may be a front camera or a rear camera. When the number of imaging devices 10 is two, the two imaging devices 10 may be a front camera and a rear camera, respectively; or both imaging devices 10 are front cameras; or both imaging devices 10 are rear cameras . Of course, when the number of the imaging devices 10 is two or more, the imaging device 10 may be a camera disposed at any position, and may be a top camera, a bottom camera, a side wall camera, or the like in addition to the front camera and the rear camera.
本发明第二实施方式中的图像处理方法、图像处理装置111、控制方法、控制装置11、成像装置10及电子装置100通过拍摄两张图像,一张对焦图像,一张虚焦图像,取出虚焦图像中与对焦图像中过曝部分对应的素材部分,合入虚化后的对焦图像中,合成一张带有真实光斑效果的合并图像,光斑效果好。The image processing method, the image processing device 111, the control method, the control device 11, the imaging device 10, and the electronic device 100 in the second embodiment of the present invention take two images, one focused image, one virtual focus image, and the virtual image is taken out. The material part corresponding to the overexposed part in the focus image in the focus image is combined into the blurred focus image to synthesize a combined image with a real spot effect, and the spot effect is good.
请参阅图16,本发明第三实施方式的图像处理方法与第一实施方式的图像处理方法基本相同,进一步地,所述识别对焦图像中是否存在处于对焦状态的过曝部分的步骤包括以下步骤:Referring to FIG. 16, the image processing method according to the third embodiment of the present invention is substantially the same as the image processing method of the first embodiment. Further, the step of identifying whether there is an overexposed portion in the in-focus state in the focused image includes the following steps. :
S11,根据对焦图像的直方图判断对焦图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为对焦图像的像素值范围的上限,例如预定像素值为255;S11. Determine, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, where the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image. , for example, the predetermined pixel value is 255;
S12,在过曝像素多于或等于第一预定数目时确定存在过曝部分;S12, determining that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number;
S13,在存在过曝部分时,判断对焦图像中是否存在相邻接的过曝像素,相邻接的过曝像素的数目多于或等于第二预定数目;和S13, when there is an overexposed portion, determining whether there is an adjacent overexposed pixel in the in-focus image, and the number of adjacent overexposed pixels is greater than or equal to a second predetermined number; and
S14,在存在相邻接的过曝像素时,确定相邻接的过曝像素属于过曝部分。S14. When there is an adjacent overexposed pixel, it is determined that the adjacent overexposed pixel belongs to the overexposed portion.
请参见图17,上述第三实施方式的图像处理方法可以由本发明第三实施方式的图像处理装置111实现。本发明第三实施方式的图像处理装置111与第一实施方式的图像处理装置111结构基本相同,不同之处在于:第三实施方式的图像处理装置111的识别模块1111包括第一判断子模块11111、第一确定子模块11112、第二判断子模块11113、及第二确定子模块11114,可分别用于执行步骤S11、S12、S13及S14。也就是说,第一判断子模块11111用于根据对焦图像的直方图判断对焦图像中过曝像素是 否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为对焦图像的像素值范围的上限,例如预定像素值为255。第一确定子模块11112用于在过曝像素多于或等于第一预定数目时确定存在过曝部分。第二判断子模块11113用于在存在过曝部分时,判断对焦图像中是否存在相邻接的过曝像素,相邻接的过曝像素的数目多于或等于第二预定数目。第二确定子模块11114用于在存在相邻接的过曝像素时,确定相邻接的过曝像素属于过曝部分。Referring to Fig. 17, the image processing method of the third embodiment described above can be realized by the image processing apparatus 111 of the third embodiment of the present invention. The image processing device 111 of the third embodiment of the present invention has substantially the same structure as the image processing device 111 of the first embodiment, except that the recognition module 1111 of the image processing device 111 of the third embodiment includes the first determination sub-module 11111. The first determining sub-module 11112, the second determining sub-module 11113, and the second determining sub-module 11114 are respectively configured to perform steps S11, S12, S13, and S14. That is, the first determining sub-module 11111 is configured to determine, according to the histogram of the focused image, that the overexposed pixel in the focused image is No more than or equal to the first predetermined number, the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, and the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image, for example, the predetermined pixel value is 255. The first determining sub-module 11112 is configured to determine that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number. The second judging sub-module 11113 is configured to determine whether there is an adjacent over-exposed pixel in the in-focus image when there is an over-exposed portion, and the number of adjacent over-exposed pixels is greater than or equal to a second predetermined number. The second determining sub-module 11114 is configured to determine that the adjacent over-exposed pixels belong to the over-exposed portion when there is an adjacent over-exposed pixel.
其中,第二预定数目应该小于第一预定数目,因为第一预定数目可能包括了噪点,甚至对焦图像可能包括多个相邻接的过曝像素,例如存在多个离散的光源,这些光源共同构成过曝部分。Wherein, the second predetermined number should be smaller than the first predetermined number, because the first predetermined number may include noise, and even the in-focus image may include a plurality of adjacent overexposed pixels, for example, there are a plurality of discrete light sources, and the light sources are combined Overexposed part.
请结合图11,一般地,对焦图像的直方图的横轴从左至右表示像素值(灰度值)的递增,纵轴从下到上表示在某一像素值(灰度值)的像素数量的递增。像素值(灰度值)的范围为0-255,也即是表示由黑到白,在某一点的峰值越高,表示在该像素值(灰度值)下的像素越多。Referring to FIG. 11, in general, the horizontal axis of the histogram of the in-focus image represents the increment of the pixel value (gradation value) from left to right, and the vertical axis represents the pixel at a certain pixel value (gray value) from bottom to top. The number is increasing. The pixel value (gray value) ranges from 0 to 255, that is, from black to white, and the higher the peak at a certain point, the more pixels are indicated at the pixel value (gray value).
第一预定数目与第二预定数目应当是直方图中靠近右侧边界的像素也即是过曝像素的数量,第一预定数目可以设置为占总像素的三分之一,第二预定数目可以设置为占总像素的四分之一,需要说明的是,三分之一与四分之一仅是示意性说明,并非对发明的限制。The first predetermined number and the second predetermined number should be the number of pixels in the histogram near the right boundary, that is, the number of overexposed pixels, and the first predetermined number may be set to be one third of the total pixels, and the second predetermined number may be It is set to account for a quarter of the total pixels. It should be noted that one-third and one-quarter are only illustrative and are not intended to limit the invention.
请参阅图18,本发明第三实施方式的控制方法与第一实施方式的控制方法基本相同,进一步地,所述识别对焦图像中是否存在处于对焦状态的过曝部分的步骤包括以下步骤:Referring to FIG. 18, the control method of the third embodiment of the present invention is substantially the same as the control method of the first embodiment. Further, the step of identifying whether there is an overexposed portion in the in-focus state in the focused image includes the following steps:
S11,根据对焦图像的直方图判断对焦图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为对焦图像的像素值范围的上限,例如预定像素值为255;S11. Determine, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, where the predetermined pixel value is an upper limit of a range of pixel values of the in-focus image. , for example, the predetermined pixel value is 255;
S12,在过曝像素多于或等于第一预定数目时确定存在过曝部分;S12, determining that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number;
S13,在存在过曝部分时,判断对焦图像中是否存在相邻接的过曝像素,相邻接的过曝像素的数目多于或等于第二预定数目;和S13, when there is an overexposed portion, determining whether there is an adjacent overexposed pixel in the in-focus image, and the number of adjacent overexposed pixels is greater than or equal to a second predetermined number; and
S14,在存在相邻接的过曝像素时,确定相邻接的过曝像素属于过曝部分。S14. When there is an adjacent overexposed pixel, it is determined that the adjacent overexposed pixel belongs to the overexposed portion.
请参见图19,上述第三实施方式的控制方法可以由本发明第三实施方式的控制装置11实现。本发明第三实施方式的控制装置11与第一实施方式的控制装置11结构基本相同,不同之处在于:第三实施方式的控制装置11的识别模块1111包括第一判断子模块11111、第一确定子模块11112、第二判断子模块11113、及第二确定子模块11114,可分别用于执行步骤S11、S12、S13及S14。也就是说,第一判断子模块11111 用于根据对焦图像的直方图判断对焦图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为对焦图像的像素值范围的上限,例如预定像素值为255。第一确定子模块11112用于在过曝像素多于或等于第一预定数目时确定存在过曝部分。第二判断子模块11113用于在存在过曝部分时,判断对焦图像中是否存在相邻接的过曝像素,相邻接的过曝像素的数目多于或等于第二预定数目。第二确定子模块11114用于在存在相邻接的过曝像素时,确定相邻接的过曝像素属于过曝部分。Referring to Fig. 19, the control method of the third embodiment described above can be realized by the control device 11 of the third embodiment of the present invention. The control device 11 of the third embodiment of the present invention has substantially the same structure as the control device 11 of the first embodiment, except that the identification module 1111 of the control device 11 of the third embodiment includes a first determination sub-module 11111, and a first The determining sub-module 11112, the second determining sub-module 11113, and the second determining sub-module 11114 are respectively configured to perform steps S11, S12, S13, and S14. That is, the first judgment sub-module 11111 And a method for determining whether the overexposed pixel in the in-focus image is greater than or equal to a first predetermined number according to a histogram of the in-focus image, wherein the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value, and the predetermined pixel value is an upper limit of a pixel value range of the in-focus image. For example, the predetermined pixel value is 255. The first determining sub-module 11112 is configured to determine that there is an overexposed portion when the overexposed pixel is more than or equal to the first predetermined number. The second judging sub-module 11113 is configured to determine whether there is an adjacent over-exposed pixel in the in-focus image when there is an over-exposed portion, and the number of adjacent over-exposed pixels is greater than or equal to a second predetermined number. The second determining sub-module 11114 is configured to determine that the adjacent over-exposed pixels belong to the over-exposed portion when there is an adjacent over-exposed pixel.
其中,第二预定数目应该小于第一预定数目,因为第一预定数目可能包括了噪点,甚至对焦图像可能包括多个相邻接的过曝像素,例如存在多个离散的光源,这些光源共同构成过曝部分。Wherein, the second predetermined number should be smaller than the first predetermined number, because the first predetermined number may include noise, and even the in-focus image may include a plurality of adjacent overexposed pixels, for example, there are a plurality of discrete light sources, and the light sources are combined Overexposed part.
请结合图11,一般地,对焦图像的直方图的横轴从左至右表示像素值(灰度值)的递增,纵轴从下到上表示在某一像素值(灰度值)的像素数量的递增。像素值(灰度值)的范围为0-255,也即是表示由黑到白,在某一点的峰值越高,表示在该像素值(灰度值)下的像素越多。Referring to FIG. 11, in general, the horizontal axis of the histogram of the in-focus image represents the increment of the pixel value (gradation value) from left to right, and the vertical axis represents the pixel at a certain pixel value (gray value) from bottom to top. The number is increasing. The pixel value (gray value) ranges from 0 to 255, that is, from black to white, and the higher the peak at a certain point, the more pixels are indicated at the pixel value (gray value).
第一预定数目与第二预定数目应当是直方图中靠近右侧边界的像素也即是过曝像素的数量,第一预定数目可以设置为占总像素的三分之一,第二预定数目可以设置为占总像素的四分之一,需要说明的是,三分之一与四分之一仅是示意性说明,并非对发明的限制。The first predetermined number and the second predetermined number should be the number of pixels in the histogram near the right boundary, that is, the number of overexposed pixels, and the first predetermined number may be set to be one third of the total pixels, and the second predetermined number may be It is set to account for a quarter of the total pixels. It should be noted that one-third and one-quarter are only illustrative and are not intended to limit the invention.
请参阅图20,本发明第三实施方式的成像装置10包括第三实施方式的控制装置11及与第三实施方式的控制装置11电连接的摄像头12。换句话说,本实施方式的成像装置10包括第三实施方式的图像处理装置111、控制模块112、及摄像头12。控制模块112与摄像头12及图像处理装置111均电连接。Referring to Fig. 20, an image forming apparatus 10 according to a third embodiment of the present invention includes a control device 11 of a third embodiment and a camera 12 electrically connected to the control device 11 of the third embodiment. In other words, the imaging device 10 of the present embodiment includes the image processing device 111, the control module 112, and the camera 12 of the third embodiment. The control module 112 is electrically connected to both the camera 12 and the image processing device 111.
请参阅图21,本发明第三实施方式的电子装置100包括第三实施方式的成像装置10。电子装置100可以是手机、平板电脑、笔记本电脑、智能手表、智能手环、智能头盔、智能眼镜、其他虚拟现实穿戴设备、其他增强现实穿戴设备等具有拍摄功能的终端中的任意一种。当成像装置10的数量为一个时,成像装置10可以是前置相机或后置相机。当成像装置10的数量为两个时,两个成像装置10可以分别是前置相机及后置相机;或两个成像装置10都是前置相机;或两个成像装置10都是后置相机。当然,成像装置10的数量大于等于两个时,成像装置10可以是设置在任意位置的相机,除了前置相机、后置相机,还可以是顶部相机、底部相机、侧壁相机等。Referring to FIG. 21, an electronic device 100 according to a third embodiment of the present invention includes the imaging device 10 of the third embodiment. The electronic device 100 may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart wristband, a smart helmet, smart glasses, other virtual reality wearable devices, and other augmented reality wearable devices. When the number of imaging devices 10 is one, the imaging device 10 may be a front camera or a rear camera. When the number of imaging devices 10 is two, the two imaging devices 10 may be a front camera and a rear camera, respectively; or both imaging devices 10 are front cameras; or both imaging devices 10 are rear cameras . Of course, when the number of the imaging devices 10 is two or more, the imaging device 10 may be a camera disposed at any position, and may be a top camera, a bottom camera, a side wall camera, or the like in addition to the front camera and the rear camera.
本发明第三实施方式中的图像处理方法、图像处理装置111、控制方法、控制装置11、成像装置10及电子装置100通过拍摄两张图像,一张对焦图像,一张虚焦图像, 取出虚焦图像中与对焦图像中过曝部分对应的素材部分,合入虚化后的对焦图像中,合成一张带有真实光斑效果的合并图像,光斑效果好。The image processing method, the image processing device 111, the control method, the control device 11, the imaging device 10, and the electronic device 100 in the third embodiment of the present invention capture two images, one focused image, and one virtual focus image. The material part corresponding to the overexposed part of the in-focus image in the virtual focus image is taken out, and is merged into the blurred focus image to synthesize a combined image with a real spot effect, and the spot effect is good.
请参阅图22,本发明第四实施方式的图像处理方法与第一实施方式的图像处理方法基本相同,进一步地,第四实施方式的图像处理方法还包括以下步骤:Referring to FIG. 22, the image processing method of the fourth embodiment of the present invention is substantially the same as the image processing method of the first embodiment. Further, the image processing method of the fourth embodiment further includes the following steps:
S7,在存在过曝部分时,输出合并图像;和S7, outputting a merged image when there is an overexposed portion; and
S8,在不存在过曝部分时,输出虚化对焦图像。S8, when there is no overexposed portion, the blurred focus image is output.
请参见图23,上述第四实施方式的图像处理方法可以由本发明第四实施方式的图像处理装置111实现。本发明第四实施方式的图像处理装置111与第一实施方式的图像处理装置111结构基本相同,不同之处在于:第四实施方式的图像处理装置111还包括第一输出模块1117及第二输出模块1118,可分别用于执行步骤S7及S8。也就是说,第一输出模块1117用于在存在过曝部分时,输出合并图像。第二输出模块1118用于在不存在过曝部分时,输出虚化对焦图像。Referring to Fig. 23, the image processing method of the fourth embodiment described above can be realized by the image processing apparatus 111 of the fourth embodiment of the present invention. The image processing device 111 of the fourth embodiment of the present invention has substantially the same structure as the image processing device 111 of the first embodiment, except that the image processing device 111 of the fourth embodiment further includes a first output module 1117 and a second output. Module 1118 can be used to perform steps S7 and S8, respectively. That is, the first output module 1117 is configured to output a merged image when there is an overexposed portion. The second output module 1118 is configured to output a blurred focus image when there is no overexposed portion.
请参阅图24,本发明第四实施方式的控制方法与第一实施方式的控制方法基本相同,第四实施方式的控制方法还包括以下步骤:Referring to FIG. 24, the control method of the fourth embodiment of the present invention is substantially the same as the control method of the first embodiment. The control method of the fourth embodiment further includes the following steps:
S7,在存在过曝部分时,输出合并图像;和S7, outputting a merged image when there is an overexposed portion; and
S8,在不存在过曝部分时,输出虚化对焦图像。S8, when there is no overexposed portion, the blurred focus image is output.
请参见图25,上述第四实施方式的控制方法可以由本发明第四实施方式的控制装置11实现。本发明第四实施方式的控制装置11与第一实施方式的控制装置11结构基本相同,不同之处在于:第四实施方式的控制装置11的图像处理装置111还包括第一输出模块1117及第二输出模块1118,可分别用于执行步骤S7及S8。也就是说,第一输出模块1117用于在存在过曝部分时,输出合并图像。第二输出模块1118用于在不存在过曝部分时,输出虚化对焦图像。Referring to Fig. 25, the control method of the fourth embodiment described above can be realized by the control device 11 of the fourth embodiment of the present invention. The control device 11 of the fourth embodiment of the present invention has basically the same configuration as the control device 11 of the first embodiment, except that the image processing device 111 of the control device 11 of the fourth embodiment further includes a first output module 1117 and a The two output modules 1118 can be used to perform steps S7 and S8, respectively. That is, the first output module 1117 is configured to output a merged image when there is an overexposed portion. The second output module 1118 is configured to output a blurred focus image when there is no overexposed portion.
请参阅图26,本发明第四实施方式的成像装置10包括第四实施方式的控制装置11及与第四实施方式的控制装置11电连接的摄像头12。换句话说,本实施方式的成像装置10包括第四实施方式的图像处理装置111、控制模块112、及摄像头12。控制模块112与摄像头12及图像处理装置111均电连接。Referring to Fig. 26, an image forming apparatus 10 according to a fourth embodiment of the present invention includes a control device 11 of a fourth embodiment and a camera 12 electrically connected to the control device 11 of the fourth embodiment. In other words, the imaging device 10 of the present embodiment includes the image processing device 111, the control module 112, and the camera 12 of the fourth embodiment. The control module 112 is electrically connected to both the camera 12 and the image processing device 111.
请参阅图27,本发明第四实施方式的电子装置100包括第四实施方式的成像装置10。电子装置100可以是手机、平板电脑、笔记本电脑、智能手表、智能手环、智能头盔、智能眼镜、其他虚拟现实穿戴设备、其他增强现实穿戴设备等具有拍摄功能的终端中的任意一种。当成像装置10的数量为一个时,成像装置10可以是前置相机或后置相机。当成像装置10的数量为两个时,两个成像装置10可以分别是前置相机及后置相机;或两个成像装置10都是前置相机;或两个成像装置10都是后置相机。当 然,成像装置10的数量大于等于两个时,成像装置10可以是设置在任意位置的相机,除了前置相机、后置相机,还可以是顶部相机、底部相机、侧壁相机等。Referring to FIG. 27, an electronic device 100 according to a fourth embodiment of the present invention includes the imaging device 10 of the fourth embodiment. The electronic device 100 may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart wristband, a smart helmet, smart glasses, other virtual reality wearable devices, and other augmented reality wearable devices. When the number of imaging devices 10 is one, the imaging device 10 may be a front camera or a rear camera. When the number of imaging devices 10 is two, the two imaging devices 10 may be a front camera and a rear camera, respectively; or both imaging devices 10 are front cameras; or both imaging devices 10 are rear cameras . when However, when the number of the imaging devices 10 is two or more, the imaging device 10 may be a camera disposed at any position, and may be a top camera, a bottom camera, a side wall camera, or the like in addition to the front camera and the rear camera.
本发明第四实施方式中的图像处理方法、图像处理装置111、控制方法、控制装置11、成像装置10及电子装置100通过拍摄两张图像,一张对焦图像,一张虚焦图像,取出虚焦图像中与对焦图像中过曝部分对应的素材部分,合入虚化后的对焦图像中,合成一张带有真实光斑效果的合并图像,光斑效果好。The image processing method, the image processing device 111, the control method, the control device 11, the imaging device 10, and the electronic device 100 in the fourth embodiment of the present invention take two images, one focused image, one virtual focus image, and the virtual image is taken out. The material part corresponding to the overexposed part in the focus image in the focus image is combined into the blurred focus image to synthesize a combined image with a real spot effect, and the spot effect is good.
可以理解,步骤S7及S8还可以应用于第二实施方式的图像处理方法、第二实施方式的控制方法;对应地,第一输出模块1117及第二输出模块1118还可以应用于第二实施方式的图像处理装置、第二实施方式的控制装置、第二实施方式的成像装置与第二实施方式的电子装置中。步骤S7及S8还可以应用于第三实施方式的图像处理方法、第三实施方式的控制方法;对应地,第一输出模块1117及第二输出模块1118还可以应用于第三实施方式的图像处理装置、第三实施方式的控制装置、第三实施方式的成像装置与第三实施方式的电子装置中。It can be understood that the steps S7 and S8 can also be applied to the image processing method of the second embodiment and the control method of the second embodiment. Correspondingly, the first output module 1117 and the second output module 1118 can also be applied to the second embodiment. The image processing device, the control device of the second embodiment, the imaging device of the second embodiment, and the electronic device of the second embodiment. Steps S7 and S8 can also be applied to the image processing method of the third embodiment and the control method of the third embodiment. Correspondingly, the first output module 1117 and the second output module 1118 can also be applied to the image processing of the third embodiment. The device, the control device of the third embodiment, the imaging device of the third embodiment, and the electronic device of the third embodiment.
请参阅图28,前述第一至第四实施方式的控制方法中,进一步地,所述控制成像装10输出相同场景的对焦图像和虚焦图像的步骤(步骤S6)可包括以下步骤:Referring to FIG. 28, in the control methods of the foregoing first to fourth embodiments, further, the step of controlling the imaging device 10 to output the in-focus image and the virtual focus image of the same scene (step S6) may include the following steps:
S61,控制成像装置对焦以得到对焦图像;S61, controlling the imaging device to focus to obtain a focused image;
S62,重新调焦并处理不同调焦状态下成像装置输出的缓存图像以得到对应的虚化程度;和S62, refocusing and processing the cached image output by the imaging device in different focusing states to obtain a corresponding degree of blur; and
S63,保存虚化程度与虚化对焦图像基本相同的缓存图像作为虚焦图像。S63, storing a cache image whose blur degree is substantially the same as the blur focus image as a virtual focus image.
对应地,请参阅图29,第一至第四实施方式的控制装置11中的控制模块112包括对焦子模块1121、调焦子模块1122、及保存子模块1123,可以用于分别执行步骤S61、S62及S63。也就是说,对焦子模块1121用于控制成像装置对焦以得到对焦图像。调焦子模块1122用于重新调焦并处理不同调焦状态下成像装置输出的缓存图像以得到对应的虚化程度。及保存子模块1123用于保存虚化程度与虚化对焦图像基本相同的缓存图像作为虚焦图像。Correspondingly, referring to FIG. 29, the control module 112 in the control device 11 of the first to fourth embodiments includes a focus sub-module 1121, a focus sub-module 1122, and a save sub-module 1123, which can be used to perform step S61, respectively. S62 and S63. That is, the focusing sub-module 1121 is for controlling the imaging device to focus to obtain a focused image. The focus sub-module 1122 is used to refocus and process the cached image output by the imaging device in different focus states to obtain a corresponding degree of blur. And the saving sub-module 1123 is configured to store a cache image having substantially the same degree of blur as the blurred focus image as a virtual focus image.
对应地,第一至第四实施方式的成像装置10与电子装置100中的控制模块112也可包括对焦子模块1121、调焦子模块1122、及保存子模块1123,具体结构与功能同前,在此不再详细展开。Correspondingly, the imaging device 10 of the first to fourth embodiments and the control module 112 of the electronic device 100 may also include a focusing sub-module 1121, a focusing sub-module 1122, and a saving sub-module 1123. The specific structure and function are the same as before. It will not be expanded in detail here.
本发明某些实施方式还提供一种电子装置,该电子装置包括壳体、处理器、存储器、电路板和电源电路。所述电路板安置在所述壳体围成的空间内部,所述处理器和所述存储器设置在所述电路板上。所述电源电路,用于为所述电子装置的各个电路或器件供电;所述存储器用于存储可执行程序代码;所述处理器通过读取所述存储器中 存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行上述任一实施方式所述的图像处理方法或执行上述任一实施方式所述的控制方法。其中,电子装置可以是手机、平板电脑、笔记本电脑、智能手表、智能手环、智能头盔、智能眼镜中的任意一种。Certain embodiments of the present invention also provide an electronic device including a housing, a processor, a memory, a circuit board, and a power supply circuit. The circuit board is disposed inside a space enclosed by the casing, and the processor and the memory are disposed on the circuit board. The power circuit for powering various circuits or devices of the electronic device; the memory for storing executable program code; the processor reading the memory by reading The stored executable program code runs a program corresponding to the executable program code for executing the image processing method of any of the above embodiments or the control method of any of the above embodiments. The electronic device may be any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart bracelet, a smart helmet, and smart glasses.
本发明实施方式还提供一种计算机可读存储介质,具有存储于其中的指令,当电子装置的处理器执行所述指令时,所述电子装置执行如上任意一实施方式所述的图像处理方法或执行上述任一实施方式所述的控制方法。The embodiment of the present invention further provides a computer readable storage medium having instructions stored therein, when the processor of the electronic device executes the instruction, the electronic device performs the image processing method according to any one of the above embodiments or The control method described in any of the above embodiments is performed.
在本说明书的描述中,参考术语“某些实施方式”、“一实施方式”、“一个实施方式”、“一些实施方式”、“示意性实施方式”、“示例”、“具体示例”、或“一些示例”等的描述意指结合所述实施方式或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。In the description of the present specification, the terms "some embodiments", "an embodiment", "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", The description of "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiments or examples are included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms does not necessarily mean the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process. And the scope of the preferred embodiments of the invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in an opposite order depending on the functions involved, in the order shown or discussed. It will be understood by those skilled in the art to which the embodiments of the present invention pertain.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer readable medium, Used in conjunction with, or in conjunction with, an instruction execution system, apparatus, or device (eg, a computer-based system, a system including a processor, or other system that can fetch instructions and execute instructions from an instruction execution system, apparatus, or device) Or use with equipment. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM). In addition, the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或 固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that portions of the invention may be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods may be implemented by software stored in a memory and executed by a suitable instruction execution system or Firmware to achieve. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
本技术领域的普通技术人员可以理解实现上述实施方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。A person skilled in the art can understand that all or part of the steps carried in implementing the above implementation method can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, and the program is executed. Including one or a combination of the steps of the method embodiments.
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。 The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. Although the embodiments of the present invention have been shown and described, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the invention. The embodiments are subject to variations, modifications, substitutions and variations.

Claims (27)

  1. 一种图像处理方法,其特征在于,所述图像处理方法包括以下步骤:An image processing method, characterized in that the image processing method comprises the following steps:
    识别对焦图像中是否存在处于对焦状态的过曝部分;Identifying whether there is an overexposed portion in the in-focus state in the in-focus image;
    虚化所述对焦图像以得到虚化对焦图像;Bluning the in-focus image to obtain a blurred focus image;
    在存在所述过曝部分时,处理与所述对焦图像场景相同的虚焦图像以得到与所述过曝部分对应的素材部分;和Processing the virtual focus image identical to the focused image scene to obtain a material portion corresponding to the overexposed portion when the overexposed portion is present; and
    将所述虚化对焦图像中与所述过曝部分对应的虚化过曝部分替换为所述素材部分以得到合并图像。A blurred overexposed portion corresponding to the overexposed portion of the blurred focus image is replaced with the material portion to obtain a merged image.
  2. 如权利要求1所述的图像处理方法,其特征在于,所述对焦图像处于全景深对焦状态。The image processing method according to claim 1, wherein the in-focus image is in a panoramic deep focus state.
  3. 如权利要求1所述的图像处理方法,其特征在于,所述识别对焦图像中是否存在处于对焦状态的过曝部分的步骤包括:The image processing method according to claim 1, wherein the step of identifying whether the overexposed portion in the in-focus state exists in the in-focus image comprises:
    根据所述对焦图像的直方图判断所述对焦图像中过曝像素是否多于或等于第一预定数目,所述过曝像素的像素值大于或等于预定像素值;和Determining, according to a histogram of the in-focus image, whether the overexposed pixel in the in-focus image is more than or equal to a first predetermined number, and the pixel value of the overexposed pixel is greater than or equal to a predetermined pixel value; and
    在所述过曝像素多于或等于第一预定数目时确定存在所述过曝部分。It is determined that the overexposed portion exists when the overexposed pixel is more than or equal to the first predetermined number.
  4. 如权利要求3所述的图像处理方法,其特征在于,所述识别对焦图像中是否存在处于对焦状态的过曝部分的步骤包括:The image processing method according to claim 3, wherein the step of identifying whether the overexposed portion in the in-focus state exists in the in-focus image comprises:
    在存在所述过曝部分时,判断所述对焦图像中是否存在相邻接的过曝像素,所述相邻接的过曝像素的数目多于或等于第二预定数目;和When there is the overexposed portion, determining whether there is an adjacent overexposed pixel in the in-focus image, the number of the adjacent overexposed pixels being more than or equal to a second predetermined number; and
    在存在所述相邻接的过曝像素时,确定所述相邻接的过曝像素属于所述过曝部分。When the adjacent overexposed pixels are present, it is determined that the adjacent overexposed pixels belong to the overexposed portion.
  5. 如权利要求3或4所述的图像处理方法,其特征在于,所述预定像素值为所述适曝图像的像素值范围的上限。The image processing method according to claim 3 or 4, wherein the predetermined pixel value is an upper limit of a range of pixel values of the expansive image.
  6. 如权利要求1所述的图像处理方法,其特征在于,所述虚化所述对焦图像以得到虚化对焦图像的步骤是采用高斯模糊算法实现的。The image processing method according to claim 1, wherein the step of blurring the in-focus image to obtain a blurred focus image is implemented by a Gaussian blur algorithm.
  7. 如权利要求1所述的图像处理方法,其特征在于,所述素材部分的虚化程度与所述虚化过曝部分的虚化程度基本相同。 The image processing method according to claim 1, wherein the degree of blur of the material portion is substantially the same as the degree of blur of the blur exposed portion.
  8. 如权利要求1所述的图像处理方法,其特征在于,所述图像处理方法包括:The image processing method according to claim 1, wherein the image processing method comprises:
    在存在所述过曝部分时,输出所述合并图像;和Outputting the merged image when the overexposed portion is present; and
    在不存在所述过曝部分时,输出所述虚化对焦图像。The blurred focus image is output when the overexposed portion is absent.
  9. 一种控制方法,用于控制成像装置,其特征在于,所述控制方法包括以下步骤:A control method for controlling an imaging device, wherein the control method comprises the following steps:
    控制所述成像装置输出相同场景的对焦图像和虚焦图像;和Controlling the imaging device to output a focused image and a virtual focus image of the same scene; and
    采用如权利要求1-8任意一项所述的图像处理方法处理所述对焦图像和所述虚焦图像。The in-focus image and the virtual focus image are processed by the image processing method according to any one of claims 1-8.
  10. 如权利要求9所述的控制方法,其特征在于,所述控制所述成像装置输出相同场景的对焦图像和虚焦图像的步骤包括以下步骤:The control method according to claim 9, wherein said step of controlling said imaging means to output a focused image and a virtual focus image of the same scene comprises the steps of:
    控制所述成像装置对焦以得到所述对焦图像;Controlling the imaging device to focus to obtain the in-focus image;
    重新调焦并处理不同调焦状态下所述成像装置输出的缓存图像以得到对应的虚化程度;和Refocusing and processing the cached image output by the imaging device in different focusing states to obtain a corresponding degree of blur; and
    保存虚化程度与所述虚化对焦图像基本相同的所述缓存图像作为所述虚焦图像。The cached image having the same degree of blur as the blurred focus image is saved as the virtual focus image.
  11. 一种图像处理装置,其特征在于,所述图像处理装置包括:An image processing apparatus, characterized in that the image processing apparatus comprises:
    识别模块,用于识别对焦图像中是否存在处于对焦状态的过曝部分;An identification module, configured to identify whether an overexposed portion in an in-focus state exists in the in-focus image;
    虚化模块,用于虚化所述对焦图像以得到虚化对焦图像;a blurring module, configured to blur the in-focus image to obtain a blurred focus image;
    处理模块,用于在存在所述过曝部分时,处理与所述对焦图像场景相同的虚焦图像以得到与所述过曝部分对应的素材部分;和a processing module, configured to process a virtual focus image identical to the focused image scene to obtain a material portion corresponding to the overexposed portion when the overexposed portion is present; and
    合并模块,用于将所述虚化对焦图像中与所述过曝部分对应的虚化过曝部分替换为所述素材部分以得到合并图像。And a merging module, configured to replace the imaginary overexposed portion corresponding to the overexposed portion in the blurred focus image with the material portion to obtain a merged image.
  12. 如权利要求11所述的图像处理装置,其特征在于,所述对焦图像处于全景深对焦状态。The image processing device according to claim 11, wherein said in-focus image is in a panoramic deep focus state.
  13. 如权利要求11所述的图像处理装置,其特征在于,所述识别模块包括:The image processing device according to claim 11, wherein the identification module comprises:
    第一判断子模块,用于根据所述对焦图像的直方图判断所述对焦图像中过曝像素是否多于或等于第一预定数目,所述过曝像素的像素值大于或等于预定像素值;和a first determining sub-module, configured to determine, according to a histogram of the in-focus image, whether the over-exposed pixel in the in-focus image is greater than or equal to a first predetermined number, and the pixel value of the over-exposed pixel is greater than or equal to a predetermined pixel value; with
    第一确定子模块,用于在所述过曝像素多于或等于第一预定数目时确定存在所述过曝部分。 The first determining submodule is configured to determine that the overexposed portion exists when the overexposed pixel is more than or equal to the first predetermined number.
  14. 如权利要求13所述的图像处理装置,其特征在于,所述识别模块还包括:The image processing device according to claim 13, wherein the identification module further comprises:
    第二判断子模块,用于在存在所述过曝部分时,判断所述对焦图像中是否存在相邻接的过曝像素,所述相邻接的过曝像素的数目多于或等于第二预定数目;和a second determining sub-module, configured to determine, in the presence of the over-exposed portion, whether there is an adjacent over-exposed pixel in the in-focus image, the number of the adjacent over-exposed pixels being more than or equal to the second The predetermined number; and
    第二确定子模块,用于在存在所述相邻接的过曝像素时,确定所述相邻接的过曝像素属于所述过曝部分。a second determining submodule, configured to determine that the adjacent overexposed pixels belong to the overexposed portion when the adjacent overexposed pixels are present.
  15. 如权利要求13或14所述的图像处理装置,其特征在于,所述预定像素值为所述适曝图像的像素值范围的上限。The image processing device according to claim 13 or 14, wherein said predetermined pixel value is an upper limit of a range of pixel values of said expansive image.
  16. 如权利要求11所述的图像处理装置,其特征在于,所述虚化模块用于是采用高斯模糊算法来虚化对焦图像以得到虚化对焦图像。The image processing apparatus according to claim 11, wherein the blurring module is configured to blur the in-focus image by using a Gaussian blurring algorithm to obtain a blurred focus image.
  17. 如权利要求11所述的图像处理装置,其特征在于,所述素材部分的虚化程度与所述虚化过曝部分的虚化程度基本相同。The image processing apparatus according to claim 11, wherein the degree of blur of the material portion is substantially the same as the degree of blur of the blur exposed portion.
  18. 如权利要求11所述的图像处理装置,其特征在于,所述图像处理装置包括:The image processing device according to claim 11, wherein said image processing device comprises:
    第一输出模块,用于在存在所述过曝部分时,输出所述合并图像;和a first output module, configured to output the merged image when the overexposed portion is present; and
    第二输出模块,用于在不存在所述过曝部分时,输出所述虚化对焦图像。And a second output module, configured to output the blurred focus image when the overexposed portion is absent.
  19. 一种控制装置,用于控制成像装置,其特征在于,所述控制装置包括:A control device for controlling an imaging device, wherein the control device comprises:
    控制模块,用于控制所述成像装置输出相同场景的对焦图像和虚焦图像;和a control module, configured to control the imaging device to output a focused image and a virtual focus image of the same scene; and
    如权利要求11-18任意一项所述并与所述控制模块电连接的图像处理装置。An image processing apparatus according to any of claims 11-18 and electrically connected to said control module.
  20. 如权利要求19所述的控制装置,其特征在于,所述控制模块包括:The control device of claim 19, wherein the control module comprises:
    对焦子模块,用于控制所述成像装置对焦以得到所述对焦图像;a focusing sub-module, configured to control the imaging device to focus to obtain the in-focus image;
    调焦子模块,用于重新调焦并处理不同调焦状态下所述成像装置输出的缓存图像以得到对应的虚化程度;和a focusing sub-module for refocusing and processing a cached image output by the imaging device in different focusing states to obtain a corresponding degree of blur; and
    保存子模块,用于保存虚化程度与所述虚化对焦图像基本相同的所述缓存图像作为所述虚焦图像。And a saving submodule, configured to save the cached image having a degree of blurring substantially the same as the blurred focus image as the virtual focus image.
  21. 一种成像装置,其特征在于,所述成像装置包括: An imaging device, characterized in that the imaging device comprises:
    摄像头;camera;
    与所述摄像头电连接的控制模块,用于控制所述摄像头输出相同场景的对焦图像和虚焦图像;和a control module electrically connected to the camera, configured to control the camera to output a focused image and a virtual focus image of the same scene; and
    如权利要求11-18任意一项所述并与所述控制模块电连接的图像处理装置。An image processing apparatus according to any of claims 11-18 and electrically connected to said control module.
  22. 如权利要求21所述的成像装置,其特征在于,所述控制模块包括:The image forming apparatus according to claim 21, wherein said control module comprises:
    对焦子模块,用于控制所述成像装置对焦以得到所述对焦图像;a focusing sub-module, configured to control the imaging device to focus to obtain the in-focus image;
    调焦子模块,用于重新调焦并处理不同调焦状态下所述成像装置输出的缓存图像以得到对应的虚化程度;和a focusing sub-module for refocusing and processing a cached image output by the imaging device in different focusing states to obtain a corresponding degree of blur; and
    保存子模块,用于保存虚化程度与所述虚化对焦图像基本相同的所述缓存图像作为所述虚焦图像。And a saving submodule, configured to save the cached image having a degree of blurring substantially the same as the blurred focus image as the virtual focus image.
  23. 一种电子装置,其特征在于,所述电子装置包括如权利要求21-22任意一项所述的成像装置。An electronic device, comprising the image forming device according to any one of claims 21-22.
  24. 如权利要求23所述的电子装置,其特征在于,所述电子装置包括手机、平板电脑、笔记本电脑、智能手表、智能手环、智能头盔、智能眼镜中的任意一种。The electronic device according to claim 23, wherein the electronic device comprises any one of a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart bracelet, a smart helmet, and smart glasses.
  25. 如权利要求23所述的电子装置,其特征在于,所述成像装置包括前置相机或/和后置相机。The electronic device of claim 23, wherein the imaging device comprises a front camera or/and a rear camera.
  26. 一种电子装置,包括壳体、处理器、存储器、电路板和电源电路,其特征在于,所述电路板安置在所述壳体围成的空间内部,所述处理器和所述存储器设置在所述电路板上;所述电源电路,用于为所述电子装置的各个电路或器件供电;所述存储器用于存储可执行程序代码;所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行如权利要求1至8中任一项所述的图像处理方法或执行如权利要求9至10中任一项所述的控制方法。An electronic device includes a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside a space enclosed by the housing, and the processor and the memory are disposed at The power circuit is configured to supply power to each circuit or device of the electronic device; the memory is configured to store executable program code; and the processor reads the memory stored in the memory by reading Executing program code to execute a program corresponding to the executable program code for performing the image processing method according to any one of claims 1 to 8 or performing the method of any one of claims 9 to 10. Control method.
  27. 一种计算机可读存储介质,具有存储于其中的指令,当电子装置的处理器执行所述指令时,所述电子装置执行如权利要求1至8中任一项所述的图像处理方法或执行如权利要求9至10中任一项所述的控制方法。 A computer readable storage medium having instructions stored therein, the electronic device performing the image processing method or performing according to any one of claims 1 to 8 when the processor of the electronic device executes the instruction The control method according to any one of claims 9 to 10.
PCT/CN2016/111149 2016-12-20 2016-12-20 Image processing method and apparatus, control method and apparatus, imaging apparatus, and electronic apparatus WO2018112764A1 (en)

Priority Applications (10)

Application Number Priority Date Filing Date Title
PCT/CN2016/111149 WO2018112764A1 (en) 2016-12-20 2016-12-20 Image processing method and apparatus, control method and apparatus, imaging apparatus, and electronic apparatus
TW106139390A TWI626620B (en) 2016-12-20 2017-11-14 Image processing method and device, electronic device, and computer readable storage medium
US15/814,791 US10692199B2 (en) 2016-12-20 2017-11-16 Image processing method and device, and non-transitory computer-readable storage medium
PCT/CN2017/117289 WO2018113685A1 (en) 2016-12-20 2017-12-19 Image processing method and device, and non-transitory computer-readable storage medium
JP2019533587A JP6803473B2 (en) 2016-12-20 2017-12-19 Image processing methods and equipment, as well as non-temporary computer-readable storage media
EP17208506.0A EP3340608B1 (en) 2016-12-20 2017-12-19 Image processing method and device, and non-transitory computer-readable storage medium
KR1020197018549A KR102171625B1 (en) 2016-12-20 2017-12-19 Image processing methods and devices, and non-transitory computer-readable storage media (IMAGE PROCESSING METHOD AND DEVICE, AND NON-TRANSITORY COMPUTER-READABLE STORAGE MEDIUM)
ES17208506T ES2761593T3 (en) 2016-12-20 2017-12-19 Image processing procedure and device, and non-transient computer readable storage medium
AU2017379019A AU2017379019B2 (en) 2016-12-20 2017-12-19 Image processing method and device, and non-transitory computer-readable storage medium
ZA2019/04191A ZA201904191B (en) 2016-12-20 2019-06-26 Image processing method and device, and non-transitory computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/111149 WO2018112764A1 (en) 2016-12-20 2016-12-20 Image processing method and apparatus, control method and apparatus, imaging apparatus, and electronic apparatus

Publications (1)

Publication Number Publication Date
WO2018112764A1 true WO2018112764A1 (en) 2018-06-28

Family

ID=62624083

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/111149 WO2018112764A1 (en) 2016-12-20 2016-12-20 Image processing method and apparatus, control method and apparatus, imaging apparatus, and electronic apparatus

Country Status (1)

Country Link
WO (1) WO2018112764A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101587586A (en) * 2008-05-20 2009-11-25 株式会社理光 Device and method for processing images
US20120320238A1 (en) * 2011-06-14 2012-12-20 AmTRAN TECHNOLOGY Co. Ltd Image processing system, camera system and image capture and synthesis method thereof
CN104660900A (en) * 2013-10-30 2015-05-27 株式会社摩如富 Image Processing Device, Image Processing Method And Recording Medium
CN105227847A (en) * 2015-10-30 2016-01-06 上海斐讯数据通信技术有限公司 A kind of camera photographic method of mobile phone and system
CN106060406A (en) * 2016-07-27 2016-10-26 维沃移动通信有限公司 Photographing method and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101587586A (en) * 2008-05-20 2009-11-25 株式会社理光 Device and method for processing images
US20120320238A1 (en) * 2011-06-14 2012-12-20 AmTRAN TECHNOLOGY Co. Ltd Image processing system, camera system and image capture and synthesis method thereof
CN104660900A (en) * 2013-10-30 2015-05-27 株式会社摩如富 Image Processing Device, Image Processing Method And Recording Medium
CN105227847A (en) * 2015-10-30 2016-01-06 上海斐讯数据通信技术有限公司 A kind of camera photographic method of mobile phone and system
CN106060406A (en) * 2016-07-27 2016-10-26 维沃移动通信有限公司 Photographing method and mobile terminal

Similar Documents

Publication Publication Date Title
CN111028189B (en) Image processing method, device, storage medium and electronic equipment
US11044410B2 (en) Imaging control method and apparatus, electronic device, and computer readable storage medium
JP7059284B2 (en) Camera assembly and mobile electronics
US10757312B2 (en) Method for image-processing and mobile terminal using dual cameras
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
KR102565513B1 (en) Method and apparatus for multiple technology depth map acquisition and fusion
KR20200017072A (en) Electronic device and method for providing notification relative to image displayed via display and image stored in memory based on image analysis
CN107358593B (en) Image forming method and apparatus
JP2020528622A (en) Image processing methods, equipment and devices
CN104917973B (en) Dynamic exposure method of adjustment and its electronic device
US10382734B2 (en) Electronic device and color temperature adjusting method
CN109618102B (en) Focusing processing method and device, electronic equipment and storage medium
CN105187728B (en) Photographic method and device
CN110717871A (en) Image processing method, image processing device, storage medium and electronic equipment
US10692199B2 (en) Image processing method and device, and non-transitory computer-readable storage medium
CN105611156B (en) Full frame focusing method and camera
KR102645054B1 (en) Vehicle status management apparatus and mehtod
CN116508326A (en) Tone mapping method and apparatus, computer usable medium storing software for implementing the method
WO2018112764A1 (en) Image processing method and apparatus, control method and apparatus, imaging apparatus, and electronic apparatus
CN106851090A (en) Image processing method and device, control method and device, imaging and electronic installation
CN105791689A (en) Image processing method and image processing device
WO2018112763A1 (en) Image processing method and device, control method and device, and imaging device and electronic device
WO2019011182A1 (en) Mobile terminal and adjusting method thereof, and computer readable storage medium
JP7397640B2 (en) Image processing device and image processing method
US8730305B2 (en) Digital photographing apparatus having common angle of view display function, method of controlling the digital photographing apparatus, and medium for recording the method

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

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

Country of ref document: EP

Kind code of ref document: A1