IMAGING SYSTEM FOR SIMULATING IIAIR STYLES
Field of the Invention The present invention relates generally to computer imaging programs and, more specifically, to a method and system for superimposing hair styles on an image of a person.
Background of the Invention
Many people have recognized the benefits of a computer imaging system that would allow images of different types of hair styles to be superimposed over an image of a person. An imaging system that allowed a client to view different hair styles would be particularly helpful at hair salons in order to allow the client to examine many different styles and choose the one that is most desirable. An imaging system that simulated different hair styles would also be beneficial to the hair replacement industry. Simulating how a client or patient would likely look after hair grafts or hair transplants would simplify the decision of the client on whether to proceed with such a procedure. Many people have therefore tried to develop an imaging system that would quickly and easily allow a client to view different hair styles on their own image.
Several shortcomings have prevented the wide-spread use of hair style imaging systems. The first shortcoming of most imaging systems is that the systems do not accurately match the client's existing hair color with the simulated hair style that is applied over the client's image. Because the displayed hair style is a different color from the client's own hair, the applied hair style looks unnatural and artificial. Oftentimes many different colors of a hair style may be stored by the imaging system in an attempt to closely approximate the client's own hair color. Unfortunately, even
a slight difference in the color of the hair style and the color of the client's own hair is easily distinguishable when the hair style is applied to the image of the client.
An additional shortcoming of existing imaging systems is that it is often difficult to accurately locate the hair style on the client image. In order for a superimposed hair style to look natural, the hair style must be correctly positioned on the client's image. To allow accurate positioning of the hair, many existing systems superimpose the hair style using reference points that are entered by the system operator. For example, the system operator may locate reference points pinpointing the ears of the client so that the hair style may be positioned with respect to the ears. Unfortunately, the use of reference points does not adequately solve the placement problem. Using reference points slows the imaging process since it requires the additional step of requiring the operator to enter the reference points. Moreover, the use of reference points cannot be universally applied because of the different shapes of people's heads and the fact that most features on a person's head are not symmetric. As a result, most imaging systems are unable to achieve a realistic positioning of the hair style on the image of the client's head.
Still another shortcoming of existing imaging systems is that they are unable to simulate a receding hairline in a hair style. Simulating a receding hairline would be advantageous to show the effects of aging on an image of the client. Simulating a receding hairline would also be beneficial in the hair replacement industry, since the slight recession may more accurately represent the results achievable through transplant or graft procedures. Existing imaging systems are unable to accurately simulate a receding hairline.
Due to the above-mentioned shortcomings, imaging systems for the display of different hair styles have yet to be recognized or widely accepted by those in the hair style industry.
Summary of the Invention The present invention provides an aesthetic imaging system for accurately displaying different hair styles on an image of an individual (hereinafter referred to as the "client"). The image of the client is captured by scanning a photograph into the imaging system or using a digital camera to capture the image. Once the image has been stored, the image is displayed on a computer monitor. The client or a system operator defines the color of the hair style to be displayed on the image by circling a region of the image containing the client's current hair. A number of hair styles are then displayed to the client in a hair style index. When a desired hair style is selected,
the color previously defined is mapped onto the hair style so that the hair style is displayed in the natural color of the client's hair. The client or system operator may then position the hair style on the image of the client. The resulting image looks natural because the hair style is displayed in the same color as the client's own hair. In accordance with one aspect of the invention, a mapping technique is disclosed for mapping the color from the defined color matching region onto the hair style. The selected hair style is first converted to a greyscale image. The mapping technique then constructs histograms representing the red, blue, and green color channels in the selected region of the client's own hair, and a histogram of the greyscale values in the hair style. The histograms are divided into a number of sections having an equal number of samples, and the sections used to map the colors represented in the red, green and blue histograms to the greyscale values in the greyscale histograms. The disclosed mapping technique generates a hair style that looks natural when added to the client's image since the hair style is the color of the client's own hair.
In accordance with another aspect of the invention, when the hair style is initially displayed on the screen with the client's image, the hair style is displayed so that it is semitransparent. The client or system operator may position the hair style to a desired location because the underlying image of the client can be viewed through the hair style. The translucency of the hair style therefore allows the accurate alignment and positioning of the hair style on the image of the client. The hair style may also be appropriately resized by lengthening, widening, or changing the rotation of the hair style. Once the desired position, size, and orientation of the hair style has been achieved by the system operator, the hair style is converted to an opaque image so that the underlying image of the client cannot be viewed through the hair style.
In accordance with still another aspect of the invention, an erosion tool is provided in the aesthetic imaging system. The erosion tool causes the outer boundary of the hair style to slowly erode away. The amount of erosion is controlled by the client or system operator, and can be used to accurately simulate a receding hairline or to more closely approximate the results achievable through hair replacement surgery.
It will be appreciated that the disclosed aesthetic imaging system offers several advantages over prior art systems. Because the color of the hair style is matched to the client's hair color and the hair style accurately positioned on the client's image, the client is presented with a very natural and realistic-looking image. Such an image allows the client to make a more informed decision about selecting a hair style or
opting for hair replacement surgery. Moreover, the ability to erode the selected hair style when displayed on the client allows achievable surgical results to be more accurately simulated. By accurately simulating surgical results, the client can make a more informed decision about whether to pursue hair replacement surgery. Brief Description of the Drawings
The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated as the same becomes better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein: FIGURE 1 is a block diagram of an aesthetic imaging system formed in accordance with the present invention;
FIGURE 2 is a flow chart illustrating an exemplary main routine by which digital images may be captured, stored, and viewed using a hair style simulation module in the aesthetic imaging system; FIGURE 3 is an exemplary routine of the hair style simulation module that allows a hair style to be simulated on an image of a client;
FIGURES 4A- C are pictorial representations illustrating the process of adding a hair style to a client's image;
FIGURE 5 is a pictorial representation illustrating a hair style selection dialog box from which a desired hair style is selected;
FIGURES 6A-6B are diagrammatic representations of the red, green, and blue (RGB) channels corresponding to the desired hair style and an alpha channel mask corresponding to the desired hair style and used to implement an erosion tool; and
FIGURES 7A-7B are a flow chart and a representative diagram of an exemplary routine for matching the color of a hair style with the color of the client's hair.
Detailed Description of the Preferred Embodiment
An aesthetic imaging system 20 formed in accordance with the present invention is illustrated in FIGURE 1. The aesthetic imaging system 20 includes an imaging program 21 that runs on a processing unit 22 controlled by an operating system 24. A memory 26 is connected to the processing unit and generally comprises, for example, random access memory (RAM), read only memory (ROM), and magnetic storage media such as a hard drive, floppy disk, or magnetic tape. The processing unit and memory are typically housed within a personal computer 28 which may be, for example, a Macintosh™, International Business Machines (IBM™) or
IBM-compatible personal computer. When used with IBM and IBM-compatible personal computers, the operating system 24 may be DOS based or may incorporate a windowing environment such as Microsoft Windows® or OS/2™.
The aesthetic imaging system 20 also includes an image capture board 30 that is coupled to the processing unit 22, a monitor 32, a video source 34, and a printer 36. The video source, monitor, and printer are coupled to the processing unit 22 through the image capture board 30. The video source may include one or more video cameras, a VCR, a scanner, or similar source for providing digital images to be edited by the aesthetic imaging system. The aesthetic imaging system further includes a pointing device, preferably a stylus (pen) and tablet 38, that is connected to the processing unit 22. In addition, the aesthetic imaging system may include a modem 40 to provide on-line capabilities to users of the system, such as technical support and teleconferencing. The image capture board 30 has a plurality of buffers in high-speed memory, e.g., RAM, that are used by the imaging program 21 to allow the quick manipulation of images. Suitable image capture boards for use in the aesthetic imaging system include the Targa +64 and Targa 2000 boards, distributed by Truevision, Inc. of Indianapolis, Indiana. Additional information about the operation of the hardware in the aesthetic imaging system 20 may be found in the commonly assigned, copending U.S. patent application Serial No. 08/406,201 entitled "Aesthetic Imaging System" (hereinafter the "Aesthetic Imaging System application"), the drawings and specification of which are expressly incorporated herein by reference.
Prior to discussing the aesthetic imaging system in further detail, a compendium of terms used in the application may be helpful:
Image A digital photograph or picture of a client.
Stylus The "pen" that may be used to select menus, modify images, and carry out other commands in the program. The stylus controls the cursor, just as a mouse pointing device does on a personal computer.
Tablet, or
Pad The electronic notepad used in conjunction with a stylus. The pen must be held relatively close to the pad in order for the pen to communicate with the
tablet. Unlike a mouse, the tablet follows an X / Y grid that matches the monitor, i.e., if the pen is positioned at the top left corner of the tablet, the cursor is displayed at the top left corner on the monitor.
Floating Moving the pen to move the cursor, without actually touching the tablet.
Selecting Selecting (also referred to as "tipping" or "pressing") the tip of the pen briefly onto the tablet. This selects a command or affects the drawing tool, depending on the current procedure being implemented.
Cancel Using the side button on the pen to execute a command.
Moving Pressing the tip of the pen on the tablet, releasing it, then moving it across the tablet.
Pressing or Tipping & Dragging Pressing the tip of the pen, then dragging it across the tablet while maintaining pressure. When using drawing and shaping tools, this turns the cursor into a drawing tool, enabling the user to draw freehand objects or "brush" the image in any manner.
FIGURE 2 illustrates an exemplary main routine executed by the processing unit 22 of the aesthetic imaging system 20 in order to implement the imaging program 21 in accordance with the present invention. At block 60, a system startup is performed wherein the computer looks for peripheral devices that are connected to the aesthetic imaging system, the memory is tested, and any other necessary startup procedures are implemented. At block 62, the imaging program displays a main menu, which provides access to the various features of the imaging program.
Specifically, the main menu includes the following options that are pertinent to the present invention: Storage, Camera, Hair Style, and Exit. Each option is described in further detail below.
The first two main menu selections, i.e., Storage and Camera, allow a system operator to load an image of a client for editing. It will be appreciated that the aesthetic imaging system 20 may be implemented by a system operator specifically trained to use the system, or when convenient, by the client. However, for purposes of the following description, the aesthetic imaging system 20 will be described as being used by a system operator as a service to a client. The first option is to capture an image of the client with the digital camera 34. Accordingly, at a decision block 64, a test is made to determine if the Camera option has been selected from the main menu. If the Camera option has been selected, at a block 66 an image of the client is captured using the digital camera and stored in the memory 26 of the aesthetic imaging system. The captured image is displayed to the system operator at a block 68. After displaying the image of the client, the main routine returns to block 62.
The second option for obtaining an image to edit is to load a previously stored image. The previously stored image may have been scanned into the system from a photograph, or downloaded from a digital storage media. If the Camera option was not selected, a test is made at a decision block 70 to determine if the Storage option has been selected. If the Storage option was selected, at a block 72 the image to be edited during the current session is selected by the system operator. The main routine then returns to block 62 where the main menu is again displayed.
Once an image has been loaded, the system operator may modify the image as described in the copending Aesthetic Imaging System application above. In addition, the present invention allows the system operator to superimpose different hair styles on the image. At a decision block 76 a test is made to determine if the system operator has selected the Hair Style option from the main menu displayed at block 62. If the Hair Style option has been selected, a hair style module subroutine is called at block 78. A suitable subroutine for implementing the Hair Style Module is depicted in FIGURE 3. If the Hair Style option is not invoked, the routine continues to a decision block 80.
At decision block 80 a test is made to determine whether the Exit option has been selected from the main menu. If the exit option is selected the program
terminates. Otherwise, the program returns to block 62 to allow the system operator to continue the selection of main menu options.
FIGURE 3 is a flow chart of an exemplary routine 100 for implementing the hair style module in the aesthetic imaging system 20. At a block 102 the selected image of the client is displayed. FIGURE 4A is a representative screen 150 that is displayed by the imaging system 20 when the system operator selects an image. A frontal image 152 of the client is preferably displayed so that the entire head of the client is visible. It will be appreciated that other views of the client, including oblique or side views, may also be displayed if desired. An advantage of the disclosed imaging system is that the client's hair color is used to color the hair style that is applied to the client's image. In order to define the client's hair color, at a block 104 the system operator defines a color matching region 154 of hair on the selected image 152 of the client. The color matching region is defined by using the cursor to circle a region anywhere within the client's present hair. The size of the region that is selected dictates the range of colors that are mapped onto the selected hair style. A larger region which incorporates many different shades of the client's hair results in a more realistic mapping to the hair style as described in additional detail below. If the client does not have any hair from which to select a color matching region, it will be appreciated that a color spectrum or other color chart may be displayed to the system operator to allow the system operator to select a desired hair color. Alternatively, the system operator may select a hair color from another client image stored in the aesthetic imaging system.
At a block 106, a hair style selection dialog box 200 as shown in FIGURE 5 is displayed. The dialog box contains a hair style index 202 that contains a number of sample hair styles 204 that may be applied to a client's image. The hair styles in the hair style index may be captured from a variety of sources. Preferably, however, the hair styles within the hair style index are obtained by taking images of actual people and removing those portions of the captured images that do not correspond to the hair. The hair styles are therefore displayed in the hair style index 202 in the natural hair color of the person from which the hair style was obtained. Using actual people's hair styles greatly improves the realism of the hair style when it is displayed on a client's image. The hair styles are depicted in miniature so that a number of styles may be viewed simultaneously.
The type of hair styles 204 that are displayed in the hair style index 202 is dependent upon criteria that are selected by the system operator from a list of
criteria 206. That is, selecting different criteria causes the number and type of hair styles 204 that are displayed within the hair style index 202 to change accordingly. The criteria list contains a number of pull-down menus that allow the system operator to select qualities of the desired hair style. Preferably, the following qualities may be selected by the system operator: view, thickness, elapsed time, curl, grade, and gender. "View" is the view of the hair style that will be applied to the client, e.g., including but not limited to a front view, side view, or a top view. "Thickness" is the relative thickness, i.e., coarse versus fine, of the desired hair. Hair styles having coarse hair appear differently from hair styles having fine hair. "Elapsed time" suggests the amount of time following a hair transplant procedure. One of the types of hair styles that may be stored in the aesthetic imaging system are hair style from persons who have undergone a hair transplant procedure. Elapsed time allows the system operator to specify the length of time following the transplant procedure of the displayed hair styles. "Curl" allows the system operator to select hairstyles that vary from curly hair to straight hair. "Grade" is the overall quality of the hair. And, finally, "gender" determines whether the displayed hair styles are suitable for men, women, or are unisex. Each of the criteria may be specified by pulling down an associated menu and highlighting the desired choice. For example, in FIGURE 5 a pull-down menu 210 for the gender quality is currently highlighted to show the selected quality to be "male". Those of ordinary skill in the art will appreciate that the depicted hair style qualities are merely an illustrative sample of the type of qualities that may be provided for selection. Many other types of qualities can be provided in lieu of, or in addition to, those described above.
At a block 108, the system operator is allowed to select a desired hair style that is to be superimposed over the client's image using the dialog box 200. When the system operator finds a hair style in the hair style index 202 that the system operator would like to superimpose on the client's image 204, the system operator selects the hair style by positioning the cursor over the appropriate image in the hair style index 202 and tipping the pen on the tablet. Selecting a hair style highlights the box containing the hair style. For example, in FIGURE 5 the client has selected the third hair style from the left in the top row of the index. Following selection of the hair style, the system operator depresses an OK button 208 to return to the image of the client as shown in FIGURE 4B.
Prior to discussing what occurs after the system operator selects a hair style 204, it is necessary to describe how the selected hair style is stored in the memory 26
of the aesthetic imaging system 20. FIGURES 6A and 6B are representative diagrams of how each hair style 204 is stored in the aesthetic imaging system 20. FIGURE 6 A depicts the color components of the hair style image 204. Each image in the aesthetic imaging system comprises a number of pixels, the color of each pixel defined by an 8-bit red component, an 8-bit green component, and an 8-bit blue component. It will be appreciated that the red, green, and blue (RGB) format for storing the pixels of an image is well-known in the art. The pixels inside an outer boundary 222 of the hair style are therefore each defined by a 24-bit value corresponding to the color of each pixel. Also associated with each image is an alpha key channel that provides information about the opacity of each pixel. For each pixel in the image, the alpha key channel contains an 8-bit value that represents the transparency of the pixel when displayed or superimposed over another pixel. For a given alpha value, the following formula is used to determine the RGB value of the resulting pixel displayed to the system operator when an image having a first pixel is superimposed over an image having a second pixel:
(Yl * A) + (Y2 * (l-A)) - Yf (1) where:
Yι= the RGB value of the superimposed pixel Y2 = the RGB value of the underlying pixel;
Y = the RGB value of the displayed pixel; and
A = the alpha value corresponding to the superimposed pixel divided by 255. An alpha value corresponding to zero therefore causes the superimposed pixel to be transparent, and an alpha value corresponding to xFF (255) causes the superimposed pixel to be opaque. In between these extremes, various amounts of the underlying pixel will be visible.
As represented diagrammatically in FIGURE 6B, the alpha channel is used to create an alpha mask 220 that corresponds to the superimposed hair style. The alpha values for those pixels outside of the boundary 222 of the hair style are set to 0 (transparent). Those pixels that fall within the boundary 222 of the hair style have an alpha value greater than zero. The transition of the alpha values from within the boundary to outside of the boundary may be abrupt, e.g., from alpha = 255 to alpha = 0. Preferably, however, the alpha values around the boundary of the hair style are stepped to smooth the boundary of the hair style. From the boundary of the hair
style, and proceeding toward the interior of the hair style, the alpha values incrementally increase from 0 to 255. While a first gradation 224 (of alpha = 100) and a second gradation 226 (of alpha = 200) are depicted in FIGURE 6B, it will be appreciated that a greater or lesser number of gradations may be included around the outer edge of the hair style. Moreover, while a linear gradation is depicted, it will be appreciated that the gradation may increase logarithmically or by another mathematical function. Those pixels in a central region 228 of the hair style have an alpha value of 255 (opaque). While separated for clarity in FIGURES 6A and 6B, it will be appreciated that the color pixel information and the alpha key channel information are preferably stored in memory 26 as a single image by the aesthetic imaging system 20.
After the desired hair style 204 is selected at block 108, the aesthetic imaging system 20 colors the hair style at a block 1 10 so that it matches the client's actual hair color as defined previously at block 104. FIGURE 7A depicts a preferred routine 250 for coloring the hair style so that the hair style matches the color of the client's hair. At a block 252 the RGB pixels in the selected hair style 204 are first converted to greyscale values. It will be appreciated that the conversion from color RGB pixel values to greyscale values are well-known to those in the art. At a block 254, a histogram of the greyscale pixel values in the selected hair style is constructed. The histogram represents a graph of the number of occurrences of each of the greyscale pixel values. It will be appreciated that depending upon the storage capabilities of the aesthetic imaging system 20, each selected hair style may already be stored with an associated histogram of its greyscale pixel values.
At a block 256, histograms are constructed for the color pixel information contained in the color matching region 154 previously defined by the system operator. Three histograms are constructed, one corresponding to the red channel, one corresponding to the blue channel, and one corresponding to the green channel of the pixels within the color matching region 154. The size of the histograms will obviously vary depending upon the size of the color matching region 154 that was selected by the system operator.
At a block 258, the histogram that was constructed at block 256 for each color channel is divided into N sections, each section having an equal number of samples (i.e., each section having an equal number of pixel value occurrences within the section). The histogram that was constructed at block 252 for the greyscale pixel values in the selected hair style 204 is also divided into N sections, each section
having an equal number of samples. It has been determined that N = 40 gives a realistic color mapping from the color matching region to the selected hair style for the majority of hair styles. It will be appreciated, however, that a greater or lesser value for N may be selected, with varying results depending upon the greyscale range within the selected hair style and the range of colors in the color matching region 154 defined by the system operator.
At a block 260, mapping tables are constructed between the histogram of the greyscale values in the selected hair style 204 and the histogram of each color channel from the color matching region 154. A mapping table is created for each section of each histogram pair, e.g. red-to-greyscale, green-to-greyscale, and blue-to-greyscale. Each mapping table is constructed by assigning the lowest greyscale pixel value in a given section to the color that corresponds to the lowest colored pixel value in the corresponding section of the color channel (red, green, or blue). The highest greyscale pixel value in a given section is assigned to the color corresponding to the highest colored pixel value in the corresponding section of the color channel (red, green, or blue). The remaining greyscale pixels are assigned to a value somewhere between the lowest and the highest RGB pixel values. To assign the remaining greyscale pixels, a linear interpolation is performed between the lowest colored pixel and the highest colored pixel in the corresponding section of each color channel. The remaining greyscale pixels are then mapped to the linearly inteφolated values within each section.
The mapping of the histograms may be better understood with reference to FIGURE 7B. FIGURE 7B represents the mapping of a hypothetical greyscale histogram 270 having twelve greyscale levels (xi to x ) with a red channel histogram 272 having nine red levels (yi to y9). The y-axis of the histograms corresponds to the pixel values within the defined region or hair style, and the x-axis to the number of pixels within the defined region or hair style that have each pixel value. In the hypothetical mapping, N - 2. Each histogram is therefore initially divided into two sections having an equal number of samples. As shown in FIGURE 7B, each section in the greyscale histogram contains 59 samples (i.e., 59 occurrences of pixels having the values of xi to x7, and 59 occurrences of pixels having the values of xg to xi2), while each section in the red channel histogram contains 19 samples. A mapping table is then constructed between corresponding sections in the greyscale histogram 270 and the red channel histogram 272. Creating the mapping table for the first section, all pixels having a greyscale value of xi will be
mapped to the red pixel value of yi, and all pixels having a greyscale value of x7 will be mapped to the red pixel value of y5. The pixels having a greyscale value of x2-xβ are mapped to the red pixel values of y2-y4 based on a linear inteφolation between the red pixel values. A similar mapping table is created for the second section of the greyscale histogram and the red channel histogram. The step of building a mapping table for each section is also repeated for the other channels (green and blue) of the image.
When completed, the mapping tables describe how the color from the color- matching region 154 is mapped onto the selected hair style 204 in a realistic manner. Returning to FIGURE 7 A, at a block 262, the color mapping is performed to convert the selected hair style 204 to the color of the client's hair. Because subtle shading and color are retained by the mapping method, the resulting hair style very closely simulates how the client's own hair would appear if styled in a similar manner.
Returning to FIGURE 3, after the selected hair style 204 has been colored to match the client's hair at block 110, at a block 112 the selected hair style is displayed on the image 152 of the client. With reference to FIGURE 4B, when the hair style 204 is initially displayed on the client's image 152, the hair style is displayed so that it is semitransparent. That is, the image of the client 152 may be seen through the image of the hair style 204. The image of the hair style is made semitransparent by changing the alpha values in the hair style alpha mask 220 so that the hair style is not opaque.
When displayed on a client's image 152, the hair style 204 is also surrounded by a sizing box 156. The sizing box allows the system operator to vary the size and orientation of the hair style. The size of the hair style may be adjusted by selecting either the top, bottom, or either side of the sizing box. Selecting the top or bottom of the sizing box and dragging the top or bottom upwards or downwards, respectively, stretches the vertical component of the hair style. Moving the top or the bottom towards each other compresses the vertical component of the hair style. Similarly, selecting either of the sides of the resizing box 156 and moving the sides inwardly compresses the horizontal component of the hair style 204. Moving the sides outwardly expands the horizontal component of the hair style. It will be appreciated that techniques for stretching or compressing an image in this manner are well-known to those skilled in the art.
Moreover, the hair style 204 may also be rotated to a desired angle. To rotate the hair style, the system operator selects a rotate menu option. When the rotate
option is selected, an axis 158 is displayed that extends from a center point 160 of the hair style. Using the cursor, the system operator may select the axis and rotate the axis around the fixed center point. As the axis rotates, the hair style is rotated an equal amount. Returning to FIGURE 3, at a block 114 the system operator is allowed to position and size the hair style 204 on the client's image 152. To position the hair style, the system operator moves the cursor over the hair style, tips the pen on the tablet to select the hair style, and moves the hair style to the desired location by floating the pen over the tablet. Because the hair style is semitransparent, it is easy for the system operator to accurately position the hair style at a desired location on the client's image. Moreover, the system operator may also resize and reorient the hair style during the positioning process so that it closely fits the size, shape, and orientation of the client's head. Another tip of the pen places the hair style on the image of the client. When placed on the image of the client, at a block 118 the hair style is displayed in opaque form on the client's image. As shown in FIGURE 4C, the opaque hair style 204 covers the underlying portion of the client's image 152.
At a decision block 120, a test is made to determine if the system operator has correctly positioned the hair style on the client's image 152. If the system operator desires to reposition the image, the operator tips the pen when the cursor is located in the resizing box 156. Tipping the pen returns the routine to block 112, where the hair style is made semitransparent. The system operator is then allowed to move, resize, and again place the semitransparent hair style on the image 152 of the client. If the system operator is satisfied with the position of the hair style at block 120, the operator tips the pen when the cursor is located outside of the resizing box 156. Tipping the pen outside of the resizing box indicates that the hair style is correctly positioned. The routine then proceeds to a decision block 122. Because the system operator was able to accurately position the hair style 204 on the client's image 152, the displayed image closely simulates how the client would appear with the selected hair style. At decision block 122, a test is made to determine if the system operator has selected an erosion tool. The erosion tool is provided by the aesthetic imaging system 20 to allow the system operator to more accurately blend the hair style with the client's own hair, to simulate the effect of a receding hairline, or to simulate achievable results from hair replacement surgery. The erosion tool may be selected through a menu choice, function key, or other selection means known in the art.
The erosion tool uses the alpha mask 220 described above to erode the outer boundary of the selected hair style 204. With respect to FIGURE 6 A, it will be appreciated that making the boundary 222 of the hair style 204 more transparent will allow more of the client's image 152 to show through the hair style around the edges. Several different techniques may be used to erode the outer boundary. Preferably, however, the following incremental scheme is used to simulate the erosion of the hair style. An initial erosion step of the hair style is made by setting the alpha value of the first gradation 224 equal to 25. A second erosion step is made by setting the alpha value of the second gradation 226 equal to 50. Third and subsequent erosion steps are made by adding additional gradations progressing inwardly from the boundary 222 towards the center of the hair style. The alpha values of the additional gradations progressively increase in steps of 25, i.e., the third gradation has an alpha value of 75, the fourth 100, etc. The boundary of the hairstyle is therefore made more transparent with each additional erosion step. Preferably, the number of erosion steps performed on the hair style is tied to the movement of the cursor. At a block 124 and a block 126, an erosion step is performed on the hair style and the hair style displayed to the system operator. At a decision block 127, a test is made of the cursor position. As the system operator floats the cursor from the top of the screen to the bottom of the screen, the number of erosion steps is changed. When the cursor is at the top of the screen, only a single erosion step is performed. When the cursor is at the bottom of the screen, ten erosions steps are performed. In between, the number of erosion steps varies between two and nine. The system operator may therefore view a variable amount of erosion by moving the cursor from the top to the bottom of the screen. When a desired erosion amount is achieved, the erosion may be halted by tipping the pen on the tablet.
When the system operator has achieved a desired amount of erosion of the hair style 204, the routine continues to a block 128. At block 128 the image 152 of the client may be stored with the hair style superimposed over the image. It will be appreciated that after storing the image, the image may be subsequently manipulated or printed out and provided to the client.
While the preferred embodiment of the invention has been illustrated and described, it will therefore be appreciated that various changes can be made therein without departing from the spirit and scope of the invention. The incremental erosion scheme described above is merely representative of one technique for making the outer edges of the hair style more transparent. Other erosion schemes could also be
envisioned that would accomplish the same result. For example, the erosion steps may change the alpha values in the alpha mask 220 by a greater or a lesser amount than 25. The erosion steps may also be unequal, and increase logarithmically or based on another mathematical function. Moreover, the number of erosion steps that may be performed on the hair style may vary depending on the type of hair style. Some hair styles may be capable of being eroded with a greater number of steps, and some hair styles with a lesser number of steps. It will be appreciated that the type of erosion technique may therefore be varied for different hair styles. Consequently, within the scope of the appended claims it will be appreciated that the invention can be practiced otherwise than as specifically described herein.