WO2018112763A1 - Image processing method and device, control method and device, and imaging device and electronic device - Google Patents

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

Info

Publication number
WO2018112763A1
WO2018112763A1 PCT/CN2016/111147 CN2016111147W WO2018112763A1 WO 2018112763 A1 WO2018112763 A1 WO 2018112763A1 CN 2016111147 W CN2016111147 W CN 2016111147W WO 2018112763 A1 WO2018112763 A1 WO 2018112763A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
overexposed
exposure amount
exposure
exposed
Prior art date
Application number
PCT/CN2016/111147
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/111147 priority Critical patent/WO2018112763A1/en
Priority to TW106139390A priority patent/TWI626620B/en
Priority to US15/814,791 priority patent/US10692199B2/en
Priority to JP2019533587A priority patent/JP6803473B2/en
Priority to AU2017379019A priority patent/AU2017379019B2/en
Priority to KR1020197018549A priority patent/KR102171625B1/en
Priority to PCT/CN2017/117289 priority patent/WO2018113685A1/en
Priority to EP17208506.0A priority patent/EP3340608B1/en
Priority to ES17208506T priority patent/ES2761593T3/en
Publication of WO2018112763A1 publication Critical patent/WO2018112763A1/en
Priority to ZA2019/04191A priority patent/ZA201904191B/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene

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:
  • Blooming the suitable exposed image to obtain a blurred exposure image the blurred exposure image including a blurred overexposure portion corresponding to the overexposed portion
  • the underexposed image is blurred to obtain a blurred underexposure image, and the underexposed image is obtained by exposure using a second exposure amount, the underexposed image and the scene of the suitable exposed image
  • the underexposed image includes a material portion corresponding to the overexposed portion
  • the blurred underexposure image includes a blur material portion corresponding to the overexposed portion
  • the second exposure amount is less than the first An exposure amount such that a pixel value of the material portion is smaller than an upper limit of a range of pixel values of the material portion;
  • the imaginary overexposed portion in the blurred exposure image is replaced with the primordial overexposed portion to obtain a merged image.
  • the step of identifying whether an overexposed portion is present in the exposed image comprises:
  • the step of identifying whether an overexposed portion is present in the exposed 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 expansive image to obtain a blurred exposure image is implemented using a Gaussian blur algorithm; or/and
  • the step of blurring the underexposed image to obtain the blurred underexposure image is implemented by using a Gaussian blur algorithm.
  • the step of lifting the brightness of the portion of the blurred material to obtain a simulated overexposed portion includes:
  • N is a ratio between the first exposure amount and the second exposure amount.
  • the image processing method comprises:
  • the blurred exposure 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 adaptive image and the underexposed image are processed by the image processing method according to any of the above embodiments.
  • the imaging device includes a camera
  • the step of controlling the imaging device to output an appropriately exposed image and an underexposed image of the same scene includes the following steps:
  • the camera is controlled to be sequentially exposed with the first exposure amount and the second exposure amount to obtain the exposed image and the underexposed image.
  • the imaging device includes a first camera and a second camera
  • the step of controlling the imaging device to output an appropriately exposed image and an underexposed image of the same scene includes the following steps:
  • the first camera and the second camera are controlled to be exposed with the first exposure amount and the second exposure amount, respectively, to obtain the exposed image and the underexposed image.
  • the present invention provides an image processing apparatus, the image processing apparatus comprising:
  • An identification module configured to identify whether an overexposed portion exists in the exposed image, and the exposed image is obtained by exposing the first exposure amount that matches the light environment;
  • a first blurring module configured to blur the exposed image to obtain a blurred exposure image, where the blurred exposure image includes a blurred overexposure portion corresponding to the overexposed portion;
  • a second blurring module configured to: when the overexposed portion exists, blur the underexposed image to obtain a blurred underexposure image, wherein the underexposed image is obtained by using a second exposure amount exposure, the underexposure image
  • the underexposed image includes a material portion corresponding to the overexposed portion
  • the blurred underexposure image includes a blur material portion corresponding to the overexposed portion
  • the second exposure amount is smaller than the first exposure amount such that a pixel value of the material portion is smaller than an upper limit of a pixel value range of the material portion;
  • a brightening module configured to: boost a brightness of the portion of the imaginary material to obtain an original overexposed portion
  • a merging module configured to replace the imaginary overexposed portion in the imaginary exposing image with the primordial overexposed portion to obtain a merged image.
  • the identification module comprises:
  • a first determining sub-module configured to determine, according to the histogram of the exposing image, whether the overexposed pixel in the exposing 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 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 exposed image, and the number of adjacent over-exposed pixels is greater than or equal to Two predetermined numbers;
  • 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 first blurring module uses a Gaussian blurring algorithm to blur the exposed image to obtain a blurred exposure image; or/and
  • the second blurring module uses a Gaussian blurring algorithm to blur the underexposed image to obtain a blurred underexposure image.
  • the brightening module is configured to increase a brightness of the blurred underexposure image by N times to obtain the pseudo-overexposure portion, wherein N is the first exposure amount and the The ratio between the second exposures.
  • the image processing apparatus further includes:
  • a first output module configured to output the merged image
  • a second output module configured to output the blurred exposure image when the overexposed portion is absent.
  • the present invention provides a control device for controlling an imaging device, the control device comprising:
  • control module configured to control the image forming apparatus to output an exposed image and an underexposed image of the same scene
  • An image processing apparatus as described in any of the above embodiments and electrically connected to the control module.
  • the imaging device includes a camera
  • the control module includes:
  • a first exposure determining unit configured to determine the first exposure amount according to a light environment
  • a second exposure determining unit configured to determine the second exposure amount according to the overexposed portion
  • control unit configured to control the camera to sequentially expose the first exposure amount and the second exposure amount to obtain the exposed image and the underexposed image.
  • the imaging device includes a first camera and a second camera
  • the control module includes:
  • a first exposure determining unit configured to determine the first exposure amount according to a light environment
  • a second exposure determining unit configured to determine the second exposure amount according to the overexposed portion
  • control unit configured to control the first camera and the second camera to respectively expose the first exposure amount and the second exposure amount to obtain the exposed image and the underexposure 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 an exposed image and an underexposed 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 first exposure determining unit configured to determine the first exposure amount according to a light environment
  • a second exposure determining unit configured to determine the second exposure amount according to the overexposed portion
  • a first control unit configured to control the camera to sequentially expose the first exposure amount and the second exposure amount to obtain the exposed image and the underexposed image.
  • the number of the cameras includes two, respectively a first camera and a second camera
  • the control module includes:
  • a first exposure determining unit configured to determine the first exposure amount according to a light environment
  • a second exposure determining unit configured to determine the second exposure amount according to the overexposed portion
  • a second control unit configured to control the first camera and the second camera to be exposed by the first exposure amount and the second exposure amount, respectively, to obtain the exposed image and the underexposed 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 also 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 housing, and the processor and the memory are disposed in the On the 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 also provides a computer readable storage medium having instructions stored therein, when the processor of the electronic device executes the instructions, the electronic device performs an image processing method or execution according to any of the above embodiments The control method according to any of the above embodiments.
  • the image processing method, the image processing device, the control method, the control device, the imaging device, the electronic device, and the computer readable storage medium in the present invention capture two images, one suitable exposure image, one underexposed image, and two images Both are blurred, and then the brightness of the underexposed image after blurring is brightened, and the part of the underexposed image is taken out, and the image is exposed in the blurred image to form a blur with a real spot effect.
  • the image has a good spot effect.
  • 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 an 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.
  • 28 is a flow diagram of controlling an imaged device to output an appropriately exposed image and an underexposed 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.
  • FIG. 30 is a flow diagram showing the control of an image-forming device to output an appropriately exposed image and an underexposed image of the same scene, in accordance with some embodiments of the present invention.
  • 31 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 integrally connected; may be mechanically connected, or may be electrically connected or may communicate with each other; may be directly connected or indirectly connected through an intermediate medium, may be internal communication of two elements or interaction of two elements relationship. 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 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:
  • S1 identifying whether there is an overexposed portion in the exposed image, and the suitable exposure image is an image obtained by exposing the first exposure amount matched with the light environment;
  • the underexposure image is blurred to obtain a blurred underexposure image
  • the underexposed image is obtained by exposure with a second exposure amount
  • the underexposed image is the same as the scene of the suitable exposed image
  • the underexposed image includes a portion of the material corresponding to the overexposed portion
  • the blurred underexposure image includes a portion of the blur material corresponding to the overexposed portion
  • the second exposure amount is smaller than the first exposure amount such that the pixel value of the material portion is smaller than the pixel value range of the material portion Upper limit (the purpose is not to overflow);
  • the step of blurring the exposed image to obtain the blurred exposure image may be implemented by using a Gaussian fuzzy algorithm;
  • the step of blurring the underexposed image to obtain a blurred underexposure image may be implemented using a Gaussian blur algorithm.
  • the step of increasing the brightness of the imaginary material portion to obtain the original overexposed portion may be to increase the brightness of the imaginary underexposed image by N times to obtain a pseudo overexposed portion, where N is between the first exposure amount and the second exposure amount. ratio.
  • 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 first blurring module 1112, a second blurring module 1113, a brightening module 1114, and a merging module 1115, which can be respectively used to execute S1 to S5.
  • the identification module 1111 is configured to identify whether there is an overexposed portion in the exposed image, and the suitable exposure image is an image obtained by exposure with a first exposure amount that matches the light environment.
  • the first blurring module 1112 is configured to blur the exposed image to obtain a blurred exposure image
  • the blurred exposure image includes a blurred overexposure portion corresponding to the overexposed portion.
  • the second blurring module 1113 is configured to blur the underexposed image to obtain a blurred underexposure image when the overexposed portion is present, and the underexposed image is obtained by using the second exposure amount to expose the underexposed image and the exposed image.
  • the underexposed image includes a material portion corresponding to the overexposed portion
  • the blurred underexposure image includes a blur material portion corresponding to the overexposed portion
  • the second exposure amount is less than the first exposure amount such that the pixel value of the material portion is smaller than the material The upper limit of the range of pixel values.
  • the brightening module 1114 is configured to increase the brightness of the portion of the imaginary material to obtain a portion of the original overexposed portion.
  • the merging module 15 is configured to replace the imaginary overexposed portion in the imaginary exposing image with the primordial overexposed portion to obtain a merged image.
  • the first blurring module 1112 uses a Gaussian blur algorithm to blur the suitable exposed image to obtain a blurred exposure image; or/and the second blurring module 1113 uses a Gaussian blur algorithm to blur the underexposed image to obtain a virtual image.
  • the step of lifting the module 1114 may be to increase the brightness of the portion of the imaginary material to obtain a portion of the imaginary overexposed portion, which is to increase the brightness of the imaginary underexposed image by N times to obtain a portion of the original overexposure portion, where N is the first exposure amount and the second portion. The ratio between the exposures.
  • 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:
  • S1 identifying whether there is an overexposed portion in the exposed image, and the suitable exposure image is an image obtained by exposing the first exposure amount matched with the light environment;
  • the underexposure image is blurred to obtain a blurred underexposure image
  • the underexposed image is obtained by exposure with a second exposure amount
  • the underexposed image is the same as the scene of the suitable exposed image
  • the underexposed image includes a portion of the material corresponding to the overexposed portion
  • the blurred underexposure image includes a portion of the blur material corresponding to the overexposed portion
  • the second exposure amount is smaller than the first exposure amount such that the pixel value of the material portion is smaller than the pixel value range of the material portion Upper limit (the purpose is not to overflow);
  • the step of blurring the image to obtain the blurred image may be implemented by using a Gaussian blur algorithm; or/and the step of blurring the underexposed image to obtain the image of the underexposed image may be implemented by using a Gaussian fuzzy algorithm.
  • the step of increasing the brightness of the imaginary material portion to obtain the original overexposed portion may be to increase the brightness of the imaginary underexposed image by N times to obtain a pseudo overexposed portion, where N is between the first exposure amount and the second exposure amount. ratio.
  • 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 S5, 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 configured to control the imaging device 10 (shown in Figures 5-7) to output an appropriately exposed image and an underexposed 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.
  • 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 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 an appropriately exposed image and an underexposed image for the same scene ( FIG. 8 illustrates for example, using two actually captured images, the scenes of the two images are not identical, but the present invention In the specific execution, the time for the exposure of the exposed image and the underexposure image is very short, and it is completely possible to achieve the same scene).
  • the suitable exposure image is obtained by exposure with a first exposure amount matched to the light environment, and the underexposure image is obtained by using a second exposure amount smaller than the first exposure amount.
  • the underexposed image includes a material portion (circular light source) corresponding to the overexposed portion (circular light source).
  • the material part (circular light source) is blurred to obtain a blurred material part (circular light source).
  • the brightness of the portion of the imaginary material is increased to obtain a partial overexposure portion, wherein the imaginary underexposure image is entirely brightened, and at this time, the brightness of the imaginary material portion is also brightened; or, it may be only brightening the imaginary The brightness of the material part.
  • the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion to obtain a merged image.
  • 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 capture two images, one suitable exposure image, one underexposed image, and two The image is blurred, and then the brightness of the underexposed image is blurred, and the imitation original overexposed portion is taken out, and the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion. Combine a blurred image with a real flare 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 exposed image includes the following steps:
  • S11 Determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 the predetermined pixel value is a pixel value of the exposed image.
  • the upper limit of the range such as 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. And the first 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 suitable exposed image, whether the overexposed pixel in the exposed 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 value is an upper limit of a range of pixel values of the exposed 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 suitable image represents the increment of the pixel value (gray value) from left to right
  • the vertical axis represents the pixel value (gray value) from bottom to top.
  • the number of pixels is incremented.
  • 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 exposed image includes the following steps:
  • S11 Determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 the predetermined pixel value is a pixel value of the exposed image.
  • the upper limit of the range such as 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 suitable exposed image, whether the overexposed pixel in the exposed 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 value is an upper limit of a range of pixel values of the exposed 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 suitable image represents the increment of the pixel value (gray value) from left to right
  • the vertical axis represents the pixel value (gray value) from bottom to top.
  • the number of pixels is incremented.
  • 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 when the number of the imaging devices 10 is one, 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 capture two images, one suitable exposure image, one underexposed image, and two The image is blurred, and then the brightness of the underexposed image is blurred, and the imitation original overexposed portion is taken out, and the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion. Combine a blurred image with a real flare effect, and the spot effect is good.
  • the image processing method of 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 exposed image includes the following steps:
  • S11 Determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 the predetermined pixel value is a pixel value of the exposed image.
  • the upper limit of the range 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 suitable exposed image, whether the overexposed pixel in the exposed 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 value is an upper limit of a range of pixel values of the exposed 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 second determining sub-module 11113 is configured to determine whether there is an adjacent over-exposed pixel in the exposed 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 exposed image may include a plurality of adjacent overexposed pixels, for example, there are a plurality of discrete light sources, and the light sources are common Form the overexposed part.
  • the horizontal axis of the histogram of the suitable image represents the increment of the pixel value (gray value) from left to right, and the vertical axis represents the pixel value (gray value) from bottom to top.
  • the number of pixels is incremented.
  • the pixel value (gray value) ranges from 0 to 255, that is, from black to white, the higher the peak at a certain point, the pixel value (gray value) is represented. The more pixels there are.
  • 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. Further, the step of identifying whether there is an overexposed portion in the exposed image includes the following steps:
  • S11 Determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 the predetermined pixel value is a pixel value of the exposed image.
  • the upper limit of the range 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 determining sub-module 11111 is configured to determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 value is an upper limit of a range of pixel values of the exposed 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 second determining sub-module 11113 is configured to determine whether there is an adjacent over-exposed pixel in the exposed 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 exposed image may include a plurality of adjacent overexposed pixels, for example, there are a plurality of discrete light sources, and the light sources are common Form the overexposed part.
  • the horizontal axis of the histogram of the suitable image represents the increment of the pixel value (gray value) from left to right, and the vertical axis represents the pixel value (gray value) from bottom to top.
  • the number of pixels is incremented.
  • the pixel value (gray value) ranges from 0 to 255, that is, from black to white, the higher the peak at a certain point, the pixel value (gray value) is represented. The more pixels there are.
  • 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 image forming apparatus 10 includes a control device 11 of a third embodiment and a camera 12 electrically connected to the control device 11 of the third 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 third 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 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 when the number of the imaging devices 10 is one, 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 take two images, one suitable exposure image, one underexposed image, and two The image is blurred, and then the brightness of the underexposed image is blurred, and the imitation original overexposed portion is taken out, and the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion. Combine a blurred image with a real flare 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.
  • Second output module 1118 Used to output a blurred exposure 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:
  • control device 11 of the fourth embodiment of the present invention has substantially the same structure as the control device 11 of the first embodiment, except that the control device 11 of the fourth embodiment further includes a first output module 1117 and a second output module 1118. It 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 exposure 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 when the number of the imaging devices 10 is one, 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 capture two images, one suitable exposure image, one underexposed image, and two The image is blurred, and then the brightness of the underexposed image is blurred, and the imitation original overexposed portion is taken out, and the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion. Combine a blurred image with a real flare 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.
  • Image processing device, control device of the second embodiment, and imaging device of the second embodiment In 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.
  • 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:
  • control camera is sequentially exposed with the first exposure amount and the second exposure amount to obtain an appropriately exposed image and an underexposed image.
  • the control module 112 in the control device 11 of the first to fourth embodiments includes a first exposure determining unit 1121, a second exposure determining unit 1122, and a first control unit 1123, which can be used to respectively Steps S61, S62, and S63 are performed. That is, the first exposure determining unit 1121 is configured to determine the first exposure amount according to the light environment. The second exposure determining unit 1122 is configured to determine the second exposure amount according to the overexposed portion. The first control unit 1123 is configured to control the camera to sequentially expose the first exposure amount and the second exposure amount to obtain an appropriately exposed image and an underexposed image.
  • the imaging device 10 of the first to fourth embodiments and the control module 112 in the electronic device 100 may also include a first exposure determining unit 1121, a second exposure determining unit 1122, and a first control unit 1123, the specific structure and The function is the same as before and will not be expanded in detail here.
  • step S6 may further comprise the following steps:
  • S63 Control the first camera and the second camera to respectively expose the first exposure amount and the second exposure amount to obtain an appropriately exposed image and an underexposed image.
  • the control module 112 in the control device 11 of the first to fourth embodiments includes a first exposure determining unit 1121, a second exposure determining unit 1122, and a second control unit 1123, which can be used to respectively Steps S61, S62, and S63 are performed. That is, the first exposure determining unit 1121 is configured to determine the first exposure amount according to the light environment. The second exposure determining unit 1122 is configured to determine the second exposure amount according to the overexposed portion. The second control unit 1123 is configured to control the first camera and the second camera to respectively expose the first exposure amount and the second exposure amount. To the appropriate exposure image and underexposure image.
  • the imaging device 10 of the first to fourth embodiments and the control module 112 in the electronic device 100 may also include a first exposure determining unit 1121, a second exposure determining unit 1122, and a second control unit 1123, the specific structure and The function is the same as above, and 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 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 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 executes 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.
  • a "computer-readable medium” can be any device that can contain, store, communicate, propagate, or transport the 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.
  • portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system 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.
  • 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.

Abstract

An image processing method, comprising: recognizing whether a properly-exposed image has an over-exposed portion (S1); blurring the properly-exposed image to obtain a blurred properly-exposed image (S2); when the properly-exposed image has an over-exposed portion, blurring an under-exposed image to obtain a blurred under-exposed image (S3); increasing the brightness of a blurred material portion to obtain an originally-imitated over-exposed portion (S4); and substituting the blurred over-exposed portion in the blurred properly-exposed image with the originally-imitated over-exposed portion to obtain a combined image (S5). Further disclosed are an image processing device (111), a control method, a control device (11), an imaging device (10), and an electronic device (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 image that is exposed, the exposed image being obtained by exposure with a first exposure amount that matches the light environment;
虚化所述适曝图像以得到虚化适曝图像,所述虚化适曝图像包括与所述过曝部分对应的虚化过曝部分;Blooming the suitable exposed image to obtain a blurred exposure image, the blurred exposure image including a blurred overexposure portion corresponding to the overexposed portion;
在存在所述过曝部分时,虚化欠曝图像以得到虚化欠曝图像,所述欠曝图像是采用第二曝光量曝光获得的,所述欠曝图像与所述适曝图像的场景相同,所述欠曝图像包括与所述过曝部分对应的素材部分,所述虚化欠曝图像包括与所述过曝部分对应的虚化素材部分,所述第二曝光量小于所述第一曝光量以使所述素材部分的像素值小于所述素材部分的像素值范围的上限;In the presence of the overexposed portion, the underexposed image is blurred to obtain a blurred underexposure image, and the underexposed image is obtained by exposure using a second exposure amount, the underexposed image and the scene of the suitable exposed image Similarly, the underexposed image includes a material portion corresponding to the overexposed portion, the blurred underexposure image includes a blur material portion corresponding to the overexposed portion, and the second exposure amount is less than the first An exposure amount such that a pixel value of the material portion is smaller than an upper limit of a range of pixel values of the material portion;
提升所述虚化素材部分的亮度得到仿原过曝部分;和Elevating the brightness of the portion of the imaginary material to obtain a pseudo-overexposure portion; and
将所述虚化适曝图像中的所述虚化过曝部分替换为所述仿原过曝部分以得到合并图像。The imaginary overexposed portion in the blurred exposure image is replaced with the primordial overexposed portion to obtain a merged image.
在某些实施方式中,所述识别适曝图像中是否存在过曝部分的步骤包括:In some embodiments, the step of identifying whether an overexposed portion is present in the exposed image comprises:
根据所述适曝图像的直方图判断所述适曝图像中过曝像素是否多于或等于第一预定数目,所述过曝像素的像素值大于或等于预定像素值;和Determining, according to the histogram of the exposing image, whether the overexposed pixel in the exposing 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 an overexposed portion is present in the exposed image comprises:
在存在所述过曝部分时,判断所述适曝图像中是否存在相邻接的过曝像素,所述相邻接的过曝像素的数目多于或等于第二预定数目;和When there is the overexposed portion, determining whether there is an adjacent overexposed pixel in the exposing 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 expansive image to obtain a blurred exposure image is implemented using a Gaussian blur algorithm; or/and
所述虚化欠曝图像以得到虚化欠曝图像的步骤是采用高斯模糊算法实现的。The step of blurring the underexposed image to obtain the blurred underexposure image is implemented by using a Gaussian blur algorithm.
在某些实施方式中,所述提升所述虚化素材部分的亮度得到仿原过曝部分的步骤包括:In some embodiments, the step of lifting the brightness of the portion of the blurred material to obtain a simulated overexposed portion includes:
将所述虚化欠曝图像的亮度提升N倍以得到所述仿原过曝部分,其中,N为所述第一曝光量与所述第二曝光量之间的比值。And increasing the brightness of the blurred underexposure image by N times to obtain the pseudo-overexposure portion, wherein N is a ratio between the first exposure amount and the second exposure amount.
在某些实施方式中,所述图像处理方法包括:In some embodiments, the image processing method comprises:
在存在所述过曝部分时,输出所述合并图像;和Outputting the merged image when the overexposed portion is present; and
在不存在所述过曝部分时,输出所述虚化适曝图像。The blurred exposure 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 an exposed image and an underexposed image of the same scene; and
采用如上任意一实施方式所述的图像处理方法处理所述适曝图像和所述欠曝图像。The adaptive image and the underexposed image are processed by the image processing method according to any of the above embodiments.
在某些实施方式中,所述成像装置包括摄像头,所述控制所述成像装置输出相同场景的适曝图像和欠曝图像的步骤包括以下步骤:In some embodiments, the imaging device includes a camera, and the step of controlling the imaging device to output an appropriately exposed image and an underexposed image of the same scene includes the following steps:
根据光环境确定所述第一曝光量;Determining the first exposure amount according to a light environment;
根据所述过曝部分确定所述第二曝光量;和Determining the second exposure amount according to the overexposed portion; and
控制所述摄像头依次以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。The camera is controlled to be sequentially exposed with the first exposure amount and the second exposure amount to obtain the exposed image and the underexposed image.
在某些实施方式中,所述成像装置包括第一摄像头和第二摄像头,所述控制所述成像装置输出相同场景的适曝图像和欠曝图像的步骤包括以下步骤:In some embodiments, the imaging device includes a first camera and a second camera, and the step of controlling the imaging device to output an appropriately exposed image and an underexposed image of the same scene includes the following steps:
根据光环境确定所述第一曝光量;Determining the first exposure amount according to a light environment;
根据所述过曝部分确定所述第二曝光量;和Determining the second exposure amount according to the overexposed portion; and
控制所述第一摄像头和所述第二摄像头分别以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。The first camera and the second camera are controlled to be exposed with the first exposure amount and the second exposure amount, respectively, to obtain the exposed image and the underexposed image.
本发明提供一种图像处理装置,所述图像处理装置包括:The present invention provides an image processing apparatus, the image processing apparatus comprising:
识别模块,用于识别适曝图像中是否存在过曝部分,所述适曝图像是采用与光环境匹配的第一曝光量曝光获得的; An identification module, configured to identify whether an overexposed portion exists in the exposed image, and the exposed image is obtained by exposing the first exposure amount that matches the light environment;
第一虚化模块,用于虚化所述适曝图像以得到虚化适曝图像,所述虚化适曝图像包括与所述过曝部分对应的虚化过曝部分;a first blurring module, configured to blur the exposed image to obtain a blurred exposure image, where the blurred exposure image includes a blurred overexposure portion corresponding to the overexposed portion;
第二虚化模块,用于在存在所述过曝部分时,虚化欠曝图像以得到虚化欠曝图像,所述欠曝图像是采用第二曝光量曝光获得的,所述欠曝图像与所述适曝图像的场景相同,所述欠曝图像包括与所述过曝部分对应的素材部分,所述虚化欠曝图像包括与所述过曝部分对应的虚化素材部分,所述第二曝光量小于所述第一曝光量以使所述素材部分的像素值小于所述素材部分的像素值范围的上限;a second blurring module, configured to: when the overexposed portion exists, blur the underexposed image to obtain a blurred underexposure image, wherein the underexposed image is obtained by using a second exposure amount exposure, the underexposure image In the same manner as the scene of the exposed image, the underexposed image includes a material portion corresponding to the overexposed portion, and the blurred underexposure image includes a blur material portion corresponding to the overexposed portion, The second exposure amount is smaller than the first exposure amount such that a pixel value of the material portion is smaller than an upper limit of a pixel value range of the material portion;
提亮模块,用于提升所述虚化素材部分的亮度得到仿原过曝部分;和a brightening module, configured to: boost a brightness of the portion of the imaginary material to obtain an original overexposed portion; and
合并模块,用于将所述虚化适曝图像中的所述虚化过曝部分替换为所述仿原过曝部分以得到合并图像。And a merging module, configured to replace the imaginary overexposed portion in the imaginary exposing image with the primordial overexposed portion to obtain a merged image.
在某些实施方式中,所述识别模块包括:In some embodiments, the identification module comprises:
第一判断子模块,用于根据所述适曝图像的直方图判断所述适曝图像中过曝像素是否多于或等于第一预定数目,所述过曝像素的像素值大于或等于预定像素值;和a first determining sub-module, configured to determine, according to the histogram of the exposing image, whether the overexposed pixel in the exposing 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
第一确定子模块,用于在所述过曝像素多于或等于第一预定数目时确定存在所述过曝部分。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 exposed image, and the number of adjacent over-exposed pixels is greater than or equal to Two predetermined numbers; 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 first blurring module uses a Gaussian blurring algorithm to blur the exposed image to obtain a blurred exposure image; or/and
所述第二虚化模块是采用高斯模糊算法来虚化所述欠曝图像以得到虚化欠曝图像。The second blurring module uses a Gaussian blurring algorithm to blur the underexposed image to obtain a blurred underexposure image.
在某些实施方式中,所述提亮模块用于将所述虚化欠曝图像的亮度提升N倍以得到所述仿原过曝部分,其中,N为所述第一曝光量与所述第二曝光量之间的比值。In some embodiments, the brightening module is configured to increase a brightness of the blurred underexposure image by N times to obtain the pseudo-overexposure portion, wherein N is the first exposure amount and the The ratio between the second exposures.
在某些实施方式中,所述图像处理装置还包括:In some embodiments, the image processing apparatus further includes:
第一输出模块,用于输出所述合并图像;或a first output module, configured to output the merged image; or
第二输出模块,用于在不存在所述过曝部分时输出所述虚化适曝图像。And a second output module, configured to output the blurred exposure 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 image forming apparatus to output an exposed image and an underexposed 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 imaging device includes a camera, and the control module includes:
第一曝光确定单元,用于根据光环境确定所述第一曝光量;a first exposure determining unit, configured to determine the first exposure amount according to a light environment;
第二曝光确定单元,用于根据所述过曝部分确定所述第二曝光量;和a second exposure determining unit, configured to determine the second exposure amount according to the overexposed portion; and
控制单元,用于控制所述摄像头依次以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。And a control unit, configured to control the camera to sequentially expose the first exposure amount and the second exposure amount to obtain the exposed image and the underexposed image.
在某些实施方式中,所述成像装置包括第一摄像头和第二摄像头,所述控制模块包括:In some embodiments, the imaging device includes a first camera and a second camera, and the control module includes:
第一曝光确定单元,用于根据光环境确定所述第一曝光量;a first exposure determining unit, configured to determine the first exposure amount according to a light environment;
第二曝光确定单元,用于根据所述过曝部分确定所述第二曝光量;和a second exposure determining unit, configured to determine the second exposure amount according to the overexposed portion; and
控制单元,用于控制所述第一摄像头和所述第二摄像头分别以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。And a control unit, configured to control the first camera and the second camera to respectively expose the first exposure amount and the second exposure amount to obtain the exposed image and the underexposure 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 an exposed image and an underexposed 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 first exposure determining unit, configured to determine the first exposure amount according to a light environment;
第二曝光确定单元,用于根据所述过曝部分确定所述第二曝光量;和a second exposure determining unit, configured to determine the second exposure amount according to the overexposed portion; and
第一控制单元,用于控制所述摄像头依次以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。a first control unit, configured to control the camera to sequentially expose the first exposure amount and the second exposure amount to obtain the exposed image and the underexposed image.
在某些实施方式中,所述摄像头的数量包括两个,分别为第一摄像头和第二摄像头,所述控制模块包括:In some embodiments, the number of the cameras includes two, respectively a first camera and a second camera, and the control module includes:
第一曝光确定单元,用于根据光环境确定所述第一曝光量;a first exposure determining unit, configured to determine the first exposure amount according to a light environment;
第二曝光确定单元,用于根据所述过曝部分确定所述第二曝光量;和a second exposure determining unit, configured to determine the second exposure amount according to the overexposed portion; and
第二控制单元,用于控制所述第一摄像头和所述第二摄像头分别以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。a second control unit, configured to control the first camera and the second camera to be exposed by the first exposure amount and the second exposure amount, respectively, to obtain the exposed image and the underexposed 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 also 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 housing, and the processor and the memory are disposed in the On the 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 also provides a computer readable storage medium having instructions stored therein, when the processor of the electronic device executes the instructions, the electronic device performs an image processing method or execution according to any of the above embodiments The control method according to any of the above embodiments.
本发明中的图像处理方法、图像处理装置、控制方法、控制装置、成像装置、电子装置及计算机可读存储介质通过拍摄两张图像,一张适曝图像,一张欠曝图像,两张图像均被虚化,然后提亮虚化后的欠曝图像的亮度,取出其中的与仿原过曝部分,合入虚化后的适曝图像中,合成一张带有真实光斑效果的虚化图像,光斑效果好。The image processing method, the image processing device, the control method, the control device, the imaging device, the electronic device, and the computer readable storage medium in the present invention capture two images, one suitable exposure image, one underexposed image, and two images Both are blurred, and then the brightness of the underexposed image after blurring is brightened, and the part of the underexposed image is taken out, and the image is exposed in the blurred image to form a blur with a real spot effect. The image has a good spot effect.
本发明的实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实施方式的实践了解到。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 an 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 imaged device to output an appropriately exposed image and an underexposed 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.
图30是本发明某些实施方式控制成像装置输出相同场景的适曝图像和欠曝图像的流程示意图。30 is a flow diagram showing the control of an image-forming device to output an appropriately exposed image and an underexposed image of the same scene, in accordance with some embodiments of the present invention.
图31是本发明某些实施方式的控制模块的功能模块示意图。31 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 integrally connected; may be mechanically connected, or may be electrically connected or may communicate with each other; may be directly connected or indirectly connected through an intermediate medium, may be internal communication of two elements or interaction of two elements relationship. 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 exposed image, and the suitable exposure image is an image obtained by exposing the first exposure amount matched with the light environment;
S2,虚化适曝图像以得到虚化适曝图像,虚化适曝图像包括与过曝部分对应的虚化过曝部分;S2, blurring the image to obtain a blurred exposure image, and blurring the exposed image includes a blurred overexposure portion corresponding to the overexposed portion;
S3,在存在过曝部分时,虚化欠曝图像以得到虚化欠曝图像,欠曝图像是采用第二曝光量曝光获得的,欠曝图像与适曝图像的场景相同,欠曝图像包括与过曝部分对应的素材部分,虚化欠曝图像包括与过曝部分对应的虚化素材部分,第二曝光量小于第一曝光量以使素材部分的像素值小于素材部分的像素值范围的上限(目的是不要溢出);S3, when there is an overexposed portion, the underexposure image is blurred to obtain a blurred underexposure image, and the underexposed image is obtained by exposure with a second exposure amount, and the underexposed image is the same as the scene of the suitable exposed image, and the underexposed image includes a portion of the material corresponding to the overexposed portion, the blurred underexposure image includes a portion of the blur material corresponding to the overexposed portion, and the second exposure amount is smaller than the first exposure amount such that the pixel value of the material portion is smaller than the pixel value range of the material portion Upper limit (the purpose is not to overflow);
S4,提升虚化素材部分的亮度得到仿原过曝部分;和S4, increasing the brightness of the portion of the imaginary material to obtain a portion of the original over-exposure; and
S5,将虚化适曝图像中的虚化过曝部分替换为仿原过曝部分以得到合并图像。S5, replacing the blurred overexposed portion in the blurred exposure image with the original overexposed portion to obtain a merged image.
其中,虚化适曝图像以得到虚化适曝图像的步骤可以是采用高斯模糊算法实现的; 或/和虚化欠曝图像以得到虚化欠曝图像的步骤可以是采用高斯模糊算法实现的。提升虚化素材部分的亮度得到仿原过曝部分的步骤可以是将虚化欠曝图像的亮度提升N倍以得到仿原过曝部分,N为第一曝光量与第二曝光量之间的比值。Wherein, the step of blurring the exposed image to obtain the blurred exposure image may be implemented by using a Gaussian fuzzy algorithm; The step of blurring the underexposed image to obtain a blurred underexposure image may be implemented using a Gaussian blur algorithm. The step of increasing the brightness of the imaginary material portion to obtain the original overexposed portion may be to increase the brightness of the imaginary underexposed image by N times to obtain a pseudo overexposed portion, where N is between the first exposure amount and the second exposure amount. ratio.
请参阅图2,上述第一实施方式的图像处理方法可以由本发明第一实施方式的图像处理装置111实现。具体地,本发明第一实施方式的图像处理装置111包括识别模块1111、第一虚化模块1112、第二虚化模块1113、提亮模块1114及合并模块1115,可分别用于执行S1至S5。也就是说,识别模块1111用于识别适曝图像中是否存在过曝部分,适曝图像是采用与光环境匹配的第一曝光量曝光获得的图像。第一虚化模块1112用于虚化适曝图像以得到虚化适曝图像,虚化适曝图像包括与过曝部分对应的虚化过曝部分。第二虚化模块1113用于在存在过曝部分时,虚化欠曝图像以得到虚化欠曝图像,欠曝图像是采用第二曝光量曝光获得的,欠曝图像与适曝图像的场景相同,欠曝图像包括与过曝部分对应的素材部分,虚化欠曝图像包括与过曝部分对应的虚化素材部分,第二曝光量小于第一曝光量以使素材部分的像素值小于素材部分的像素值范围的上限。提亮模块1114用于提升虚化素材部分的亮度得到仿原过曝部分。合并模块15用于将虚化适曝图像中的虚化过曝部分替换为仿原过曝部分以得到合并图像。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 first blurring module 1112, a second blurring module 1113, a brightening module 1114, and a merging module 1115, which can be respectively used to execute S1 to S5. . That is to say, the identification module 1111 is configured to identify whether there is an overexposed portion in the exposed image, and the suitable exposure image is an image obtained by exposure with a first exposure amount that matches the light environment. The first blurring module 1112 is configured to blur the exposed image to obtain a blurred exposure image, and the blurred exposure image includes a blurred overexposure portion corresponding to the overexposed portion. The second blurring module 1113 is configured to blur the underexposed image to obtain a blurred underexposure image when the overexposed portion is present, and the underexposed image is obtained by using the second exposure amount to expose the underexposed image and the exposed image. Similarly, the underexposed image includes a material portion corresponding to the overexposed portion, and the blurred underexposure image includes a blur material portion corresponding to the overexposed portion, and the second exposure amount is less than the first exposure amount such that the pixel value of the material portion is smaller than the material The upper limit of the range of pixel values. The brightening module 1114 is configured to increase the brightness of the portion of the imaginary material to obtain a portion of the original overexposed portion. The merging module 15 is configured to replace the imaginary overexposed portion in the imaginary exposing image with the primordial overexposed portion to obtain a merged image.
其中,第一虚化模块1112是采用高斯模糊算法来虚化适曝图像以得到虚化适曝图像;或/和第二虚化模块1113是采用高斯模糊算法来虚化欠曝图像以得到虚化欠曝图像。提亮模块1114可以是提升虚化素材部分的亮度得到仿原过曝部分的步骤是将虚化欠曝图像的亮度提升N倍以得到仿原过曝部分,N为第一曝光量与第二曝光量之间的比值。The first blurring module 1112 uses a Gaussian blur algorithm to blur the suitable exposed image to obtain a blurred exposure image; or/and the second blurring module 1113 uses a Gaussian blur algorithm to blur the underexposed image to obtain a virtual image. Underexposure images. The step of lifting the module 1114 may be to increase the brightness of the portion of the imaginary material to obtain a portion of the imaginary overexposed portion, which is to increase the brightness of the imaginary underexposed image by N times to obtain a portion of the original overexposure portion, where N is the first exposure amount and the second portion. The ratio between the exposures.
请参阅图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 an exposed image and an underexposed image of the same scene;
S1,识别适曝图像中是否存在过曝部分,适曝图像是采用与光环境匹配的第一曝光量曝光获得的图像;S1, identifying whether there is an overexposed portion in the exposed image, and the suitable exposure image is an image obtained by exposing the first exposure amount matched with the light environment;
S2,虚化适曝图像以得到虚化适曝图像,虚化适曝图像包括与过曝部分对应的虚化过曝部分;S2, blurring the image to obtain a blurred exposure image, and blurring the exposed image includes a blurred overexposure portion corresponding to the overexposed portion;
S3,在存在过曝部分时,虚化欠曝图像以得到虚化欠曝图像,欠曝图像是采用第二曝光量曝光获得的,欠曝图像与适曝图像的场景相同,欠曝图像包括与过曝部分对应的素材部分,虚化欠曝图像包括与过曝部分对应的虚化素材部分,第二曝光量小于第一曝光量以使素材部分的像素值小于素材部分的像素值范围的上限(目的是不要溢出); S3, when there is an overexposed portion, the underexposure image is blurred to obtain a blurred underexposure image, and the underexposed image is obtained by exposure with a second exposure amount, and the underexposed image is the same as the scene of the suitable exposed image, and the underexposed image includes a portion of the material corresponding to the overexposed portion, the blurred underexposure image includes a portion of the blur material corresponding to the overexposed portion, and the second exposure amount is smaller than the first exposure amount such that the pixel value of the material portion is smaller than the pixel value range of the material portion Upper limit (the purpose is not to overflow);
S4,提升虚化素材部分的亮度得到仿原过曝部分;和S4, increasing the brightness of the portion of the imaginary material to obtain a portion of the original over-exposure; and
S5,将虚化适曝图像中的虚化过曝部分替换为仿原过曝部分以得到合并图像。S5, replacing the blurred overexposed portion in the blurred exposure image with the original overexposed portion to obtain a merged image.
其中,虚化适曝图像以得到虚化适曝图像的步骤可以是采用高斯模糊算法实现的;或/和虚化欠曝图像以得到虚化欠曝图像的步骤可以是采用高斯模糊算法实现的。提升虚化素材部分的亮度得到仿原过曝部分的步骤可以是将虚化欠曝图像的亮度提升N倍以得到仿原过曝部分,N为第一曝光量与第二曝光量之间的比值。The step of blurring the image to obtain the blurred image may be implemented by using a Gaussian blur algorithm; or/and the step of blurring the underexposed image to obtain the image of the underexposed image may be implemented by using a Gaussian fuzzy algorithm. . The step of increasing the brightness of the imaginary material portion to obtain the original overexposed portion may be to increase the brightness of the imaginary underexposed image by N times to obtain a pseudo overexposed portion, where N is between the first exposure amount and the second exposure amount. ratio.
请参阅图4,上述第一实施方式的控制方法可以由本发明第一实施方式的控制装置11实现。具体地,在本发明第一实施方式的控制装置11中,控制装置11包括第一实施方式中的图像处理装置111及与图像处理装置111电连接的控制模块112。图像处理装置111用于执行步骤S1至S5,控制模块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 S5, 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 configured to control the imaging device 10 (shown in Figures 5-7) to output an appropriately exposed image and an underexposed 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. The 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为了说明,利用两幅实际拍摄的图像来说明,两幅图像的场景不完全相同,但本发明在具体执行时,适曝图像和欠曝图像拍摄完成的时间非常短,完全可以实现具有相同的场景)。其中,适曝图像是采用与光环境匹配的第一曝光量曝光获得,欠曝图像是采用小于第一曝光量的第二曝光量获得。经识别后,可以判断适曝图像中有过曝部分,即右边的圆形光源,欠曝图像包括与过曝部分(圆形光源)对应的素材部分(圆形光源)。虚化适曝图像以得到虚化适曝图像,及虚化欠曝图像以得到虚化欠曝图像,其中,虚化适曝图像中的过曝部分(圆形光源)被虚化得到虚化过曝部分(圆形光源),虚化欠曝图像 中的素材部分(圆形光源)被虚化得到虚化素材部分(圆形光源)。提升虚化素材部分的亮度得到仿原过曝部分,其中,可以是将虚化欠曝图像整个提亮,此时,虚化素材部分的亮度也跟着提亮;或者,可以是只提亮虚化素材部分的亮度。最后,将虚化适曝图像中的虚化过曝部分替换为仿原过曝部分以得到合并图像。For example, referring to FIG. 8 , the camera 12 captures an appropriately exposed image and an underexposed image for the same scene ( FIG. 8 illustrates for example, using two actually captured images, the scenes of the two images are not identical, but the present invention In the specific execution, the time for the exposure of the exposed image and the underexposure image is very short, and it is completely possible to achieve the same scene). Wherein, the suitable exposure image is obtained by exposure with a first exposure amount matched to the light environment, and the underexposure image is obtained by using a second exposure amount smaller than the first exposure amount. After being identified, it can be judged that there is an overexposed portion in the suitable exposed image, that is, a circular light source on the right side, and the underexposed image includes a material portion (circular light source) corresponding to the overexposed portion (circular light source). Blur the exposed image to obtain a blurred exposure image, and blur the underexposed image to obtain a blurred underexposure image, wherein the overexposed portion (circular light source) in the blurred exposure image is blurred to be blurred Overexposed part (circular light source), blurring underexposure image The material part (circular light source) is blurred to obtain a blurred material part (circular light source). The brightness of the portion of the imaginary material is increased to obtain a partial overexposure portion, wherein the imaginary underexposure image is entirely brightened, and at this time, the brightness of the imaginary material portion is also brightened; or, it may be only brightening the imaginary The brightness of the material part. Finally, the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion to obtain a merged image.
本发明第一实施方式中的图像处理方法、图像处理装置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 capture two images, one suitable exposure image, one underexposed image, and two The image is blurred, and then the brightness of the underexposed image is blurred, and the imitation original overexposed portion is taken out, and the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion. Combine a blurred image with a real flare 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 exposed image includes the following steps:
S11,根据适曝图像的直方图判断适曝图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为适曝图像的像素值范围的上限,例如预定像素值为255;和S11. Determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 the predetermined pixel value is a pixel value of the exposed image. The upper limit of the range, such as 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 determining sub-module 11111 is configured to determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 value is an upper limit of a range of pixel values of the exposed 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, generally, the horizontal axis of the histogram of the suitable image represents the increment of the pixel value (gray value) from left to right, and the vertical axis represents the pixel value (gray value) from bottom to top. The number of pixels is incremented. 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 exposed image includes the following steps:
S11,根据适曝图像的直方图判断适曝图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为适曝图像的像素值范围的上限,例如预定像素值为255;和S11. Determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 the predetermined pixel value is a pixel value of the exposed image. The upper limit of the range, such as 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 suitable exposed image, whether the overexposed pixel in the exposed 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 value is an upper limit of a range of pixel values of the exposed 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 suitable image represents the increment of the pixel value (gray value) from left to right, and the vertical axis represents the pixel value (gray value) from bottom to top. The number of pixels is incremented. 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. In the present embodiment, when the number of the 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 capture two images, one suitable exposure image, one underexposed image, and two The image is blurred, and then the brightness of the underexposed image is blurred, and the imitation original overexposed portion is taken out, and the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion. Combine a blurred image with a real flare effect, and the spot effect is good.
请参阅图16,本发明第三实施方式的图像处理方法与第一实施方式的图像处理方法基本相同,进一步地,所述识别适曝图像中是否存在过曝部分的步骤包括以下步骤:Referring to FIG. 16, the image processing method of 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 exposed image includes the following steps:
S11,根据适曝图像的直方图判断适曝图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为适曝图像的像素值范围的上限,例如预定像素值为255;S11. Determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 the predetermined pixel value is a pixel value of the exposed image. The upper limit of the range, 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 suitable exposed image, and the number of adjacent overexposed pixels is more 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 suitable exposed image, whether the overexposed pixel in the exposed 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 value is an upper limit of a range of pixel values of the exposed 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 second determining sub-module 11113 is configured to determine whether there is an adjacent over-exposed pixel in the exposed 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 exposed image may include a plurality of adjacent overexposed pixels, for example, there are a plurality of discrete light sources, and the light sources are common Form the overexposed part.
请结合图11,一般地,适曝图像的直方图的横轴从左至右表示像素值(灰度值)的递增,纵轴从下到上表示在某一像素值(灰度值)的像素数量的递增。像素值(灰度值)的范围为0-255,也即是表示由黑到白,在某一点的峰值越高,表示在该像素值(灰度值) 下的像素越多。Referring to FIG. 11, in general, the horizontal axis of the histogram of the suitable image represents the increment of the pixel value (gray value) from left to right, and the vertical axis represents the pixel value (gray value) from bottom to top. The number of pixels is incremented. The pixel value (gray value) ranges from 0 to 255, that is, from black to white, the higher the peak at a certain point, the pixel value (gray value) is represented. The more pixels there are.
第一预定数目与第二预定数目应当是直方图中靠近右侧边界的像素也即是过曝像素的数量,第一预定数目可以设置为占总像素的三分之一,第二预定数目可以设置为占总像素的四分之一,需要说明的是,三分之一与四分之一仅是示意性说明,并非对发明的限制。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 exposed image includes the following steps:
S11,根据适曝图像的直方图判断适曝图像中过曝像素是否多于或等于第一预定数目,过曝像素的像素值大于或等于预定像素值,预定像素值为适曝图像的像素值范围的上限,例如预定像素值为255;S11. Determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 the predetermined pixel value is a pixel value of the exposed image. The upper limit of the range, 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 suitable exposed image, and the number of adjacent overexposed pixels is more 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 determining sub-module 11111 is configured to determine, according to the histogram of the suitable exposed image, whether the overexposed pixel in the exposed 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 value is an upper limit of a range of pixel values of the exposed 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 second determining sub-module 11113 is configured to determine whether there is an adjacent over-exposed pixel in the exposed 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 exposed image may include a plurality of adjacent overexposed pixels, for example, there are a plurality of discrete light sources, and the light sources are common Form the overexposed part.
请结合图11,一般地,适曝图像的直方图的横轴从左至右表示像素值(灰度值)的递增,纵轴从下到上表示在某一像素值(灰度值)的像素数量的递增。像素值(灰度值)的范围为0-255,也即是表示由黑到白,在某一点的峰值越高,表示在该像素值(灰度值) 下的像素越多。Referring to FIG. 11, in general, the horizontal axis of the histogram of the suitable image represents the increment of the pixel value (gray value) from left to right, and the vertical axis represents the pixel value (gray value) from bottom to top. The number of pixels is incremented. The pixel value (gray value) ranges from 0 to 255, that is, from black to white, the higher the peak at a certain point, the pixel value (gray value) is represented. The more pixels there are.
第一预定数目与第二预定数目应当是直方图中靠近右侧边界的像素也即是过曝像素的数量,第一预定数目可以设置为占总像素的三分之一,第二预定数目可以设置为占总像素的四分之一,需要说明的是,三分之一与四分之一仅是示意性说明,并非对发明的限制。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. In the present embodiment, when the number of the 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 take two images, one suitable exposure image, one underexposed image, and two The image is blurred, and then the brightness of the underexposed image is blurred, and the imitation original overexposed portion is taken out, and the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion. Combine a blurred image with a real flare 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 output image is blurred.
请参见图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. Second output module 1118 Used to output a blurred exposure 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 output image is blurred.
请参见图25,上述第四实施方式的控制方法可以由本发明第四实施方式的控制装置11实现。本发明第四实施方式的控制装置11与第一实施方式的控制装置11结构基本相同,不同之处在于:第四实施方式的控制装置11还包括第一输出模块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 substantially the same structure as the control device 11 of the first embodiment, except that the control device 11 of the fourth embodiment further includes a first output module 1117 and a second output module 1118. It 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 exposure 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. In the present embodiment, when the number of the 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 fourth embodiment of the present invention capture two images, one suitable exposure image, one underexposed image, and two The image is blurred, and then the brightness of the underexposed image is blurred, and the imitation original overexposed portion is taken out, and the blurred overexposed portion in the blurred exposure image is replaced with the original overexposed portion. Combine a blurred image with a real flare 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. Image processing device, control device of the second embodiment, and imaging device of the second embodiment In 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,前述第一至第四实施方式的控制方法中,进一步地,若通过控制方法控制的成像装置包括摄像头,则所述控制成像装置输出相同场景的适曝图像和欠曝图像的步骤(步骤S6)可包括以下步骤:Referring to FIG. 28, in the control methods of the foregoing first to fourth embodiments, further, if the imaging device controlled by the control method includes a camera, the control imaging device outputs the exposed image and the underexposed image of the same scene. The step (step S6) may include the following steps:
S61,根据光环境确定第一曝光量;S61. Determine a first exposure amount according to a light environment.
S62,根据过曝部分确定第二曝光量;和S62, determining a second exposure amount according to the overexposed portion; and
S63,控制摄像头依次以第一曝光量和第二曝光量曝光以得到适曝图像和欠曝图像。S63. The control camera is sequentially exposed with the first exposure amount and the second exposure amount to obtain an appropriately exposed image and an underexposed 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 first exposure determining unit 1121, a second exposure determining unit 1122, and a first control unit 1123, which can be used to respectively Steps S61, S62, and S63 are performed. That is, the first exposure determining unit 1121 is configured to determine the first exposure amount according to the light environment. The second exposure determining unit 1122 is configured to determine the second exposure amount according to the overexposed portion. The first control unit 1123 is configured to control the camera to sequentially expose the first exposure amount and the second exposure amount to obtain an appropriately exposed image and an underexposed image.
对应地,第一至第四实施方式的成像装置10与电子装置100中的控制模块112也可包括第一曝光确定单元1121、第二曝光确定单元1122、及第一控制单元1123,具体结构与功能同前,在此不再详细展开。Correspondingly, the imaging device 10 of the first to fourth embodiments and the control module 112 in the electronic device 100 may also include a first exposure determining unit 1121, a second exposure determining unit 1122, and a first control unit 1123, the specific structure and The function is the same as before and will not be expanded in detail here.
请参阅图30,前述第一至第四实施方式的控制方法中,进一步地,若通过控制方法控制的成像装置包括第一摄像头和第二摄像头,则所述控制成像装置输出相同场景的适曝图像和欠曝图像的步骤(步骤S6)还可包括以下步骤:Referring to FIG. 30, in the control methods of the foregoing first to fourth embodiments, further, if the imaging device controlled by the control method includes the first camera and the second camera, the control imaging device outputs the same scene. The step of image and underexposure of the image (step S6) may further comprise the following steps:
S61,根据光环境确定第一曝光量;S61. Determine a first exposure amount according to a light environment.
S62,根据过曝部分确定第二曝光量;和S62, determining a second exposure amount according to the overexposed portion; and
S63,控制第一摄像头和第二摄像头分别以第一曝光量和第二曝光量曝光以得到适曝图像和欠曝图像。S63. Control the first camera and the second camera to respectively expose the first exposure amount and the second exposure amount to obtain an appropriately exposed image and an underexposed image.
对应地,请参阅图31,第一至第四实施方式的控制装置11中的控制模块112包括第一曝光确定单元1121、第二曝光确定单元1122、及第二控制单元1123,可以用于分别执行步骤S61、S62及S63。也就是说,第一曝光确定单元1121用于根据光环境确定第一曝光量。第二曝光确定单元1122用于根据过曝部分确定第二曝光量。第二控制单元1123用于控制第一摄像头和第二摄像头分别以第一曝光量和第二曝光量曝光以得 到适曝图像和欠曝图像。Correspondingly, referring to FIG. 31, the control module 112 in the control device 11 of the first to fourth embodiments includes a first exposure determining unit 1121, a second exposure determining unit 1122, and a second control unit 1123, which can be used to respectively Steps S61, S62, and S63 are performed. That is, the first exposure determining unit 1121 is configured to determine the first exposure amount according to the light environment. The second exposure determining unit 1122 is configured to determine the second exposure amount according to the overexposed portion. The second control unit 1123 is configured to control the first camera and the second camera to respectively expose the first exposure amount and the second exposure amount. To the appropriate exposure image and underexposure image.
对应地,第一至第四实施方式的成像装置10与电子装置100中的控制模块112也可包括第一曝光确定单元1121、第二曝光确定单元1122、及第二控制单元1123,具体结构与功能同上,在此不再详细展开。Correspondingly, the imaging device 10 of the first to fourth embodiments and the control module 112 in the electronic device 100 may also include a first exposure determining unit 1121, a second exposure determining unit 1122, and a second control unit 1123, the specific structure and The function is the same as above, and 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 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 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 executes 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. In the context of the present specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport the program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device. Set. 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-described embodiments, multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. 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 (28)

  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 image that is exposed, the exposed image being obtained by exposure with a first exposure amount that matches the light environment;
    虚化所述适曝图像以得到虚化适曝图像,所述虚化适曝图像包括与所述过曝部分对应的虚化过曝部分;Blooming the suitable exposed image to obtain a blurred exposure image, the blurred exposure image including a blurred overexposure portion corresponding to the overexposed portion;
    在存在所述过曝部分时,虚化欠曝图像以得到虚化欠曝图像,所述欠曝图像是采用第二曝光量曝光获得的,所述欠曝图像与所述适曝图像的场景相同,所述欠曝图像包括与所述过曝部分对应的素材部分,所述虚化欠曝图像包括与所述过曝部分对应的虚化素材部分,所述第二曝光量小于所述第一曝光量以使所述素材部分的像素值小于所述素材部分的像素值范围的上限;In the presence of the overexposed portion, the underexposed image is blurred to obtain a blurred underexposure image, and the underexposed image is obtained by exposure using a second exposure amount, the underexposed image and the scene of the suitable exposed image Similarly, the underexposed image includes a material portion corresponding to the overexposed portion, the blurred underexposure image includes a blur material portion corresponding to the overexposed portion, and the second exposure amount is less than the first An exposure amount such that a pixel value of the material portion is smaller than an upper limit of a range of pixel values of the material portion;
    提升所述虚化素材部分的亮度得到仿原过曝部分;和Elevating the brightness of the portion of the imaginary material to obtain a pseudo-overexposure portion; and
    将所述虚化适曝图像中的所述虚化过曝部分替换为所述仿原过曝部分以得到合并图像。The imaginary overexposed portion in the blurred exposure image is replaced with the primordial overexposed portion to obtain a merged image.
  2. 如权利要求1所述的图像处理方法,其特征在于,所述识别适曝图像中是否存在过曝部分的步骤包括:The image processing method according to claim 1, wherein the step of identifying whether there is an overexposed portion in the expansive image comprises:
    根据所述适曝图像的直方图判断所述适曝图像中过曝像素是否多于或等于第一预定数目,所述过曝像素的像素值大于或等于预定像素值;和Determining, according to the histogram of the exposing image, whether the overexposed pixel in the exposing 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.
  3. 如权利要求2所述的图像处理方法,其特征在于,所述识别适曝图像中是否存在过曝部分的步骤包括:The image processing method according to claim 2, wherein the step of identifying whether there is an overexposed portion in the expansive image comprises:
    在存在所述过曝部分时,判断所述适曝图像中是否存在相邻接的过曝像素,所述相邻接的过曝像素的数目多于或等于第二预定数目;和When there is the overexposed portion, determining whether there is an adjacent overexposed pixel in the exposing 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.
  4. 如权利要求2或3所述的图像处理方法,其特征在于,所述预定像素值为所述适曝图像的像素值范围的上限。The image processing method according to claim 2 or 3, wherein the predetermined pixel value is an upper limit of a range of pixel values of the expansive image.
  5. 如权利要求1所述的图像处理方法,其特征在于,所述虚化所述适曝图像以得到虚化适曝图像的步骤是采用高斯模糊算法实现的;或/和 The image processing method according to claim 1, wherein the step of blurring the suitable exposure image to obtain a blurred exposure image is implemented by using a Gaussian blur algorithm; or/and
    所述虚化欠曝图像以得到虚化欠曝图像的步骤是采用高斯模糊算法实现的。The step of blurring the underexposed image to obtain the blurred underexposure image is implemented by using a Gaussian blur algorithm.
  6. 如权利要求1所述的图像处理方法,其特征在于,所述提升所述虚化素材部分的亮度得到仿原过曝部分的步骤包括:The image processing method according to claim 1, wherein the step of ascending the brightness of the portion of the imaginary material to obtain a simulated overexposed portion comprises:
    将所述虚化欠曝图像的亮度提升N倍以得到所述仿原过曝部分,其中,N为所述第一曝光量与所述第二曝光量之间的比值。And increasing the brightness of the blurred underexposure image by N times to obtain the pseudo-overexposure portion, wherein N is a ratio between the first exposure amount and the second exposure amount.
  7. 如权利要求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 exposure image is output when the overexposed portion is absent.
  8. 一种控制方法,用于控制成像装置,其特征在于,所述控制方法包括以下步骤:A control method for controlling an imaging device, wherein the control method comprises the following steps:
    控制所述成像装置输出相同场景的适曝图像和欠曝图像;和Controlling the imaging device to output an exposed image and an underexposed image of the same scene; and
    采用如权利要求1-7任意一项所述的图像处理方法处理所述适曝图像和所述欠曝图像。The adaptive image and the underexposed image are processed by the image processing method according to any one of claims 1-7.
  9. 如权利要求8所述的控制方法,其特征在于,所述成像装置包括摄像头,所述控制所述成像装置输出相同场景的适曝图像和欠曝图像的步骤包括以下步骤:The control method according to claim 8, wherein said imaging means comprises a camera, and said step of controlling said imaging means to output an appropriately exposed image and an underexposed image of the same scene comprises the steps of:
    根据光环境确定所述第一曝光量;Determining the first exposure amount according to a light environment;
    根据所述过曝部分确定所述第二曝光量;和Determining the second exposure amount according to the overexposed portion; and
    控制所述摄像头依次以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。The camera is controlled to be sequentially exposed with the first exposure amount and the second exposure amount to obtain the exposed image and the underexposed image.
  10. 如权利要求8所述的控制方法,其特征在于,所述成像装置包括第一摄像头和第二摄像头,所述控制所述成像装置输出相同场景的适曝图像和欠曝图像的步骤包括以下步骤:The control method according to claim 8, wherein said imaging means comprises a first camera and a second camera, and said step of controlling said imaging means to output an image of the same scene and an underexposed image comprises the following steps :
    根据光环境确定所述第一曝光量;Determining the first exposure amount according to a light environment;
    根据所述过曝部分确定所述第二曝光量;和Determining the second exposure amount according to the overexposed portion; and
    控制所述第一摄像头和所述第二摄像头分别以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。The first camera and the second camera are controlled to be exposed with the first exposure amount and the second exposure amount, respectively, to obtain the exposed image and the underexposed image.
  11. 一种图像处理装置,其特征在于,所述图像处理装置包括:An image processing apparatus, characterized in that the image processing apparatus comprises:
    识别模块,用于识别适曝图像中是否存在过曝部分,所述适曝图像是采用与光环境匹 配的第一曝光量曝光获得的;An identification module, configured to identify whether an overexposed portion exists in the exposed image, and the exposed image is used in a light environment Obtained with the first exposure amount obtained;
    第一虚化模块,用于虚化所述适曝图像以得到虚化适曝图像,所述虚化适曝图像包括与所述过曝部分对应的虚化过曝部分;a first blurring module, configured to blur the exposed image to obtain a blurred exposure image, where the blurred exposure image includes a blurred overexposure portion corresponding to the overexposed portion;
    第二虚化模块,用于在存在所述过曝部分时,虚化欠曝图像以得到虚化欠曝图像,所述欠曝图像是采用第二曝光量曝光获得的,所述欠曝图像与所述适曝图像的场景相同,所述欠曝图像包括与所述过曝部分对应的素材部分,所述虚化欠曝图像包括与所述过曝部分对应的虚化素材部分,所述第二曝光量小于所述第一曝光量以使所述素材部分的像素值小于所述素材部分的像素值范围的上限;a second blurring module, configured to: when the overexposed portion exists, blur the underexposed image to obtain a blurred underexposure image, wherein the underexposed image is obtained by using a second exposure amount exposure, the underexposure image In the same manner as the scene of the exposed image, the underexposed image includes a material portion corresponding to the overexposed portion, and the blurred underexposure image includes a blur material portion corresponding to the overexposed portion, The second exposure amount is smaller than the first exposure amount such that a pixel value of the material portion is smaller than an upper limit of a pixel value range of the material portion;
    提亮模块,用于提升所述虚化素材部分的亮度得到仿原过曝部分;和a brightening module, configured to: boost a brightness of the portion of the imaginary material to obtain an original overexposed portion; and
    合并模块,用于将所述虚化适曝图像中的所述虚化过曝部分替换为所述仿原过曝部分以得到合并图像。And a merging module, configured to replace the imaginary overexposed portion in the imaginary exposing image with the primordial overexposed portion to obtain a merged image.
  12. 如权利要求11所述的图像处理装置,其特征在于,所述识别模块包括:The image processing device according to claim 11, wherein the identification module comprises:
    第一判断子模块,用于根据所述适曝图像的直方图判断所述适曝图像中过曝像素是否多于或等于第一预定数目,所述过曝像素的像素值大于或等于预定像素值;和a first determining sub-module, configured to determine, according to the histogram of the exposing image, whether the overexposed pixel in the exposing 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
    第一确定子模块,用于在所述过曝像素多于或等于第一预定数目时确定存在所述过曝部分。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.
  13. 如权利要求12所述的图像处理装置,其特征在于,所述识别模块还包括:The image processing device according to claim 12, 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 exposed image, and the number of adjacent over-exposed pixels is greater than or equal to Two predetermined numbers; 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.
  14. 如权利要求12或13所述的图像处理装置,其特征在于,所述预定像素值为所述适曝图像的像素值范围的上限。The image processing device according to claim 12 or 13, wherein said predetermined pixel value is an upper limit of a range of pixel values of said expansive image.
  15. 如权利要求11所述的图像处理装置,其特征在于,所述第一虚化模块是采用高斯模糊算法来虚化所述适曝图像以得到虚化适曝图像;或/和The image processing apparatus according to claim 11, wherein the first blurring module uses a Gaussian blurring algorithm to blur the suitable exposed image to obtain a blurred exposure image; or/and
    所述第二虚化模块是采用高斯模糊算法来虚化所述欠曝图像以得到虚化欠曝图像。The second blurring module uses a Gaussian blurring algorithm to blur the underexposed image to obtain a blurred underexposure image.
  16. 如权利要求11所述的图像处理装置,其特征在于,所述提亮模块用于将所述虚化 欠曝图像的亮度提升N倍以得到所述仿原过曝部分,其中,N为所述第一曝光量与所述第二曝光量之间的比值。The image processing device according to claim 11, wherein said brightening module is for rendering said blur The brightness of the underexposed image is increased by N times to obtain the pseudo-overexposure portion, wherein N is a ratio between the first exposure amount and the second exposure amount.
  17. 如权利要求11所述的图像处理装置,其特征在于,所述图像处理装置还包括:The image processing device according to claim 11, wherein the image processing device further comprises:
    第一输出模块,用于输出所述合并图像;或a first output module, configured to output the merged image; or
    第二输出模块,用于在不存在所述过曝部分时输出所述虚化适曝图像。And a second output module, configured to output the blurred exposure image when the overexposed portion is absent.
  18. 一种控制装置,用于控制成像装置,其特征在于,所述控制装置包括:A control device for controlling an imaging device, wherein the control device comprises:
    控制模块,用于控制所述成像装置输出相同场景的适曝图像和欠曝图像;和a control module, configured to control the image forming apparatus to output an exposed image and an underexposed image of the same scene; and
    如权利要求11-17任意一项所述并与所述控制模块电连接的图像处理装置。An image processing apparatus according to any of claims 11-17 and electrically connected to said control module.
  19. 如权利要求18所述的控制装置,其特征在于,所述成像装置包括摄像头,所述控制模块包括:The control device according to claim 18, wherein the imaging device comprises a camera, and the control module comprises:
    第一曝光确定单元,用于根据光环境确定所述第一曝光量;a first exposure determining unit, configured to determine the first exposure amount according to a light environment;
    第二曝光确定单元,用于根据所述过曝部分确定所述第二曝光量;和a second exposure determining unit, configured to determine the second exposure amount according to the overexposed portion; and
    控制单元,用于控制所述摄像头依次以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。And a control unit, configured to control the camera to sequentially expose the first exposure amount and the second exposure amount to obtain the exposed image and the underexposed image.
  20. 如权利要求18所述的控制装置,其特征在于,所述成像装置包括第一摄像头和第二摄像头,所述控制模块包括:The control device according to claim 18, wherein the imaging device comprises a first camera and a second camera, and the control module comprises:
    第一曝光确定单元,用于根据光环境确定所述第一曝光量;a first exposure determining unit, configured to determine the first exposure amount according to a light environment;
    第二曝光确定单元,用于根据所述过曝部分确定所述第二曝光量;和a second exposure determining unit, configured to determine the second exposure amount according to the overexposed portion; and
    控制单元,用于控制所述第一摄像头和所述第二摄像头分别以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。And a control unit, configured to control the first camera and the second camera to respectively expose the first exposure amount and the second exposure amount to obtain the exposed image and the underexposure 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 an exposed image and an underexposed image of the same scene; and
    如权利要求11-17任意一项所述并与所述控制模块电连接的图像处理装置。An image processing apparatus according to any of claims 11-17 and electrically connected to said control module.
  22. 如权利要求21所述的成像装置,其特征在于,所述控制模块包括: The image forming apparatus according to claim 21, wherein said control module comprises:
    第一曝光确定单元,用于根据光环境确定所述第一曝光量;a first exposure determining unit, configured to determine the first exposure amount according to a light environment;
    第二曝光确定单元,用于根据所述过曝部分确定所述第二曝光量;和a second exposure determining unit, configured to determine the second exposure amount according to the overexposed portion; and
    第一控制单元,用于控制所述摄像头依次以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。a first control unit, configured to control the camera to sequentially expose the first exposure amount and the second exposure amount to obtain the exposed image and the underexposed image.
  23. 如权利要求21所述的成像装置,其特征在于,所述摄像头的数量包括两个,分别为第一摄像头和第二摄像头,所述控制模块包括:The imaging device according to claim 21, wherein the number of the cameras comprises two, respectively a first camera and a second camera, and the control module comprises:
    第一曝光确定单元,用于根据光环境确定所述第一曝光量;a first exposure determining unit, configured to determine the first exposure amount according to a light environment;
    第二曝光确定单元,用于根据所述过曝部分确定所述第二曝光量;和a second exposure determining unit, configured to determine the second exposure amount according to the overexposed portion; and
    第二控制单元,用于控制所述第一摄像头和所述第二摄像头分别以所述第一曝光量和所述第二曝光量曝光以得到所述适曝图像和所述欠曝图像。a second control unit, configured to control the first camera and the second camera to be exposed by the first exposure amount and the second exposure amount, respectively, to obtain the exposed image and the underexposed image.
  24. 一种电子装置,其特征在于,所述电子装置包括如权利要求21-23任意一项所述的成像装置。An electronic device, characterized in that the electronic device comprises the image forming device according to any one of claims 21-23.
  25. 如权利要求24所述的电子装置,其特征在于,所述电子装置包括手机、平板电脑、笔记本电脑、智能手表、智能手环、智能头盔、智能眼镜中的任意一种。The electronic device according to claim 24, 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.
  26. 如权利要求24所述的电子装置,其特征在于,所述成像装置包括前置相机或/和后置相机。The electronic device of claim 24, wherein the imaging device comprises a front camera or/and a rear camera.
  27. 一种电子装置,包括壳体、处理器、存储器、电路板和电源电路,其中,所述电路板安置在所述壳体围成的空间内部,所述处理器和所述存储器设置在所述电路板上;所述电源电路,用于为所述电子装置的各个电路或器件供电;所述存储器用于存储可执行程序代码;所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行如权利要求1至7中任一项所述的图像处理方法或执行如权利要求8至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 in the a power circuit for powering various circuits or devices of the electronic device; the memory for storing executable program code; the processor reading an executable program stored in the memory Codes for executing a program corresponding to the executable program code for performing the image processing method according to any one of claims 1 to 7 or performing the control according to any one of claims 8 to 10. method.
  28. 一种计算机可读存储介质,具有存储于其中的指令,当电子装置的处理器执行所述指令时,所述电子装置执行如权利要求1至7中任一项所述的图像处理方法或执行如权利要求8至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 7 when the processor of the electronic device executes the instruction A control method according to any one of claims 8 to 10.
