WO2019200720A1 - 基于图像处理的环境光补偿方法、装置及电子设备 - Google Patents

基于图像处理的环境光补偿方法、装置及电子设备 Download PDF

Info

Publication number
WO2019200720A1
WO2019200720A1 PCT/CN2018/094073 CN2018094073W WO2019200720A1 WO 2019200720 A1 WO2019200720 A1 WO 2019200720A1 CN 2018094073 W CN2018094073 W CN 2018094073W WO 2019200720 A1 WO2019200720 A1 WO 2019200720A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
dimensional face
illumination
face image
ambient light
Prior art date
Application number
PCT/CN2018/094073
Other languages
English (en)
French (fr)
Inventor
李建亿
Original Assignee
太平洋未来科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 太平洋未来科技(深圳)有限公司 filed Critical 太平洋未来科技(深圳)有限公司
Publication of WO2019200720A1 publication Critical patent/WO2019200720A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/506Illumination models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2215/00Indexing scheme for image rendering
    • G06T2215/12Shadow map, environment map

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to an image light-based ambient light compensation method, apparatus, and electronic device.
  • the inventors found that when the three-dimensional model is polished, if the two-dimensional face image corresponding to the three-dimensional model is acquired under backlight or backlight conditions, the stereoscopic image of the face image is obtained.
  • the processing is affected by ambient light, resulting in poor visual effects in the image.
  • the image processing-based ambient light compensation method, device and electronic device provided by the embodiments of the present invention are used to solve at least the above problems in the related art.
  • An embodiment of the present invention provides an ambient light compensation method based on image processing, including:
  • Obtaining a to-be-processed image converting the two-dimensional face image in the image to be processed into a three-dimensional face image; performing a lighting process on the three-dimensional face image to generate a three-dimensional face illumination image; and acquiring an environment corresponding to the three-dimensional face image Light compensation data; processing the three-dimensional face image according to the ambient light compensation data to obtain a three-dimensional face compensation image.
  • performing the lighting process on the three-dimensional face image to generate the three-dimensional face illumination image includes: acquiring a lighting rendering parameter, and lighting the three-dimensional face image according to the lighting rendering parameter and a pre-established lighting model Render, generate a 3D face lighting image.
  • the three-dimensional face image is matched with the two-dimensional face image in the to-be-processed image
  • the acquiring the ambient light compensation data corresponding to the three-dimensional face image includes: acquiring the first illumination of the to-be-processed image The intensity information and the second illumination intensity information of the two-dimensional face image; and the ambient light compensation data corresponding to the three-dimensional face image is determined according to the first illumination intensity information and the second illumination intensity information.
  • performing illumination rendering on the three-dimensional face image according to the illumination rendering parameter and the pre-established illumination model comprises: acquiring a correction coefficient, and correcting the illumination rendering parameter according to the correction coefficient; The subsequent illumination rendering parameters and the illumination model perform illumination rendering on the three-dimensional face image.
  • the method further includes: performing light and shadow processing on the face image according to the three-dimensional face illumination image and the three-dimensional face compensation image.
  • a picture to be processed is acquired by a camera of the electronic device
  • the camera includes a lens, an auto focus voice coil motor, an image sensor, and a micro memory alloy optical image stabilization device, the lens being fixed on the auto focus voice coil motor, the image sensor acquiring an optical scene of the lens Converting to image data, the autofocus voice coil motor is mounted on the micro memory alloy optical image stabilization device, and the processor of the electronic device drives the micro memory alloy optical image stabilization device according to the lens shake data detected by the gyroscope Action to achieve lens compensation for the lens;
  • the micro memory alloy optical image stabilization device includes a movable plate and a substrate, the auto focus voice coil motor is mounted on the movable plate, the substrate has a size larger than the movable plate, and the movable plate is mounted on the substrate
  • a plurality of movable supports are disposed between the movable plate and the substrate, and four sides of the substrate are provided on the periphery of the substrate, and a gap is formed in a middle portion of each of the side walls, and a micro-motion is installed in the notch a movable member of the micro switch capable of opening or closing the notch under the instruction of the processor, and the movable member is provided with a strip disposed along a width direction of the movable member near a side of the movable plate
  • the substrate is provided with a temperature control circuit connected to the electrical contact
  • the processor controls opening and closing of the temperature control circuit according to a lens shake direction detected by the gyroscope
  • the movable plate The middle of the four sides of the four
  • the elastic member is a spring.
  • the electronic device is a camera, and the camera is mounted on a bracket, the bracket includes a mounting seat, a support shaft, and three support frames hinged on the support shaft;
  • the mounting base includes a first mounting plate and a second mounting plate that are perpendicular to each other, and the first mounting plate and the second mounting plate are both for mounting the camera, and the support shaft is vertically mounted on the first mounting plate a bottom surface, the support shaft is disposed away from a bottom surface of the mounting seat with a radial dimension larger than a circumferential surface of the support shaft, and the three support frames are mounted on the support shaft from top to bottom, and each of the two The horizontal projection of the support frame after deployment is at an angle, the support shaft is a telescopic rod member, and includes a tube body connected to the mounting seat and a rod body partially retractable into the tube body, a portion of the rod that extends into the tubular body includes a first section, a second section, a third section, and a fourth section that are sequentially hinged, the first section being coupled to the tubular body, the first section being adjacent to the
  • the end of the second stage is provided with a mounting groove, a locking member is hinged in the mounting
  • a mounting slot is disposed at an end of the second segment adjacent to the third segment, and the mounting slot is hinged a locking member, the end of the third segment adjacent to the second segment is provided with a locking hole detachably engaged with the locking member, and the third portion is provided with a mounting groove near the end of the fourth segment.
  • a locking member is hinged in the mounting groove, and an end of the fourth segment adjacent to the third segment is provided with a locking hole detachably engaged with the locking member.
  • each of the support frames is further connected with a distance adjusting device
  • the distance adjusting device comprises a bearing ring mounted on the bottom of the support frame, a rotating ring connected to the bearing ring, a pipe body, a screw, a threaded sleeve and a support rod, wherein one end of the tubular body is provided with a plug, and the screw portion is installed in the tube body through the plugging, and the plugging is provided with an inner portion adapted to the screw Thread, another part of the screw is connected to the rotating ring, one end of the screw sleeve is installed in the tube body and is screwed with the screw, and the other end of the screw sleeve protrudes outside the tube body and
  • the support rod is fixedly connected, and the inner wall of the screw sleeve is provided with a protrusion, and the outer side wall of the screw sleeve is provided with a slide rail adapted to the protrusion along the length direction thereof, and the tube body includes adjacent
  • an image processing-based ambient light compensation apparatus including:
  • a light-emitting module configured to perform a light-processing process on the three-dimensional face image to generate a three-dimensional face illumination image
  • an acquisition module configured to acquire ambient light compensation data corresponding to the three-dimensional face image
  • the first processing module is configured to The ambient light compensation data processes the three-dimensional face image to obtain a three-dimensional face compensation image.
  • the lighting module is specifically configured to acquire a lighting rendering parameter, and perform illumination rendering on the three-dimensional face image according to the lighting rendering parameter and a pre-established lighting model to generate a three-dimensional face illumination image.
  • the three-dimensional face image is matched with the face image in the to-be-processed image
  • the acquiring module includes: an obtaining sub-module, configured to acquire first illumination intensity information of the to-be-processed image and the face a second light intensity information of the image; a determining submodule, configured to determine ambient light compensation data corresponding to the three-dimensional face image according to the first light intensity information and the second light intensity information.
  • the lighting module is specifically configured to: acquire a correction coefficient, and modify the illumination rendering parameter according to the correction coefficient; and the three-dimensional face according to the corrected illumination rendering parameter and the illumination model The image is rendered with light.
  • the device further includes: a second processing module, configured to perform light and shadow processing on the face image according to the three-dimensional face illumination image and the three-dimensional face compensation image.
  • a still further aspect of the embodiments of the present invention provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor;
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform any of the above-described embodiments of the present invention based on image processing Ambient light compensation method.
  • the image processing-based ambient light compensation method, device and electronic device provided by the embodiments of the present invention can accurately reduce the brightness of the portrait in the image, and avoid the stereoscopic processing of the face image by the ambient light.
  • the effect is to improve the visual effect of the portrait in the picture.
  • FIG. 1 is a flowchart of an image light-based ambient light compensation method according to an embodiment of the present invention
  • FIG. 2 is a specific flowchart of step S102 according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of an ambient light compensation method based on image processing according to an embodiment of the present invention
  • FIG. 4 is a structural diagram of an ambient light compensation device based on image processing according to an embodiment of the present invention.
  • FIG. 5 is a structural diagram of an ambient light compensation device based on image processing according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram showing the hardware structure of an electronic device for performing an image processing-based ambient light compensation method according to an embodiment of the method of the present invention
  • FIG. 7 is a structural diagram of a camera provided by an embodiment of the present invention.
  • FIG. 8 is a structural diagram of a micro memory alloy optical image stabilization device according to an embodiment of the present invention.
  • FIG. 9 is a structural diagram showing an operation state of a micro memory alloy optical image stabilization device according to an embodiment of the present invention.
  • Figure 10 is a structural view of a bracket according to an embodiment of the present invention.
  • Figure 11 is a structural view of a support shaft according to an embodiment of the present invention.
  • FIG. 12 is a structural diagram of a distance adjusting device according to an embodiment of the present invention.
  • the execution subject of the embodiment of the present invention is an electronic device, including but not limited to a mobile phone, a tablet computer, a notebook computer, a desktop computer with a camera, and a server.
  • FIG. 1 is a flowchart of an ambient light compensation method based on image processing according to an embodiment of the present invention.
  • an image processing-based ambient light compensation method provided by an embodiment of the present invention includes:
  • S101 Perform a lighting process on the three-dimensional face image to generate a three-dimensional face illumination image.
  • the illumination rendering parameter may be pre-configured, and then the three-dimensional face image is illuminated by the illumination model, and the natural light is applied to the three-dimensional face image, thereby simulating the appearance of the real light hitting the human face. Brightness and shadows make the facial features of the face three-dimensional and hierarchical, generating three-dimensional face illumination images.
  • the lighting rendering parameters include, but are not limited to, parameters such as illumination color, light source position, and light cooling.
  • the three-dimensional face image is polished using a Phong Lighting Model.
  • the light in three-dimensional space is mainly composed of three components: Ambient, Diffuse, and Specular. Since the specular light is generally related to metal reflection, the embodiment of the present invention mainly relates to the shooting of a human face, and therefore only uses the ambient (Ambient) and diffuse (Diffuse) illumination for calculation, and the specific calculation formula is as follows:
  • Diffuse color diffuse*light color
  • light color refers to the color of light
  • diffuse refers to the diffuse reflection coefficient of the material and the light source
  • ambient strength refers to the ambient light intensity
  • correction factors Gamma and Exposure may be introduced to prevent illumination over-exposed or ambient conditions caused by excessive illumination or excessive lighting conditions (light is too dark or underexposed).
  • the correction is performed, and the three-dimensional face image is illuminated by the modified illumination rendering parameter and the illumination model.
  • Gamma is used to correct the illumination anomaly
  • Exposure is used to correct the illumination overexplosion.
  • positive and negative light can also be introduced to obtain a three-dimensional face illumination image with a shadow effect.
  • the positive light refers to the normal illumination in the Feng's illumination model
  • the negative illumination color is the opposite of the positive illumination color to obtain the shadow effect.
  • the three-dimensional face image in the embodiment of the present invention is determined according to the face image in the image to be processed, and the specific determination method belongs to the technical common sense in the art, and is not described here again, that is, the three-dimensional face image. Matches the face image in the image to be processed.
  • the face image is subjected to light and shadow processing according to the difference between the three-dimensional face image and the texture value (RGB value) of the three-dimensional face illumination image, so that the photographed portrait is more three-dimensional and more hierarchical. sense.
  • the face image may be affected by backlight or backlight, and the problem of insufficient exposure and brightness is obviously dark, and the texture value of the corresponding three-dimensional face image is generated.
  • the texture values under normal exposure There is a difference between the texture values under normal exposure; at the same time, the three-dimensional face illumination image obtained in step S101 is corrected by the correction coefficient, so the texture value corresponding to each part is the texture value under normal exposure. .
  • the face image is subjected to light and shadow processing, and there is an inappropriate lighting or shadow processing, and Present a more three-dimensional portrait of the five senses.
  • Steps S102 and S103 correct the deviation by performing ambient light compensation on the three-dimensional face image.
  • this step can be performed by the following sub-steps:
  • the light intensity information includes, but is not limited to, a light brightness level, a light brightness level, and the like.
  • the brightness of the picture may be detected by the overall image of the picture to be processed, and the first light intensity information is determined according to the overall brightness; and the grayscale value of the pixel data in the face image in the image to be processed is analyzed. To determine the second light intensity information.
  • the average value method may be used to obtain an average value of the luminance values of all the pixels of the entire image to be processed, or to obtain an average value of the grayscale values of all the pixel data in the face image.
  • the value is used as the illumination brightness level, and then the illumination brightness level is determined according to the illumination brightness level.
  • the illumination intensity information when it is the illumination brightness level, it may be divided into multiple intervals according to the illumination brightness, each interval corresponding to different levels, and depending on the actual detected brightness of the picture light. An interval to obtain the first illumination brightness level.
  • the grayscale value range that may be presented by the pixel data in the face image may be divided into multiple intervals, each interval corresponding to different levels, and the gray scale of the pixel data in the face image according to the analysis may be obtained. The interval in which the value size falls to obtain the second illumination brightness level.
  • the first illumination intensity information of the to-be-processed picture and the second illumination intensity information of the face image can be comprehensively determined to determine the final ambient light.
  • Compensation data Specifically, the ambient light compensation data corresponding to the three-dimensional face image may be calculated by calculating an average value of the two or according to a preset fixed weight or the like.
  • the three-dimensional face image is subjected to exposure compensation processing according to the ambient light compensation data obtained in step S102, and the face brightness in the image is compensated and corrected.
  • the method further includes:
  • the place where the light is brightened will be brightened, and the place where the light cannot be touched will form a shadow, and the pixel point of the same coordinate position on the human face is illuminated in the three-dimensional face.
  • the texture difference is strengthened or weakened at the corresponding position of the pixel of the face image, so that the face image is generated and the 3D face illumination image is generated.
  • the face image may be processed according to a difference in texture values (RGB values) in the first three-dimensional image and the second three-dimensional image.
  • the image processing-based ambient light compensation method provided by the embodiment of the invention achieves accurate restoration of the portrait brightness in the image, avoids the influence of the ambient light on the stereoscopic processing of the face image, and improves the visual effect of the portrait in the image.
  • FIG. 3 is a flowchart of an ambient light compensation method based on image processing according to an embodiment of the present invention. As shown in FIG. 3 , this embodiment is a specific implementation of the embodiment shown in FIG. 1 and FIG. 2 , and therefore, the specific implementation method and beneficial effects of the steps in the embodiment shown in FIG. 1 and FIG. 2 are not further described.
  • the image processing-based ambient light compensation method provided by the embodiment specifically includes:
  • S301 Perform a lighting process on the three-dimensional face image to generate a three-dimensional face illumination image.
  • the three-dimensional face image in the embodiment of the present invention is determined according to the two-dimensional face image in the image to be processed, that is, the three-dimensional face image matches the face image in the image to be processed.
  • S305 Perform light and shadow processing on the face image in the image to be processed according to the three-dimensional face illumination image and the three-dimensional face compensation image.
  • the image processing-based ambient light compensation method provided by the embodiment of the invention achieves accurate restoration of the portrait brightness in the image, avoids the influence of the ambient light on the stereoscopic processing of the face image, and improves the visual effect of the portrait in the image.
  • FIG. 4 is a structural diagram of an ambient light compensation device based on image processing according to an embodiment of the present invention. As shown in FIG. 4, the device specifically includes: a light-emitting module 100, an acquisition module 200, and a first processing module 300. among them,
  • the light-receiving module 100 is configured to perform a lighting process on the three-dimensional face image to generate a three-dimensional face illumination image;
  • the acquiring module 200 is configured to acquire ambient light compensation data corresponding to the three-dimensional face image;
  • the first processing module 300 is configured to process the three-dimensional face image according to the ambient light compensation data to obtain a three-dimensional face compensation image.
  • the lighting module 100 is configured to acquire a lighting rendering parameter, and perform illumination rendering on the three-dimensional face image according to the lighting rendering parameter and a pre-established lighting model to generate a three-dimensional face illumination image.
  • the lighting module 100 is specifically configured to: acquire a correction coefficient, and modify the illumination rendering parameter according to the correction coefficient; and the third dimension according to the modified illumination rendering parameter and the illumination model The face image is rendered by light.
  • the image processing-based ambient light compensation device provided by the embodiment of the present invention is specifically configured to perform the method provided by the embodiment shown in FIG. 1 and FIG. 2, and the implementation principle, method, and functional use thereof are shown in FIG. 1 and FIG. The embodiments are similar and will not be described again here.
  • FIG. 5 is a structural diagram of an ambient light compensation device based on image processing according to an embodiment of the present invention. As shown in FIG. 5, the device specifically includes: a light-emitting module 100, an acquisition module 200, a first processing module 300, and a second processing module 400. among them,
  • the light-receiving module 100 is configured to perform a lighting process on the three-dimensional face image to generate a three-dimensional face illumination image;
  • the acquiring module 200 is configured to acquire ambient light compensation data corresponding to the three-dimensional face image;
  • a first processing module 300 configured to process the three-dimensional face image according to the ambient light compensation data to obtain a three-dimensional face compensation image;
  • the second processing module is configured to use the three-dimensional face illumination image and
  • the three-dimensional face compensation image performs light and shadow processing on the face image in the image to be recognized.
  • the lighting module 100 is configured to acquire a lighting rendering parameter, and perform illumination rendering on the three-dimensional face image according to the lighting rendering parameter and a pre-established lighting model to generate a three-dimensional face illumination image.
  • the lighting module 100 is specifically configured to: acquire a correction coefficient, and modify the illumination rendering parameter according to the correction coefficient; and the third dimension according to the modified illumination rendering parameter and the illumination model The face image is rendered by light.
  • the three-dimensional face image is matched with the face image in the to-be-processed image
  • the obtaining module 200 includes: an obtaining sub-module 210 and a determining sub-module 220. among them,
  • the obtaining sub-module 210 is configured to acquire first illumination intensity information of the to-be-processed image and second illumination intensity information of the facial image, and the determining sub-module 220 is configured to use, according to the first illumination intensity The information and the second illumination intensity information determine ambient light compensation data corresponding to the three-dimensional face image.
  • the image processing-based ambient light compensation device provided by the embodiment of the present invention is specifically configured to perform the method provided by the embodiment shown in FIG. 3, and the implementation principle, method, and functional use thereof are similar to the embodiment shown in FIG. Let me repeat.
  • the image processing-based ambient light compensation device of the embodiments of the present invention may be independently installed in the electronic device as one of the software or hardware functional units, or may be implemented as one of the functional modules integrated in the processor.
  • An image processing based ambient light compensation method of an embodiment may be independently installed in the electronic device as one of the software or hardware functional units, or may be implemented as one of the functional modules integrated in the processor.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device for performing an image processing-based ambient light compensation method according to an embodiment of the method of the present invention.
  • the electronic device includes:
  • processors 610 and memory 620 one processor 610 is taken as an example in FIG.
  • the apparatus for performing the image processing-based ambient light compensation method may further include: an input device 630 and an output device 630.
  • the processor 610, the memory 620, the input device 630, and the output device 640 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 620 is a non-volatile computer readable storage medium for storing a non-volatile software program, a non-volatile computer executable program, and a module, such as the image processing-based environment in the embodiment of the present invention.
  • the processor 610 performs various functional applications of the server and data processing by executing non-volatile software programs, instructions, and modules stored in the memory 620, that is, implementing the image processing-based ambient light compensation method.
  • the memory 620 can include a storage program area and a storage data area, wherein the storage program area can store an operating system, an application required for at least one function; and the storage data area can store image processing-based ambient light compensation according to an embodiment of the present invention. Data created by the use of the device, etc.
  • memory 620 can include high speed random access memory 620, and can also include non-volatile memory 620, such as at least one disk storage device 620, flash memory device, or other non-volatile solid state memory 620 device.
  • memory 620 can optionally include a memory 620 remotely located relative to processor 66, which can be connected to the image processing based ambient light compensation device over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 630 can receive input digital or character information and generate key signal inputs related to user settings and function control of the image processing based ambient light compensation device.
  • Input device 630 can include a device such as a press module.
  • the one or more modules are stored in the memory 620, and when executed by the one or more processors 610, the image processing based ambient light compensation method is performed.
  • the electronic device of the embodiment of the invention exists in various forms, including but not limited to:
  • Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
  • Portable entertainment devices These devices can display and play multimedia content. Such devices include: digital cameras, audio, video players (such as iPods), handheld game consoles, e-books, and smart toys and portable car navigation devices.
  • digital cameras audio, video players (such as iPods), handheld game consoles, e-books, and smart toys and portable car navigation devices.
  • the server consists of a processor 610, a hard disk, a memory, a system bus, etc.
  • the server is similar to a general-purpose computer architecture, but is capable of processing and is stable due to the need to provide highly reliable services. Sex, reliability, security, scalability, manageability, etc. are highly demanding.
  • the device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, ie may be located A place, or it can be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
  • Embodiments of the present invention provide a non-transitory computer readable storage medium storing computer executable instructions, wherein when the computer executable instructions are executed by an electronic device, the electronic device is caused
  • the image processing-based ambient light compensation method in any of the above method embodiments is performed.
  • An embodiment of the present invention provides a computer program product, wherein the computer program product comprises a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, wherein when the program instruction When executed by the electronic device, the electronic device is caused to perform the image processing-based ambient light compensation method in any of the above method embodiments.
  • a camera with an electronic device with better anti-shake performance is provided, and the picture obtained by the camera is clearer and more capable than the ordinary camera. Meet the needs of users.
  • the picture acquired by the camera in this embodiment is used in the ambient light compensation method in the above embodiment, the effect is better.
  • the existing electronic device camera (the electronic device may be a mobile phone or a video camera, etc.) including the lens 1, the auto focus voice coil motor 2, and the image sensor 3 are well known in the art, and thus are not described here.
  • Micro memory alloy optical anti-shake device is usually used because the existing anti-shake device mostly uses the energized coil to generate Loren magnetic force to drive the lens in the magnetic field, and to achieve optical image stabilization, the lens needs to be driven in at least two directions. It means that multiple coils need to be arranged, which will bring certain challenges to the miniaturization of the overall structure, and is easily interfered by external magnetic fields, thus affecting the anti-shake effect.
  • Some prior art techniques achieve the stretching and shortening of the memory alloy wire through temperature changes.
  • the autofocus voice coil motor is moved to realize the lens shake compensation, and the control chip of the micro memory alloy optical anti-shake actuator can control the change of the drive signal to change the temperature of the memory alloy wire, thereby controlling the extension of the memory alloy wire.
  • the length and length are shortened, and the position and moving distance of the actuator are calculated based on the resistance of the memory alloy wire.
  • the Applicant has found that due to the randomness and uncertainty of jitter, the structure of the above technical solution alone cannot accurately compensate the lens in the case of multiple jitters due to the temperature rise of the shape memory alloy. It takes a certain time to cool down.
  • the above technical solution can compensate the lens for the first direction jitter, but when the second direction of the jitter occurs, the memory alloy wire is too late. It is deformed in an instant, so it is easy to cause the compensation to be untimely. It is impossible to accurately achieve lens shake compensation for multiple jitters and continuous jitter in different directions. This results in poor quality of the acquired image, so the camera or camera structure needs to be improved.
  • the camera of the embodiment includes a lens 1, an auto focus voice coil motor 2, an image sensor 3, and a micro memory alloy optical image stabilization device 4, and the lens 1 is fixed to the auto focus voice coil.
  • the image sensor 3 transmits an image acquired by the lens 1 to the identification module 100, and the autofocus voice coil motor 2 is mounted on the micro memory alloy optical image stabilization device 4, the electron
  • the internal processor of the device drives the action of the micro-memory alloy optical anti-shake device 4 according to the lens shake detected by the gyroscope (not shown) inside the electronic device to realize the lens shake compensation;
  • the improvement of the micro memory alloy optical anti-shake device is as follows:
  • the micro memory alloy optical image stabilization device comprises a movable plate 5 and a substrate 6, wherein the movable plate 5 and the substrate 6 are rectangular plate-shaped members, and the autofocus voice coil motor 2 is mounted on the movable plate 5, the substrate
  • the size of 6 is larger than the size of the movable panel 5, the movable panel 5 is mounted on the substrate 6, and a plurality of movable supports 7 are disposed between the movable panel 5 and the substrate 6, and the movable support 7 Specifically, the balls are disposed in the grooves at the four corners of the substrate 6 to facilitate the movement of the movable plate 5 on the substrate 6.
  • the substrate 6 has four side walls around, and the central portion of each of the side walls A notch 8 is disposed, and the notch 8 is mounted with a micro switch 9 , and the movable member 10 of the micro switch 9 can open or close the notch under the instruction of the processing module, and the movable member 10 is close to the
  • the side surface of the movable panel 5 is provided with strip-shaped electrical contacts 11 arranged along the width direction of the movable member 10, and the substrate 6 is provided with a temperature control circuit connected to the electrical contact 11 (not shown)
  • the processing module can control the opening of the temperature control circuit according to the lens shake direction detected by the gyroscope
  • a shape memory alloy wire 12 is disposed in a middle portion of the four sides of the movable plate 5, and one end of the shape memory alloy wire 12 is fixedly connected to the movable plate 5, and the other end is slidably engaged with the electrical contact 11
  • An elastic member 13 for resetting is disposed between the inner side wall of the periphery of the
  • the working process of the micro memory alloy optical image stabilization device of the present embodiment will be described in detail below with reference to the above structure: taking the lens in the opposite direction of the lens as an example, when the lens is shaken in the first direction, the gyroscope will detect The lens shake direction and distance are fed back to the processor, and the processor calculates the amount of elongation of the shape memory alloy wire that needs to be controlled to compensate the jitter, and drives the corresponding temperature control circuit to heat the shape memory alloy wire.
  • the memory alloy wire is elongated and drives the movable plate to move in a direction that can compensate for the first direction of shaking, while the other shape memory alloy wire symmetrical with the shape memory alloy wire does not change, but with the other shape memory alloy wire
  • the connected movable piece opens the corresponding notch, so that the other shape memory alloy wire protrudes out of the notch by the movable plate, and at this time, the elastic members near the two shape memory alloy wires are respectively stretched and Compression (as shown in Figure 9), feedback the shape memory alloy wire after moving to the specified position on the micro memory alloy optical anti-shake actuator
  • the resistance of the micro-memory alloy optical anti-shake actuator can be corrected by comparing the deviation of the resistance value from the target value; and when the second dither occurs, the processor first passes through another shape and the alloy wire
  • the abutting movable member closes the notch, and opens the movable member that abuts against the shape memory alloy wire in the extended state, and the rotation of the movable member with
  • the opening of the movable member abutting against the shape memory alloy wire in an extended state can facilitate the extension of the shape memory alloy wire in the extended state, and the elastic deformation of the two elastic members can ensure rapid reset of the movable plate.
  • the processor again calculates the amount of elongation of the shape memory alloy wire that needs to be controlled to compensate for the second jitter, and drives the corresponding temperature control circuit to heat up the other shape memory alloy wire, and the other shape memory alloy wire is elongated and Driving the movable plate to compensate for the direction of the second direction of shaking, due to the lack of the shape of the alloy wire Open, so it does not affect the other shape and the movement of the alloy ribbon moving plate, and due to the opening speed of the movable member and the resetting action of the spring, the micro memory alloy optical image stabilization device of the embodiment is used when multiple shaking occurs. Accurate compensation can be made, which is far superior to the micro-memory alloy optical anti-shake device in the prior art.
  • the above is only a simple two-jitter.
  • the two adjacent shape memory alloy wires can be elongated to compensate for the jitter.
  • the basic working process is as described above. The description principle is the same, but it is not described here.
  • the detection feedback of the shape memory alloy resistance and the detection feedback of the gyroscope are all prior art, and will not be described here.
  • the electronic device is a camera
  • the camera can be mounted on the bracket of the camera.
  • the bracket of the existing camera has the following defects during use: 1.
  • the existing camera bracket All are supported by a tripod, but the tripod structure can not guarantee the level of the bracket mount when the ground unevenness is installed at a large uneven position, which is easy to be shaken or tilted, which may easily adversely affect the shooting; 2.
  • Existing bracket Cannot be used as a shoulder camera bracket, with a single structure and function, and must be equipped with a shoulder camera bracket separately when shoulder impact shooting is required.
  • the bracket of the embodiment includes a mounting seat 14, a support shaft 15, and three support frames 16 hinged on the support shaft;
  • the mounting bracket 14 includes a first mounting plate 141 and a second mounting plate 142 that are perpendicular to each other, and the first mounting plate 141 and the second mounting plate 142 are both used to mount the camera, and the support shaft 15 is vertically mounted at the same.
  • a bottom surface of the first mounting plate 141, the support shaft 15 is disposed away from the bottom end of the mounting seat 14 with a radial surface slightly larger than the circumferential surface 17 of the support shaft, and the three support frames 16 are from top to bottom.
  • each of the two support frames 16 is inclined at an angle.
  • the circumferential surface 17 is first assumed to be flat on the uneven surface.
  • the erection of the bracket is leveled by opening and adjusting the position of the three retractable support frames, so even the uneven ground can quickly erect the support, adapt to various terrains, and ensure that the mount is horizontal. status.
  • the support shaft 15 of the present embodiment is also a telescopic rod member including a tube body 151 connected to the mounting seat 14 and a rod body 152 partially retractable into the tube body 151, the rod body
  • the portion of the 152 that extends into the tubular body includes a first segment 1521, a second segment 1522, a third segment 1523, and a fourth segment 1524 that are sequentially hinged, the first segment 1521 being coupled to the tubular body 151,
  • a mounting slot 18 is defined in the end of the first segment 1521 adjacent to the second segment 1522.
  • a locking member 19 is hinged in the mounting slot 18, and the second segment 1522 is adjacent to the end of the first segment 1521.
  • the locking hole 20 is detachably engaged with the locking member 19.
  • the second portion 1522 is provided with a mounting groove 18 near the end of the third segment 1523.
  • the mounting groove 18 is hingedly locked.
  • the third section 1523 is provided with a locking hole 20 detachably engaged with the locking member 19 near the end of the second segment 1522, and the third segment 1523 is adjacent to the end of the fourth segment 1524.
  • a mounting slot 18 is defined in the mounting slot 18, and a locking member 19 is hinged therein.
  • the end of the fourth segment 1524 adjacent to the third segment 1523 is detachably coupled with the locking member 19.
  • the locking hole 20 can be hidden in the mounting groove. When the locking member is needed, the locking member can be locked on the locking hole by rotating the locking member.
  • the locking member 19 may be a strip having a protrusion which is adapted to the size of the locking hole to press the protrusion into the two adjacent sections in the locking hole (
  • the first segment and the second segment are fixed in position to prevent relative rotation, and the portion can be formed by the cooperation of the first segment 1521, the second segment 1522, the third segment 1523 and the fourth segment 1524.
  • the structure is fixed, and the relative positions of the segments are fixed by the locking member 19.
  • the soft material can also be provided at the bottom of the structure.
  • the Applicant has also found that the telescopic support frame stretches most of the telescopic portion by human force to realize the adjustment of the telescopic length, but the distance is uncontrollable and the randomness is large, so that the problem of adjustment inconvenience often occurs, especially in need of When the telescopic length is partially adjusted, it is often not easy to implement. Therefore, the applicant also optimizes the structure of the support frame 16. As shown in FIG. 12, the bottom end of each of the support frames 16 of the embodiment is also connected with a pitch adjustment.
  • the device 21 includes a bearing ring 211 mounted on the bottom of the support frame 16, a rotating ring 212 connected to the bearing ring 211, a tube body 213, a screw 214, a threaded sleeve 215 and a support rod 216.
  • One end of the tubular body 213 is provided with a plugging 217, and the screw 215 is partially installed in the tubular body 213 through the plugging 217, and the plugging 217 is provided with the screw 214.
  • the other end of the screw 214 is connected to the rotating ring 212.
  • One end of the threaded sleeve 215 is mounted in the tube body 213 and is screwed to the screw 214.
  • the other end of the threaded sleeve 215 extends.
  • the inner wall of the screw sleeve 215 is provided with a protrusion 218.
  • the outer side wall of the thread sleeve 215 is provided along the length thereof with a slide 219 adapted to the protrusion.
  • 213 includes an adjacent first portion 2131 having an inner diameter smaller than an inner diameter of the second portion 2132, and a second portion 2132 disposed on an outer end of the second portion 2132.
  • the end of the screw sleeve 215 near the screw 214 is provided with a limiting end 2151 having an outer diameter larger than the inner diameter of the first portion.
  • the screw 214 By rotating the rotating ring 212, the screw 214 is rotated in the tube body 213, and the rotation trend is transmitted.
  • the screw sleeve 215 is not rotated due to the cooperation of the protrusion 218 and the slide 219, so that the rotational force is turned into an outward linear movement, thereby driving the support rod 216 to move, and the bottom end of the support frame is realized.
  • the length is finely adjusted, which is convenient for the user to flatten the bracket and its mounting seat, and provide a good foundation for the subsequent shooting work.
  • a machine-readable medium includes read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , an infrared signal, a digital signal, etc., etc., the computer software product comprising instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the various embodiments or portions of the embodiments described Methods.
  • ROM read only memory
  • RAM random access memory
  • magnetic disk storage media e.g., magnetic disks, magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , an infrared signal, a digital signal, etc., etc.
  • the computer software product comprising instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the various embodiments or portions of the embodiment

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Studio Devices (AREA)

Abstract

本发明实施例提供一种基于图像处理的环境光补偿方法、装置及电子设备,该方法包括:对三维人脸图像进行打光处理,生成三维人脸光照图像;获取所述三维人脸图像对应的环境光补偿数据;依据所述环境光补偿数据对所述三维人脸图像进行处理,得到三维人脸补偿图像。通过上述方法、装置及电子设备,实现了对图像中的人像亮度的准确还原,避免了环境光对人脸图像立体化处理的影响,提高了图片中人像的视觉效果。

Description

基于图像处理的环境光补偿方法、装置及电子设备 技术领域
本发明涉及图像处理技术领域,尤其涉及一种基于图像处理的环境光补偿方法、装置及电子设备。
背景技术
随着科技的发展,移动终端在人们生活中所起的作用也越来越广泛。例如,人们可以利用移动终端的摄像头和美图软件来进行照片的拍摄。发明人在对移动终端拍出来的人脸照片进行立体化处理时,一般是通过对照片中二维人脸图像的三维模型进行打光处理,来实现对照片中人像五官的立体化处理。
然而,发明人在实现本发明的过程中发现,在对三维模型进行打光处理时,如果该三维模型对应的二维人脸图像是在背光或逆光条件下采集的,人脸图像的立体化处理会受到环境光的影响,导致图片中人像视觉效果较差。
发明内容
本发明实施例提供的基于图像处理的环境光补偿方法、装置及电子设备,用以至少解决相关技术中的上述问题。
本发明实施例一方面提供了一种基于图像处理的环境光补偿方法,包括:
获取待处理图片,将待处理图片中的二维人脸图像转换为三维人脸图像;对三维人脸图像进行打光处理,生成三维人脸光照图像;获取所述三维人脸图像对应的环境光补偿数据;依据所述环境光补偿数据对所述三维人脸图像进行处理,得到三维人脸补偿图像。
进一步地,所述对三维人脸图像进行打光处理,生成三维人脸光照图像,包括:获取光照渲染参数,根据所述光照渲染参数和预先建立的光照模型对所述三维人脸图像进行光照渲染,生成三维人脸光照图像。
进一步地,所述三维人脸图像与待处理图片中的二维人脸图像相匹配,所述获取所述三维人脸图像对应的环境光补偿数据包括:获取所述待 处理图片的第一光照强度信息和所述二维人脸图像的第二光照强度信息;根据所述第一光照强度信息和所述第二光照强度信息,确定所述三维人脸图像对应的环境光补偿数据。
进一步地,所述根据所述光照渲染参数和预先建立的光照模型对所述三维人脸图像进行光照渲染,包括:获取修正系数,根据所述修正系数对所述光照渲染参数进行修正;根据修正后的所述光照渲染参数和所述光照模型对所述三维人脸图像进行光照渲染。
进一步地,所述方法还包括:根据所述三维人脸光照图像和所述三维人脸补偿图像,对所述人脸图像进行光影处理。
进一步的,
所述基于图像处理的环境光补偿方法中通过电子装置的摄像头获取待处理图片,
所述摄像头包括镜头、自动聚焦音圈马达、图像传感器以及微型记忆合金光学防抖器,所述镜头固装在所述自动聚焦音圈马达上,所述图像传感器将所述镜头获取的光学场景转换为图像数据,所述自动聚焦音圈马达安装在所述微型记忆合金光学防抖器上,电子装置的处理器根据陀螺仪检测到的镜头抖动数据驱动所述微型记忆合金光学防抖器的动作,实现镜头的抖动补偿;
所述微型记忆合金光学防抖器包括活动板和基板,所述自动聚焦音圈马达安装在所述活动板上,所述基板的尺寸大于所述活动板,所述活动板安装在所述基板上,所述活动板和所述基板之间设有多个活动支撑,所述基板的四周具有四个侧壁,每个所述侧壁的中部设有一缺口,所述缺口处安装有微动开关,所述微动开关的活动件可以在所述处理器的指令下打开或封闭所述缺口,所述活动件靠近所述活动板的侧面设有沿所述活动件宽度方向布设的条形的电触点,所述基板设有与所述电触点相连接的温控电路,所述处理器根据陀螺仪检测到的镜头抖动方向控制所述温控电路的开闭,所述活动板的四个侧边的中部均设有形状记忆合金丝,所述形状记忆合金丝一端与所述活动板固定连接,另一端与所述电触点滑动配合,所述基板的四周的内侧壁与所述活动板之间均设有弹性件,当所述基板上的一个温控电路连通时,与该电路相连接的形状记忆合金丝伸长,同时,远离该形状记忆合金丝的微动开关的活动件打开所述缺口,与该形状记忆合金丝同侧的弹性件收缩,远离该形状记忆合金丝的弹性件伸长。
进一步的,所述弹性件为弹簧。
进一步的,所述电子装置为摄像机,所述摄像机安装于支架上,所述支架包括安装座、支撑轴、三个铰装在所述支撑轴上的支撑架;
所述安装座包括相互垂直的第一安装板和第二安装板,所述第一安装板和第二安装板均可用于安装所述摄像机,所述支撑轴垂直安装在所述第一安装板的底面,所述支撑轴远离所述安装座的底端设有径向尺寸大于所述支撑轴的圆周面,三个所述支撑架由上至下安装在所述支撑轴上,且每两个所述支撑架展开后的水平投影呈一夹角,所述支撑轴为伸缩杆件,其包括与所述安装座相连接的管体和部分可收缩至所述管体内的杆体,所述杆体伸入所述管体的部分包括依次铰接的第一段、第二段、第三段和第四段,所述第一段与所述管体相连接,所述第一段靠近所述第二段的端部设有安装槽,所述安装槽内铰接有锁止件,所述第二段靠近所述第一段的端部设有与锁止件可拆卸配合的锁止孔,所述第二段靠近所述第三段的端部设有安装槽,所述安装槽内铰接有锁止件,所述第三段靠近所述第二段的端部设有与锁止件可拆卸配合的锁止孔,所述第三段靠近所述第四段的端部设有安装槽,所述安装槽内铰接有锁止件,所述第四段靠近所述第三段的端部设有与锁止件可拆卸配合的锁止孔。
进一步的,每个所述支撑架的底端还连接有调距装置,所述调距装置包括安装在所述支撑架底部的轴承圈、与所述轴承圈相连接的转动环、管体、螺杆、螺套及支撑杆,所述管体的一端设有封堵,所述螺杆部分通过所述封堵安装在所述管体内,所述封堵设有与所述螺杆相适配的内螺纹,所述螺杆另一部分与所述转动环相连接,所述螺套一端安装在所述管体内并与所述螺杆螺纹连接,所述螺套的另一端伸出所述管体外并与所述支撑杆固定连接,所述螺套的内壁设有一凸起,所述螺套的外侧壁沿其长度方向设有与所述凸起相适配的滑道,所述管体包括相邻的第一部分和第二部分,所述第一部分的内径小于所述第二部分的内径,所述封堵设置在所述第二部分的外端上,所述螺套靠近所述螺杆的端部设有外径大于所述第一部分内径的限位端。
本发明实施例的另一方面提供了一种基于图像处理的环境光补偿装置,包括:
打光模块,用于对三维人脸图像进行打光处理,生成三维人脸光照图像;获取模块,用于获取所述三维人脸图像对应的环境光补偿数据;第一处理模块,用于依据所述环境光补偿数据对所述三维人脸图像进行处理,得到三维人脸补偿图像。
进一步地,所述打光模块具体用于,获取光照渲染参数,根据所述光照渲染参数和预先建立的光照模型对所述三维人脸图像进行光照渲染,生成三维人脸光照图像。
进一步地,所述三维人脸图像与待处理图片中的人脸图像相匹配,所 述获取模块包括:获取子模块,用于获取所述待处理图片的第一光照强度信息和所述人脸图像的第二光照强度信息;确定子模块,用于根据所述第一光照强度信息和所述第二光照强度信息,确定所述三维人脸图像对应的环境光补偿数据。
进一步地,所述打光模块具体用于,获取修正系数,根据所述修正系数对所述光照渲染参数进行修正;根据修正后的所述光照渲染参数和所述光照模型对所述三维人脸图像进行光照渲染。
进一步地,所述装置还包括:第二处理模块,用于根据所述三维人脸光照图像和所述三维人脸补偿图像,对所述人脸图像进行光影处理。
本发明实施例的又一方面提供一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明实施例上述任一项基于图像处理的环境光补偿方法。
由以上技术方案可见,本发明实施例提供的基于图像处理的环境光补偿方法、装置及电子设备,实现了对图像中的人像亮度的准确还原,避免了环境光对人脸图像立体化处理的影响,提高了图片中人像的视觉效果。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。
图1为本发明一个实施例提供的基于图像处理的环境光补偿方法流程图;
图2为本发明一个实施例提供的步骤S102的具体流程图;
图3为本发明一个实施例提供的基于图像处理的环境光补偿方法流程图;
图4为本发明一个实施例提供的基于图像处理的环境光补偿装置结构图;
图5为本发明一个实施例提供的基于图像处理的环境光补偿装置结构图;
图6为执行本发明方法实施例提供的基于图像处理的环境光补偿方法的电子设备的硬件结构示意图;
图7为本发明一个实施例提供的摄像头的结构图;
图8为本发明一个实施例提供的微型记忆合金光学防抖器的结构图;
图9为本发明一个实施例提供的微型记忆合金光学防抖器的一种工作状态结构图;
图10为本发明一个实施例提供的支架结构图;
图11为本发明一个实施例提供的支撑轴结构图;
图12为本发明一个实施例提供的调距装置结构图。
具体实施方式
为了使本领域的人员更好地理解本发明实施例中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明实施例一部分实施例,而不是全部的实施例。基于本发明实施例中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本发明实施例保护的范围。
本发明实施例的执行主体为电子设备,所述电子设备包括但不限于手机、平板电脑、笔记本电脑、带摄像头的台式电脑、服务器。下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互结合。
图1为本发明实施例提供的基于图像处理的环境光补偿方法流程图。如图1所示,本发明实施例提供的基于图像处理的环境光补偿方法,包括:
S101,对三维人脸图像进行打光处理,生成三维人脸光照图像。
本实施例中,可以预先配置光照渲染参数,再结合光照模型对所述三维人脸图像进行光照渲染,在所述三维人脸图像上打上自然光线,从而模拟出现实光线打在人脸上的光亮和阴影,使人脸的五官立体化和层次化,生成三维人脸光照图像。具体地,光照渲染参数包括但不限于光照色彩、光源位置、光线冷暖等参数。
在本实施例中,采用冯氏光照模型(Phong Lighting Model)对所述三维人脸图像进行打光处理。按照冯氏光照模型,三维空间中光线主要由三个分量构成:环境(Ambient)、漫反射(Diffuse)、镜面(Specular)光照。由于镜面光一般与金属反射有关,本发明实施例主要涉及的是人脸的拍摄,因此只使用环境(Ambient)和漫反射(Diffuse)光照进行计算,具体计算公式如下:
ambient color=ambient strength*light color
diffuse color=diffuse*light color
result color=diffuse color+ambient color
其中,light color指的是光照色彩,diffuse指的是材质和光源的漫反射系数,ambient strength指的是环境光强。
在本发明的一些可选实施例中,为了防止光照色彩过亮而导致的过度曝光或环境条件造成的光照异常(光线过暗或曝光不足)的情况,可以引入修正系数Gamma和Exposure对光照色彩进行修正,并利用修正后的所述光照渲染参数和上述光照模型对三维人脸图像进行光照渲染。其中,Gamma用来纠正光照异常现象,Exposure用来纠正光照过爆现象。
进一步地,还可以引入正负光来得到具有阴影效果的三维人脸光照图像。其中,正光指的是冯氏光照模型中的正常光照,负光的光照色彩为正光光照色彩的相反数,以此来获取阴影效果。具体计算公式如下:
result light color=pow(light color,vec3(1.0/gamma))
result light color=vec3(1.0)-exp(-light color*exposure)
本发明实施例中的三维人脸图像是根据待处理图片中的人脸图像来确定的,具体的确定方法属于本领域的技术常识,此处不再赘述,也就是说,该三维人脸图像与待处理图片中的人脸图像相匹配。将根据所述三维人脸图像和所述三维人脸光照图像的纹理值(RGB值)的差值,对所述人脸图像进行光影处理,从而使拍照出来的人像五官更立体、更有层次感。
因此,如果待处理图片是在背光或逆光条件下进行拍摄的,该人脸图像会受到背光或逆光的影响,发生曝光不足、亮度明显偏暗的问题,其对应的三维人脸图像的纹理值会和正常曝光下的纹理值存在差异;与此同时,经过步骤S101得到的三维人脸光照图像,由于利用修正系数进行了修正,所以其每个部位对应的纹理值是正常曝光下的纹理值。在此种情况下,根据该三维人脸光照图像和存在偏差的三维人脸图像的纹理值的差值,对所述人脸图像进行光影处理,会存在打光或阴影处理不合适,并且不能呈现更立体的人像五官。
步骤S102和步骤S103通过对三维人脸图像进行环境光补偿,来修正上述偏差。
S102,获取所述三维人脸图像对应的环境光补偿数据。
具体地,如图2所示,本步骤可以通过如下子步骤进行:
S1021,获取所述待处理图片的第一光照强度信息和所述人脸图像的第二光照强度信息。
具体地,所述光照强度信息包括但不限于光照亮度等级、光照亮度大小等。本步骤中,可以通过待处理图片的整体图像来检测图片光亮度,并依据该整体光亮度确定第一光照强度信息;通过分析待处理图片中所述人脸图像中像素数据的灰阶值大小,来确定第二光照强度信息。
在确定光照强度信息的过程中,可以采用平均值法,通过对待处理图片整体图像的所有像素点的亮度值求取平均值,或,对人脸图像中所有像素数据的灰阶值求取平均值,将该平均值作为光照亮度大小,进而根据该光照亮度大小确定光照亮度等级。
需要注意的是,当光照强度信息为光照亮度等级时,预先可以根据光照亮度大小划分为多个区间,每个区间与不同等级相对应,并依据实际上所检测到的图片光亮度落在哪一个区间、来获得第一光照亮度等级。相对地,也可以根据人脸图像中像素数据所可能呈现的灰阶值范围来划分为多个区间,每个区间与不同等级相对应,并依据分析得到的人脸图像中像素数据的灰阶值大小落在哪一个区间,来获得第二光照亮度等级。
S1022,根据所述第一光照强度信息和所述第二光照强度信息,确定所述三维人脸图像对应的环境光补偿数据。
具体地,由于第一光照强度信息考虑到了环境光照对人脸图像的影响,因此可以综合考虑待处理图片全局的第一光照强度信息和人脸图像的第二光照强度信息,确定最终的环境光补偿数据。具体可采用计算两者的平均值或者根据预先设定的固定权重等方法计算得到所述三维人脸图像对应的环境光补偿数据。
S103,依据所述环境光补偿数据对所述三维人脸图像进行处理,得到三维人脸补偿图像。
具体地,根据步骤S102得到的环境光补偿数据对三维人脸图像进行曝光补偿处理,对图像中的人脸亮度进行补偿修正。
可选地,在执行完步骤S103之后,所述方法还包括:
根据所述三维人脸光照图像和所述三维人脸补偿图像,对所述人脸图像进行光影处理。
具体地,对于所述三维人脸光照图像,由于其光线打亮的地方会提亮、光线打不到的地方会形成阴影,对于人脸上同一坐标位置的像素点,其在三维人脸光照图像与三维人脸补偿图像中会存在纹理差值,按该差值,在人脸图像所述像素点的对应位置加强或减弱其纹理差值,使得人脸图像会产生和三维人脸光照图像一样的打光效果。本步骤中,可以根据所述第一三维图像和所述第二三维图像中的纹理值(RGB值)差异,对所述人脸图像进行处理。
本发明实施例提供的基于图像处理的环境光补偿方法,实现了对图像中的人像亮度的准确还原,避免了环境光对人脸图像立体化处理的影响,提高了图片中人像的视觉效果。
图3为本发明实施例提供的基于图像处理的环境光补偿方法流程图。如图3所示,本实施例为图1和图2所示实施例的具体实现方案,因此不再赘述图1和图2所示实施例中各步骤的具体实现方法和有益效果,本发明实施例提供的基于图像处理的环境光补偿方法,具体包括:
S301,对三维人脸图像进行打光处理,生成三维人脸光照图像。
S302,获取待处理图片的第一光照强度信息和所述待处理图片中的二维人脸图像的第二光照强度信息。
本发明实施例中的三维人脸图像是根据待处理图片中的二维人脸图像来确定的,也就是说,该三维人脸图像与待处理图片中的人脸图像相匹配。
S303,根据所述第一光照强度信息和所述第二光照强度信息,确定所述三维人脸图像对应的环境光补偿数据。
S304,依据所述环境光补偿数据对所述三维人脸图像进行处理,得到三维人脸补偿图像。
S305,根据所述三维人脸光照图像和所述三维人脸补偿图像,对待处理图片中的人脸图像进行光影处理。
本发明实施例提供的基于图像处理的环境光补偿方法,实现了对图像中的人像亮度的准确还原,避免了环境光对人脸图像立体化处理的影响,提高了图片中人像的视觉效果。
图4为本发明实施例提供的基于图像处理的环境光补偿装置结构图。如图4所示,该装置具体包括:打光模块100,获取模块200和第一处理模块300。其中,
所述打光模块100,用于对三维人脸图像进行打光处理,生成三维人脸光照图像;所述获取模块200,用于获取所述三维人脸图像对应的环境光补偿数据;所述第一处理模块300,用于依据所述环境光补偿数据对所述三维人脸图像进行处理,得到三维人脸补偿图像。
可选地,所述打光模块100具体用于,获取光照渲染参数,根据所述光照渲染参数和预先建立的光照模型对所述三维人脸图像进行光照渲染,生成三维人脸光照图像。
可选地,所述打光模块100具体用于,获取修正系数,根据所述修正系数对所述光照渲染参数进行修正;根据修正后的所述光照渲染参数和所述光照模型对所述三维人脸图像进行光照渲染。
本发明实施例提供的基于图像处理的环境光补偿装置具体用于执行图1和图2所示实施例提供的所述方法,其实现原理、方法和功能用途等与图1和图2所示实施例类似,在此不再赘述。
图5为本发明实施例提供的基于图像处理的环境光补偿装置结构图。如图5所示,该装置具体包括:打光模块100,获取模块200,第一处理模块300和第二处理模块400。其中,
所述打光模块100,用于对三维人脸图像进行打光处理,生成三维人脸光照图像;所述获取模块200,用于获取所述三维人脸图像对应的环境光补偿数据;所述第一处理模块300,用于依据所述环境光补偿数据对所述三维人脸图像进行处理,得到三维人脸补偿图像;所述第二处理模块,用于根据所述三维人脸光照图像和所述三维人脸补偿图像,对待识别图片中的人脸图像进行光影处理。
可选地,所述打光模块100具体用于,获取光照渲染参数,根据所述光照渲染参数和预先建立的光照模型对所述三维人脸图像进行光照渲染,生成三维人脸光照图像。
可选地,所述打光模块100具体用于,获取修正系数,根据所述修正系数对所述光照渲染参数进行修正;根据修正后的所述光照渲染参数和所述光照模型对所述三维人脸图像进行光照渲染。
可选地,所述三维人脸图像与待处理图片中的人脸图像相匹配,所述获取模块200包括:获取子模块210和确定子模块220。其中,
所述获取子模块210,用于获取所述待处理图片的第一光照强度信息和所述人脸图像的第二光照强度信息;所述确定子模块220,用于根据所述第一光照强度信息和所述第二光照强度信息,确定所述三维人脸图像对应的环境光补偿数据。
本发明实施例提供的基于图像处理的环境光补偿装置具体用于执行图3所示实施例提供的所述方法,其实现原理、方法和功能用途和图3所示实施例类似,在此不再赘述。
上述这些本发明实施例的基于图像处理的环境光补偿装置可以作为其中一个软件或者硬件功能单元,独立设置在上述电子设备中,也可以作为整合在处理器中的其中一个功能模块,执行本发明实施例的基于图像处理的环境光补偿方法。
图6为执行本发明方法实施例提供的基于图像处理的环境光补偿方法的电子设备的硬件结构示意图。根据图6所示,该电子设备包括:
一个或多个处理器610以及存储器620,图6中以一个处理器610为例。
执行所述的基于图像处理的环境光补偿方法的设备还可以包括:输入装置630和输出装置630。
处理器610、存储器620、输入装置630和输出装置640可以通过总线或者其他方式连接,图6中以通过总线连接为例。
存储器620作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本发明实施例中的所述基于图像处理的环境光补偿方法对应的程序指令/模块。处理器610通过运行存储在存储器620中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现所述基于图像处理的环境光补偿方法。
存储器620可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据本发明实施例提供的基于图像处理的环境光补偿装置的使用所创建的数据等。此外,存储器620可以包括高速随机存取存储器620,还可以包括非易失性存储器620,例如至少一个磁盘存储器620件、闪存器件、或其他非易失性固态存储器620件。在一些实施例中,存储器620可选包括相对于处理器66远程设置的存储器620,这些远程存储器620可以通过网络连接至所述基于图像处理的环境光补偿装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置630可接收输入的数字或字符信息,以及产生与基于图像处理的环境光补偿装置的用户设置以及功能控制有关的键信号输入。输入装置630可包括按压模组等设备。
所述一个或者多个模块存储在所述存储器620中,当被所述一个或者多个处理器610执行时,执行所述基于图像处理的环境光补偿方法。
本发明实施例的电子设备以多种形式存在,包括但不限于:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:数码相机、音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。
(4)服务器:提供计算服务的设备,服务器的构成包括处理器610、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展 性、可管理性等方面要求较高。
(5)其他具有数据交互功能的电子装置。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
本发明实施例提供了一种非暂态计算机可读存存储介质,所述计算机存储介质存储有计算机可执行指令,其中,当所述计算机可执行指令被电子设备执行时,使所述电子设备上执行上述任意方法实施例中的基于图像处理的环境光补偿方法。
本发明实施例提供了一种计算机程序产品,其中,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,其中,当所述程序指令被电子设备执行时,使所述电子设备执行上述任意方法实施例中的基于图像处理的环境光补偿方法。
在另一实施例中,为了便于上述实施例对图片的处理,还提供了一种具有更好防抖性能的电子装置的摄像头,通过该摄像头获取的图片相比于普通摄像头更加清晰,更能满足用户的需求。特别是本实施例中的摄像头获取的图片用于上述实施例中的环境光补偿方法时,效果更佳。
具体的,现有的电子装置摄像头(电子装置可以是手机或摄像机等)包括镜头1、自动聚焦音圈马达2、图像传感器3为本领域技术人员公知的现有技术,因此这里不过多描述。通常采用微型记忆合金光学防抖器是因为现有的防抖器大多由通电线圈在磁场中产生洛伦磁力驱动镜头移动,而要实现光学防抖,需要在至少两个方向上驱动镜头,这意味着需要布置多个线圈,会给整体结构的微型化带来一定挑战,而且容易受外界磁场干扰,进而影响防抖效果,一些现有技术通过温度变化实现记忆合金丝的拉伸和缩短,以此拉动自动聚焦音圈马达移动,实现镜头的抖动补偿,微型记忆合金光学防抖致动器的控制芯片可以控制驱动信号的变化来改变记忆合金丝的温度,以此控制记忆合金丝的伸长和缩短,并且根据记忆合金丝的电阻来计算致动器的位置和移动距离。当微型记忆合金光学防抖致动器上移动到指定位置后反馈记忆合金丝此时的电阻,通过比较这个电阻值与目标值的偏差,可以校正微型记忆合金光学防抖致动器上的移动偏差。但是申请人发现,由于抖动的随机性和不确定性,仅仅依靠上述技术方案的结构是无法实现在多次抖动发生的情况下能够对镜头进行精确的补偿, 这是由于形状记忆合金的升温和降温均需要一定的时间,当抖动向第一方向发生时,上述技术方案可以实现镜头对第一方向抖动的补偿,但是当随之而来的第二方向的抖动发生时,由于记忆合金丝来不及在瞬间变形,因此容易造成补偿不及时,无法精准实现对多次抖动和不同方向的连续抖动的镜头抖动补偿,这导致了获取的图片质量不佳,因此需要对摄像头或摄像机结构上进行改进。
如图7所示,本实施例的所述摄像头包括镜头1、自动聚焦音圈马达2、图像传感器3以及微型记忆合金光学防抖器4,所述镜头1固装在所述自动聚焦音圈马达2上,所述图像传感器3将所述镜头1获取的图像传输至所述识别模块100,所述自动聚焦音圈马达2安装在所述微型记忆合金光学防抖器4上,所述电子装置内部处理器根据电子装置内部陀螺仪(图中未示出)检测到的镜头抖动驱动所述微型记忆合金光学防抖器4的动作,实现镜头的抖动补偿;
结合附图8所示,对所述微型记忆合金光学防抖器的改进之处介绍如下:
所述微型记忆合金光学防抖器包括活动板5和基板6,活动板5和基板6均为矩形板状件,所述自动聚焦音圈马达2安装在所述活动板5上,所述基板6的尺寸大于所述活动板5的尺寸,所述活动板5安装在所述基板6上,所述活动板5和所述基板6之间设有多个活动支撑7,所述活动支撑7具体为设置在所述基板6四个角处凹槽内的滚珠,便于活动板5在基板6上的移动,所述基板6的四周具有四个侧壁,每个所述侧壁的中部均设有一缺口8,所述缺口8处安装有微动开关9,所述微动开关9的活动件10可以在所述处理模块的指令下打开或封闭所述缺口,所述活动件10靠近所述活动板5的侧面设有沿所述活动件10宽度方向布设的条形的电触点11,所述基板6设有与所述电触点11相连接的温控电路(图中未示出),所述处理模块可以根据陀螺仪检测到的镜头抖动方向控制所述温控电路的开闭,所述活动板5的四个侧边的中部均设有形状记忆合金丝12,所述形状记忆合金丝12一端与所述活动板5固定连接,另一端与所述电触点11滑动配合,所述基板6的四周的内侧壁与所述活动板5之间均设有用于复位的弹性件13,具体的,本实施例的所述弹性件优选为微型的弹簧。
下面结合上述结构对本实施例的微型记忆合金光学防抖器的工作过程进行详细的描述:以镜头两次方向相反的抖动为例,当镜头发生向第一方向抖动时,陀螺仪将检测到的镜头抖动方向和距离反馈给所述处理器,处理器计算出需要控制可以补偿该抖动的形状记忆合金丝的伸长量,并驱 动相应的温控电路对该形状记忆合金丝进行升温,该形状记忆合金丝伸长并带动活动板向可补偿第一方向抖动的方向运动,与此同时与该形状记忆合金丝相对称的另一形状记忆合金丝没有变化,但是与该另一形状记忆合金丝相连接的活动件会打开与其对应的缺口,便于所述另一形状记忆合金丝在活动板的带动下向缺口外伸出,此时,两个形状记忆合金丝附近的弹性件分别拉伸和压缩(如图9所示),当微型记忆合金光学防抖致动器上移动到指定位置后反馈该形状记忆合金丝的电阻,通过比较这个电阻值与目标值的偏差,可以校正微型记忆合金光学防抖致动器上的移动偏差;而当第二次抖动发生时,处理器首先通过与另一形状以及合金丝相抵接的活动件关闭缺口,并且打开与处于伸长状态的该形状记忆合金丝相抵接的活动件,与另一形状以及合金丝相抵接活动件的转动可以推动另一形状记忆合金丝复位,与处于伸长状态的该形状记忆合金丝相抵接的活动件的打开可以便于伸长状态的形状记忆合金丝伸出,并且在上述的两个弹性件的弹性作用下可以保证活动板迅速复位,同时处理器再次计算出需要控制可以补偿第二次抖动的形状记忆合金丝的伸长量,并驱动相应的温控电路对另一形状记忆合金丝进行升温,另一形状记忆合金丝伸长并带动活动板向可补偿第二方向抖动的方向运动,由于在先伸长的形状记忆合金丝处的缺口打开,因此不会影响另一形状以及合金丝带动活动板运动,而由于活动件的打开速度和弹簧的复位作用,因此在发生多次抖动时,本实施例的微型记忆合金光学防抖器均可做出精准的补偿,其效果远远优于现有技术中的微型记忆合金光学防抖器。
当然上述仅仅为简单的两次抖动,当发生多次抖动时,或者抖动的方向并非往复运动时,可以通过驱动两个相邻的形状记忆合金丝伸长以补偿抖动,其基础工作过程与上述描述原理相同,这里不过多赘述,另外关于形状记忆合金电阻的检测反馈、陀螺仪的检测反馈等均为现有技术,这里也不做赘述。
另一实施例中,电子装置为摄像机,所述摄像机可以安装于所述摄像机的支架上,但是申请人在使用过程中发现,现有的摄像机的支架具有以下缺陷:1、现有的摄像机支架均采用三脚架支撑,但是三脚架结构在地面不平整存在较大凹凸不平的位置进行安装时无法保证支架安装座的水平,容易发生抖动或者倾斜,对拍摄容易产生不良的影响;2、现有的支架无法作为肩抗式摄影机支架,结构和功能单一,在需要肩抗拍摄时必须单独配备肩抗式摄影机支架。
因此,申请人对支架结构进行改进,如图10和11所示,本实施例的所述支架包括安装座14、支撑轴15、三个铰装在所述支撑轴上的支撑架 16;所述安装座14包括相互垂直的第一安装板141和第二安装板142,所述第一安装板141和第二安装板142均可用于安装所述摄像机,所述支撑轴15垂直安装在所述第一安装板141的底面,所述支撑轴15远离所述安装座14的底端设有径向尺寸略大于所述支撑轴的圆周面17,三个所述支撑架16由上至下安装在所述支撑轴15上,且每两个所述支撑架16展开后的水平投影呈一倾角,上述结构在进行支架的架设时,首先将圆周面17假设在凹凸不平的平面较平整的一小块区域,在通过打开并调整三个可伸缩的支撑架的位置实现支架的架设平整,因此即使是凹凸不平的地面也能迅速将支架架设平整,适应各种地形,保证安装座处于水平状态。
更有利的,本实施例的所述支撑轴15也是伸缩杆件,其包括与所述安装座14相连接的管体151和部分可收缩至所述管体151内的杆体152,所述杆体152伸入所述管体的部分包括依次铰接的第一段1521、第二段1522、第三段1523和第四段1524,所述第一段1521与所述管体151相连接,所述第一段1521靠近所述第二段1522的端部设有安装槽18,所述安装槽18内铰接有锁止件19,所述第二段1522靠近所述第一段1521的端部设有与锁止件19可拆卸配合的锁止孔20,同理,所述第二段1522靠近所述第三段1523的端部设有安装槽18,所述安装槽18内铰接有锁止件19,所述第三段1523靠近所述第二段1522的端部设有与锁止件19可拆卸配合的锁止孔20,所述第三段1523靠近所述第四段1524的端部设有安装槽18,所述安装槽18内铰接有锁止件19,所述第四段1524靠近所述第三段1523的端部设有与锁止件19可拆卸配合的锁止孔20,所述锁止件可以隐藏在安装槽内,当需要使用锁止件时可以通过转动锁止件,将锁止件扣合在所述锁止孔上,具体的,所述锁止件19可以是具有一个凸起的条形件,该凸起与所述锁止孔的大小尺寸相适配,将凸起压紧在锁止孔内完整相邻两个段(例如第一段和第二段)位置的固定,防止相对转动,而通过第一段1521、第二段1522、第三段1523和第四段1524的配合可以将该部分形成一
Figure PCTCN2018094073-appb-000001
形结构,并且通过锁止件19固定各个段的相对位置,还可以在该结构的底部设有软质材料,当需要将支架作为肩抗式摄像机支架时,该部分放置在用户的肩部,通过把持三个支撑架中的一个作为肩抗式支架的手持部,可以快速的实现由固定式支架到肩抗式支架的切换,十分方便。
另外,申请人还发现,可伸缩的支撑架伸大多通过人力拉出伸缩部分以实现伸缩长度的调节,但是该距离不可控制,随机性较大,因此常常出现调节不便的问题,特别是需要将伸缩长度部分微调时,往往不容易实现,因此申请人还对支撑架的16结构进行优化,结合附图12所示,本实施例 的每个所述支撑架16的底端还连接有调距装置21,所述调距装置21包括安装在所述支撑架16底部的轴承圈211、与所述轴承圈211相连接的转动环212、管体213、螺杆214、螺套215及支撑杆216,所述管体213的一端设有封堵217,所述螺杆215部分通过所述封堵217安装在所述管体213内,所述封堵217设有与所述螺杆214相适配的内螺纹,所述螺杆214另一部分与所述转动环212相连接,所述螺套215一端安装在所述管体213内并与所述螺杆214螺纹连接,所述螺套215的另一端伸出所述管体213外并与所述支撑杆216固定连接,所述螺套215的内壁设有一凸起218,所述螺套215的外侧壁沿其长度方向设有与所述凸起相适配的滑道219,所述管体213包括相邻的第一部分2131和第二部分2132,所述第一部分2131的内径小于所述第二部分2132的内径,所述封堵217设置在所述第二部分2132的外端上,所述螺套215靠近所述螺杆214的端部设有外径大于所述第一部分内径的限位端2151,通过转动所述转动环212带动螺杆214在管体213内转动,并将转动趋势传递给所述螺套215,而由于螺套受凸起218和滑道219的配合影响,无法转动,因此将转动力化为向外的直线移动,进而带动支撑杆216运动,实现支撑架底端的长度微调节,便于用户架平支架及其安装座,为后续的拍摄工作提供良好的基础保障。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,所述计算机可读记录介质包括用于以计算机(例如计算机)可读的形式存储或传送信息的任何机制。例如,机器可读介质包括只读存储器(ROM)、随机存取存储器(RAM)、磁盘存储介质、光存储介质、闪速存储介质、电、光、声或其他形式的传播信号(例如,载波、红外信号、数字信号等)等,该计算机软件产品包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本发明实施例的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种基于图像处理的环境光补偿方法,其特征在于,包括:
    获取待处理图片,将待处理图片中的二维人脸图像转换为三维人脸图像;
    对三维人脸图像进行打光处理,生成三维人脸光照图像;
    获取所述三维人脸图像对应的环境光补偿数据;
    依据所述环境光补偿数据对所述三维人脸图像进行处理,得到三维人脸补偿图像。
  2. 根据权利要求1所述的方法,其特征在于,所述对三维人脸图像进行打光处理,生成三维人脸光照图像,包括:
    获取光照渲染参数,根据所述光照渲染参数和预先建立的光照模型对所述三维人脸图像进行光照渲染,生成三维人脸光照图像。
  3. 根据权利要求1或2所述的方法,其特征在于,所述获取所述三维人脸图像对应的环境光补偿数据包括:
    获取所述待处理图片的第一光照强度信息和所述二维人脸图像的第二光照强度信息;
    根据所述第一光照强度信息和所述第二光照强度信息,确定所述三维人脸图像对应的环境光补偿数据。
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述光照渲染参数和预先建立的光照模型对所述三维人脸图像进行光照渲染,包括:
    获取修正系数,根据所述修正系数对所述光照渲染参数进行修正;
    根据修正后的所述光照渲染参数和所述光照模型对所述三维人脸图像进行光照渲染。
  5. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    根据所述三维人脸光照图像和所述三维人脸补偿图像,对所述人脸图像进行光影处理。
  6. 一种基于图像处理的环境光补偿装置,其特征在于,包括:
    打光模块,用于对三维人脸图像进行打光处理,生成三维人脸光照图像;
    获取模块,用于获取所述三维人脸图像对应的环境光补偿数据;
    第一处理模块,用于依据所述环境光补偿数据对所述三维人脸图像进行处理,得到三维人脸补偿图像。
  7. 根据权利要求6所述的装置,其特征在于,所述打光模块具体用于,获取光照渲染参数,根据所述光照渲染参数和预先建立的光照模型对所述三维人脸图像进行光照渲染,生成三维人脸光照图像。
  8. 根据权利要求6或7所述的装置,其特征在于,所述三维人脸图像与待处理图片中的人脸图像相匹配,所述获取模块包括:
    获取子模块,用于获取所述待处理图片的第一光照强度信息和所述人脸图像的第二光照强度信息;
    确定子模块,用于根据所述第一光照强度信息和所述第二光照强度信息,确定所述三维人脸图像对应的环境光补偿数据。
  9. 根据权利要求7所述的装置,其特征在于,所述打光模块具体用于,获取修正系数,根据所述修正系数对所述光照渲染参数进行修正;根据修正后的所述光照渲染参数和所述光照模型对所述三维人脸图像进行光照渲染。
  10. 一种电子设备,其特征在于,包括:至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1至5中任一项所述的基于图像处理的环境光补偿方法。
PCT/CN2018/094073 2018-04-20 2018-07-02 基于图像处理的环境光补偿方法、装置及电子设备 WO2019200720A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810362074.8 2018-04-20
CN201810362074.8A CN108573480B (zh) 2018-04-20 2018-04-20 基于图像处理的环境光补偿方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2019200720A1 true WO2019200720A1 (zh) 2019-10-24

Family

ID=63574095

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/094073 WO2019200720A1 (zh) 2018-04-20 2018-07-02 基于图像处理的环境光补偿方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN108573480B (zh)
WO (1) WO2019200720A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246354B (zh) * 2018-09-07 2020-04-24 Oppo广东移动通信有限公司 图像处理方法和装置、电子设备、计算机可读存储介质
CN109523473A (zh) * 2018-10-16 2019-03-26 网易(杭州)网络有限公司 图像处理方法、装置、存储介质和电子装置
CN110349079B (zh) * 2019-06-04 2023-04-18 南京掌心互动网络科技有限公司 一种基于用户习惯及大数据的影像修正方法及其系统
CN111563850B (zh) * 2020-03-20 2023-12-05 维沃移动通信有限公司 一种图像处理方法及电子设备
CN111556255B (zh) * 2020-04-30 2021-10-01 华为技术有限公司 图像生成方法及装置
CN113658313B (zh) * 2021-09-09 2024-05-17 北京达佳互联信息技术有限公司 人脸模型的渲染方法、装置及电子设备
CN116263941A (zh) * 2021-12-13 2023-06-16 小米科技(武汉)有限公司 图像处理方法、装置、存储介质及电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105825544A (zh) * 2015-11-25 2016-08-03 维沃移动通信有限公司 一种图像处理方法及移动终端
WO2016137080A1 (ko) * 2015-02-27 2016-09-01 허윤주 범용 그래픽 프로세싱 유닛을 이용한 3 차원 캐릭터 렌더링 시스템 및 그의 처리 방법
CN106023295A (zh) * 2016-05-27 2016-10-12 美屋三六五(天津)科技有限公司 一种三维模型处理方法及装置
CN107220953A (zh) * 2017-06-16 2017-09-29 广东欧珀移动通信有限公司 图像处理方法、装置及终端
CN107506714A (zh) * 2017-08-16 2017-12-22 成都品果科技有限公司 一种人脸图像重光照的方法
CN107580209A (zh) * 2017-10-24 2018-01-12 维沃移动通信有限公司 一种移动终端的拍照成像方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ITPD20040198A1 (it) * 2004-07-23 2004-10-23 Lino Manfrotto & Co Spa Supporto per apparecchiiature elettroniche, particolarmente di tipo video fotografico
CN203784598U (zh) * 2014-04-02 2014-08-20 刘昊 用于摄影摄像器材的支架
CN204494025U (zh) * 2015-03-20 2015-07-22 刘昊 中轴及包括该中轴的摄影摄像用支架
CN106131435B (zh) * 2016-08-25 2021-12-07 东莞市亚登电子有限公司 微型光学防抖摄像头模组
CN205987121U (zh) * 2016-08-25 2017-02-22 东莞市亚登电子有限公司 微型光学防抖摄像头模组结构
CN205987122U (zh) * 2016-08-25 2017-02-22 东莞市亚登电子有限公司 微型光学防抖摄像头模组
CN106990551B (zh) * 2017-04-25 2019-10-15 维沃移动通信有限公司 摄像头及摄像头的防抖方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016137080A1 (ko) * 2015-02-27 2016-09-01 허윤주 범용 그래픽 프로세싱 유닛을 이용한 3 차원 캐릭터 렌더링 시스템 및 그의 처리 방법
CN105825544A (zh) * 2015-11-25 2016-08-03 维沃移动通信有限公司 一种图像处理方法及移动终端
CN106023295A (zh) * 2016-05-27 2016-10-12 美屋三六五(天津)科技有限公司 一种三维模型处理方法及装置
CN107220953A (zh) * 2017-06-16 2017-09-29 广东欧珀移动通信有限公司 图像处理方法、装置及终端
CN107506714A (zh) * 2017-08-16 2017-12-22 成都品果科技有限公司 一种人脸图像重光照的方法
CN107580209A (zh) * 2017-10-24 2018-01-12 维沃移动通信有限公司 一种移动终端的拍照成像方法及装置

Also Published As

Publication number Publication date
CN108573480B (zh) 2020-02-11
CN108573480A (zh) 2018-09-25

Similar Documents

Publication Publication Date Title
WO2019200720A1 (zh) 基于图像处理的环境光补偿方法、装置及电子设备
WO2019200718A1 (zh) 图像处理方法、装置及电子设备
US9638989B2 (en) Determining motion of projection device
KR102598109B1 (ko) 이미지 분석에 기반하여, 디스플레이를 통해 표시된 영상과 메모리에 저장된 영상과 관련하여 알림을 제공하는 전자 장치 및 방법
CN108596827B (zh) 三维人脸模型生成方法、装置及电子设备
US9819870B2 (en) Photographing method and electronic device
CN113454982B (zh) 用于使图像稳定化的电子装置及其操作方法
WO2019205283A1 (zh) 基于红外的ar成像方法、系统及电子设备
US20180367732A1 (en) Visual cues for managing image capture
KR100796849B1 (ko) 휴대 단말기용 파노라마 모자이크 사진 촬영 방법
WO2019205284A1 (zh) Ar成像方法和装置
US9571743B2 (en) Dynamic exposure adjusting method and electronic apparatus using the same
EP1938577B1 (en) A method and a device for reducing motion distortion in digital imaging
US20130120635A1 (en) Subject detecting method and apparatus, and digital photographing apparatus
CN107743637B (zh) 用于处理外围图像的方法和设备
TW201707438A (zh) 電子裝置及影像處理方法
WO2018066705A1 (ja) スマートフォン
JP2010072813A (ja) 画像処理装置および画像処理プログラム
US20180098050A1 (en) Power efficient long range depth sensing
TWI604413B (zh) 影像處理方法及影像處理裝置
US10122937B2 (en) Method and apparatus for processing image obtained by camera
US10817992B2 (en) Systems and methods to create a dynamic blur effect in visual content
TWI664558B (zh) 鍵盤裝置與應用其上的投影畫面防抖方法
WO2023061325A1 (zh) 画面显示方法、装置、终端设备以及存储介质
JP2014160998A (ja) 画像処理システム、画像処理方法、画像処理プログラム、及び記録媒体

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02.03.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18915485

Country of ref document: EP

Kind code of ref document: A1