WO2012165238A1 - 描画装置、描画方法及びプログラム - Google Patents

描画装置、描画方法及びプログラム Download PDF

Info

Publication number
WO2012165238A1
WO2012165238A1 PCT/JP2012/063098 JP2012063098W WO2012165238A1 WO 2012165238 A1 WO2012165238 A1 WO 2012165238A1 JP 2012063098 W JP2012063098 W JP 2012063098W WO 2012165238 A1 WO2012165238 A1 WO 2012165238A1
Authority
WO
WIPO (PCT)
Prior art keywords
line
pixels
pixel
interpolation range
parameter
Prior art date
Application number
PCT/JP2012/063098
Other languages
English (en)
French (fr)
Inventor
山本 知弘
博 石黒
豊嶋 亮蔵
Original Assignee
アイシン精機株式会社
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 アイシン精機株式会社 filed Critical アイシン精機株式会社
Priority to US14/119,288 priority Critical patent/US20140125677A1/en
Priority to EP12793713.4A priority patent/EP2717224A4/en
Priority to CN201280026637.7A priority patent/CN103562965A/zh
Publication of WO2012165238A1 publication Critical patent/WO2012165238A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Definitions

  • the present invention relates to a drawing apparatus, a drawing method, and a program, and more particularly, to a drawing apparatus that draws a line on a screen, and a drawing method and a program for drawing a line on the screen.
  • This type of support device displays, for example, a straight line indicating the vehicle width and a trajectory indicating the destination of the vehicle on the monitor screen superimposed on the image behind the vehicle.
  • DDA Digital Differential Analyzer
  • the support device can easily perform calculations necessary for drawing a straight line, and can draw a straight line on a monitor screen in a short time.
  • the line width of the straight line to be drawn basically depends on the pixel size, such as the horizontal width or height of the pixel. To do. Accordingly, various techniques for drawing a straight line having a desired line width using DDA have been proposed (see, for example, Patent Documents 1 and 2).
  • the apparatus described in Patent Document 1 draws a straight line to be drawn according to a DDA algorithm and draws a dot pattern corresponding to the line width of the straight line.
  • the apparatus described in Patent Document 2 draws a straight line to be drawn according to the DDA algorithm, and draws a normal having a length equal to the line width on the straight line.
  • the above two devices display a straight line having a desired line width by drawing a dot pattern or a normal line corresponding to the line width of the straight line.
  • Patent Document 1 needs to store a dot pattern corresponding to the line width in advance. Therefore, a certain amount of memory is required to store the dot pattern. As a result, there is a problem that the apparatus becomes large.
  • Patent Document 2 calculates a straight line normal to be drawn by a complicated calculation. For this reason, it is considered that the arithmetic circuit becomes complicated. In addition, it may be difficult to display a straight line on the monitor screen in a short time.
  • the present invention has been made under the above circumstances, and an object thereof is to perform drawing processing at high speed while simplifying the apparatus.
  • a drawing apparatus provides: A drawing device for drawing a line defined by two points on a screen composed of a plurality of pixels, Interpolation range defining means for defining an interpolation range for a line segment having the two points as end points according to the line width of the line; Determining means for determining whether or not the pixel is included in the interpolation range; Drawing means for drawing a line by pixels on the line segment and pixels determined to be included in the interpolation range; Is provided.
  • a drawing method includes: A drawing method for drawing a line defined by two points on a screen composed of a plurality of pixels, Defining an interpolation range for a line segment having the two points as end points according to the line width of the line; Determining whether the pixel is included in the interpolation range; Drawing a line of pixels on the line segment and pixels determined to be included in the interpolation range; including.
  • a program provides: On the computer, A procedure for defining an interpolation range for a line segment whose end points are two points on a screen composed of a plurality of pixels according to the line width of a line to be drawn; A procedure for determining whether the pixel is included in the interpolation range; Drawing a line with pixels on the line segment and pixels determined to be included in the interpolation range; Is executed.
  • an interpolation range is defined around a line segment determined by two points based on information on the line width.
  • a line is drawn by the pixels included in the interpolation range.
  • FIG. 1 is a block diagram showing a schematic configuration of a back monitor system 10 according to the present embodiment.
  • the back monitor system 10 is a device that displays, for example, a line indicating a vehicle trajectory or a vehicle width, superimposed on an image behind the vehicle.
  • the back monitor system 10 includes a drawing device 20 and a photographing device 30.
  • the imaging device 30 is attached to the rear of the vehicle 100 as shown in FIG.
  • the photographing device 30 is adjusted in its mounting posture and viewing angle so that the road surface behind the vehicle is positioned within the field of view. And the imaging device 30 converts the image obtained by imaging into an electrical signal and outputs it.
  • the drawing apparatus 20 is a computer having a CPU (Central Processing Unit) 21, a main storage unit 22, an auxiliary storage unit 23, a display unit 24, an input unit 25, and an interface unit 26.
  • CPU Central Processing Unit
  • the CPU 21 reads and executes the program stored in the auxiliary storage unit 23 to draw a line indicating the trajectory, the vehicle width, and the like of the vehicle 100 on the screen of the display unit 24 so as to overlap the image behind the vehicle 100. To do.
  • the CPU 21 can draw a line having a desired width by executing the above-described program.
  • the main storage unit 22 has a volatile memory such as a RAM (Random Access Memory).
  • the main storage unit 22 is used as a work area for the CPU 21.
  • the auxiliary storage unit 23 has a non-volatile memory such as a ROM (Read Only Memory), a magnetic disk, or a semiconductor memory.
  • the auxiliary storage unit 23 stores programs executed by the CPU 21, various parameters, and the like.
  • the auxiliary storage unit 23 sequentially stores information about the image output from the imaging device 30 and information including the processing result by the CPU 21.
  • the display unit 24 has a display device such as an LCD (Liquid Crystal Display).
  • the display unit 24 displays the processing result of the CPU 21 and the like.
  • the input unit 25 has an input key and a pointing device such as a touch panel.
  • the operator's instruction is input via the input unit 25 and is notified to the CPU 21 via the system bus 27.
  • the interface unit 26 includes a serial interface or a LAN (Local Area Network) interface.
  • the imaging device 30 is connected to the system bus 27 via the interface unit 26.
  • the screen of the display unit 24 is composed of pixels arranged in a matrix of 10 rows and 20 columns as shown in FIG.
  • the pixel in the mth row and the nth column is represented as a pixel D (m, n). Note that (m, n) is equivalent to coordinates on the screen of the display unit 24.
  • the straight line drawn by the CPU 21 is a downward-sloping line defined by two points, a pixel D (3, 3) marked with a circle and a pixel D (13, 6) marked with a triangle. It shall be a straight line. Further, it is assumed that the line width in the vertical direction of the straight line to be drawn is 3.
  • step S201 the CPU 21 calculates the distance Xa and the distance Ya to the drawing end point pixel based on the drawing start pixel.
  • the distance Xa and the distance Ya are expressed by the following equations (1) and (2), respectively.
  • the Abs (x) function is a function that outputs the absolute value of x.
  • the drawing start pixel is the pixel D (3, 3) and the drawing end pixel is the pixel D (13, 6)
  • the distance Xa is 10
  • the distance Ya is 3. Calculated.
  • the CPU 21 calculates the shift amount XYsft that defines the line width based on the following equation (3).
  • the Int (x) function is a function that outputs the maximum integer that does not exceed x.
  • s_wdt is the width of the line to be drawn, and is 3 under the above assumption. Therefore, the shift amount XYsft is calculated as 1.
  • the CPU 21 calculates parameters Xb and Yb depending on the line width based on the following equations (4) and (5).
  • parameters Xb and Yb are parameters for adjusting the drawing start position according to the line width.
  • the parameters Xb and Yb at this time are determined from the pixel D (2, 2) that is separated from the drawing start pixel D (3, 3) by ⁇ 1 in the X direction and ⁇ 1 in the Y direction. This means that line drawing is started.
  • the CPU 21 calculates the parameter XaYb and the parameter YaXb based on the following equations (6) and (7). Then, the CPU 21 sets the calculated value of the parameter YaXb as the initial value YaXbInt.
  • the value of the parameter XaYb is calculated as ⁇ 10. Further, since the distance Ya is 3 and the parameter Xb is -1, the value of the parameter YaXb is calculated to be -3.
  • the initial value YaXbInt is set to -3.
  • the CPU 21 calculates parameters Xa2 and Ya2 based on the following equations (8) and (9), respectively.
  • the distance Xa is 10 and the distance Ya is 3. Therefore, the parameter Xa2 is calculated as 5, and the parameter Ya2 is calculated as 1.
  • the CPU 21 updates the parameters Xa2 and Ya2 according to the line width by executing the calculations shown in the following equations (10) and (11). Under the above assumption, since the line width is 3, Int (s_wdt / 2) is calculated as 1. A value obtained by adding the value of the distance Xa once to the parameter Xa2 becomes a new value of the parameter Xa2 (index value). Further, a value obtained by adding the value of the distance Ya once to the parameter Ya2 becomes a new value of the parameter Ya2 (index value).
  • the CPU 21 initializes the values of the parameters Xdp and Ydp for designating the pixels constituting the screen of the display unit 24 to zero.
  • step S206 the CPU 21 executes a subroutine 300 for realizing the drawing process.
  • the CPU 21 increments the parameter Ydp.
  • step S302 the CPU 21 increments the parameter Xdp.
  • FIG. 6 shows the drawing range F.
  • the drawing range F is defined by a drawing start pixel D (Xst, Yst), a drawing end pixel D (Xep, Yep), and a shift amount XYsft.
  • the drawing range F is defined as a rectangular range in which the pixel D (Xst-XYsft, Yst-XYsft) indicated by a double circle in FIG. 6 and the pixel D (Xep + XYsft, Yep + XYsft) are located at the corners. Is done.
  • step S303: No When the pixel D (Xdp, Ydp) is not included in the drawing range F (step S303: No), the CPU 21 proceeds to step S310.
  • step S310 the CPU 21 determines whether or not the value of the parameter Xdp is 20 or more. If the value of the parameter Xdp is less than 20 (step S310: No), the CPU 21 returns to step S302.
  • step S303 the determination in step S303 is not affirmed, and the CPU 21 repeats the processes of step S302, step S303, and step S310. Thereby, the state of the pixels in the first row is designated as off.
  • step S310 determines whether the value of the parameter Xdp reaches 20 or not. If the value of the parameter Xdp reaches 20, the determination in step S310 is affirmed (step S310: Yes), and the CPU 21 proceeds to step S311.
  • step S311 the CPU 21 updates the parameter XaYb based on the following equation (12).
  • the value of the parameter XaYb is ⁇ 10 and the value of the distance Xa is 10. For this reason, the value of the parameter XaYb is updated to 0.
  • the CPU 21 sets the value of the parameter YaXb to be equivalent to the value of the initial value YaXbInt.
  • the value of the initial value YaXbInt is -3, so the value of the parameter YaXb is set to -3.
  • step S313 the CPU 21 determines whether or not the value of the parameter Ydp is 10 or more. If the value of the parameter Ydp is less than 10 (step S313: No), the CPU 21 proceeds to step S314.
  • step S314 the CPU 21 initializes the value of the parameter Xdp to 0. Then, the process returns to step S301, and the value of the parameter Ydp is incremented. For example, in step S301 executed for the second time, the value of the parameter Ydp is 2.
  • the CPU 21 executes the processes of step S302, step S303, and step S310.
  • the value of the parameter Xdp becomes 2 by the processing in step S302.
  • the pixel D (Xdp, Ydp) defined by the parameters Xdp, Ydp is the pixel D (2, 2).
  • step S303 the determination in step S303 is affirmed (step S303: Yes), and the CPU 21 proceeds to step S306.
  • step S306 the CPU 21 calculates the value of the parameter s_abs based on the following expression (14) as a predetermined conditional expression.
  • the value of the parameter XaYb is ⁇ 10 and the value of the parameter YaXb is ⁇ 3. For this reason, the value of the parameter s_abs is calculated as 7.
  • step S307 the CPU 21 determines whether or not the value of the parameter s_abs is equal to or smaller than the value of the parameter Xa2. Under the above assumption, the value of the parameter Xa2 is 15, so the determination in step S307 is affirmed (step S307: Yes). Then, the CPU 21 proceeds to step S308 and designates the state of the pixel D (2, 2) as ON. As a result, the pixel D (2, 2) marked with a star in FIG. 8 is turned on.
  • the CPU 21 updates the value of the parameter YaXb based on the following equation (15).
  • the value of the parameter YaXb is ⁇ 3 and the value of the parameter Ya is 3. For this reason, the value of the parameter YaXb is updated to 0.
  • step S310 since the value of the parameter Xdp is 2 (step S310: No), the CPU 21 returns to step S302.
  • step S306 the CPU 21 proceeds to step S306 via step S303.
  • 13 Abs ( ⁇ 10 ⁇ 3)
  • step S307 the determination in step S307 is affirmed (step S307: Yes)
  • step S307 Yes
  • the pixel D (2, 4) is turned on.
  • step S308 the continuous pixel D (2, 2), pixel D (2, 3), and pixel D (2, 4) marked with an asterisk are turned on (step S308). .
  • step S313 the processing from steps S301 to S314 described above is repeatedly executed by the CPU 21.
  • a line having a line width of 3 in the vertical direction is drawn as indicated by the pixel D marked with a star in FIG.
  • the CPU 21 affirms the determination in step S313, it ends the series of processes.
  • the back monitor system 10 executes the processes shown in FIGS. Thereby, as schematically shown in FIG. 12, the line segment defined by the circled pixel D (3, 3) and the triangle D pixel (13, 6) is included.
  • An interpolation range R is defined. This interpolation range R is indirectly defined by the parameter Xa2 updated in accordance with the line width in step S204.
  • the drawing apparatus 20 can perform the drawing process at high speed.
  • the main storage unit 22 and the auxiliary storage unit 23 can be reduced in size.
  • the back monitor system 10 can be reduced in size and reduced in price.
  • the CPU 21 compares the value of the parameter Ya2 calculated in step S204 with the value of the parameter s_abs in step S307. Thereby, the CPU 21 can draw a line having a desired line width.
  • the screen of the display unit 24 is composed of pixels arranged in a matrix of 10 rows and 20 columns.
  • the pixels constituting the display unit 24 may be arranged in a matrix of, for example, 480 rows and 800 columns.
  • the functions of the drawing apparatus 20 according to each of the above embodiments can be realized by dedicated hardware or by a normal computer system.
  • the program stored in the auxiliary storage unit 23 of the drawing apparatus 20 is a flexible disk, a CD-ROM (Compact Disk Read-Only Memory), a DVD (Digital Versatile Disk), an MO (Magneto-Optical Disk), or the like.
  • An apparatus that executes the above-described processing may be configured by storing the program in a computer-readable recording medium, distributing the program, and installing the program in the computer.
  • the drawing apparatus, drawing method and program of the present invention are suitable for drawing a line on the screen.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

 描画装置は、複数の画素からなる画面に描画され、画面上の2点によって規定される線の線幅に応じて、2点を端点とする線分に対する補間範囲を規定する。また、描画装置は、画素が補間範囲に含まれるか否かを判断する。そして、描画装置は、線分上の画素と、補間範囲に含まれると判断された画素とによる線を描画する。このため、描画装置は、線幅に関する情報のみに基づいて、線を描画するための画素を特定することが可能となる。したがって、描画処理の際に取り扱う情報が少なくなり、描画処理を高速に行うことができる。また、描画処理を行うために予め用意しておく情報が少なくてすむので、装置の小型化を図ることができる。

Description

描画装置、描画方法及びプログラム
 本発明は、描画装置、描画方法及びプログラムに関し、更に詳しくは、画面に線を描画する描画装置、画面に線を描画するための描画方法及びプログラムに関する。
 近年、車両の車庫入れや、縦列駐車等をアシストするための支援装置が登場するに至っている。この種の支援装置は、例えば、車両後方の映像に重ねて、車幅を示す直線や、車両の移動先を示す軌跡をモニタ画面に表示する。この種の線を描画する際には、例えばDDA(Digital Differential Analyzer)がよく用いられる。支援装置は、DDAを用いることで、直線を描画する際に必要な演算を簡単に行うことができ、モニタ画面に短時間に直線を描画することができる。
 DDAを用いて、異なる2点によって規定される直線が描画される場合には、描画対象となる直線の線幅は、基本的には、画素の横幅或いは高さ等、画素の大きさに依存する。そこで、DDAを用いて、所望の線幅の直線を描画する技術が種々提案されている(例えば特許文献1及び2参照)。
特開平4-23179号公報 特開平8-279038号公報
 上記特許文献1に記載された装置は、描画対象となる直線をDDAのアルゴリズムに従って描画するとともに、当該直線の線幅に応じたドットパターンを描画する。また、特許文献2に記載された装置は、描画対象となる直線をDDAのアルゴリズムに従って描画するとともに、線幅に等しい長さの法線を当該直線に重ねて描画する。上記2つの装置は、直線の線幅に応じたドットパターン或いは法線を描画することにより、所望の線幅の直線を表示する。
 しかしながら、特許文献1に記載された装置は、線幅に応じたドットパターンを予め記憶しておく必要がある。このため、ドットパターンを記憶しておくために、ある程度の容量のメモリが必要になる。その結果、装置が大型化するという問題がある。
 また、特許文献2に記載された装置は、描画対象となる直線の法線を、複雑な演算により算出する。このため、演算回路が複雑になると考えられる。また、モニタ画面に短時間に直線を表示することが困難になることが考えられる。
 本発明は、上述の事情の下になされたもので、装置の簡素化を図りつつ、描画処理を高速に行うことを目的とする。
 上記目的を達成するため、本発明の第1の観点に係る描画装置は、
 複数の画素からなる画面に、2点によって規定される線を描画する描画装置であって、
 前記線の線幅に応じて、前記2点を端点とする線分に対する補間範囲を規定する補間範囲規定手段と、
 前記画素が、前記補間範囲に含まれるか否かを判断する判断手段と、
 前記線分上の画素と、前記補間範囲に含まれると判断された画素とによる線を描画する描画手段と、
 を備える。
 上記目的を達成するため、本発明の第2の観点に係る描画方法は、
 複数の画素からなる画面に、2点によって規定される線を描画する描画方法であって、
 前記線の線幅に応じて、前記2点を端点とする線分に対する補間範囲を規定する工程と、
 前記画素が、前記補間範囲に含まれるか否かを判断する工程と、
 前記線分上の画素と、前記補間範囲に含まれると判断された画素とによる線を描画する工程と、
 を含む。
 上記目的を達成するため、本発明の第3の観点に係るプログラムは、
 コンピュータに、
 複数の画素からなる画面上の2点を端点とする線分に対する補間範囲を、描画する線の線幅に応じて、規定する手順と、
 前記画素が、前記補間範囲に含まれるか否かを判断する手順と、
 前記線分上の画素と、前記補間範囲に含まれると判断された画素とによる線を描画する手順と、
 を実行させる。
 本発明によれば、2点によって定まる線分の周囲に、線幅に関する情報に基づいて補間範囲が規定される。そして、補間範囲に含まれる画素によって線が描画される。このため、描画処理の際に取り扱う情報が少なくなり、描画処理を高速に行うことができる。また、描画処理を行うために予め記憶しておく情報が少なくてすむので、装置の小型化を図ることができる。
本実施形態に係るバックモニタシステムのブロック図である。 撮影装置の配置を示す図である。 表示部の画面を模式的に示す図である。 CPUによって実行される一連の処理を示すフローチャートである。 CPUによって実行される描画処理を示すフローチャートである。 描画範囲を示す図である。 描画手順を説明するための図である。 描画手順を説明するための図である。 描画手順を説明するための図である。 描画手順を説明するための図である。 描画手順を説明するための図である。 補間範囲を示す図である。
 以下、本発明の一実施形態を、図面を参照しつつ説明する。図1は本実施形態に係るバックモニタシステム10の概略的な構成を示すブロック図である。バックモニタシステム10は、例えば車両の後方の画像に重ねて、車両の軌跡や車幅を示す線を表示する装置である。図1に示されるように、バックモニタシステム10は、描画装置20と、撮影装置30を有している。
 撮影装置30は、例えば図2に示されるように、車両100の後方に取り付けられている。この撮影装置30は、視野内に車両後方の路面が位置するように、取り付け姿勢や視野角が調整されている。そして、撮影装置30は、撮影により得た画像を電気信号に変換して出力する。
 図1に戻り、描画装置20は、CPU(Central Processing Unit)21、主記憶部22、補助記憶部23、表示部24、入力部25、及びインタフェース部26を有するコンピュータである。
 CPU21は、補助記憶部23に記憶されたプログラムを読み出して実行することにより、表示部24の画面に、車両100の後方の画像に重ねて、車両100の軌跡や車幅等を示す線を描画する。このCPU21は、上述のプログラムを実行することで、所望の幅の線を描画することができる。
 主記憶部22は、RAM(Random Access Memory)等の揮発性メモリを有している。主記憶部22は、CPU21の作業領域として用いられる。
 補助記憶部23は、ROM(Read Only Memory)、磁気ディスク、半導体メモリ等の不揮発性メモリを有している。補助記憶部23は、CPU21が実行するプログラム、及び各種パラメータなどを記憶している。また、補助記憶部23は、撮影装置30から出力される画像に関する情報、及びCPU21による処理結果などを含む情報を順次記憶する。
 表示部24は、LCD(Liquid Crystal Display)などの表示装置を有している。表示部24は、CPU21の処理結果等を表示する。
 入力部25は、入力キーや、タッチパネル等のポインティングデバイスを有している。オペレータの指示は、入力部25を介して入力され、システムバス27を経由してCPU21へ通知される。
 インタフェース部26は、シリアルインターフェイスまたはLAN(Local Area Network)インタフェース等を含んで構成されている。撮影装置30は、インタフェース部26を介してシステムバス27に接続される。
 次に、CPU21による線の描画動作について説明する。説明の便宜上、上述の表示部24の画面は、図3に示されるように、10行20列のマトリクス状に配列された画素から構成されていると仮定する。そして、m行目のn列目にある画素は画素D(m,n)と表記する。なお、(m,n)は、表示部24の画面上の座標と等価である。
 また、前提として、CPU21によって描画される直線は、丸印が付された画素D(3,3)と三角印が付された画素D(13,6)の2点によって規定される右下がりの直線であるものとする。また、描画される直線の縦方向の線幅は3であるものとする。
 図4及び図5のフローチャートは、CPU21によって実行されるプログラムの一連の処理(アルゴリズム)に対応している。以下、図4及び図5を参照しつつ、バックモニタシステム10の動作について説明する。図4及び図5のフローチャートに示される一連の処理は、例えばドライバによって車両100のギアが、後退ギアにギアチェンジされることにより開始される。
 まず、ステップS201では、CPU21は、描画開始画素を基準とする描画終点画素までの距離Xa、及び距離Yaを算出する。例えば、描画開始画素が画素D(Xst,Yst)であり、描画終了画素が画素D(Xep,Yep)である場合には、距離Xa及び距離Yaは、それぞれ次式(1)及び(2)で示される。なお、Abs(x)関数は、xの絶対値を出力する関数である。
Xa=Abs(Xep-Xst) …(1)
Ya=Abs(Yep-Yst) …(2)
 上述した前提のように、描画開始画素が画素D(3,3)であり、描画終了画素が画素D(13,6)である場合には、距離Xaは10と、距離Yaは3とそれぞれ算出される。
 また、CPU21は、線幅を規定するシフト量XYsftを、次式(3)に基づいて算出する。なお、Int(x)関数は、xを超えない最大の整数を出力する関数である。また、s_wdtは、描画される線の幅であり、上述の前提では3である。したがって、シフト量XYsftは、1と算出される。
XYsft=Int(s_wdt/2) …(3)
 次のステップS202では、CPU21は、線幅に依存するパラメータXb,Ybを次式(4)及び(5)に基づいて算出する。
Xb=0-XYsft …(4)
Yb=0-XYsft …(5)
 このパラメータXb,Ybは、描画開始位置を線幅に応じて調整するためのパラメータである。上述した前提のように線幅が3である場合には、パラメータXb,Ybは、それぞれ-1(=0-1)と算出される。図3を参照するとわかるように、このときのパラメータXb,Ybは、描画開始画素D(3,3)からX方向へ-1、Y方向へ-1だけ離れた画素D(2,2)から線の描画が開始されることを意味する。
 次のステップS203では、CPU21は、パラメータXaYb及びパラメータYaXbを、次式(6)及び(7)に基づいて算出する。そして、CPU21は、算出したパラメータYaXbの値を初期値YaXbIntとして設定する。
XaYb=Xa・Yb …(6)
YaXb=Ya・Xb …(7)
 上述の前提の下では、距離Xaが10で、パラメータYbが-1であるため、パラメータXaYbの値は-10と算出される。また、距離Yaが3で、パラメータXbが-1であるため、パラメータYaXbの値は-3と算出される。また、初期値YaXbIntは、-3と設定される。
 また、CPU21は、パラメータXa2、Ya2をそれぞれ次式(8)及び(9)に基づいて算出する。
Xa2=Int(Xa/2) …(8)
Ya2=Int(Ya/2) …(9)
 上述の前提の下では、距離Xaが10で、距離Yaが3である。したがって、パラメータXa2が5と、パラメータYa2が1とそれぞれ算出される。
 次のステップS204では、CPU21は、次式(10)及び(11)に示される演算を実行することで、パラメータXa2,Ya2を線幅に応じて更新する。上述の前提では、線幅が3であるため、Int(s_wdt/2)が1と算出される。そして、パラメータXa2に距離Xaの値を一回加えた値が、新たにパラメータXa2(指標値)の値となる。また、パラメータYa2に距離Yaの値を一回加えた値が、新たにパラメータYa2(指標値)の値となる。
Xa2=Xa2+Xa・Int(s_wdt/2) …(10)
Ya2=Ya2+Ya・Int(s_wdt/2) …(11)
 上述の前提の下では、パラメータXa2の値は、5から15(=5+10)に更新される。また、パラメータYa2の値は、1から4(=1+3)に更新される。
 次のステップS205では、CPU21は、表示部24の画面を構成する画素を指定するためのパラメータXdp,Ydpそれぞれの値を0に初期化する。
 次のステップS206では、CPU21は、描画処理を実現するためのサブルーチン300を実行する。サブルーチン300において、まず、ステップS301では、CPU21は、パラメータYdpをインクリメントする。
 次のステップS302では、CPU21は、パラメータXdpをインクリメントする。
 次のステップS303では、CPU21は、画素D(Xdp、Ydp)が、描画範囲内にあるか否かを確認する。図6には、描画範囲Fが示されている。この描画範囲Fは、描画開始画素D(Xst,Yst)と描画終了画素D(Xep,Yep)と、シフト量XYsftによって規定される。具体的には、描画範囲Fは、図6に二重丸で示される画素D(Xst-XYsft,Yst-XYsft)と、画素D(Xep+XYsft,Yep+XYsft)とがコーナーに位置する矩形の範囲として規定される。
 CPU21は、画素D(Xdp、Ydp)が、描画範囲Fに含まれない場合には(ステップS303:No)、ステップS310へ移行する。
 ステップS310では、CPU21は、パラメータXdpの値が20以上であるか否かを判断する。そして、パラメータXdpの値が20未満である場合には(ステップS310:No)、CPU21は、ステップS302へ戻る。
 例えば図7を参照するとわかるように、パラメータYdpの値が1の場合に、パラメータXdpの値が1から20まで変化することにより指定される画素D(Xdp,Ydp)は、網掛けが付された1行目の画素である。したがって、この場合には、ステップS303での判断が肯定されることがなく、CPU21は、ステップS302、ステップS303、ステップS310の処理を繰り返す。これにより、1行目の画素の状態がオフに指定される。
 そして、パラメータXdpの値が20になると、ステップS310での判断が肯定され(ステップS310:Yes)、CPU21は、ステップS311へ移行する。
 ステップS311では、CPU21は、パラメータXaYbを、次式(12)に基づいて更新する。
XaYb=XaYb+Xa …(12)
 上述の前提の下では、パラメータXaYbの値は-10であり、距離Xaの値は10である。このため、パラメータXaYbの値は0に更新される。
 次のステップS312では、CPU21は、パラメータYaXbの値を、初期値YaXbIntの値と等価に設定する。上述の前提の下では、初期値YaXbIntの値は-3であるから、パラメータYaXbの値は-3に設定される。
 次のステップS313では、CPU21は、パラメータYdpの値が10以上であるか否かを判断する。そして、パラメータYdpの値が10未満である場合には(ステップS313:No)、CPU21は、ステップS314へ移行する。
 ステップS314では、CPU21は、パラメータXdpの値を0に初期化する。そして、ステップS301へ戻り、パラメータYdpの値をインクリメントする。例えば、2回目に実行されるステップS301において、パラメータYdpの値は2になる。
 以降のステップでは、CPU21によって、ステップS302、ステップS303、及びステップS310の処理が実行される。次に、ステップS302での処理により、パラメータXdpの値が2になる。したがって、パラメータXdp,Ydpによって規定される画素D(Xdp,Ydp)は、画素D(2、2)となる。
 図8を参照するとわかるように、画素D(2,2)は、描画範囲F内に位置する。このため、ステップS303での判断は肯定され(ステップS303:Yes)、CPU21は、ステップS306へ移行する。
 ステップS306では、CPU21は、所定の条件式としての次式(14)に基づいて、パラメータs_absの値を算出する。パラメータXdp、Ydpの双方が2である場合には、パラメータXaYbの値は-10であり、パラメータYaXbの値は-3である。このため、パラメータs_absの値は7と算出される。
s_abs=Abs(XaYb-YaXb) …(14)
 次のステップS307では、CPU21は、パラメータs_absの値が、パラメータXa2の値以下であるか否かを判断する。上述の前提の下では、パラメータXa2の値が15であるから、ステップS307での判断は肯定される(ステップS307:Yes)。そして、CPU21は、ステップS308へ移行して、画素D(2,2)の状態をオンに指定する。これにより、図8の星印が付された画素D(2,2)がオンとなる。
 次のステップS309では、CPU21は、次式(15)に基づいて、パラメータYaXbの値を更新する。パラメータXdp、Ydpの双方が2である場合には、パラメータYaXbの値が-3であり、パラメータYaの値が3である。このため、パラメータYaXbの値は0に更新される。
YaXb=YaXb+Ya …(15)
 次のステップS310では、パラメータXdpの値が2であるため(ステップS310:No)、CPU21は、ステップS302に戻る。
 以降のステップでは、ステップS302の処理で、パラメータXdpの値が3になる。そして、CPU21は、ステップS303を経てステップS306へ移行する。続いて、ステップS306の処理により、パラメータs_absの値として10(=Abs(-10-0))が算出される。パラメータXa2が15であるから、ステップS307での判断が肯定され(ステップS307:Yes)、画素D(2,3)がオンとなる(ステップS308)。
 同様に、ステップS302の処理で、パラメータXdpの値が4になると、CPU21は、ステップS303を経てステップS306へ移行する。続いて、ステップS306の処理により、パラメータs_absの値として13(=Abs(-10-3))が算出される。パラメータXa2が15であるから、ステップS307での判断が肯定され(ステップS307:Yes)、画素D(2,4)がオンとなる。これにより、図9に示されるように、星印が付された連続する画素D(2,2),画素D(2,3),画素D(2,4)がオンとなる(ステップS308)。
 その後、ステップS302の処理で、パラメータXdpの値が5になると、ステップS303に続くステップS306の処理により、パラメータs_absの値として16(=Abs(-10-6))が算出される。したがって、パラメータXa2が15であるから、ステップS307での判断が否定され(ステップS307:No)、画素D(2,5)がオフとなる。以降、ステップS310での判断が肯定されるまで、ステップS302~ステップS310の処理が繰り返される。これにより、図10において網掛けが付された画素D(2,5)から画素D(2,20)がオフとなる。
 以降、ステップS313での判断が肯定されるまで、CPU21によって、上述したステップS301~S314までの処理が、繰り返し実行される。これにより、図11の星印が付された画素Dで示されるように、縦方向の線幅が3の線が描画される。CPU21は、ステップS313での判断を肯定すると、一連の処理を終了する。
 以上説明したように、本実施形態に係るバックモニタシステム10は、図4及び図5に示される処理を実行する。これにより、図12に模式的に示されるように、丸印が付された画素D(3,3)と、三角印が付された画素D(13,6)によって規定される線分を含む補間範囲Rが規定される。この補間範囲Rは、ステップS204で線幅に応じて更新されたパラメータXa2によって、間接的に規定される。
 このため、線幅に関する情報のみに基づいて、線を描画するための画素を特定することが可能となる。したがって、描画処理の際に取り扱う情報が少なくなり、描画装置20は、描画処理を高速に行うことができる。また、描画処理を行うために予め用意しておく情報が少なくてすむので、主記憶部22及び補助記憶部23の小型化を図ることができる。ひいてはバックモニタシステム10の小型化及び低下価格を図ることが可能となる。
 以上、本発明の実施形態について説明したが、本発明は上記実施形態によって限定されるものではない。
 例えば、上記実施形態では、図3を参照するとわかるように、距離Xaの方が距離Yaよりも大きい場合について説明した。一方、距離Yaの方が距離Xaよりも大きい場合には、CPU21は、ステップS307において、ステップS204で算出したパラメータYa2の値と、パラメータs_absの値とを比較する。これにより、CPU21は、所望の線幅の線を描画することができる。
 上記実施形態では、例えば図3に示されるように、右下がりの線を描画する場合について説明した。これに限らず、右上がりの線を描画することも同様の要領で実現することができる。
 上記実施形態では、表示部24の画面が、10行20列のマトリクス状に配列された画素から構成されていると仮定した。これに限らず、表示部24を構成する画素は、例えば480行800列のマトリクス状に配列されていてもよい。
 上記各実施形態に係る描画装置20の機能は、専用のハードウェアによっても、また、通常のコンピュータシステムによっても実現することができる。
 上記実施形態において描画装置20の補助記憶部23に記憶されているプログラムは、フレキシブルディスク、CD-ROM(Compact Disk Read-Only Memory)、DVD(Digital Versatile Disk)、MO(Magneto-Optical disk)等のコンピュータで読み取り可能な記録媒体に格納して配布し、そのプログラムをコンピュータにインストールすることにより、上述の処理を実行する装置を構成することとしてもよい。
 上述の機能を、OS(Operating System)が分担して実現する場合又はOSとアプリケーションとの協働により実現する場合等には、OS以外の部分のみを媒体に格納して配布してもよく、また、コンピュータにダウンロード等してもよい。
 本発明は、本発明の広義の精神と範囲を逸脱することなく、様々な実施形態及び変形が可能とされるものである。また、上述した実施形態は、本発明を説明するためのものであり、本発明の範囲を限定するものではない。
 本出願は、2011年5月30日に出願された日本国特許出願2011-121105号に基づく。本明細書中に日本国特許出願2011-121105号の明細書、特許請求の範囲、図面全体を参照として取り込むものとする。
 本発明の描画装置、描画方法及びプログラムは、画面に線を描画するのに適している。
 10 バックモニタシステム
 20 描画装置
 21 CPU
 22 主記憶部
 23 補助記憶部
 24 表示部
 25 入力部
 26 インタフェース部
 27 システムバス
 30 撮影装置
 100 車両
 D 画素
 F 描画範囲
 R 補間範囲

Claims (6)

  1.  複数の画素からなる画面に、2点によって規定される線を描画する描画装置であって、
     前記線の線幅に応じて、前記2点を端点とする線分に対する補間範囲を規定する補間範囲規定手段と、
     前記画素が、前記補間範囲に含まれるか否かを判断する判断手段と、
     前記線分上の画素と、前記補間範囲に含まれると判断された画素とによる線を描画する描画手段と、
     を備える描画装置。
  2.  前記補間範囲規定手段は、前記補間範囲を規定する指標値を算出し、
     前記判断手段は、所定の条件式による算出結果と、前記指標値との比較結果に基づいて、前記画素が前記補間範囲に含まれるか否かを判断する請求項1に記載の描画装置。
  3.  前記判断手段は、前記算出結果の絶対値が前記指標値よりも小さい場合に、前記画素が、前記補間範囲に含まれると判断する請求項2に記載の描画装置。
  4.  前記線分上の画素についての前記条件式による前記算出結果は0である請求項2又は3に記載の描画装置。
  5.  複数の画素からなる画面に、2点によって規定される線を描画する描画方法であって、
     前記線の線幅に応じて、前記2点を端点とする線分に対する補間範囲を規定する工程と、
     前記画素が、前記補間範囲に含まれるか否かを判断する工程と、
     前記線分上の画素と、前記補間範囲に含まれると判断された画素とによる線を描画する工程と、
     を含む描画方法。
  6.  コンピュータに、
     複数の画素からなる画面上の2点を端点とする線分に対する補間範囲を、描画する線の線幅に応じて、規定する手順と、
     前記画素が、前記補間範囲に含まれるか否かを判断する手順と、
     前記線分上の画素と、前記補間範囲に含まれると判断された画素とによる線を描画する手順と、
     を実行させるためのプログラム。
PCT/JP2012/063098 2011-05-30 2012-05-22 描画装置、描画方法及びプログラム WO2012165238A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US14/119,288 US20140125677A1 (en) 2011-05-30 2012-05-22 Rendering device, rendering method, and recording medium
EP12793713.4A EP2717224A4 (en) 2011-05-30 2012-05-22 PRESENTING DEVICE, PRESENTATION METHOD AND PROGRAM THEREFOR
CN201280026637.7A CN103562965A (zh) 2011-05-30 2012-05-22 描画装置、描画方法及程序

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011121105 2011-05-30
JP2011-121105 2011-05-30

Publications (1)

Publication Number Publication Date
WO2012165238A1 true WO2012165238A1 (ja) 2012-12-06

Family

ID=47259097

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/063098 WO2012165238A1 (ja) 2011-05-30 2012-05-22 描画装置、描画方法及びプログラム

Country Status (5)

Country Link
US (1) US20140125677A1 (ja)
EP (1) EP2717224A4 (ja)
JP (1) JPWO2012165238A1 (ja)
CN (1) CN103562965A (ja)
WO (1) WO2012165238A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016123432A (ja) * 2014-12-26 2016-07-11 カシオ計算機株式会社 描画装置及び描画装置の描画制御方法
CN107871333B (zh) * 2017-11-30 2021-04-16 上海联影医疗科技股份有限公司 线描画方法及装置、计算机设备及计算机存储介质

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01166177A (ja) * 1987-12-22 1989-06-30 Fujitsu Ltd 太線描画方法
JPH02126377A (ja) * 1988-11-05 1990-05-15 Fujitsu Ltd 太線描画方式
JPH031283A (ja) * 1989-05-29 1991-01-07 Mitsubishi Electric Corp 直線描画方式
JPH03125277A (ja) * 1989-10-09 1991-05-28 Fuji Xerox Co Ltd ベクトルデータ/イメージデータ変換方式
JPH0423179A (ja) 1990-05-18 1992-01-27 Fujitsu Ltd 太線描画方法及びその装置
JPH06161417A (ja) * 1992-11-18 1994-06-07 Fuji Facom Corp 幅有り直線の表示方法
JPH08138065A (ja) * 1994-11-14 1996-05-31 Canon Inc 太線描画方式
JPH08279038A (ja) 1995-04-07 1996-10-22 Fuji Xerox Co Ltd 太線描画装置
JPH09212665A (ja) * 1996-02-02 1997-08-15 Fuji Xerox Co Ltd 線分描画装置
JPH10275239A (ja) * 1997-03-31 1998-10-13 Mutoh Ind Ltd 太線コーナ座標算出方式及び太線形成方式
JP2008027350A (ja) * 2006-07-25 2008-02-07 Canon Inc 太線描画処理方法および処理装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7439980B2 (en) * 2004-03-08 2008-10-21 Yamaha Corporation Image processing method and apparatus
EP1742180A1 (en) * 2004-04-27 2007-01-10 Hitachi Medical Corporation Image plotting device and method thereof
JP4327105B2 (ja) * 2005-01-25 2009-09-09 株式会社ソニー・コンピュータエンタテインメント 描画方法、画像生成装置、および電子情報機器
WO2009090726A1 (ja) * 2008-01-15 2009-07-23 Mitsubishi Electric Corporation 図形描画装置及び図形描画方法

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01166177A (ja) * 1987-12-22 1989-06-30 Fujitsu Ltd 太線描画方法
JPH02126377A (ja) * 1988-11-05 1990-05-15 Fujitsu Ltd 太線描画方式
JPH031283A (ja) * 1989-05-29 1991-01-07 Mitsubishi Electric Corp 直線描画方式
JPH03125277A (ja) * 1989-10-09 1991-05-28 Fuji Xerox Co Ltd ベクトルデータ/イメージデータ変換方式
JPH0423179A (ja) 1990-05-18 1992-01-27 Fujitsu Ltd 太線描画方法及びその装置
JPH06161417A (ja) * 1992-11-18 1994-06-07 Fuji Facom Corp 幅有り直線の表示方法
JPH08138065A (ja) * 1994-11-14 1996-05-31 Canon Inc 太線描画方式
JPH08279038A (ja) 1995-04-07 1996-10-22 Fuji Xerox Co Ltd 太線描画装置
JPH09212665A (ja) * 1996-02-02 1997-08-15 Fuji Xerox Co Ltd 線分描画装置
JPH10275239A (ja) * 1997-03-31 1998-10-13 Mutoh Ind Ltd 太線コーナ座標算出方式及び太線形成方式
JP2008027350A (ja) * 2006-07-25 2008-02-07 Canon Inc 太線描画処理方法および処理装置

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
EP2717224A1 (en) 2014-04-09
CN103562965A (zh) 2014-02-05
JPWO2012165238A1 (ja) 2015-02-23
EP2717224A4 (en) 2014-11-19
US20140125677A1 (en) 2014-05-08

Similar Documents

Publication Publication Date Title
EP2892230A1 (en) Image processing apparatus, image processing method, and program
US8625932B2 (en) Seam carving using seam energy re-computation in seam neighborhood
CN106847068A (zh) 一种地图转换方法、装置和计算设备
JP2009103473A (ja) 表示装置
WO2012165238A1 (ja) 描画装置、描画方法及びプログラム
US8928669B2 (en) OSD display control program product, OSD display control method, and OSD display device
JP4727304B2 (ja) 曲線描画装置、曲線描画方法、駐車支援装置及び車両
JP2007265035A (ja) 描画装置及び破線描画方法
JP2796284B1 (ja) 画像処理装置
JP4760550B2 (ja) 画像変換装置及び画像変換プログラム
US7646385B2 (en) Computer graphics rendering method and apparatus
JP4664169B2 (ja) 図形描画装置及び図形描画プログラム
CN114222074A (zh) 拼接屏驱动方法、装置、服务器及存储介质
EP2811454B1 (en) Image transformation
EP3633439A1 (en) Display panel, and 3d display device and 3d head up display (hud) device using the display panel
TW200404266A (en) Method of analyzing and modifying a footprint
US20140063068A1 (en) Accommodating display data corresponding to a scanout area of a graphics processor within an incompatible display unit
CN113096209B (zh) 一种车载影像轨迹线的显示方法
US20120154429A1 (en) Apparatus and method for smoothed aliasing on a two-dimensional plane
JP2022510894A (ja) 命令リストの生成
WO2013114559A1 (ja) 地図描画装置、ナビゲーション装置および地図描画方法
JP2016167792A (ja) 多方向画像出力装置および多方向画像出力プログラム
US8363053B2 (en) Method and apparatus for rendering outline of multimedia character image
JP2015197718A (ja) 補間装置及び補間方法
JP6644264B2 (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: 12793713

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013517987

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2012793713

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14119288

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE