The present invention relates to an image processing system and method, and in particular to a system and method of digital engraving for image authoring. The engraving effect converts a source image to an engraved-like image.
Victor Ostromoukhov, disclosing “Digital Facial Engraving,” SIGGRAPH 1999, presents a system to create Digital Facial Engraving. In this system, a lot of effort and time have to be put in to produce an engraving image. A face, for example, is manually segmented, parametric grids are morphed to fit the surface's geography, and those layers are merged with different merging styles. The engraving process, however, in this system requires much processing time and effort to generate engraving images.
Thus, the invention presents a simple system requiring less user participation to generate digital engraving from an input image.
Accordingly, an embodiment of the invention provides a method of digital engraving, simply and rapidly generating high-quality digital engraving images.
Accordingly, an embodiment of the invention discloses a method of digital engraving. First, a source image is obtained and converted to a grayscale image or any other applicable format file. Edges of the source image are extracted and stored in a buffer. Next, the maximum and minimum grayscale ranges of the grayscale image is set, the brightness and contrast of the grayscale image are adjusted for generating a more convincing engraved image, line patterns are selected, and engraving lines are generated procedurally based on the selected line patterns and the grayscale ranges, thus generating layers corresponding to the source image. Next, generated layers are merged directly on a target image or on a mask, edges of the target image are emphasized once again using the extracted stored in the buffer, and finally the target image is output.
An embodiment of the present invention further provides a system of digital engraving. The system comprises a data extracting unit and a data processing unit.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
The present invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The present invention discloses a method of digital engraving, generating a digital engraving image from a source image. Engraving lines are smooth and generated procedurally, and the widths thereof represent grayscale ranges of the source image. An engraving system of the invention can be full automatic or semi-automatic with very less user participation for generating different engraving styles. The line patterns, line density, and line colors can be manually determined or system predefined. Multiple layers of a line can be generated and merged using different merging methods, generating different engraving results. In addition, both tones and edges of the source image can be preserved.
In step S11, a source image is obtained.
In step S12, edges of the source image are extracted using a method, such as Canny algorithm, for preserving high-frequency details and edges thereof, and the edges are stored in a buffer.
In step S13, a layer corresponding to the source image is generated. The number of generated layers can be manually determined or predefined by the engraving system of the invention. Layer generation further comprises the following steps, as shown in
In step S21, the source image is converted to a grayscale image and the maximum and minimum grayscale ranges thereof can be set automatically by the engraving system or manual determination. A drawing, for example, with grayscale value ranged from 25 to 125 indicates only pixels with grayscale values within the range are available for generating engraving lines.
In step S22, the brightness and contrast of the grayscale image are adjusted, obtaining values of image parameters for generating a more convincing engraved image. The values of the image parameters are stored in the buffer. The adjustment can be performed either manually or automatically by the engraving system. In addition, the source image can be converted to any other applicable format image. An Edge-Preserving Blur technique is further used to smooth out the grayscale image for creating smoother engraving lines.
In step S23, line patterns are selected either manually or automatically by the engraving system.
In step S24, engraving lines are generated procedurally based on the selected line patterns and grayscale values of the line patterns, as shown in
In step S14, layers, if more than one, are merged directly to the target image or mask.
In step S15, edges of the target image are emphasized using the extracted edges stored in the buffer, increasing grayscale values of edge pixels. The edges can be added to the target image or mask.
In step S16, the target image with the rendered engraving lines is output. The mask is merged to the target image when the engraving lines are rendered to the mask. The color of an engraving line and the background of the engraving line is plain black-and-white, user-defined single color, or source pixel color.
In addition, more layers are generated and merged by repeating the generating and merging steps, thus generating a high-quality digital engraving image.
Data extracting unit 200 obtains a source image 100. Data processing unit 300 extracts edges 250 of the source image and the edges are stored in a buffer. Next, data processing unit 300 converts the source image to a grayscale image and adjusts the brightness and contrast of the grayscale image for obtaining values of image parameters. The values of the image parameters are stored in the buffer. Next, data processing unit 300 generates engraving lines procedurally based on selected line patterns and grayscale values of the line patterns, thus generating at least one layer corresponding to the source image in accordance with a generated engraving line. The generated layer is stored in the buffer.
Next, data processing unit 300 merges generated layers to the target image or mask, emphasizes edges of the target image are using the extracted edges stored in the buffer, and outputs the target image with the rendered engraving lines.
Embodiments of the invention generate a digital engraving image from an input image with different engraving styles created by varying line patterns and merging methods. The invention is simple and efficient and can be applied to digital image or video processing.
While embodiments of the invention have been described by way of example and in terms of preferred embodiments, it is to be understood that the invention is not limited thereto. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.