WO2010053175A1 - ベクター画像描画装置、ベクター画像描画方法および記録媒体 - Google Patents

ベクター画像描画装置、ベクター画像描画方法および記録媒体 Download PDF

Info

Publication number
WO2010053175A1
WO2010053175A1 PCT/JP2009/069047 JP2009069047W WO2010053175A1 WO 2010053175 A1 WO2010053175 A1 WO 2010053175A1 JP 2009069047 W JP2009069047 W JP 2009069047W WO 2010053175 A1 WO2010053175 A1 WO 2010053175A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
data
outline
overflow
contour
Prior art date
Application number
PCT/JP2009/069047
Other languages
English (en)
French (fr)
Inventor
博志 藤原
Original Assignee
Necシステムテクノロジー株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Necシステムテクノロジー株式会社 filed Critical Necシステムテクノロジー株式会社
Priority to CA2743036A priority Critical patent/CA2743036C/en
Priority to US13/125,836 priority patent/US8907955B2/en
Priority to EP09824872.7A priority patent/EP2346002A4/en
Publication of WO2010053175A1 publication Critical patent/WO2010053175A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management

Definitions

  • the present invention relates to a vector image drawing apparatus, a vector image drawing method, and a recording medium for displaying an image from vector data.
  • Image data displayed by a general-purpose display device includes a raster image represented by a two-dimensional pixel array and a vector image holding line information.
  • the vector image is represented by, for example, data for specifying a start point and an end point of a line segment, a combination of the order of a function that defines a curve and a point, an arc, and the like.
  • the raster image holds the color and brightness of each pixel as data, so there is no need to calculate when displaying it. However, when the image is enlarged, it is enlarged in units of pixels, so the display roughness is conspicuous. .
  • the vector image data (vector data) is expanded into a two-dimensional pixel array in accordance with the display resolution, and therefore can be displayed at the resolution when the image is enlarged or reduced. For example, there is an outline font in which a character typeface (also referred to as a font) is held in the form of vector data so that a smooth display can be obtained when enlarged or reduced.
  • the raster image holds the color and brightness of all the pixels as data, it simply displays the shape fill as it is.
  • the range to be filled with color is represented by a closed figure, and the fill color and brightness are only specified by data, so when displaying the fill, the pixels included in that range are displayed. It is necessary to determine and set the pixels in the range to the designated color and brightness. When there are overlapping figures, the intersection and overlapping range are calculated from the vector data, and the pixels to be filled are set.
  • a vector image drawing apparatus that performs contour generation uses an outline buffer for holding contour information.
  • the number of bits per pixel is often reduced.
  • Patent Document 1 describes a technique for improving the inaccuracy of image color values in encoding and decoding of image data.
  • the encoding unit extracts a difference between an original image and an average image to generate difference data, and vector-quantizes the difference data to generate a vector quantization code. Then, an attempt is made to decode the original image from the vector quantization code and the average image to check whether or not an overflow occurs, and exception determination information is created according to the result.
  • the decoding unit creates difference data from the vector quantization code, decodes the image by adding the difference data and the average image, and at the time of decoding the image, exception determination information created by the encoding processing device Exception handling is performed according to.
  • Patent Document 2 describes that an image is prevented from being blank due to a CCD overflow caused by reflected light in a copying machine.
  • a white level and a black level when the CCD reads an original is set in advance, and the output of a 10-bit A / D converter that digitizes the output of the CCD up to a set value of the white level.
  • the data of the target pixel is corrected by the image correction circuit using the data of the neighboring pixels.
  • the number of bits per pixel may be reduced in order to reduce the capacity of the outline buffer.
  • the capacity of the outline buffer is reduced by reducing the number of bits per pixel, overflow may occur in the data for each pixel due to overlapping of figures.
  • erroneous drawing is performed up to the rightmost pixel in the horizontal direction, greatly affecting the drawing quality.
  • the present invention has been made in view of the above-described circumstances, and an object of the present invention is to provide a system that prevents inconsistency of outline information when drawing a vector image and improves drawing quality.
  • a vector image drawing apparatus provides: Contour generating means for generating contour data indicating a start pixel for starting filling along a scanning line of the drawing area and an end pixel for ending filling based on vector data; For each pixel to be drawn, an outline buffer for storing the number of start or end of the filling that is the contour data; Determining means for determining which pixel of the outline data overflows when the outline data is stored in the outline buffer; Setting means for adding and setting the numerical value of the overflow in the pixel determined to be overflowed by the determination means to the numerical value of the contour data associated with the pixel adjacent to the pixel in which the overflow has occurred; It is characterized by providing.
  • a vector image drawing method includes: A contour generation step for generating contour data indicating a start pixel for starting filling along a scanning line of the drawing area and an end pixel for ending filling based on vector data; For each pixel to be drawn, a storing step of storing the number of start or end of filling as the outline data in an outline buffer; A determination step of determining when the outline data is stored in the outline buffer, the outline buffer overflows for which outline data of which pixel; In the determination step, a setting step for setting the numerical value of the overflow amount in the pixel determined to overflow by adding to the numerical value of the contour data associated with the pixel adjacent to the pixel in which the overflow has occurred, and It is characterized by providing.
  • a recording medium is provided in a computer.
  • a contour generation step for generating contour data indicating a start pixel for starting filling along a scanning line of the drawing area and an end pixel for ending filling based on vector data;
  • a storing step of storing the number of start or end of filling as the outline data in an outline buffer;
  • a determination step of determining when the outline data is stored in the outline buffer, the outline buffer overflows for which outline data of which pixel;
  • a setting step for setting the numerical value of the overflow amount in the pixel determined to overflow by adding to the numerical value of the contour data associated with the pixel adjacent to the pixel in which the overflow has occurred, and
  • a program for executing is recorded.
  • FIG. 4 is a diagram illustrating an example of data stored in an outline buffer when the image of FIG. 3 is rendered. It is a figure which shows the example of the data stored in the outline buffer when an overflow does not occur. It is a figure which shows the example of the data stored in the outline buffer when an overflow generate
  • FIG. 3 is a block diagram illustrating an example of a physical configuration when the drawing apparatus is mounted on a computer.
  • FIG. 1 is a block diagram showing a configuration example of an overflow correction circuit according to an embodiment of the present invention.
  • FIG. 1 shows a part of the drawing apparatus 100.
  • the drawing apparatus 100 includes a contour generation circuit 104, an overflow correction circuit 1, an outline buffer 106, and a drawing processing unit 120.
  • the overflow correction circuit 1 includes an error determination unit 2 and a pixel position transfer unit 3.
  • the overflow correction circuit 1 stores information (hereinafter referred to as “outline data”) related to contour data stored in the outline buffer when storing contour data indicating pixels that start or end filling along the scanning line in the outline buffer 106. ) If an overflow occurs, correct it.
  • FIG. 2 is a block diagram illustrating a configuration example of the drawing apparatus 100 including the overflow correction circuit 1.
  • the drawing apparatus 100 includes a control point input unit 101, a Bezier curve dividing unit 102, a coordinate conversion unit 103, a contour generation circuit 104, an antialiasing circuit 105, an overflow correction circuit 1, an outline buffer 106, and a mask generation unit. 107, a filling unit 108, a synthesis unit 109, a dither unit 110, an image buffer 111, a filter unit 112, and a color conversion unit 113.
  • the outline of the processing of the drawing apparatus 100 will be described.
  • the coordinate conversion unit 103 displays the coordinates of the dividing points. Convert coordinates to coordinates in the entire screen to be displayed.
  • the contour generation circuit 104 stores information related to contour data indicating pixels through which each line segment passes from the coordinates of the dividing point in the outline buffer 106 as outline data.
  • the overflow correction circuit 1 corrects an overflow of the outline data when the outline data is set.
  • the anti-aliasing circuit 105 performs anti-aliasing processing from the information of each line segment constituting the contour line, and calculates the fill occupancy ratio of the pixels in the contour portion.
  • the mask generation unit 107 generates mask data from the outline data.
  • the filling unit performs a filling process according to the mask data.
  • the image data is stored in the image buffer 111.
  • the filter unit 112 performs processing such as edge enhancement and singularity removal on the stored image data, and the color conversion unit 113 performs color conversion on the image data in accordance with the display device.
  • the combining unit 109 combines the image data and the image generated from the outline data.
  • the dither unit 110 applies a dither effect to the combined image data so that it can be easily seen on the screen, and draws the image. Generate data.
  • the drawing processing unit 120 in FIG. 1 corresponds to the mask generation 107 and subsequent steps in FIG. In FIG. 1, the control point input unit 101 to the coordinate conversion unit 103 and the anti-aliasing circuit 105 which are parts before contour generation are omitted.
  • the processing procedure of the present invention in generating contour data will be described with reference to FIG.
  • the overflow correction circuit 1 in the present embodiment adds the error determination unit 2 and the pixel position transfer unit 3 to the path until the contour data after contour generation is stored in the outline buffer 106.
  • the error determination unit 2 checks the state of the contour data of the pixel to be stored by the contour generation circuit 104 and determines whether or not an overflow has occurred in the pixel. When the error determination unit 2 determines that an overflow has occurred, the error determination unit 2 notifies the pixel position transfer unit 3 of error information.
  • the pixel position transfer unit 3 receives the error information notified from the error determination unit 2. If an overflow has occurred, the overflow amount is added to the outline data of the pixel adjacent to the pixel where the overflow has occurred, and the result is written back to the outline buffer 106. If overflow occurs in the adjacent pixels to which the overflow amount is added, out of the pixels on the same scan line where overflow has not occurred, the overflow amount to the pixel closest to the pixel for which outline data has been set Are written back to the outline buffer 106.
  • the rendering processing unit 120 determines whether or not each pixel is rendered from the outline data read from the outline buffer 106. Specifically, as a result of adding outline data in the scanning line direction, the drawing unit 120 does not draw when the pixel value is 0, and draws the pixel when the value is other than that. The determination is performed from the leftmost pixel. The leftmost pixel uses the outline data read from the outline buffer 106 as it is. For the subsequent pixels, it is determined whether or not the result of adding the outline data of the corresponding pixel to the data of the pixel processed immediately before is 0.
  • the contour data of the figure is composed of the start point and end point (hereinafter simply referred to as “start point” and “end point”) of the fill of the figure along each scanning line.
  • start point and end point
  • outline data set for each pixel is generated as follows.
  • the outline data is represented by a value obtained by adding 1 when the contour of the figure crosses the scanning line from the bottom to the top, and subtracting 1 when crossing the scanning line from the top to the bottom.
  • the number of start points is the number of times the scan line is traversed from bottom to top
  • the number of end points is the scan line from top to bottom. The number of crossings. Therefore, the outline data can be obtained by the equation “number of start points ⁇ 1 + number of end points ⁇ ( ⁇ 1)”.
  • the outline data is obtained as 0, and the pixel 14 has two start points and one end point (see FIG. 4).
  • Outline data is obtained as 1 (FIG. 5).
  • the operation of the overflow correction circuit 1 of the present embodiment will be described with an example.
  • the outline buffer 106 will be described assuming that the data of each pixel is composed of 4 bits and can represent values from -8 to 7.
  • FIG. 6 shows an example of outline data stored in the outline buffer 106 when no overflow occurs.
  • the outline data 201 in FIG. 6 shows an example of outline data for one line in the scanning line direction stored in the outline buffer 106.
  • the crossing from the bottom to the top is performed seven times from the left to the third pixel position from the left, the fourth crossing from the left to the seventh pixel, and the crossing from top to bottom three times from the left to the tenth pixel.
  • the drawing processing unit 120 reads out the outline data stored in the outline buffer 106 from the leftmost pixel, and performs a process of adding the data of each pixel in the scanning line direction.
  • An example of the pixel data 202 after the addition is shown in the lower part of FIG.
  • the outline data is 0 from the left to the second pixel, it becomes 0 after addition. Since the outline data is 7 for the third pixel, it becomes 7 after addition.
  • the outline data is 0 from the 4th pixel to the 6th pixel from the left, so that the outline data of each pixel is added to 7 of the 3rd pixel to become 7. Since the outline data is -4 for the seventh pixel from the left, it is 3 by adding to the previous value of 7.
  • the 8th pixel from the left and the 9th pixel from the left are 3 after addition because the outline data is 0. Since the outline data is -3 for the tenth pixel from the left, it is added to the previous value of 3 and becomes 0.
  • the outline data Since the outline data is 0 from the 11th pixel to the right end from the left, it becomes 0 after addition.
  • the result after this processing is shown as pixel data 202 in FIG.
  • pixels from the third pixel to the ninth pixel from the left are determined to be drawn.
  • FIG. 7 shows an example in which an overflow has occurred in the vector image drawing processing without performing overflow correction.
  • the outline data 301 in the upper part of FIG. 7 indicates information that should be stored in the outline buffer 106 originally.
  • outline data is generated that crosses the third pixel from the left 8 times from the bottom to the top, the seventh pixel from the left 4 times, and the tenth pixel from the left 4 times the top to bottom. ing.
  • each pixel in the outline buffer 106 can only store a numerical value from -8 to 7, so overflow occurs at the third pixel from the left.
  • Outline data 302 in the state of the outline buffer shown in the middle part of FIG. 7 indicates outline data that is actually set when the outline data shown in the outline data 301 in the upper part is generated.
  • the third pixel from the left where overflow has occurred is clamped to 7 which is the maximum value that can be stored when the outline data is stored in the outline buffer 106.
  • the third pixel from the left tries to store 8. However, since overflow occurs, the result 7 is clamped to the maximum value that can be stored.
  • the pixel data 303 in FIG. 7 is data after the drawing processing unit 120 performs the determination process using the outline data 302 in the outline buffer state. Since the outline data is 0 from the left end to the second pixel, it becomes 0 after addition. The third pixel from the left is 7 after addition because the outline data is 7. Since the outline data is 0 from the fourth pixel to the sixth pixel from the left, it becomes 7 after addition. The seventh pixel from the left is 3 after addition because the outline data is -4. Since the outline data is 0 for the eighth pixel from the left and the ninth pixel from the left, the result is 3 after addition. The 10th pixel from the left is -1 after addition because the outline data is -4. Since the outline data is 0 from the 11th pixel to the right end from the left, it becomes ⁇ 1 after addition.
  • the pixels drawn by the information of the pixel data 303 in FIG. 7 are drawn from the third pixel from the left to the rightmost pixel, whereas the pixels to be originally drawn are from the third pixel to the ninth pixel from the left. Thus, pixels from the tenth pixel to the right end are drawn, and erroneous drawing occurs.
  • FIG. 8 shows an example of processing using the drawing apparatus 100 of the present embodiment.
  • the original outline data crosses the third pixel from the left as in FIG. 7 eight times from the bottom to the top, and the seventh pixel from the left four times and the tenth pixel crosses the top four times from the top to the bottom.
  • Outline data 401 in FIG. 8 indicates information that should be stored in the outline buffer 106 originally.
  • the outline buffer 106 can only store values from -8 to 7, so the third pixel from the left is set to the maximum value 7 that can be stored, and the overflow amount is added to the fourth pixel from the left next to it, 1 is stored.
  • Outline data 402 in the state of the outline buffer shown in FIG. 8 indicates data in the outline buffer 106 after performing overflow correction by the drawing apparatus 100 of the present embodiment.
  • the pixel data 403 in FIG. 8 is the data after the processing by the drawing processing unit using the information of the outline data 402 in the outline buffer state. Since the outline data is 0 from the left end to the second pixel, it becomes 0 after addition. The third pixel from the left is 7 after addition because the outline data is 7. The fourth pixel from the left is 8 after addition because the outline data is 1. Since the outline data is 0 for the fifth pixel from the left and the sixth pixel from the left, the result is 8 after addition. The seventh pixel from the left is 4 after addition because the outline data is -4. Since the outline data is 0 for the eighth pixel from the left and the ninth pixel from the left, the result is 4 after addition. The 10th pixel from the left is 0 after addition because the outline data is -4. Since the outline data is 0 from the 11th pixel to the right end from the left, it becomes 0 after addition.
  • the pixels drawn by the information of the pixel data 403 in FIG. 8 are from the third pixel to the ninth pixel from the left, and no erroneous drawing occurs.
  • FIG. 9 is a flowchart showing an example of the operation of the overflow correction process according to the embodiment.
  • the overflow correction process is started each time an outline is generated and outline data is set in the outline buffer 106 of one scanning line.
  • the pixel position transfer unit 3 of the overflow correction circuit 1 sets a counter i to 0 (step S2).
  • the error determination unit 2 determines whether or not the value of the outline buffer 106 of the pixel for which outline data is set overflows (step S3). If it overflows (step S3; YES), 1 is added to the counter i (step S4).
  • step S5 If the counter i is an even number (step S5; YES), an address obtained by subtracting i / 2 from the address of the original outline buffer 106 for setting outline data is set as an address for the next determination (step S6).
  • step S5; NO When the counter i is an odd number (step S5; NO), an address obtained by adding (i + 1) / 2 to the address of the original outline buffer 106 for setting the outline data is set as an address for the next determination (step S7).
  • the next determination (counter i) is the even number
  • the outline buffer 106 of the pixel before the first pixel is selected along the scanning line
  • the next determination (counter) If i) is an odd number, the outline buffer 106 of the pixel after the first pixel is selected.
  • step S8 If the next determination address is within the valid range, that is, in the outline buffer 106 of the scanning line (step S8; YES), the process returns to step S3, and the outline data is added to the value of the outline buffer 106 at the address. In this case, it is determined whether or not an overflow occurs (step S3). If the address of the next determination is not within the valid range (step S8; NO), the determination is not performed at that address, the process returns to step S4, and the counter i is incremented.
  • step S3 If it is determined in step S3 that there is no overflow (step S3; NO), the pixel position transfer unit 3 adds the outline data to the outline buffer 106 of the determined address and stores it (step S9). Therefore, the overflowed value is added to the outline buffer 106 that is closest to the outline buffer 106 of the pixel in which the outline data is generated, and is set by being added.
  • the outline buffer 106 closest to the outline buffer 106 of the pixel in which the outline data is generated is referred to one after another in the overflow. You may add to the buffer 106. It can be said that the drawing error is the smallest when the setting is made in the outline buffer 106 that is closest to the outline buffer 106 of the pixel in which the outline data is generated and does not overflow.
  • FIG. 10 is a block diagram illustrating an example of a physical configuration when the drawing apparatus is mounted on a computer.
  • the drawing apparatus 100 according to the present embodiment can be realized by a hardware configuration similar to a general computer apparatus.
  • the overflow correction circuit 1 constitutes a part of the drawing apparatus 100 as described in FIG.
  • the drawing apparatus 100 includes a control unit 21, a main storage unit 22, an external storage unit 23, an operation unit 24, a display unit 25, and an input / output unit 26.
  • the main storage unit 22, the external storage unit 23, the operation unit 24, the display unit 25, and the input / output unit 26 are all connected to the control unit 21 via the internal bus 20.
  • the control unit 21 includes a CPU (Central Processing Unit) and the like, and executes processing for drawing including overflow correction processing according to a program 30 stored in the external storage unit 23.
  • CPU Central Processing Unit
  • the main storage unit 22 is composed of a RAM (Random-Access Memory) or the like, loads a program 30 stored in the external storage unit 23, and is used as a work area of the control unit 21.
  • the outline buffer 106 described above is configured in the main storage unit 22.
  • the external storage unit 23 includes a non-volatile memory such as a flash memory, a hard disk, a DVD-RAM (Digital Versatile Disc Random-Access Memory), a DVD-RW (Digital Versatile Disc Disc ReWritable), and the above processing is performed by the control unit 21.
  • a program 30 to be executed is stored in advance, and data stored in the program 30 is supplied to the control unit 21 in accordance with an instruction from the control unit 21, and the data supplied from the control unit 21 is stored.
  • the operation unit 24 includes a pointing device such as a keyboard and a mouse, and an interface device that connects the keyboard and the pointing device to the internal bus 20. Instructions for creating, inputting, and transmitting / receiving image data including a Bezier curve, designation of an image to be displayed, drawing area range, enlargement ratio, position of the drawing area on the display device, and the like are input via the operation unit 24, and control is performed. Supplied to the unit 21.
  • the display unit 25 includes a CRT (Cathode Ray Tube) or an LCD (Liquid Crystal Display), and displays a drawn image.
  • CTR Cathode Ray Tube
  • LCD Liquid Crystal Display
  • the input / output unit 26 is composed of a wireless transceiver, a wireless modem or a network termination device, and a serial interface or a LAN (Local Area Network) interface connected thereto. Image data including a Bezier curve can be received and transmitted via the input / output unit 26.
  • a drawing apparatus 100 including an overflow correction circuit 1 according to the present invention is configured as an electronic circuit by mounting a circuit composed of hardware components such as an LSI (Large Scale Integration) incorporating a circuit for realizing the anti-aliasing described above. can do.
  • the drawing apparatus 100 can be realized in software by executing a program that performs each of the above functions by the control unit 21 on the computer processing apparatus. In that case, the CPU of the control unit 21 loads the program 30 stored in the external storage unit 23 to the main storage unit 22 and executes it, and controls the operation of each unit to perform the above functions. Then, the process of the overflow correction circuit 1 is executed.
  • the drawing apparatus 100 has the following effects.
  • the first effect can prevent erroneous drawing when an overflow occurs.
  • the second effect is that drawing can be performed without erroneous drawing even if the number of bits per pixel in the outline buffer is reduced, and the capacity of the outline buffer can be reduced.
  • the third effect is that even if the number of bits per pixel in the outline buffer is reduced, drawing can be performed without drawing erroneously, thereby improving the memory bus use efficiency.
  • the setting unit includes a determination unit that recursively determines whether or not an outline buffer of the pixel overflows as a result of the addition when the setting unit adds to the numerical value of the contour data of adjacent pixels.
  • the determining means determines that the determining means overflows
  • the setting means overflows to the numerical value of the contour data of the non-overflowing pixel closest to the pixel on the same scanning line as the pixel determined to overflow. It is characterized in that the value is set by adding up the corresponding values.
  • the contour generation unit generates data representing the start of painting and data representing the end of painting with numerical values having opposite signs, and generates contour data stored in the outline buffer along the scanning line of the drawing area.
  • the image processing apparatus includes a drawing processing unit that sequentially adds pixel by pixel and generates drawing data indicating whether or not to paint each pixel.
  • the setting step includes a determination step of recursively determining whether the outline buffer of the pixel overflows as a result of the addition when adding to the numerical value of the contour data of the adjacent pixel, If it is determined in the determination step that the overflow has occurred, the contour data is set to the value of the contour data of the pixel that is closest to the pixel and does not generate overflow on the same scanning line as the pixel determined to overflow in the setting step. It is characterized by adding the overflowed numerical value for.
  • the image processing apparatus includes a drawing processing step of sequentially adding outline data stored in the outline buffer for each pixel along a scanning line of the drawing area to generate drawing data indicating whether or not to fill each pixel. .
  • the central part that performs processing of the drawing apparatus 100 including the control unit 21, the main storage unit 22, the external storage unit 23, the operation unit 24, the input / output unit 26, the internal bus 20, and the like is independent of a dedicated system. It can be realized using a normal computer system.
  • a computer program for executing the above operation is stored and distributed on a computer-readable recording medium (flexible disk, CD-ROM, DVD-ROM, etc.), and the computer program is installed in the computer.
  • the drawing apparatus 100 that executes the above-described processing may be configured.
  • the drawing apparatus 100 may be configured by storing the computer program in a storage device included in a server device on a communication network such as the Internet and downloading the computer program by a normal computer system.
  • the functions of the drawing apparatus 100 are realized by sharing an OS (operating system) and an application program, or by cooperation between the OS and the application program, only the application program part is stored in a recording medium or a storage device. May be.
  • the computer program may be posted on a bulletin board (BBS, Bulletin Board System) on a communication network, and the computer program may be distributed via the network.
  • BSS bulletin Board System
  • the computer program may be started and executed in the same manner as other application programs under the control of the OS, so that the above-described processing may be executed.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Generation (AREA)