PCT/CN2016/111147 2016-12-20 2016-12-20 Image processing method and device, control method and device, and imaging device and electronic device WO2018112763A1 (en)

Priority Applications (10)

Application Number Priority Date Filing Date Title
PCT/CN2016/111147 WO2018112763A1 (en) 2016-12-20 2016-12-20 Image processing method and device, control method and device, and imaging device and electronic device
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
JP2019533587A JP6803473B2 (en) 2016-12-20 2017-12-19 Image processing methods and equipment, as well as non-temporary computer-readable storage media
AU2017379019A AU2017379019B2 (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)
PCT/CN2017/117289 WO2018113685A1 (en) 2016-12-20 2017-12-19 Image processing method and device, and non-transitory computer-readable storage medium
EP17208506.0A EP3340608B1 (en) 2016-12-20 2017-12-19 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
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/111147 WO2018112763A1 (en) 2016-12-20 2016-12-20 Image processing method and device, control method and device, and imaging device and electronic device

Publications (1)

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

Family

ID=62624050

Family Applications (1)

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

Country Status (1)

Country Link
WO (1) WO2018112763A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420944A (en) * 2011-04-25 2012-04-18 展讯通信(上海)有限公司 High dynamic-range image synthesis method and device
US20140085510A1 (en) * 2012-09-26 2014-03-27 Olympus Imaging Corp. Image editing device and image editing method
CN104104886A (en) * 2014-07-24 2014-10-15 深圳市中兴移动通信有限公司 Overexposure shooting method and device
CN104113701A (en) * 2014-07-25 2014-10-22 深圳市中兴移动通信有限公司 Shooting method and shooting device
CN106161979A (en) * 2016-07-29 2016-11-23 广东欧珀移动通信有限公司 High dynamic range images image pickup method, device and terminal unit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420944A (en) * 2011-04-25 2012-04-18 展讯通信(上海)有限公司 High dynamic-range image synthesis method and device
US20140085510A1 (en) * 2012-09-26 2014-03-27 Olympus Imaging Corp. Image editing device and image editing method
CN104104886A (en) * 2014-07-24 2014-10-15 深圳市中兴移动通信有限公司 Overexposure shooting method and device
CN104113701A (en) * 2014-07-25 2014-10-22 深圳市中兴移动通信有限公司 Shooting method and shooting device
CN106161979A (en) * 2016-07-29 2016-11-23 广东欧珀移动通信有限公司 High dynamic range images image pickup method, device and terminal unit

Similar Documents

Publication Publication Date Title
CN111028189B (en) Image processing method, device, storage medium and electronic equipment
CN108335279B (en) Image fusion and HDR imaging
US11044410B2 (en) Imaging control method and apparatus, electronic device, and computer readable storage medium
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
US10630906B2 (en) Imaging control method, electronic device and computer readable storage medium
JP6112230B2 (en) Photography method, apparatus, and terminal
WO2019072190A1 (en) Image processing method, electronic apparatus, and computer readable storage medium
US10074165B2 (en) Image composition device, image composition method, and recording medium
US9813635B2 (en) Method and apparatus for auto exposure value detection for high dynamic range imaging
WO2020029732A1 (en) Panoramic photographing method and apparatus, and imaging device
CN109194882B (en) Image processing method, image processing device, electronic equipment and storage medium
US20150086127A1 (en) Method and image capturing device for generating artificially defocused blurred image
WO2017101561A1 (en) Method for generating high dynamic range image, and photographing apparatus, terminal and imaging method
WO2012093519A1 (en) Imaging device and light emission amount control method
TWI626620B (en) Image processing method and device, electronic device, and computer readable storage medium
CN111953893A (en) High dynamic range image generation method, terminal device and storage medium
JP2017152866A (en) Image processing system and image processing method
JP2014179920A (en) Imaging apparatus, control method thereof, program, and storage medium
US10972676B2 (en) Image processing method and electronic device capable of optimizing hdr image by using depth information
CN105163040A (en) Image processing method and mobile terminal
US10021314B2 (en) Image processing apparatus, image capturing apparatus, method of controlling the same, and storage medium for changing shading using a virtual light source
WO2018112763A1 (en) Image processing method and device, control method and device, and imaging device and electronic device
WO2018112764A1 (en) Image processing method and apparatus, control method and apparatus, imaging apparatus, and electronic apparatus
JP2017069871A (en) Image processing apparatus, control method therefor, program, and recording medium
JP6663246B2 (en) Image processing apparatus, imaging apparatus, control method thereof, and program

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

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

Country of ref document: EP

Kind code of ref document: A1