Manipulation of graphic imagery is often desirable to enhance image appearance, modify an image to meet specific requirements, or for other reasons. In many situations, it is more practical to attain a desired image by modifying an existing image rather than to create a new image without the benefit of the existing image. For example, it is often impractical and sometimes impossible for a photographer to return to a location where a photograph was taken to retake the photograph with different photographic attributes, such as lighting.
Digital imagery has continued to evolve to enable modification of images. Some digital imagery tools enable users to change some aspects of colorization of an image. In some situations, a reference color may be available from a second image. A user may desire to transfer the color, or colorization, from the first image to the second image. Color transfer operations are useful features in graphic imaging because the example image provides a good preview of the final effect on a destination image. Some algorithms have been introduced to provide automatic global color transfer. These algorithms may perform well in transferring global color styles, but they are often inflexible and do not enable a user to specify many aspects of the color transfer.
In addition, current color transfer tools are typically not intuitive and are difficult to use. For example, many color transfer tools require knowledge of complex toolkits and take large amounts of time to make relatively small changes to an image.
This summary is provided to introduce simplified concepts of localized color transfer between one or more source images and a destination image, which is further described below in the Detailed Description. This summary is not intended to identify essential features of the claimed subject matter, nor is it intended for use in determining the scope of the claimed subject matter.
Exemplary techniques for providing localized color transfer are disclosed. According to one or more embodiments, a source region of a source image and a destination region of a destination image are selected based on user input. The source region and the destination region may be linked or otherwise associated by a designator to create a color transfer pair. The color style of the source region is used to modify the color style of the destination region.
In some embodiments, an optimization process may be used to remove any resulting discontinuities that may remain after the destination region is modified. Further embodiments may include receiving a selection of a maintain region by a user. The maintain region may be designated to not receive color style information from the source region and/or to be modified by the optimization process.
In still further embodiments, additional source regions may be selected by the user, including source regions from additional source images. The additional source regions may be used to create additional color transfer pairs, which in turn may facilitate localized color transfer to the destination image.
The detailed description is described with reference to the accompanying figures. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The same reference number in different figures refers to similar or identical items.
In accordance with one or more embodiments, the localized color transfer component 104 includes a destination image 106 and one or more source images 108. The destination image 106 is any image a user desires to modify using the techniques described herein. For example, the destination image 106 may be a digital photography image, a scanned image, or an image obtained using other techniques to create a digital image. The destination image 106 and the source images 108 may be stored using any type of available image storage format or compression scheme, including without limitations, .jpeg, .bmp, .gif, .png, .eps, .psd, and so forth.
The source images 108 are images which contain color styles based on color statistics, which the user desires to transfer in part to the destination image 106. For example, the source images 108 may be a collection of images in a digital library, scanned images, downloaded images (e.g., obtained from the Internet or another network repository), and so forth, or a collection thereof. The user may select one or more of the sources images 108 based on specific colorization regions of the source images, which the user desires to transfer to the destination image 106.
The localized color transfer techniques, as described herein, enable the user to modify the destination image 106 with colorization from the source images 108 to create a modified image 110. The user may map user-selected regions of the source images 108 to user-selected regions of the destination image 106 to facilitate the localized color transfer techniques. User mapping addresses the problem of establishing regional correspondence in a localized color transfer process. Thus, the user may edit the color style of the destination image 106 based on color styles included in the source images 108. The color style of the destination image 106 may be progressively modified by transferring desirable color statistics from user-selected source region(s) of the source images 108 to the destination region(s) of the destination image 106 that are specified by the user with a designed color transfer tool 112.
In some embodiments, the localized color transfer component 104 may include one or more selector tools 112 to facilitate mapping region of the source images 108 and destination images 106, or to otherwise select, demarcate, or identify regions in the source images or the destination images. The selector tools 112 may include a color transfer tool 114 and/or a color maintain tool 116. The color transfer tool 114 to enable users to select regions of images for color transfer. The color maintain tool 116 may enable users to select regions of images to maintain the color of those regions. The color transfer tool 114 and/or the color maintain tool 116 may be such as, and without limitation, a brush, sprayer, free-form sketcher, shape tool, or other selection tool.
The localized color transfer techniques described herein enable direct and local control of modifications to the destination image 106. The localized color transfer techniques may enable a transfer of color distributions to produce rich color variations in the modified image 110, which are not limited to single color variations or a single source image.
As shown in
In some embodiments, at 208, the user may select a region of a source image 204(2) having a color style to transfer to a region of the destination image 206. For example, the source image 204(2) may include a first selected source region 210 and a second selected source region 212, which correspond to a first selected destination region 214 and a second selected destination region 216, respectively.
The selected source and destination regions may include designators to associate a selected region of the source image 204(2) to a selected region of the destination image 206(2) to create a color transfer pair. For example, a first designator 218 may associate the first selected source region 210 to the first selected destination region 214 to create a first color transfer pair. Similarly, a second designator 220 may associate the second selected source region 212 to the second selected destination region 216 to create a second color transfer pair. Although two color transfer pairs are shown at the operation 208, any number of color transfer pairs may be created including a single color transfer pair. The designators for each color transfer pair may be unique designators which are distinguishable and differentiated by attributes such as a color, pattern, shape, or other type of designator attribute.
At 222, a color style, including color statistic information, may be transferred, at least in part, from a source image 204(3) to the destination image 206 to create a modified image 206(3). The modified image 206(3) may include modified regions 224, 226, which include colorization statistics from the first selected source region 210 and the second selected source region 212, respectively.
In accordance with one or more embodiments, at 304, the user may select a designator (e.g., designator 218, 220) to associate a source region with a destination region. A unique designator may be used for each color transfer pair. The designator may be a color, a pattern, a shape (e.g., a circular shape, polygon, etc.), or other type of designator which associates the source region and the designation region. For example, a green color designator may be selected by the user. The user may then use the green color designator, via the selector tools 112, such as the color transfer tool 114 or other selector tool, and identify a source region and a destination region, which will be associated as a color transfer pair because they share the same green color designator. In some embodiments, the designator may be automatically selected for a user when the user attempts to create a color transfer pair. Additionally or alternatively, the designator may be selectable by the user.
At 306, the user selects a region of the source image. The selection may be made with the color transfer tool 114 of
At 308, the user selects a region of the destination image to receive a color style of the source image. The selection may be made with the same designator as used for the source region selection at the operation 306, thus associating the source region and selected destination region as a color transfer pair. In some embodiments, the user may select more than one region of the destination image to be associated to the source region. Thus, a one-to-many relationship may exist between source regions and destination regions. The selection of the source region and the destination region makes color transfer an intuitive and controllable task by enabling users to locally determine color transfer regions
In accordance with some embodiments, the operations 306, 308 may include a boundary identification function to enable a user to select a region that is identifiable in an image. For example, boundaries may be established in an image based on changes in colorization, linear patterns, or other features which create visual and/or intuitive boundaries in an image. When the user selects a source region (via the operation 306) or a destination region (via the operation 308), the selected region may be increased or decreased to snap (i.e., align) to a boundary of the image. In some embodiments, the user may override a snap to boundary function.
In some embodiments, the user may modify the selected source regions and/or destination regions. For example, the user may delete selected regions, modify the boundaries by adding or subtracting from the regions, or take other actions to modify the regions.
At 310, a color transfer pair is established for the designator selected at the operation 304 for the selected source region and the selected destination region(s). For example, when a user selects a source region and a destination region with the same designator, the color transfer pair may be automatically formed at the operation 310.
At 312, the user may optionally select additional region transfer pairs using the operations 304-310.
At 314, the user may implement the color transfer when the user is finished associating regions of the source image with regions of the destination image.
In accordance with some embodiments, the localized color transfer of color statistics from the source region to the destination region of a color transfer pair may be implemented in part using techniques discussed in Reinhard et al. (E. Reinhard, M. Ashikhmin, B. Gooch, and P. Shirley, “Color Transfer Between Images,” IEEE, Computer Graphics and Applications, vol. 21, p. 34-41, 2001., hereinafter “Reinhard”). Reinhard includes an effective automatic color transfer method for global transfer of color statistics and relies on Equation 1, as follows.
In Equation 1, μs, μd are the means of the underlying Gaussian distribution in the source and destination images and θs, θd are the standard deviations, respectively. Thus, for each pixel with color Cd in the destination image, the transferred color value g(Cd) is obtained using equation 1. Lab color space, without limitation, may be used in the algorithm of Equation 1.
In accordance with some embodiments, at the operation 314, the localized color transfer is implemented by using Equation 1 to apply local color style transfer to the transfer region pairs. For Equation 1 to be successful, similarity must be present in the image composition and the simplicity of image statistics of the source region and the destination region. The implementation of Equation 1 may be complementary to transfer a localized color style to a color transfer pair, which is interactively defined by the user because the user intuitively selects regions that are similar in content. For example, a user may select a sky as a source region to transfer a sunset color style to a destination region that is also a sky. It follows that the source and destination regions are likely to have similar color statistics. When transfer takes place in local regions, the color statistics involved are comparatively simpler than the entire image. Thus, color transfer using equation 1 may consistently perform well in local regions that are selected by users.
At 316, the computing device 102 may perform an optimization to the destination image after the color transfer has been completed in the operation 314. The localized color transfer of the operation 314 may result in discontinuity across the destination image, such as between the region that has the color transfer and an adjacent region of the image. A global optimization (or simply “optimization”) process may be used to remove at least a portion of any resulting discontinuity in the destination image. The optimization may be used to eliminate the discontinuity on the transfer region boundary as well as maintain the gradient in the rest of the destination image. Based on a known boundary between regions, the optimization stage may enhance the cross-region coherence by naturally propagating the colors beyond the boundaries while preserving the gradient of the remaining parts of the destination image. To perform the optimization, Equation 2 may be used, where the energy term is minimized.
In Equation 2, μpq=ƒp−q, where f is the unknown function for the optimization and vpq=gp−gq, where g is the value of original image. In addition, p and q are neighbor pixels and Ω represents the regions that are not covered by the transfer process of the operation 314. On the boundary of the region, ƒp=gp.
Equation 2 may form a sparse, symmetric, positive-definite system. In an embodiment, a Gauss-Seidel SOR algorithm (Y. Saad, “Iterative Methods For Sparse Linear Systems,” 1 st Ed. PWS, 1996.) may be used to minimize the energy in Equation 2 because the Gauss-Seidel SOR algorithm has a stable performance. In some embodiments, the optimization resembles that in Poisson image editing because both techniques aim to maintain a gradient that maintains salient features for visual quality as discussed in Perez et al. (P. Perez, M. Gangnet, and A. Blake, “Poisson Image Editing,” ACM Transaction on Graphics, vol. 22, p. 313-318, 2003.)
In some embodiments, a first source region 408 may be selected using the color transfer tool 114, such as a brush tool, to demarcate the region of the first source image 402 that shows the color of a person's hair in the first source image 402. The user may select the first source region 408 by dragging the brush tool over the hair portion of the first source image until the hair is completely covered by the designator. In some embodiments, other color transfer tools may be used to select source regions and/or destinations, such as a line tool, object tool, and so forth. Some color transfer tools may enable selecting the region inside of an area demarcated by the user while other color transfer tools may be used to select an area covered by an application of the tool, such as brush strokes over the region. Similarly, the user may select a second source region 410 from the first source image. In addition, the user optionally may select a color style from other source images, such as the second source image 404. Thus, the user may select a third source region 412.
The user may select corresponding regions on the destination image 406 which are associated with the source regions 408, 410, 412 via unique designators which create color transfer pairs. As shown in the imagery 400, three color transfer pairs are established. A first color transfer pair includes the first source region 408 and a first destination region 416. A second color transfer pair includes the second source region 410 and a second destination region 418. A third color transfer pair includes the third source region 412 and a third destination region 420.
As shown in
In accordance with one or more embodiments, at 516, the user may select a region where the user desires the color of the destination image 506(3) to be maintained, rather than to be modified by a transferred color style from the source image 504(3). The user may select a maintain region 518 by a demarcation line, area, or by other user selections. For example, a maintain region 518 may be established by the user drawing a line between a selected destination region, such as the destination region 512 and another portion of the destination image 506(3). In other embodiments, the maintain region may be determined by a user selection of an entire area to maintain, such as by using the color maintain tool 116 of
At 520, the color style may be transferred from the source image 504(4) to the destination image 506 to create a modified image 506(4). The modified image 506(4) may include modified regions 522, which include colorization statistics from the selected source region 510. In addition, the modified image 506(4) may include a color maintained region 524, which is maintained because of the maintain region 518, and thus not altered by the color transfer process.
In accordance with one or more embodiments, at 610, the user may demarcate one or more destination regions as maintain regions with the color maintain tool 116 to maintain a color style of the maintain regions in the destination image after a localized color transfer process is implemented for other regions of the destination image. When the user desires to create a maintain region, at 612, the user selects a region of the destination image to maintain. In some embodiments, the user may draw a boundary across a portion of the image to create the maintain region while in other embodiments the user may select the maintain region by circumscribing the maintain region or covering the maintain region, such as by covering it with brush strokes by the color maintain tool 116. At 614, the user may create an additional color maintain region. At 616, the user may select another color transfer by returning to the operation 604.
In accordance with some embodiments, the color transfer may be implemented by the computing device at 618. The color transfer at 618 is similar to the color transfer that was described at the operation 314 of
In some embodiments, at 620, the computing device may perform an optimization to the destination image after the color transfer has been completed in the operation 618. The optimization at 620 is similar to the optimization that was described at the operation 316 of
In accordance with one or more embodiments, the user may select a source region 706 on a selected source image 708. For example, the user may brush a line over an area of the sky represented in the selected source image 708. In some embodiments, the selected source image 708 may change in shade (e.g., get darker or lighter) to show that a source region has been selected and/or the user is in a localized color transfer mode. A selected destination image 710 may include a user selected destination region 712. For example, the user may use the color maintain tool 116, such as a brush, to cover a portion of the sky representation of the destination image 710. The user may also create a maintain region 714. The maintain region 714 may be a line drawn adjacent to the destination region, such that the color transfer does not occur beyond the maintain region 714.
A modified image 716 may be created from the destination image after a localized color transfer and optimization, including a color maintain process. As shown, a first region 718 representing the sky of the modified image 716 shows the new color style reflecting the color style of the source region 706, as applied to the destination region 712. A second region 720 may include the original image color style because of the presence and operation of the maintain region 714.
In further embodiments, the localized color transfer techniques herein may be used to obtain much richer colors for a color transfer process than previously available. For example, stroke-based colorization often looks flat and unnatural because only a limited number of strokes are used. Instead of carefully specifying multiple colors, the color transfer techniques disclosed herein enable the user to select one or more source regions from a plurality of source images to apply to a destination image to make a modified image include richer color variation than would otherwise be attainable.
Computing device 800 may have additional features or functionality. For example, computing device 800 may also include additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in
Computing device 800 may also contain communication connections 824 that allow the device to communicate with other computing devices 826, such as over a network. Communication connection(s) 824 is one example of communication media. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Computer readable media can be any available media that can be accessed by a computer. By way of example, and not limitation, computer readable media may comprise “computer storage media” and “communications media.”
Various modules and techniques may be described herein in the general context of computer-executable instructions, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, etc. for performing particular tasks or implement particular abstract data types. These program modules and the like may be executed as native code or may be downloaded and executed, such as in a virtual machine or other just-in-time compilation execution environment. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments. An implementation of these modules and techniques may be stored on or transmitted across some form of computer readable media.
The above-described techniques (e.g., methods, systems, etc.) pertain to localized color transfer techniques. Although the techniques have been described in language specific to structural features and/or methodological acts, it is to be understood that the appended claims are not necessarily limited to the specific features or acts described. Rather, the specific features and acts are disclosed as exemplary forms of implementing such techniques.
This application claims priority to U.S. Provisional Patent Application No. 60/983,860 to Ying-Qing Xu et al., entitled, “Color Transfer Brush”, filed Oct. 30, 2007 and incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
60983860 | Oct 2007 | US |