A computing device for performing image pre-processing for blending images receives a first image depicting a head. The computing device detects a portion of the head in the first image and calculates an image attribute of the portion in the first image. The computing device receives a second image and generates an adjusted second image by adjusting color pixels in the second image based on the calculated image attribute of the portion in the first image. The computing device blends the adjusted second image with the first image.
|
1. A system, comprising:
a display;
a memory device storing instructions; and
a processor coupled to the memory device and configured by the instructions to at least:
receive a first image depicting a face;
detect an eye region on the face in the first image;
calculate a dynamic range of a contrast of the eye region in the first image;
receive a second image;
generate an adjusted second image by adjusting a contrast of the second image based on the calculated dynamic range of the contrast of the eye region in the first image; and
blend the adjusted second image with the first image.
7. A non-transitory computer-readable storage medium storing instructions to be implemented by a computing device having a processor, wherein the instructions, when executed by the processor, cause the computing device to at least:
receive a first image depicting a face;
detect an eye region on the face in the first image;
calculate a dynamic range of a contrast of the eye region in the first image;
receive a second image;
generate an adjusted second image by adjusting a contrast of the second image based on the calculated dynamic range of the contrast of the eye region in the first image; and
blend the adjusted second image with the first image.
2. The system of
3. The system of
applying facial alignment processing and extracting positions of facial features relative to the facial alignment processing;
identifying locations of eye feature points among the facial features; and
defining the eye region based on the locations of the eye feature points with respect to the facial alignment processing.
4. The system of
5. The system of
6. The system of
8. The non-transitory computer-readable storage medium of
9. The non-transitory computer-readable storage medium of
10. The non-transitory computer-readable storage medium of
11. The non-transitory computer-readable storage medium of
12. The non-transitory computer-readable storage medium of
|
This application claims priority to, and the benefit of, U.S. Provisional Patent Application entitled, “System and Method for Performing Image Pre-Processing for Blending,” having Ser. No. 62/442,605, filed on Jan. 5, 2017, which is incorporated by reference in its entirety.
The present disclosure generally relates to editing multimedia content and more particularly, to pre-processing techniques for blending images.
With the proliferation of smartphones, tablets, and other display devices, people have the ability to take or display digital images virtually any time. Smartphones and other portable display devices are commonly used for a variety of applications, including both business and personal applications. Certain application programs have become popular that allow users to modify images containing pictures of the user or other people. Devices may be used to capture or receive digital images (either still images or video images) containing an image of the user's face. The ability to incorporate or blend content from another image into a target image is an increasingly-popular feature in media applications, where a graphical effect or image is selectable by a user and applied to the target image. However, one perceived shortcoming of various existing applications is that due to variation in the lighting and the luminance range of respective scenes of the captured images being blended, the blended result can appear unnatural due to inconsistent dynamic ranges across the blended images, thereby detracting from the realism of the blended result. Therefore, it is desirable to provide an improved technique for blending images.
Systems and methods for performing pre-processing for blending images are disclosed. In a first embodiment, a computing device for performing image pre-processing for blending images receives a first image depicting a head. The computing device detects a portion of the head in the first image and calculates an image attribute of the portion in the first image. The computing device receives a second image and generates an adjusted second image by adjusting color pixels in the second image based on the calculated image attribute of the portion in the first image. The computing device blends the adjusted second image with the first image.
Another embodiment is a system that comprises a display, a memory device storing instructions, and a processor coupled to the memory device. The processor is configured by the instructions to receive a first image depicting a face, detect an eye region on the face in the first image, and calculate a dynamic range of the eye region in the first image. The processor is further configured to receive a second image, generate an adjusted second image by adjusting a contrast of the second image based on the calculated dynamic range of the eye region in the first image, and blend the adjusted second image with the first image.
Another embodiment is a non-transitory computer-readable storage medium storing instructions to be implemented by a computing device having a processor. The instructions, when executed by the processor, cause the computing device to receive a first image depicting a face, detect an eye region on the face in the first image, and calculate a dynamic range of the eye region in the first image. The computing device is further configured by the instructions to receive a second image, generate an adjusted second image by adjusting a contrast of the second image based on the calculated dynamic range of the eye region in the first image, and blend the adjusted second image with the first image.
Various aspects of the disclosure can be better understood with reference to the following drawings. The components in the drawings are not necessarily to scale, emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
Various embodiments are disclosed for processing images prior to blending the images in order to mitigate inconsistencies in the dynamic ranges across the images to be blended. A preferred embodiment achieves the technical effect of providing adaptive adjustment and refinement of the dynamic range of one or both of the images being blended, thereby resulting in improved blended images.
An effects applicator 104 executes on a processor of the computing device 102 and includes various components including a facial feature analyzer 106, an image analyzer 110, a user interface component 112, and a blending component 114. The facial feature analyzer 106 is configured to analyze the content of digital images captured by the camera module 111 and/or received from a remote source. The facial feature analyzer 106 may be further configured to analyze content of digital images stored on a storage medium such as, by way of example and without limitation, a compact disc (CD), a universal serial bus (USB) flash drive, or cloud storage, wherein the digital images may then be transferred and stored locally on a data store 122 of the computing device 102.
The images 108 processed by the facial feature analyzer 106 may be encoded in any of a number of formats including, but not limited to, JPEG (Joint Photographic Experts Group) files, TIFF (Tagged Image File Format) files, PNG (Portable Network Graphics) files, GIF (Graphics Interchange Format) files, BMP (bitmap) files or other digital formats. Note that the digital images may also be extracted from media content encoded in other formats including, but not limited to, Motion Picture Experts Group (MPEG)-1, MPEG-2, MPEG-4, H.264, Third Generation Partnership Project (3GPP), 3GPP-2, Standard-Definition Video (SD-Video), High-Definition Video (HD-Video), Digital Versatile Disc (DVD) multimedia, Video Compact Disc (VCD) multimedia, High-Definition Digital Versatile Disc (HD-DVD) multimedia, Digital Television Video/High-definition Digital Television (DTV/HDTV) multimedia, Audio Video Interleave (AVI), Digital Video (DV), QuickTime (QT) file, Windows Media Video (WMV), Advanced System Format (ASF), Real Media (RM), Flash Media (FLV), an MPEG Audio Layer III (MP3), an MPEG Audio Layer II (MP2), Waveform Audio Format (WAV), Windows Media Audio (WMA), or any number of other digital formats.
The user interface component 112 generates a user interface that allows the user to select a first image and a second image to be blended. The images 108 may be captured by the camera module 111 and/or retrieved from a source external to the computing device 102. The facial feature analyzer 106 identifies an eye region on a face depicted in the first image, where the second image is to be blended with the first image. It should be appreciated, however, that the concepts described herein are applicable to other regions/features of the first image as well and are not limited to the eye region. In this regard, one of ordinary skill in the art will readily appreciate and understand the applicability and implementation of the invention with other target features from the description provided herein.
For some embodiments, the eye region encompasses the eye white or the pupil of the eye depicted in the first image. Note that while the eye and the pupil of the eye are utilized, other portions or features of the eye may be utilized. When there are multiple faces depicted in the first image, the facial feature analyzer 106 may be configured to identify the eye region of each of the depicted faces.
The image analyzer 110 then calculates the dynamic range of the eye region in the first image by calculating a difference of luminance within the eye region encompassing the eye white of the eye and the pupil of the eye. If there are multiple faces depicted in the first image, the image analyzer 110 may be configured to calculate an average of the dynamic ranges values. The blending component 114 adaptively adjusts the contrast of the second image based on the dynamic range value derived by the image analyzer 110 and then blends the adjusted second image with the first image. For some embodiments, the image analyzer 110 determines whether the contrast of the second image differs from the dynamic range of the first image by a threshold amount, where the image analyzer 110 calculates the dynamic range of the eye region in the first image and the blending component 114 generates the adjusted second image only if the contrast of the second image differs from the dynamic range of the first image by the threshold amount.
The processing device 202 may include any custom made or commercially available processor, a central processing unit (CPU) or an auxiliary processor among several processors associated with the computing device 102, a semiconductor based microprocessor (in the form of a microchip), a macroprocessor, one or more application specific integrated circuits (ASICs), a plurality of suitably configured digital logic gates, and other well known electrical configurations comprising discrete elements both individually and in various combinations to coordinate the overall operation of the computing system.
The memory 214 may include any one of a combination of volatile memory elements (e.g., random-access memory (RAM, such as DRAM, and SRAM, etc.)) and nonvolatile memory elements (e.g., ROM, hard drive, tape, CDROM, etc.). The memory 214 typically comprises a native operating system 216, one or more native applications, emulation systems, or emulated applications for any of a variety of operating systems and/or emulated hardware platforms, emulated operating systems, etc. For example, the applications may include application specific software which may comprise some or all the components of the computing device 102 depicted in
Input/output interfaces 204 provide any number of interfaces for the input and output of data. For example, where the computing device 102 comprises a personal computer, these components may interface with one or more user input/output interfaces 204, which may comprise a keyboard or a mouse, as shown in
In the context of this disclosure, a non-transitory computer-readable medium stores programs for use by or in connection with an instruction execution system, apparatus, or device. More specific examples of a computer-readable medium may include by way of example and without limitation: a portable computer diskette, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, EEPROM, or Flash memory), and a portable compact disc read-only memory (CDROM) (optical).
Reference is made to
Although the flowchart 300 of
To begin, in block 310, the computing device 102 receives a first image depicting a head. In block 320, the computing device 102 detects a portion of a head in the first image. For some embodiments, this comprises applying facial alignment processing and extracting positions of facial features relative to the facial alignment processing, identifying locations of eye feature points among the facial features, and defining the eye region based on the locations of the eye feature points with respect to the facial alignment processing. For some embodiments, defining the eye region further comprises identifying an eye white and identifying a pupil of the eye among the identified eye feature points, where the eye region encompasses both the eye white and the pupil of the eye.
For other embodiments, detecting a portion of a head in the first image further comprises applying facial alignment processing and extracting positions of facial features relative to the facial alignment processing, identifying locations of nose feature points among the facial features, and defining the nose region based on the locations of the nose feature points with respect to the facial alignment processing. For some embodiments, defining the nose region further comprises identifying a nose tip and identifying a nostril among the identified nose feature points, where the nose region encompasses both the nose tip of the nose and the nostril of the nose. Referring briefly to
Referring back to
In block 340, the computing device 102 receives a second image, and in block 350, the computing device 102 generates an adjusted second image by adjusting color pixels in the second image based on the calculated image attribute of the portion in the first image. In block 360, the computing device 102 blends the adjusted second image with the first image. Thereafter, the process in
To further illustrate various functions of the algorithm discussed in connection with the flowchart of
With reference to
The image analyzer 110 (
It should be emphasized that the above-described embodiments of the present disclosure are merely possible examples of implementations set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and protected by the following claims.
Patent | Priority | Assignee | Title |
11670112, | Nov 21 2019 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, and image capture apparatus |
Patent | Priority | Assignee | Title |
8072507, | Oct 20 2006 | Primax Electronics Ltd. | Method and system of generating high dynamic range image corresponding to specific scene |
8933965, | Jul 27 2006 | Canon Kabushiki Kaisha | Method for calculating light source information and generating images combining real and virtual images |
9131201, | May 24 2013 | GOOGLE LLC | Color correcting virtual long exposures with true long exposures |
9398235, | Dec 14 2012 | HANWHA VISION CO , LTD | Apparatus and method for fusing images |
20050031173, | |||
20060114265, | |||
20070086652, | |||
20080030516, | |||
20120170027, | |||
20140354947, | |||
20150279113, | |||
20160217609, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Jan 05 2018 | PERFECT CORP. | (assignment on the face of the patent) | / | |||
Jan 05 2018 | KUO, CHIA-CHEN | PERFECT CORP | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 044542 | /0916 |
Date | Maintenance Fee Events |
Jan 05 2018 | BIG: Entity status set to Undiscounted (note the period is included in the code). |
Feb 26 2024 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Date | Maintenance Schedule |
Sep 29 2023 | 4 years fee payment window open |
Mar 29 2024 | 6 months grace period start (w surcharge) |
Sep 29 2024 | patent expiry (for year 4) |
Sep 29 2026 | 2 years to revive unintentionally abandoned end. (for year 4) |
Sep 29 2027 | 8 years fee payment window open |
Mar 29 2028 | 6 months grace period start (w surcharge) |
Sep 29 2028 | patent expiry (for year 8) |
Sep 29 2030 | 2 years to revive unintentionally abandoned end. (for year 8) |
Sep 29 2031 | 12 years fee payment window open |
Mar 29 2032 | 6 months grace period start (w surcharge) |
Sep 29 2032 | patent expiry (for year 12) |
Sep 29 2034 | 2 years to revive unintentionally abandoned end. (for year 12) |