This Nonprovisional application claims priority under 35 U.S.C. §119(a) to Korean Patent Application No. 10-2006-0120429 filed Dec. 1, 2006, the entire contents of which are hereby incorporated by reference.
1. Field of the Invention
The present invention relates to open vector graphic (OpenVG) application program interface (API) translation, and more particularly, to an apparatus and method for translating OpenVG API, a mobile terminal comprising the translation apparatus, and a record medium storing the translation method.
2. Description of the Related Art
Vector graphic is the digital image created by a series of commands or mathematical statements that place lines or shapes in a given two-dimensional or three-dimensional space. In physics, a vector is a representation of both a quantity and a direction at the same time. In the vector graphics, a graphic file that results from a graphic artist's work is created and saved as a sequence of vector statements. For example, to draw a line, vector graphic file contains the information of the points to be connected instead of information of every point on the line. This results in much reduced file size. The vector graphic file is easier to modify than a raster image file.
As one kind of the vector graphics, there is Scalable Vector Graphics (SVG) which describes images based on the extensible markup language (XML). SVG is widely used in the web and is abundant in contents. However, SVG is slow in speed under a mobile environment because it processes many driving functions by using software.
Thus, in recent years, OpenVG is being used as mobile vector graphic for creating contents to be served for a mobile terminal. OpenVG led to improvement on a low rate under the mobile environment because it provides APIs which are supporting hardware acceleration to a variety of mobile terminals. However, OpenVG results in a reduction of the efficiency of image creation thereby resulting in a shortage of contents because contents developers have to create contents manually using algorithm.
Accordingly, the present invention is to provide an apparatus for translating OpenVG API, for providing abundant and diverse contents for a mobile terminal.
Also, the present invention is to provide an apparatus for translating OpenVG API, for promoting high-rate processing of driven contents and a reduction of consumption power in a mobile terminal.
Also, the present invention is to provide a method for translating OpenVG API, for efficiently providing abundant and diverse OpenVG contents to contents developer.
Also, the present invention is to provide a mobile terminal comprising an apparatus for translating OpenVG API and a computer readable record medium storing a program which realizes a method for translating OpenVG API.
In one aspect, there is provided an apparatus for translating OpenVG API. The apparatus comprises a data parsing unit, an OpenVG API script creating unit, and a raster image data output unit. The data parsing unit parses SVG format data depending on a data attribute. The OpenVG API script creating unit extracts an OpenVG API format syntax associated with each of the parsed SVG format data and creates an OpenVG API script. The raster image data output unit creates and outputs raster image data associated with the created OpenVG API script.
The parsing unit may comprise a data reading unit configured to read the SVG format data, a data parser configured to parse the read SVG format data depending on the data attribute, a data analyzing unit configured to check and analyze the parsed SVG format data, and a first storage unit configured to store the analyzed SVG format data on a per-attribute basis.
The data analyzing unit may transmit a result of the checking to the data parser and the data reading unit in sequence.
The OpenVG API script creating unit may comprise a syntax comparator configured to compare the respective parsed SVG format data with data previously stored in a syntax lookup table, a syntax extractor configured to extract an OpenVG API format syntax from the syntax lookup table depending on the comparison result, a script creator configured to combine the extracted OpenVG API format syntax and create the OpenVG API script, and a second storage unit configured to rearrange and store the OpenVG API format syntax of the OpenVG API script depending on an attribute of the created raster image data.
The syntax lookup table may store the OpenVG API format syntax associated with each of the SVG format data.
In another aspect, there is provided a mobile terminal comprising an apparatus for translating OpenVG API.
In a further another aspect, there is provided a method for translating OpenVG API. The method comprises: parsing SVG format data depending on a data attribute; creating an OpenVG API script by extracting an OpenVG API format syntax associated with each of the parsed SVG format data; and creating and outputting raster image data associated with the created OpenVG API script.
The parsing may comprise: reading the SVG format data; parsing the read SVG format data depending on the data attribute; checking and analyzing the parsed SVG format data; and storing the analyzed SVG format data on a per-attribute basis.
Depending on a result of the checking, the parsing and the reading may be repeated.
The creating of the OpenVG API script may comprise: comparing the respective parsed SVG format data with data previously stored in a syntax lookup table; extracting an OpenVG API format syntax from the syntax lookup table depending on the comparison result; creating the OpenVG API script by combining the extracted OpenVG API format syntax; and rearranging and storing the OpenVG API format syntax of the OpenVG API script depending on an attribute of the created raster image data.
The syntax lookup table may store the OpenVG API format syntax associated with each of the SVG format data.
In a yet another aspect, there is provided a computer readable record medium storing a program for executing a method for translating the OpenVG API.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are intended to provide further explanation of the invention as claimed.
The invention will be described in detail with reference to the following drawings in which like numerals refer to like elements.
Preferred embodiments of the present invention will be described in a more detailed manner with reference to the drawings.
As shown in
The data parsing unit 110 parses Scalable Vector Graphic (SVG) format data depending on the attribute of the data. In detail, the data parsing unit 110 reads and parses a web-based XML data file, e.g., a file with a “svg” extension, thereby preparing OpenVG API translation of data. A detailed description of the data parsing unit 110 will be later made with reference to
The OpenVG API script creating unit 120 extracts an OpenVG API format syntax associated with each of the parsed SVG format data and creates an OpenVG API script. The OpenVG API script creating unit 120 comprises a syntax lookup table to extract the OpenVG API format syntax associated with the parsed SVG format data in real time. A detailed description of the OpenVG API script creating unit 120 will be later made with reference to
The raster image data output unit 130 creates and outputs raster image data in a unit of pixel associated with the OpenVG API script. The outputted raster image data is displayed on a screen of a mobile terminal.
As described above, the OpenVG API translation apparatus according to an exemplary embodiment of the present invention can automatically translate the SVG format data so that it can be used in OpenVG, thereby expressing abundant vector graphic statements of the SVG format data by OpenVG as it stands.
In an exemplary embodiment of the present invention, a mobile terminal can comprise the OpenVG API translation apparatus, thereby expanding a contents expression region of the mobile terminal and promoting high-rate processing and a reduction of consumption power through hardware acceleration of the mobile terminal. Also, contents developer can create abundant and diverse OpenVG contents because SVG format data can be reused. The OpenVG API translation apparatus according to the present invention is no hindrance to any use, if hardware acceleration is needed in OpenVG API translation, as well as the mobile terminal. Contents developer mainly does the translation process using a computer. A computer without the OpenVG API translation apparatus of the present invention can be used to execute the translation process, as long as it has enough processing power to run the program, i.e., software for executing a method for translating an OpenVG API described later with reference to
As shown in
The data reading unit 210 reads SVG format data. The data reading unit 210 reads a header of data inputted to the data parsing unit 110, determines whether the input data is SVG format data, and sequentially reads the input data up to the last field.
The data parser 220 parses the read SVG format data depending on a data attribute predefined by the data parsing unit 110. The data attribute is distinguished and defined depending on information type such as a basic type, a text type, an XML type, etc. of
The data analyzing unit 230 checks and analyzes the parsed SVG format data. Before analyzing, the data analyzing unit 230 checks whether the parsed SVG format data is normal or abnormal. In case that it checked the SVG format data is abnormal, the data analyzing unit 230 informs the data parser 220 that the SVG format data is abnormal, and the data parser 220 again parses the SVG format data. In case that it checked the SVG format data is abnormal again from the re-parsed SVG format data, the data analyzing unit 230 informs the data reading unit 210 that the SVG format data is abnormal, and the data reading unit 210 reads SVG format data again. Here, the checking is limited to the predetermined number of times, thereby preventing an infinite loop. In other words, according to an exemplary embodiment of the present invention, the data analyzing unit 230 transmits the data check result to the data parser 220 and the data reading unit 210 sequentially when needed, thereby detecting an abnormality or normality of SVG format data before translation. After that, the data analyzing unit 230 analyzes the SVG format data for data translation.
The first storage unit 240 stores the analyzed SVG format data on a per-attribute basis. In detail, the first storage unit 240 can store the analyzed SVG format data on a per-attribute basis in a divided storage region for each attribute and transmit the SVG format data to the OpenVG API script creating unit 120 in real time, thereby improving a processing rate. For the improvement of processing rate, it is desirable that the first storage unit 240 is comprised of an internal Random Access Memory (RAM).
As shown in
The syntax comparator 410 compares each data with data previously stored in the syntax lookup table. The syntax lookup table (not shown) stores an Open VG API format syntax associated with each of SVG format data. Accordingly, the syntax comparator 410 compares the SVG format data received from the data parsing unit 110 with SVG format data stored in the syntax lookup table, by one-to-one matching or substitution. By doing so, the syntax comparator 410 can check whether there is the same or similar SVG format data and also, detect a matched syntax. This can lead to the improvement on a rate of translation processing and the guarantee for a reliability of translation processing.
The syntax extractor 420 extracts the OpenVG API format syntax associated with the SVG format data from the syntax lookup table depending on the comparison result.
The script creator 430 combines the extracted syntax and creates the OpenVG API script. According to an exemplary embodiment of the present invention, the OpenVG API script is displayed on a screen via the raster image data output unit 130. However, the OpenVG API script can be provided to one or more contents developers to be used for contents development.
The second storage unit 440 rearranges and stores a syntax of the OpenVG API script depending on an attribute of the created raster image data. The second storage unit 440 rearranges and stores the syntax of the OpenVG API script and transmits the stored syntax to the raster image data output unit 130, thereby increasing the speed of creating raster image data in the raster image data output unit 130. It is desirable that the syntax is tabled to be stored on a per-attribute basis.
As shown in
The OpenVG API translation method according to an exemplary embodiment of the present invention comprises, after the steps 501 to 504, Step of creating an OpenVG API script which comprises the substeps 505 to 508. In more detail, in the Step 505, each of the stored SVG format data is compared with data previously stored in a syntax lookup table. The syntax lookup table stores the OpenVG API format syntax associated with each of the SVG format data. In the Step 506, the OpenVG API format syntax is extracted from the syntax lookup table depending on the comparison result. In the Step 507, the extracted OpenVG API format syntax is combined and an OpenVG API script is created. In the Step 508, a syntax of the OpenVG API script is rearranged and stored depending on an attribute of the created raster image data.
In Step 509, raster image data associated with the rearranged and stored script is created and outputted. Here, a method for outputting the raster image data varies depending on an operation system for executing the outputting method.
As described above, the OpenVG API translation method according to an exemplary embodiment of the present invention can automatically translate the SVG format data so that it can be used in OpenVG, thereby expressing abundant vector graphic statements of the SVG format data by OpenVG as it stands. Also, a contents developer can create abundant and diverse OpenVG contents because SVG format data can be reused. As described above, the present invention has an effect of translating the SVG format data by OpenVG API, thereby providing abundant and diverse contents to a mobile terminal.
Also, the present invention has an effect of promoting high-rate processing of driven contents and a reduction of power consumption in the mobile terminal.
Also, the present invention has an effect of providing abundant and diverse OpenVG contents to a contents developer with a great efficiency.
The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2006-0120429 | Dec 2006 | KR | national |
Number | Name | Date | Kind |
---|---|---|---|
6675377 | Tanaka | Jan 2004 | B1 |
6957439 | Lewallen | Oct 2005 | B1 |
6993476 | Dutta et al. | Jan 2006 | B1 |
7055095 | Anwar | May 2006 | B1 |
7325229 | Nicolle | Jan 2008 | B2 |
7486294 | Beda et al. | Feb 2009 | B2 |
7500229 | Tanaka et al. | Mar 2009 | B2 |
7542846 | Motoyama et al. | Jun 2009 | B2 |
7600022 | Takamine | Oct 2009 | B2 |
7669183 | Bowman et al. | Feb 2010 | B2 |
7774746 | Mansfield et al. | Aug 2010 | B2 |
7784036 | Tjong et al. | Aug 2010 | B2 |
7856244 | Lee et al. | Dec 2010 | B2 |
7908594 | Varanasi et al. | Mar 2011 | B2 |
8032837 | Bowman et al. | Oct 2011 | B2 |
8451275 | Lee et al. | May 2013 | B2 |
20030098862 | Hunt et al. | May 2003 | A1 |
20040044991 | Eschermann et al. | Mar 2004 | A1 |
20040100490 | Boston et al. | May 2004 | A1 |
20040111672 | Bowman et al. | Jun 2004 | A1 |
20040111673 | Bowman et al. | Jun 2004 | A1 |
20040117773 | Nicolle | Jun 2004 | A1 |
20050022116 | Bowman et al. | Jan 2005 | A1 |
20050086584 | Sampathkumar et al. | Apr 2005 | A1 |
20050157323 | Narusawa et al. | Jul 2005 | A1 |
20050235272 | Skinner | Oct 2005 | A1 |
20060112167 | Steele et al. | May 2006 | A1 |
20060230393 | Doh et al. | Oct 2006 | A1 |
20070011439 | Kim et al. | Jan 2007 | A1 |
20070109318 | Tuomi | May 2007 | A1 |
20070136417 | Kreiner et al. | Jun 2007 | A1 |
20070169021 | Huynh et al. | Jul 2007 | A1 |
20070180353 | Hundhausen | Aug 2007 | A1 |
20070185651 | Motoyama et al. | Aug 2007 | A1 |
20070186005 | Setlur et al. | Aug 2007 | A1 |
20070192818 | Bourges-Sevenier et al. | Aug 2007 | A1 |
20070294674 | Marilly et al. | Dec 2007 | A1 |
20080007568 | Chou et al. | Jan 2008 | A1 |
20080062203 | Williams | Mar 2008 | A1 |
20080064447 | Lee et al. | Mar 2008 | A1 |
20080094401 | Lee et al. | Apr 2008 | A1 |
20080122866 | Dorbie et al. | May 2008 | A1 |
20080127062 | Kim | May 2008 | A1 |
20080134218 | Kim | Jun 2008 | A1 |
20080201695 | Zhou | Aug 2008 | A1 |
20080218531 | Chou et al. | Sep 2008 | A1 |
20090313293 | Setlur et al. | Dec 2009 | A1 |
Entry |
---|
Johansson et al., OpenVG for Moblie Equipment, Master of Science in Computer Graphics, Lund Institute of Technology 2006, May-2006, pp. 1-70. |
Huang et al., Implementation of an OpenVG Rasterizer with Configurable Anti-aliasing and Multi-window Scissoring, Published on IEEE, 2006, pp. 1-6. |
Kari Pulli, New APIs for Mobile Graphics, published 2006, pp. 1-13. |
Ferraiolo et al., Scalable Vector Graphics (SVG) 1.0 Specification, W3C Recommendation Sep. 4, 2001, pp. 1-617. |
OpenVG Overview, published by Khronos Group, 2005, pp. 1-23. |
Danile Rice, OpenVG Specification Version 1.0, published on Jul. 28, 2005, pp. 1-188. |
Naohiko Yamashita, Two-dimensional graphics description by XML: fundametnal explanation on SVG, XML application technology, published by Open Design, Feb. 2003, pp. 148-153 (including english translation, pp. 1-8). |
Number | Date | Country | |
---|---|---|---|
20080134218 A1 | Jun 2008 | US |