Abstract

 ベクター画像描画装置は、以下のように構成する。輪郭生成回路(104)は、ベクターデータに基づいて、描画領域の走査線に沿って塗りつぶしを開始する開始画素、および塗りつぶしを終了する終了画素を示す、輪郭データを生成する。アウトラインバッファ(106)は描画する画素ごとに、前記輪郭データである塗りつぶしの開始または終了の数を格納する。エラー判別部(2)は、前記アウトラインバッファ(106)に前記輪郭データを格納するときに、前記アウトラインバッファ(106)が、どの画素の前記輪郭データについてオーバーフローするかを判別する。ピクセル位置移送部(3)は、前記エラー判別部(2)がオーバーフローすると判別した画素においてオーバーフローした分の数値を、当該オーバーフローが発生した画素に隣接する画素に対応付けられた輪郭データの数値に加算して設定する。

Description

ベクター画像描画装置、ベクター画像描画方法および記録媒体
 本発明は、ベクターデータから画像を表示するためのベクター画像描画装置、ベクター画像描画方法および記録媒体に関する。
 汎用の表示装置が表示する画像データには、二次元の画素の配列により表されるラスター画像と、線の情報を保持するベクター画像がある。ベクター画像は、例えば、線分の始点と終点、曲線を定める関数の次数と点の組み合わせ、円弧などを特定するデータ等により表される。
 ラスター画像は、画素ごとの色と輝度とをデータとして保持しているので、表示するときに演算する必要はないが、画像を拡大表示する場合に画素単位で拡大するので表示の粗さが目立つ。一方、ベクター画像のデータ(ベクターデータ)は、表示の解像度に合わせて二次元の画素配列に展開されるので、画像を拡大・縮小する場合にその解像度で表示できる。例えば、文字のタイプフェース(フォントともいう)をベクターデータの形式で保持して、拡大・縮小したときに滑らかな表示が得られるようにしているアウトラインフォントがある。
 ラスター画像は、全画素の色と輝度とをデータとして保持しているので、図形の塗りつぶしについてもそのまま表示するだけである。これに対して、ベクター画像では、色で塗りつぶす範囲が閉じた図形で表され、塗りつぶす色と輝度とがデータで指定されているだけなので、塗りつぶしを表示するときに、その範囲に含まれる画素を決定し、その範囲の画素を指定の色と輝度とに設定する必要がある。図形の重なりがある場合には、ベクターデータから交点および重なる範囲を演算して、塗りつぶす画素を設定する。
 輪郭生成を行うベクター画像描画装置では、輪郭情報を保持するためのアウトラインバッファを使うが、アウトラインバッファの容量を少なくしたい場合に画素単位のビット数を減らして対応することが多い。
 特許文献1には、画像データの符号化復号化において、画像の色値の不正を改善する技術が記載されている。特許文献1の符号化復号化装置は、符号化部では、原画像と平均画像との差分を抽出して差分データを作成し、差分データをベクトル量子化してベクトル量子化コードを作成する。そして、ベクトル量子化コードと、平均画像から原画像の復号化を試みて、オーバーフローが発生するか否かを調べ、その結果に応じて、例外判定情報を作成する。復号化部では、ベクトル量子化コードから差分データを作成し、差分データと、平均画像の加算により、画像を復号化すると共に、画像を復号化する際、符号化処理装置で作成した例外判定情報に従って、例外処理を行う。
 また、画像の色値の不正を改善する技術に関連して特許文献2には、複写機において反射光により生じたCCDのオーバーフローによる画像の白抜けを防止することが記載されている。特許文献2の技術は、CCDが原稿を読み取る際の白レベルと黒レベルとを予め設定し、CCDの出力をディジタル化する10ビットのA/Dコンバータの出力のうち、白レベルの設定値までを8ビットのビデオ信号とし、上位2ビットをオーバーフロー検出信号とする。オーバーフローが検出されるとその対象画素のデータを近傍の画素のデータを用いて画像補正回路で補正する。
特開平07-231444号公報 特開平09-284557号公報
 ベクター画像描画装置において、輪郭生成時の輪郭データを格納しておくためにアウトラインバッファを使用する場合、アウトラインバッファの容量を削減するために画素あたりのビット数を減らすことがある。画素あたりのビット数を減らすことでアウトラインバッファの容量は削減されるが、図形の重なりによって画素ごとのデータでオーバーフローが発生する場合がある。アウトラインバッファのオーバーフローが発生した結果、水平方向に右端の画素まで誤描画することになり描画品質に大きな影響を与えていた。
 すなわち、画素単位のビット数を減らすことにより、画素単位で扱うことができる輪郭情報量が減ることで、同じ画素への輪郭情報書き込みが多発した場合に輪郭情報の不整合が発生し、大きな誤描画を引き起こしてしまう問題があった。
 本発明は上述の事情に鑑みてなされたもので、ベクター画像を描画する際に輪郭情報の不整合を防ぎ、描画品質を向上するシステムを提供することを目的とする。
 本発明の第1の観点に係るベクター画像描画装置は、
 ベクターデータに基づいて、描画領域の走査線に沿って塗りつぶしを開始する開始画素、および塗りつぶしを終了する終了画素を示す、輪郭データを生成する輪郭生成手段と、
 描画する画素ごとに、前記輪郭データである塗りつぶしの開始または終了の数を格納するアウトラインバッファと、
 前記アウトラインバッファに前記輪郭データを格納するときに、前記アウトラインバッファが、どの画素の前記輪郭データについてオーバーフローするかを判別する判別手段と、
 前記判別手段がオーバーフローすると判別した画素においてオーバーフローした分の数値を、当該オーバーフローが発生した画素に隣接する画素に対応付けられた輪郭データの数値に加算して設定する設定手段と、
 を備えることを特徴とする。
 本発明の第2の観点に係るベクター画像描画方法は、
 ベクターデータに基づいて、描画領域の走査線に沿って塗りつぶしを開始する開始画素、および塗りつぶしを終了する終了画素を示す、輪郭データを生成する輪郭生成ステップと、
 描画する画素ごとに、前記輪郭データである塗りつぶしの開始または終了の数をアウトラインバッファに格納する格納ステップと、
 前記アウトラインバッファに前記輪郭データを格納するときに、前記アウトラインバッファが、どの画素の前記輪郭データについてオーバーフローするかを判別する判別ステップと、
 前記判別ステップにおいて、オーバーフローすると判別された画素においてオーバーフローした分の数値を、当該オーバーフローが発生した画素に隣接する画素に対応付けられた輪郭データの数値に加算して設定する設定ステップと、
 を備えることを特徴とする。
 本発明の第3の観点に係る記録媒体は、コンピュータに、
 ベクターデータに基づいて、描画領域の走査線に沿って塗りつぶしを開始する開始画素、および塗りつぶしを終了する終了画素を示す、輪郭データを生成する輪郭生成ステップと、
 描画する画素ごとに、前記輪郭データである塗りつぶしの開始または終了の数をアウトラインバッファに格納する格納ステップと、
 前記アウトラインバッファに前記輪郭データを格納するときに、前記アウトラインバッファが、どの画素の前記輪郭データについてオーバーフローするかを判別する判別ステップと、
 前記判別ステップにおいて、オーバーフローすると判別された画素においてオーバーフローした分の数値を、当該オーバーフローが発生した画素に隣接する画素に対応付けられた輪郭データの数値に加算して設定する設定ステップと、
 を実行させるプログラムを記録することを特徴とする。
 本発明によれば、ベクター画像を描画するときに、アウトラインバッファのオーバーフローが発生する場合でも誤って描画するのを防ぐことができる。
本発明の実施の形態に係るオーバーフロー補正回路の構成例を示すブロック図である。 描画装置の構成例を示すブロック図である。 画面に描画される画像の一例を示す図である。 図3の画像が描画される場合の輪郭データの例を示す図である。 図3の画像が描画される場合のアウトラインバッファに格納されるデータの例を示す図である。 オーバーフローが発生しない場合のアウトラインバッファに格納されるデータの例を示す図である。 オーバーフローが発生した場合のアウトラインバッファに格納されるデータの例を示す図である。 実施の形態に係るベクター画像描画処理の動作を説明する図である。 実施の形態に係るオーバーフロー補正処理の動作の一例を示すフローチャートである。 描画装置をコンピュータに実装する場合の、物理的な構成の一例を示すブロック図である。
 図1は、本発明の実施の形態に係るオーバーフロー補正回路の構成例を示すブロック図である。図1は、描画装置100の一部分を示す。描画装置100は、輪郭生成回路104と、オーバーフロー補正回路1と、アウトラインバッファ106と、描画処理部120と、を備える。オーバーフロー補正回路1は、エラー判定部2と、ピクセル位置移送部3と、から構成される。
 オーバーフロー補正回路1は、走査線に沿って塗りつぶしを開始または終了する画素を示す輪郭データをアウトラインバッファ106に格納する際に、アウトラインバッファに格納される輪郭データに関する情報(以下、「アウトラインデータ」という)にオーバーフローが発生した場合にそれを補正する。
 図2は、オーバーフロー補正回路1を含む描画装置100の構成例を示すブロック図である。描画装置100は、制御点入力部101と、ベジェ曲線分割部102と、座標変換部103と、輪郭生成回路104と、アンチエイリアス回路105と、オーバーフロー補正回路1と、アウトラインバッファ106と、マスク生成部107と、塗りつぶし部108と、合成部109と、ディザー部110と、イメージバッファ111と、フィルタ部112と、色変換部113と、から構成される。
 描画装置100の処理の概要を説明する。制御点入力部101がベジェ曲線の制御点の座標を取得し、ベジェ曲線分割部102が、ベジェ曲線を線分で近似するための分割点の座標を出力すると、座標変換部103は分割点の座標を、表示する画面全体の中の座標に変換する。輪郭生成回路104は、分割点の座標から各線分が通る画素を示す輪郭データに関する情報を、アウトラインデータとしてアウトラインバッファ106に格納する。オーバーフロー補正回路1は、アウトラインデータを設定する際に、アウトラインデータのオーバーフローが発生した場合にそれを補正する。アンチエイリアス回路105は、輪郭線を構成する各線分の情報から、アンチエイリアス処理を行って輪郭部の画素の塗りつぶし占有率を算出する。マスク生成部107は、アウトラインデータからマスクデータを生成する。そして、塗りつぶし部は、マスクデータに従って、塗りつぶし処理を行う。
 一方、ビットマップなどの画素ごとの色および輝度のデータで表された画像データと重ね合わせる場合には、画像データはイメージバッファ111に格納される。フィルタ部112は格納された画像データにエッジ強調、特異点除去などの処理を施し、色変換部113が当該画像データを表示装置に合わせて色変換する。そして、合成部109が、画像データと、アウトラインデータから生成された画像とを合成し、最後に、ディザー部110が、合成後の画像データに、画面で見やすいようにディザー効果をかけて、描画データを生成する。
 図1の描画処理部120は、図2のマスク生成107以降に相当する。図1では、輪郭生成より前の部分である制御点入力部101から座標変換部103まで、およびアンチエイリアス回路105を省略している。
 図1を用いて輪郭データ生成における本発明の処理手順を説明する。本実施の形態におけるオーバーフロー補正回路1は、輪郭生成後輪郭データをアウトラインバッファ106へ格納するまでの経路にエラー判定部2とピクセル位置移送部3とを追加する。
 エラー判定部2は、輪郭生成回路104が格納しようとする画素の輪郭データの状態をチェックし、当該画素においてオーバーフローが発生したか否かを判定する。エラー判定部2が、オーバーフローが発生したと判断した場合に、エラー情報をピクセル位置移送部3に通知する。
 ピクセル位置移送部3は、エラー判定部2から通知されたエラー情報を受け取る。オーバーフローが発生している場合には、オーバーフローが発生している画素に隣接する画素のアウトラインデータに、オーバーフローした分を加算して、アウトラインバッファ106へ書き戻す。オーバーフローした分が加算される隣接画素にもオーバーフローが発生している場合には、同一走査線上のオーバーフローの発生していない画素のうち、アウトラインデータが設定された画素に最も近い画素にオーバーフローした分を加算して、アウトラインバッファ106へ書き戻す。
 描画処理部120はアウトラインバッファ106から読み出したアウトラインデータから各画素に対して描画するか否かの判定を行う。具体的には、描画部120は、走査線方向にアウトラインデータを加算した結果、画素の値が0の場合描画はせず、それ以外の値の場合は、その画素に対して描画を行う。判定は左端の画素から実施される。左端の画素は、アウトラインバッファ106から読み出されたアウトラインデータをそのまま使用する。それ以降の画素に対しては、直前に処理された画素のデータに該当画素のアウトラインデータを加算した結果が0かどうかを判定する。
 以下に、本実施形態の輪郭データと、アウトラインデータ(アウトラインバッファに格納されるデータ)について、図3の図形(図形A、図形B、図形C)を例に説明する。
 図3の図形が描画される画面は、複数の走査線i(i=0~I(Iは任意))を有し、1本の走査線上に複数の画素n(n=0~N(Nは任意))が配置されているとする。図形の輪郭データは、各走査線に沿って、図形の塗りつぶしの始点と終点(以下、単に「始点」、「終点」という)とから構成されるので、例えば、図3の各図の輪郭データは、図4のように格納される。すなわち、図3の走査線100上では、図形Aの始点は画素2、終点は画素14、図形Bの始点は画素14、終点は画素22、図形Cの始点は画素14、終点は画素30を通るので、それぞれの図形の始点と終点とが、輪郭データとして格納される。
 次に、各画素について設定されるアウトラインデータは、以下のように生成される。アウトラインデータは、図形の輪郭が、走査線を下から上に横切った場合は、1を加算し、反対に上から下に横切った場合は、1を減算した値によって表されるとする。この場合、図3の各図形は矢印が示す方向に描画されるとすると、始点の数は、走査線を下から上に横切った回数であり、終点の数は、走査線を上から下へ横切った回数である。したがって、アウトラインデータは、“始点の数×1+終点の数×(-1)”の式によって求めることができる。図3の図形の場合、例えば、画素6は、始点及び終点ともに1つもないので、アウトラインデータは0と求められ、画素14は、始点が2個、終点が1個(図4参照)なので、アウトラインデータは1と求められる(図5)。
 以下に、本実施の形態のオーバーフロー補正回路1の動作を、例を挙げて説明する。以下の例では、アウトラインバッファ106は各画素のデータが4ビットで構成され、値として-8から7まで表現可能な場合を想定して説明する。
 図6は、オーバーフローが発生しない場合のアウトラインバッファ106に格納されるアウトラインデータの例を示す。図6のアウトラインデータ201は、アウトラインバッファ106が格納する走査線方向1ラインのアウトラインデータの例を示す。図6の例では左から3画素目の場所に7回下から上に横切り、左から7画素目に4回、左から10画素目に3回上から下へ横切ったことを表している。
 描画処理部120は、左端の画素からアウトラインバッファ106に格納されているアウトラインデータを読み出し、走査線方向に各画素のデータを加算する処理を実施する。図6の下段に加算後の画素データ202の例を示す。
 図6の例では、左から2画素目まではアウトラインデータが0なので加算後0となる。3画素目はアウトラインデータが7なので加算後7となる。左から4画素目から6画素目まではアウトラインデータ0なので、3画素目の7にそれぞれの画素のアウトラインデータを加算して7となる。左から7画素目はアウトラインデータが-4なので、直前までの値7に加算して3となる。左から8画素目と左から9画素目はアウトラインデータが0なので加算後3となる。左から10画素目はアウトラインデータが-3なので、直前までの値3に加算して0となる。左から11画素目から右端まではアウトラインデータが0なので加算後0となる。この処理後の結果を図6の画素データ202に示す。アウトラインデータが0以外の画素を描画するルールを使用した場合、左から3画素目から9画素目までの画素が描画対象と判定される。
 図7は、オーバーフロー補正を行わないベクター画像描画処理で、オーバーフローが発生した例を示す。図7の上段のアウトラインデータ301は、本来アウトラインバッファ106に格納されるべき情報を示す。図7のベクター画像の例では、左から3画素目を8回下から上に横切り、左から7画素目を4回、左から10画素目を4回上から下に横切るアウトラインデータが生成されている。
 説明の例ではアウトラインバッファ106の各画素は-8から7までの数値しか格納できないため、左から3画素目ではオーバーフローが発生する。図7の中段に示すアウトラインバッファの状態のアウトラインデータ302は、上段のアウトラインデータ301に示すアウトラインデータが生成された場合に、実際に設定されるアウトラインデータを示す。オーバーフローが発生した左から3画素目はアウトラインバッファ106へアウトラインデータが格納される際に、格納可能な最大値である7にクランプされる。左から3画素目は8を格納しようとするがオーバーフローが発生するため格納可能な最大値にクランプされた結果7となる。
 アウトラインバッファの状態のアウトラインデータ302を使って、描画処理部120で判定処理実施した後のデータが、図7の画素データ303である。左端から2画素目まではアウトラインデータが0なので加算後0となる。左から3画素目はアウトラインデータが7なので加算後7となる。左から4画素目から6画素目まではアウトラインデータが0なので加算後7となる。左から7画素目はアウトラインデータが-4なので加算後3となる。左から8画素目と左から9画素目まではアウトラインデータが0なので加算後3となる。左から10画素目はアウトラインデータが-4なので加算後-1となる。左から11画素目から右端まではアウトラインデータが0なので加算後-1となる。
 図7の画素データ303の情報により描画される画素は左から3画素目から右端の画素までが描画対象となり、本来描画すべき画素は左から3画素目から9画素目までであるのに対して、10画素目から右端までの画素が描画されることになり、誤描画が発生する。
 図8は、本実施の形態の描画装置100を用いて処理した例を示す。図8の例は、本来のアウトラインデータが図7と同じ左から3画素目を8回下から上に横切り、左から7画素目を4回、10画素目を4回上から下に横切るような描画の場合である。図8のアウトラインデータ401は、本来アウトラインバッファ106に格納されるべき情報を示している。説明の例ではアウトラインバッファ106は-8から7までの値しか格納できないため、左から3画素目は格納できる最大値の7とし、その隣の左から4画素目にオーバーフローした分を加算し、1を格納する。図8に示すアウトラインバッファの状態のアウトラインデータ402は、本実施の形態の描画装置100によるオーバーフロー補正を行った後のアウトラインバッファ106のデータを示す。
 このアウトラインバッファの状態のアウトラインデータ402の情報を使って描画処理部で処理が実施された後のデータが図8の画素データ403である。左端から2画素目まではアウトラインデータが0なので加算後0となる。左から3画素目はアウトラインデータが7なので加算後7となる。左から4画素目はアウトラインデータが1なので加算後8となる。左から5画素目と左から6画素目まではアウトラインデータが0なので加算後8となる。左から7画素目はアウトラインデータが-4なので加算後4となる。左から8画素目と左から9画素目まではアウトラインデータが0なので加算後4となる。左から10画素目はアウトラインデータが-4なので加算後0となる。左から11画素目から右端まではアウトラインデータが0なので加算後0となる。
 図8の画素データ403の情報により描画される画素は左から3画素目から9画素目までとなり、誤描画は発生しない。
 図9は、実施の形態に係るオーバーフロー補正処理の動作の一例を示すフローチャートである。オーバーフロー補正処理は、輪郭線が生成され、1つの走査線のアウトラインバッファ106にアウトラインデータを設定するごとに起動される。
 輪郭生成回路104が、ある画素の輪郭データを生成すると(ステップS1)、オーバーフロー補正回路1のピクセル位置移送部3は、カウンタiを0にセットする(ステップS2)。エラー判定部2は、アウトラインデータをセットする画素のアウトラインバッファ106の値がオーバーフローするかどうかを判定する(ステップS3)。オーバーフローする場合は(ステップS3;YES)、カウンタiに1を加算する(ステップS4)。
 カウンタiが偶数の場合は(ステップS5;YES)、アウトラインデータを設定する元のアウトラインバッファ106のアドレスからi/2を減算したアドレスを次回の判定のアドレスとする(ステップS6)。カウンタiが奇数の場合は(ステップS5;NO)、アウトラインデータを設定する元のアウトラインバッファ106のアドレスに(i+1)/2を加算したアドレスを次回の判定のアドレスとする(ステップS7)。すなわち、調べているアウトラインバッファ106がオーバーフローする場合に、次回の判定(カウンタi)が偶数回目では走査線に沿って最初の画素より前の画素のアウトラインバッファ106が選択され、次回の判定(カウンタi)が奇数回目では最初の画素より後の画素のアウトラインバッファ106が選択される。
 次回の判定のアドレスが有効範囲内、すなわち、その走査線のアウトラインバッファ106内であれば(ステップS8;YES)、ステップS3に戻って、そのアドレスのアウトラインバッファ106の値にアウトラインデータを加算した場合にオーバーフローするかどうかを判定する(ステップS3)。次回の判定のアドレスが有効範囲内でなければ(ステップS8;NO)、そのアドレスでは判定を行わず、ステップS4に戻って、カウンタiをインクリメントする。
 ステップS3の判定で、オーバーフローしない場合は(ステップS3;NO)、ピクセル位置移送部3は、判定したアドレスのアウトラインバッファ106にアウトラインデータを加算して格納する(ステップS9)。したがって、アウトラインデータが生成された画素のアウトラインバッファ106に最も近い、オーバーフローしないアウトラインバッファ106に、オーバーフローした分の値が加算されて設定される。
 なお、オーバーフローした場合に、アウトラインデータが生成された画素のアウトラインバッファ106に最も近いオーバーフローしないアウトラインバッファ106ではなく、オーバーフローする場合に、次々に隣接画素のアウトラインバッファ106を参照して、オーバーフローしないアウトラインバッファ106に加算してもよい。アウトラインデータが生成された画素のアウトラインバッファ106に最も近い、オーバーフローしないアウトラインバッファ106に設定する場合が、最も描画の誤差が少ないと言える。
 図10は、描画装置をコンピュータに実装する場合の、物理的な構成の一例を示すブロック図である。本実施の形態に係る描画装置100は、一般的なコンピュータ装置と同様のハードウェア構成によって実現することができる。オーバーフロー補正回路1は、図2で説明したように描画装置100の一部を構成する。描画装置100は、図10に示すように、制御部21と、主記憶部22と、外部記憶部23と、操作部24と、表示部25と、入出力部26と、備える。主記憶部22と、外部記憶部23と、操作部24と、表示部25と、入出力部26とはいずれも内部バス20を介して制御部21に接続される。
 制御部21はCPU(Central Processing Unit)等から構成され、外部記憶部23に記憶されているプログラム30に従って、オーバーフロー補正処理を含む描画するための処理を実行する。
 主記憶部22は、RAM(Random-Access Memory)等から構成され、外部記憶部23に記憶されているプログラム30をロードし、制御部21の作業領域として用いられる。上述のアウトラインバッファ106は、主記憶部22の中に構成される。
 外部記憶部23は、フラッシュメモリ、ハードディスク、DVD-RAM(Digital Versatile Disc Random-Access Memory)、DVD-RW(Digital Versatile Disc ReWritable)等の不揮発性メモリから構成され、前記の処理を制御部21に行わせるためのプログラム30を予め記憶し、また、制御部21の指示に従って、このプログラム30が記憶するデータを制御部21に供給し、制御部21から供給されたデータを記憶する。
 操作部24は、キーボードおよびマウスなどのポインティングデバイス等と、キーボードおよびポインティングデバイス等を内部バス20に接続するインタフェース装置から構成されている。操作部24を介して、ベジェ曲線を含む画像データの作成、入力、送受信などの指示、表示する画像の指定、描画領域の範囲、拡大率、描画領域の表示装置における位置などが入力され、制御部21に供給される。
 表示部25は、CRT(Cathode Ray Tube)またはLCD(Liquid Crystal Display)などから構成され、描画された画像を表示する。
 入出力部26は、無線送受信機、無線モデムまたは網終端装置、およびそれらと接続するシリアルインタフェースまたはLAN(Local Area Network)インタフェース等から構成されている。入出力部26を介して、ベジェ曲線を含む画像データを受信し、また送信できる。
 本発明によるオーバーフロー補正回路1を含む描画装置100は、上記のアンチエイリアス処理を実現する回路を組み込んだLSI(Large Scale Integration)等のハードウェア部品から構成される回路を実装して、電子回路として構成することができる。また、上記の各機能を行うプログラムを、コンピュータ処理装置上の制御部21で実行することにより、ソフトウェア的に描画装置100を実現することができる。その場合、制御部21のCPUは、外部記憶部23に格納されているプログラム30を、主記憶部22にロードして実行し、各部の動作を制御して上記の各機能を行わせることによって、オーバーフロー補正回路1の処理を実行する。
 以上に説明したように、本実施の形態の描画装置100においては、以下に記載するような効果を奏する。
 第1の効果は、オーバーフローが発生した時の誤描画を防ぐことができる。
 第2の効果は、アウトラインバッファの画素あたりのビット数を減らしても誤描画せず描画できるようになり、アウトラインバッファの容量を削減できる。
 第3の効果は、アウトラインバッファの画素あたりのビット数を減らしても誤描画せず描画できるようになることで、メモリバス使用効率を向上することができる。
 その他、本発明の好適な変形として、以下の構成が含まれる。
 本発明の第1の観点に係るベクター画像描画装置について、
 好ましくは、前記設定手段が、隣接する画素の輪郭データの数値に加算する場合に、加算した結果によってその画素のアウトラインバッファがオーバーフローするか否かを再帰的に判定する判定手段を備え、
 前記設定手段は、前記判定手段がオーバーフローすると判定した場合、オーバーフローすると判定された画素と同一走査線上で、当該画素に最も近い、オーバーフローの発生しない画素の輪郭データの数値に、前記輪郭データについてオーバーフローした分の数値を加算して設定する
 ことを特徴とする。
 好ましくは、前記輪郭生成手段は、塗りつぶしの開始を表すデータと塗りつぶしの終了を表すデータを互いに反対の符号の数値で生成し、前記アウトラインバッファが格納する輪郭データを前記描画領域の走査線に沿って画素ごとに順次加算して、画素毎に塗りつぶすか否かを表す描画データを生成する描画処理手段を備える
 ことを特徴とする。
 本発明の第2の観点に係るベクター画像描画方法について、
 好ましくは、前記設定ステップにおいて、隣接する画素の輪郭データの数値に加算する場合に、加算した結果によってその画素のアウトラインバッファがオーバーフローするか否かを再帰的に判定する判定ステップを備え、
 前記判定ステップにおいて、オーバーフローすると判定された場合、前記設定ステップにおいて、オーバーフローすると判定された画素と同一走査線上で、当該画素に最も近い、オーバーフローの発生しない画素の輪郭データの数値に、前記輪郭データについてオーバーフローした分の数値を加算して設定する
 ことを特徴とする。
 好ましくは、前記輪郭生成ステップにおいて、塗りつぶしの開始を表すデータと塗りつぶしの終了を表すデータを互いに反対の符号の数値で生成し、
 前記アウトラインバッファが格納する輪郭データを前記描画領域の走査線に沿って画素ごとに順次加算して、画素毎に塗りつぶすか否かを表す描画データを生成する描画処理ステップを備える
 ことを特徴とする。
 その他、前記のハードウエェア構成やフローチャートは一例であり、任意に変更および修正が可能である。
 制御部21、主記憶部22、外部記憶部23、操作部24、入出力部26および内部バス20等から構成される描画装置100の処理を行う中心となる部分は、専用のシステムによらず、通常のコンピュータシステムを用いて実現可能である。たとえば、前記の動作を実行するためのコンピュータプログラムを、コンピュータが読み取り可能な記録媒体(フレキシブルディスク、CD-ROM、DVD-ROM等)に格納して配布し、当該コンピュータプログラムをコンピュータにインストールすることにより、前記の処理を実行する描画装置100を構成してもよい。また、インターネット等の通信ネットワーク上のサーバ装置が有する記憶装置に当該コンピュータプログラムを格納しておき、通常のコンピュータシステムがダウンロード等することで描画装置100を構成してもよい。
 また、描画装置100の機能を、OS(オペレーティングシステム)とアプリケーションプログラムの分担、またはOSとアプリケーションプログラムとの協働により実現する場合などには、アプリケーションプログラム部分のみを記録媒体や記憶装置に格納してもよい。
 また、搬送波にコンピュータプログラムを重畳し、通信ネットワークを介して配信することも可能である。たとえば、通信ネットワーク上の掲示板(BBS, Bulletin Board System)に前記コンピュータプログラムを掲示し、ネットワークを介して前記コンピュータプログラムを配信してもよい。そして、このコンピュータプログラムを起動し、OSの制御下で、他のアプリケーションプログラムと同様に実行することにより、前記の処理を実行できるように構成してもよい。
 本出願は、2008年11月7日に出願された、日本国特許出願2008-287185号に基づく。本明細書中に日本国特許出願2008-287185号の明細書、特許請求の範囲、図面全体を参照として取り込むものとする。また、特許文献1及び特許文献2において開示された内容を、本明細書に取り込むものとする。
   1 オーバーフロー補正回路
   2 エラー判定部
   3 ピクセル位置移送部
  21 制御部
  22 主記憶部
  23 外部記憶部
  24 操作部
  25 表示部
  26 入出力部
  30 プログラム
 100 描画装置
 101 制御点入力部
 102 ベジェ曲線分割部
 103 座標変換部
 104 輪郭生成回路
 105 アンチエイリアス回路
 106 アウトラインバッファ
 107 マスク生成部
 108 塗りつぶし部
 109 合成部
 110 ディザー部
 111 イメージバッファ
 112 フィルタ部
 113 色変換部
 120 描画処理部
 201、301、302、401、402 アウトラインデータ
 202、303、403 画素データ

Claims (7)

  1.  ベクターデータに基づいて、描画領域の走査線に沿って塗りつぶしを開始する開始画素、および塗りつぶしを終了する終了画素を示す、輪郭データを生成する輪郭生成手段と、
     描画する画素ごとに、前記輪郭データである塗りつぶしの開始または終了の数を格納するアウトラインバッファと、
     前記アウトラインバッファに前記輪郭データを格納するときに、前記アウトラインバッファが、どの画素の前記輪郭データについてオーバーフローするかを判別する判別手段と、
     前記判別手段がオーバーフローすると判別した画素においてオーバーフローした分の数値を、当該オーバーフローが発生した画素に隣接する画素に対応付けられた輪郭データの数値に加算して設定する設定手段と、
     を備えることを特徴とするベクター画像描画装置。
  2.  前記設定手段が、隣接する画素の輪郭データの数値に加算する場合に、加算した結果によってその画素のアウトラインバッファがオーバーフローするか否かを再帰的に判定する判定手段を備え、
     前記設定手段は、前記判定手段がオーバーフローすると判定した場合、オーバーフローすると判定された画素と同一走査線上で、当該画素に最も近い、オーバーフローの発生しない画素の輪郭データの数値に、前記輪郭データについてオーバーフローした分の数値を加算して設定する、
     ことを特徴とする請求項1に記載のベクター画像描画装置。
  3.  前記輪郭生成手段は、塗りつぶしの開始を表すデータと塗りつぶしの終了を表すデータを互いに反対の符号の数値で生成し、
     前記アウトラインバッファが格納する輪郭データを前記描画領域の走査線に沿って画素ごとに順次加算して、画素毎に塗りつぶすか否かを表す描画データを生成する描画処理手段を備える、
     ことを特徴とする請求項1記載のベクター画像描画装置。
  4.  ベクターデータに基づいて、描画領域の走査線に沿って塗りつぶしを開始する開始画素、および塗りつぶしを終了する終了画素を示す、輪郭データを生成する輪郭生成ステップと、
     描画する画素ごとに、前記輪郭データである塗りつぶしの開始または終了の数をアウトラインバッファに格納する格納ステップと、
     前記アウトラインバッファに前記輪郭データを格納するときに、前記アウトラインバッファが、どの画素の前記輪郭データについてオーバーフローするかを判別する判別ステップと、
     前記判別ステップにおいて、オーバーフローすると判別された画素においてオーバーフローした分の数値を、当該オーバーフローが発生した画素に隣接する画素に対応付けられた輪郭データの数値に加算して設定する設定ステップと、
     を備えることを特徴とするベクター画像描画方法。
  5.  前記設定ステップにおいて、隣接する画素の輪郭データの数値に加算する場合に、加算した結果によってその画素のアウトラインバッファがオーバーフローするか否かを再帰的に判定する判定ステップを備え、
     前記判定ステップにおいて、オーバーフローすると判定された場合、前記設定ステップにおいて、オーバーフローすると判定された画素と同一走査線上で、当該画素に最も近い、オーバーフローの発生しない画素の輪郭データの数値に、前記輪郭データについてオーバーフローした分の数値を加算して設定する、
     ことを特徴とする請求項4に記載のベクター画像描画方法。
  6.  前記輪郭生成ステップにおいて、塗りつぶしの開始を表すデータと塗りつぶしの終了を表すデータを互いに反対の符号の数値で生成し、
     前記アウトラインバッファが格納する輪郭データを前記描画領域の走査線に沿って画素ごとに順次加算して、画素毎に塗りつぶすか否かを表す描画データを生成する描画処理ステップを備える、
     ことを特徴とする請求項4に記載のベクター画像描画方法。
  7.  コンピュータに、
     ベクターデータに基づいて、描画領域の走査線に沿って塗りつぶしを開始する開始画素、および塗りつぶしを終了する終了画素を示す、輪郭データを生成する輪郭生成ステップと、
     描画する画素ごとに、前記輪郭データである塗りつぶしの開始または終了の数をアウトラインバッファに格納する格納ステップと、
     前記アウトラインバッファに前記輪郭データを格納するときに、前記アウトラインバッファが、どの画素の前記輪郭データについてオーバーフローするかを判別する判別ステップと、
     前記判別ステップにおいて、オーバーフローすると判別された画素においてオーバーフローした分の数値を、当該オーバーフローが発生した画素に隣接する画素に対応付けられた輪郭データの数値に加算して設定する設定ステップと、
     を実行させることを特徴とするプログラムを記録する記録媒体。
PCT/JP2009/069047 2008-11-07 2009-11-09 ベクター画像描画装置、ベクター画像描画方法および記録媒体 WO2010053175A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CA2743036A CA2743036C (en) 2008-11-07 2009-11-09 Vector image drawing device, vector image drawing method, and recording medium
US13/125,836 US8907955B2 (en) 2008-11-07 2009-11-09 Vector image drawing device, vector image drawing method, and recording medium
EP09824872.7A EP2346002A4 (en) 2008-11-07 2009-11-09 Vector image drawing device, vector image drawing method, and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008287185A JP4858883B2 (ja) 2008-11-07 2008-11-07 ベクター画像描画装置、ベクター画像描画方法およびプログラム
JP2008-287185 2008-11-07

Publications (1)

Publication Number Publication Date
WO2010053175A1 true WO2010053175A1 (ja) 2010-05-14

Family

ID=42152980

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/069047 WO2010053175A1 (ja) 2008-11-07 2009-11-09 ベクター画像描画装置、ベクター画像描画方法および記録媒体

Country Status (5)

Country Link
US (1) US8907955B2 (ja)
EP (1) EP2346002A4 (ja)
JP (1) JP4858883B2 (ja)
CA (1) CA2743036C (ja)
WO (1) WO2010053175A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10395401B2 (en) * 2015-08-07 2019-08-27 Zhejiang University Method for efficient parallel visualizing vector graphic
US11924415B2 (en) * 2021-05-11 2024-03-05 Tencent America LLC Method and apparatus for boundary handling in video coding

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07231444A (ja) 1994-02-18 1995-08-29 Fujitsu Ltd 符号化復号化装置及び符号化復号化方法
JPH07325928A (ja) * 1994-06-02 1995-12-12 Fujitsu Ltd 描画処理装置
JPH09284557A (ja) 1996-04-09 1997-10-31 Canon Inc 画像形成装置
JP2008287185A (ja) 2007-05-21 2008-11-27 Canon Inc 画像形成装置及びその制御方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5043711A (en) * 1989-06-09 1991-08-27 Xerox Corporation Representation of polygons defined by non-zero winding numbers
JP2770582B2 (ja) * 1991-03-12 1998-07-02 富士ゼロックス株式会社 図形塗潰し装置
US8482801B2 (en) * 2008-04-10 2013-07-09 Xerox Corporation Storage of stamp information for error diffusion

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07231444A (ja) 1994-02-18 1995-08-29 Fujitsu Ltd 符号化復号化装置及び符号化復号化方法
JPH07325928A (ja) * 1994-06-02 1995-12-12 Fujitsu Ltd 描画処理装置
JPH09284557A (ja) 1996-04-09 1997-10-31 Canon Inc 画像形成装置
JP2008287185A (ja) 2007-05-21 2008-11-27 Canon Inc 画像形成装置及びその制御方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2346002A4 *

Also Published As

Publication number Publication date
JP4858883B2 (ja) 2012-01-18
CA2743036A1 (en) 2010-05-14
EP2346002A1 (en) 2011-07-20
CA2743036C (en) 2014-02-25
EP2346002A4 (en) 2017-04-26
US8907955B2 (en) 2014-12-09
JP2010113626A (ja) 2010-05-20
US20110205232A1 (en) 2011-08-25

Similar Documents

Publication Publication Date Title
US6768491B2 (en) Barycentric centroid sampling method and apparatus
JP4370438B2 (ja) ベクター画像描画装置、ベクター画像描画方法およびプログラム
JP3142550B2 (ja) 図形処理装置
JPH06236176A (ja) ラスタ画像に透明性を与える方法及び装置
JP4858883B2 (ja) ベクター画像描画装置、ベクター画像描画方法およびプログラム
JP4686624B2 (ja) 情報処理装置、画像処理方法およびプログラム
KR102405309B1 (ko) 디스플레이 장치 및 그 디스플레이 방법
CN107146268B (zh) 矢量图形的填充方法和矢量图形的填充装置
JP3009525B2 (ja) ベクトル画像描画装置
WO2013069058A1 (ja) 描画装置及び描画プログラム
JP4361118B2 (ja) 情報処理装置、情報処理方法、およびプログラム
JP5825306B2 (ja) 画像変倍装置および画像変倍方法
JP5159949B2 (ja) ベクトル図形描画装置
JP2010055374A (ja) データ作成装置、データ作成方法、データ作成用プログラム、描画装置、描画方法、描画用プログラム、および、コンピュータ読取可能な記録媒体
JP4930860B2 (ja) 図形描画装置、アンチエイリアス処理方法およびプログラム
US8237628B2 (en) Vector image drawing circuit and method for vector image drawing
JP2017016511A (ja) 歪み補正画像処理装置及びプログラム
JP6122322B2 (ja) 画像処理装置、プログラムおよび集積回路
EP2988269B1 (en) A system and method for scaling and copying graphics
JP2012019315A (ja) 画像処理装置及び画像処理方法
JP4734952B2 (ja) 画像処理方法および装置
JP2014085402A (ja) 描画処理装置およびその制御方法
JP2008283392A (ja) 補間画素生成回路
JP3063506B2 (ja) ラスタデータ処理装置
JP2005269476A (ja) 輝度データ補正装置および輝度データ補正方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09824872

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 13125836

Country of ref document: US

REEP Request for entry into the european phase

Ref document number: 2009824872

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2009824872

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2743036

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE