TW201112164A - Electronic device and anti-aliasing method thereof - Google Patents

Electronic device and anti-aliasing method thereof Download PDF

Info

Publication number
TW201112164A
TW201112164A TW98131244A TW98131244A TW201112164A TW 201112164 A TW201112164 A TW 201112164A TW 98131244 A TW98131244 A TW 98131244A TW 98131244 A TW98131244 A TW 98131244A TW 201112164 A TW201112164 A TW 201112164A
Authority
TW
Taiwan
Prior art keywords
pixel
order
value
gradation
aliasing
Prior art date
Application number
TW98131244A
Other languages
Chinese (zh)
Other versions
TWI405146B (en
Inventor
Shiau-Jiuan Chen
Original Assignee
Via Tech Inc
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 Via Tech Inc filed Critical Via Tech Inc
Priority to TW98131244A priority Critical patent/TWI405146B/en
Publication of TW201112164A publication Critical patent/TW201112164A/en
Application granted granted Critical
Publication of TWI405146B publication Critical patent/TWI405146B/en

Links

Abstract

An electronic device and an anti-aliasing method thereof are provided. The method includes the following steps. Assign a current pixel in a first memory area storing a plurality of pixels. Execute a determination procedure in a first direction, a second direction, a third direction and a fourth direction centered at the current pixel, respectively, in order to determine whether or not there is aliasing in each direction. Execute a calculation procedure in each direction with aliasing in order to calculate the number of gradient stages of each direction. Determine whether or not each direction needs anti-aliasing according to the number of gradient stages of each direction and a predetermined criterion. Perform the anti-aliasing in each direction which needs anti-aliasing according to its number of gradient stages.

Description

201112164 VlT〇y-〇〇29I〇〇-TW 31914twf.doc/n 六、發明說明: 【發明所屬之技術領域】 本發明是有關於—種電子裝置與1 處理務,且特別是有·一種 (Ρ1χ_色的順序值而進行的反鑛齒處理方法。像像素 【先前技術】 具有導航功能的行動震置已經非常普及,而 的重點是繪製電子地圖供制者觀看。此種軸多 邊形表示公目學校料域,衫邊線段麵觀,二 斜角的邊線會在畫©上呈贿齒狀4縣處理技ς 經過運算,在上述的邊線加上漸層色,使地圖晝面上 邊線段和多邊形看起來比較平滑,使地圖更加美觀。夕 一般行動裝置的處理器(processor)效率不高,圮憶體 容量有限,而且所使㈣作業祕並未直接提供反鑛^的 函式支援。目前存在的反鋸齒演算方法,若非耗時,就是 佔用較多記憶體資源’無關賴有·省時而且省記憶體的 兩項優勢。 牛例而0超取樣反鑛齒演算法(super-sampling ant卜aliasing)是將地圖畫布(canvas)擴展為原始晝布的ηχη 倍大小,所有物件尺寸和線段寬度必須以η倍計算繪製, 繪製完之後再將擴大的晝布經由運算縮小到原始大小。這 種演算法會消耗大量的運算和記憶體資源。 某些現成的函式庫(library),例如開放原始碼(open 201112164 vuuy-uU29I00-TW 319l4twf.d〇c/n source)的反顆粒幾何函式庫(Anti_Gmin Ge〇metry201112164 VlT〇y-〇〇29I〇〇-TW 31914twf.doc/n VI. Description of the Invention: [Technical Field] The present invention relates to an electronic device and a processing device, and particularly has one ( Anti-mineral tooth processing method based on the order value of Ρ1χ_ color. Like pixel [Prior Art] The action of the action with the navigation function has been very popular, and the focus is on drawing the electronic map for the viewer to watch. The school material area, the side line of the shirt, the sideline of the two bevels will be in the form of a bribe-toothed 4 county processing technique. After the calculation, add the gradient color on the above-mentioned side line to make the map line on the edge line. The polygons look smoother and make the map more beautiful. The processor of the general mobile device is not efficient, and the capacity of the memory is limited, and the (4) job secret does not directly provide the function support of the anti-mine. The existing anti-aliasing calculation method, if it is not time-consuming, is to occupy more memory resources. It has two advantages of irrelevant, time-saving and provincial memory. The case of the super-sampling anti-mineral tooth algorithm (super-samp) Ling ant (aliasing) is to expand the canvas to the original 昼 times, all object size and line width must be calculated in n times, after the drawing is completed, the enlarged crepe is reduced to the original size by operation. This algorithm consumes a lot of computational and memory resources. Some off-the-shelf libraries, such as the anti-particles of the open source code (open 201112164 vuuy-uU29I00-TW 319l4twf.d〇c/n source) Geometric library (Anti_Gmin Ge〇metry

Library ’以下簡稱AGG函式庫)可以在緣晝同時進行反 錯齒處理,繪製出來的圖像已經有平滑效果。因為agg 函式庫並歧料行祕置.作業㈣㈣函式庫,雖 然效果非常好,卻相當耗費運算資源。 【發明内容】 炎一 t發種反鑛齒處理方法,此方法提供-種較 ^即省計算資源和記顏資_運#方式,可以使電子裝 置的地圖呈現更加美觀。 本發㈣提供—種電子裝置,執行上料反鑛齒處理 能節省地圖顯示平滑美觀,不僅節省計算資源,也 儲存處理方法’包括下列步驟。在 為中心,分別指定目前像素。以目前像素 四方向執行判斷程序,二判::?方向、以及第 在有鋸齒的每-上斷母述方岐科鑛齒。 盤, 述方向執行計算程序,以計算其漸層階 —上ii方二上述方向的漸層階數以及預設條件’,、決定每 理齒處理。以及,在需要繼處 進行反_處理據漸層·執行漸錢色程序,以 本發明另提出—種電l-r ^ 器°第―記憶_存多】處理 仔夕個像素。處理器耦接第一記憶區, 201112164 VIT09-0029I00-TW 3l9l4twf.doc/n 在第一記憶區内指定目前像素,而且以目前像素為中心, 分別在第-方向、第二方向、第三方向、以及第四方向執 行判斷程序’以決定每—上述方向是否有麵。處理器也 在有鋸齒的每一上述方向執行計算程序,以計算矣漸層階 數。此外,處理器根據每一上述方向的漸層階數以及預設 條件,決定每一上述方向是否需要反鋸齒處理,並且在^The Library ‘hereinafter referred to as the AGG library” can perform anti-alias processing at the same time, and the drawn image has a smoothing effect. Because the agg library and the confusing line secret. The operation (4) (four) library, although the effect is very good, it is quite expensive computing resources. SUMMARY OF THE INVENTION The method for treating anti-mineral teeth of Yanyi T provides a more beautiful appearance of the map of the electronic device than the method of calculating the resource and the memory of the image. The present invention provides an electronic device for performing an anti-mineral tooth treatment, which can save the map display smooth and beautiful, not only saves computing resources, but also stores the processing method' including the following steps. At the center, specify the current pixel separately. In the current pixel four directions to execute the judgment procedure, the second sentence::? The direction, as well as the per-spinning of the parent-staple tooth. In the disc, the calculation process is performed to calculate the gradation order of the above-mentioned direction of the gradation level - the upper ii square 2 and the preset condition ', and the processing of each tooth is determined. And, in the case where it is necessary to carry out the inverse _ processing according to the gradual layer and the implementation of the gradual color program, the present invention further proposes that the type of electric l-r ^ device ° - memory _ memory is processed a pixel. The processor is coupled to the first memory area, 201112164 VIT09-0029I00-TW 3l9l4twf.doc/n to specify the current pixel in the first memory area, and is centered on the current pixel, respectively in the first direction, the second direction, and the third direction And the fourth direction executes the determination program to determine whether each of the above directions has a face. The processor also performs a calculation procedure in each of the above directions that are sawtooth to calculate the gradation order. In addition, the processor determines whether each of the above directions requires anti-aliasing according to the progressive order of each of the above directions and a preset condition, and

要反鋸齒處理的每一上述方向,根據漸層階數執行漸層塗 色程序’以進行反鑛齒處理。 基於上述,本發明使用簡單有效的演算法,並且利用 繪製地圖的顏色優先順序來進行反鋸齒處理,可產生平滑 美觀的電子地圖,而且兼具節省計算資源和節省記情體二 優點。 〜 為讓本發明之上述特徵和優點能更明顯易懂,下文特 舉實施例,並配合所附圖式作詳細說明如下。 【實施方式】 圖1為依照本發明-實施例的一種電子裝置1〇〇的方 塊圖。電子裝置100包括顯示H 11〇、處理器12〇、記憶區 U0以及記憶區140。其中記憶區13〇和14〇可以屬於同一 記憶體,也可以屬於不_記憶體。處理器12G 於顯 不器11G和記憶區13G、140之間,負責繪製電子地圖,並 且對電子地ffi作聽齒處理。記憶區13_存電子地圖, 也就是電子地圖的每-個像素的顏色值。記憶區14〇 則儲存電子地_每-個像相顏色值所對應的順序值 201112164 vnuy-uu29IOO-TW 31914twf.doc/n (細節後述)。顯糸器110負責顯示經過反鋸齒處理的電 子地圖。本發明一實施例的電子裝置1〇〇可為具有電子地 圖功能的汽車導航裝置、行動電話、個人數位助理或其他 可*攜.式行動H~弋,~-- ------ 圖4為本實施例的處理器120繪製電子地圖的流程步 驟。電子地圖的繪製有一個預設的優先順序。首先,繪製 海洋(步驟410) '然後繪製台北縣、台北市之類的城市 區域(步驟420)。然後繪製學校、公園等多邊形區域(步 驟430)。然後繪製道路、鐵路這一類的多邊線段(步驟 =0)。這時候需要反鋸齒處理的多邊形和多邊線段都已經 完成繪製,接下來就是反鋸齒處理(步驟45〇)。然後再 繪製不需要反鋸齒處理的景點小圖示(步驟46〇)以及景 點和迢路名稱(步驟470)。然後處理器12〇可以控制顯 示器110 ’使其顯示完成的地圖。 /圖4的流程中,例如海洋、公園、道路之類的每一寺 ^形必須使用唯-不重複__製,才能在反鑛齿處王 時正確判絲色重疊狀況。從各種地形在圖4流程的” 順序’可以得丨各種地形㈣應純值_製優先順序c j =例是絲製電子地紐用到的所有顏色,依據㈣ 復Γ順序從1開始編號’而得到所有顏色的順序值。南 繪製:應的順序值Ϊ低,順序值1即對應最另 ^% 圖上的顏色。本實施例的電子地圖是在記作 ^ 130進行繪製,記憶區13〇儲存 ^ 顏色值’記麵__存每-上述像料顏 201112164 VI1 U?MK)29I00-TW 31914twf.doc/n 順序值。 圖5為圖4流程中步驟45〇的流程圖,也就是處理器 12〇所執行的反鑛齒處理方法的流程圖。當步驟獨完成 枯,而要反-鑛-齒處理的電子地圖儲存在記億區13〇中,而 記憶區140尚無資料。圖5流程的第一個步驟,就是將記 憶區130的每個像素的顏色值轉換成對應的順序值,儲存 在記憶區140的對應位置(步驟51〇)。在圖5的其他步 籲驟。如果處理器12〇需要某個像素的順序值,就直接自記 $區140 δ|取,這樣可以節省將顏色值轉換成順序值的時 —圖2疋步驟510的一個範例,記舰13〇和14〇其中 的母-方格代表—個像素。假設此範例的電子地圖只有 曰X ^小’而且只有黑白兩色。自色和黑色的順序值分別 Γ同〇厂也就是白底優先㈣’錢才繪製黑色線段。 區二憶區13G儲存白色和黑色_色值,記憶 C 0則儲存轉換後的順序值1和2。 妄价^ &觸反齡處理方法是將記憶11 130的每個像 設順序逐—處理。這_設順序可以是由上到 的每個’也可以是其他順序,只要包含記憶區⑽ 依昭前絲立記舰14G的内容之後,處理器120 素Ο驟52〇Γ順序指定第一個進行反鑛齒處理的目前像 素的上、下然後以目前像素為中心,分別在目前像 二個上述二這四個方向執行判斷程序,以判斷每 疋万向疋否有鋸齒(步驟530)。 201112164 y^29I00-TW 31914twf.d〇e/n 本實施例中,在上、下 斷程序完全對稱,下面以上方為向執行的判 圖3為本實施例的像素相對位二程序的細節。 •目前像也就是本.實施 〜I央的P0表示 置。首先,在目前像素的蝴方法的^位 以及第三像素。其中第日=、第二像素、 (也就是圖3賴鄰像素 的順序值等於目前像素的順序值,而且目前像==素 大於第二像素的順序值,則判斷上方有鑛齒 值 像素如的述的判斷程序,則第- 方執行判斷程序,則第-像素、第二像S 行別為Ρ9、Ρδ *Ρ7。如果在目前像素的左方執 斷程序相同,向是否有鑛齒的條件和上方的判 的每==二向是!有_之後丄下-個步驟是在有鑛齒 ^, Λ =计异程序,以計算各方向的漸層階數(步 行的古十管程施例中’在上、下、左、右這四個方向執 計算程;4=完全對稱。以右方為例,在右方執行的 首先’比較第一像素㈣、第三像素㈣和目前像素⑽) 201112164 vnuy-u029I00-TW 31914twf.doc/n ”。若僅有第-像素__序值肖_ 的順序值相同,則自第-像素(P3)開始,沿右 顏色值的連續像素長度,做為右方的漸層階數。ϋ圖 匕如果观务目香像素.,..自姻一像素撕開始沿 右方计异,只有一個顏色相同的像素,也就是704本身。 所以在圖7的範例中,右方的漸層階數為卜To each of the above directions of the anti-aliasing process, a gradient coating process is performed according to the gradation order to perform the anti-mineral tooth treatment. Based on the above, the present invention uses a simple and efficient algorithm, and uses the color priority of the map to perform anti-aliasing processing, which can produce a smooth and beautiful electronic map, and has the advantages of saving computational resources and saving the memory. The above described features and advantages of the present invention will be more apparent from the following detailed description of the embodiments of the invention. [Embodiment] FIG. 1 is a block diagram of an electronic device 1A according to an embodiment of the present invention. The electronic device 100 includes a display H11, a processor 12A, a memory area U0, and a memory area 140. The memory areas 13〇 and 14〇 may belong to the same memory or may not belong to the memory. The processor 12G is responsible for drawing an electronic map between the display 11G and the memory areas 13G, 140, and performing an audio processing on the electronic ffi. The memory area 13_ stores an electronic map, that is, the color value of each pixel of the electronic map. The memory area 14 〇 stores the electronic sequence _ the order value corresponding to the color value of each image phase. 201112164 vnuy-uu29IOO-TW 31914twf.doc/n (details will be described later). The display 110 is responsible for displaying the electronic map processed by anti-aliasing. The electronic device 1 according to an embodiment of the present invention may be a car navigation device with an electronic map function, a mobile phone, a personal digital assistant, or other portable action H~弋,~-------- 4 is a process step of the electronic map of the processor 120 of the embodiment. The mapping of electronic maps has a preset priority order. First, the ocean is drawn (step 410) 'and then an urban area such as Taipei County, Taipei City is drawn (step 420). Then, a polygon area such as a school or a park is drawn (step 430). Then draw a polygonal line such as roads and railways (step =0). At this time, the polygons and polygon segments that need to be anti-aliased have been drawn, and then the anti-aliasing process (step 45〇). Then, draw a small map of the attraction (step 46〇) and the name of the scene and the route (step 470) that do not require anti-aliasing. The processor 12A can then control the display 110' to display the completed map. / In the flow of Figure 4, each temple such as the ocean, the park, and the road must use the unique-non-repetitive __ system to correctly judge the silk color overlap at the anti-mineral tooth. From the various sequences in the "sequence" of the flow of Figure 4, you can get a variety of terrain (four) should be pure value _ system priority cj = the example is all the colors used in the silk electronic map, according to (4) the order of reclamation is numbered from 1 ' The order value of all the colors is obtained. The south drawing: the order value should be lower, and the order value 1 corresponds to the color on the most other image. The electronic map of this embodiment is drawn as ^ 130, the memory area 13〇 Save ^ color value 'record __ save every - above image material 201112164 VI1 U? MK) 29I00-TW 31914twf.doc / n order value. Figure 5 is the flow chart of step 45 图 in the flow of Figure 4, that is, processing The flow chart of the anti-mineral tooth processing method performed by the device 12〇. When the step is completed, the electronic map to be treated by the anti-mineral-tooth processing is stored in the 13th area of the Jiyue District, and the memory area 140 has no data. The first step of the flow of 5 is to convert the color value of each pixel of the memory area 130 into a corresponding sequential value and store it in the corresponding position of the memory area 140 (step 51A). The other steps in Fig. 5 are called. If the processor 12 does not need the order value of a certain pixel, it directly records the $ area 140. δ| fetch, which saves the time when the color value is converted into a sequential value - Figure 2 一个 An example of step 510, where the mother-squares of the ship 13 〇 and 14 代表 represent - pixels. Suppose the electronic map of this example Only ^X^小' and only black and white. The order values of the color and black are the same as the white one. (4) 'The money is drawn in black. The area IIG 13G stores white and black _ color values, The memory C 0 stores the converted sequence values 1 and 2. The price ^ & touch-resistance processing method is to process each image of the memory 11 130 one by one. This _ set order can be up to each The 'can also be in other order, as long as the memory area (10) contains the content of the 14G of the front of the ship, the processor 120 sequentially specifies the first pixel of the current anti-mineral processing. Then, with the current pixel as the center, the judgment program is executed in the current four directions of the two above two to determine whether each of the universal directions is jagged (step 530). 201112164 y^29I00-TW 31914twf.d〇e /n In this embodiment, the program is completely up and down. It is said that the figure 3 executed in the upper direction is the detail of the pixel relative bit two program of the present embodiment. • The current image is also the P0 representation of the implementation of the I. First, the current pixel method of the pixel ^ bit and the third pixel. wherein the first day =, the second pixel, (that is, the order value of the adjacent pixel of FIG. 3 is equal to the order value of the current pixel, and the current order == prime is greater than the order value of the second pixel, then judge If there is a determination program in which the orthodontic value pixel is as described above, the first pixel and the second image S are Ρ9 and Ρδ*Ρ7. If the procedure is the same on the left side of the current pixel, the condition of whether there is a mineral tooth and the above judgment are == two directions! There are _ after the squat - one step is in the presence of the ore tooth ^, Λ = different program to calculate the gradation order in all directions (walking in the ancient ten tube process in the case of 'up, down, left, right this The calculation process is performed in four directions; 4 = complete symmetry. Taking the right side as an example, the first execution on the right side 'compares the first pixel (four), the third pixel (four), and the current pixel (10)) 201112164 vnuy-u029I00-TW 31914twf.doc/ n ”. If only the order value of the first-pixel __order value _ is the same, the continuous pixel length along the right color value starts from the first pixel (P3), and is the gradient order on the right side. If you look at the pixel, the pixel is torn to the right and there is only one pixel of the same color, which is 704 itself. So in the example of Figure 7, the right step is Number is

面’右僅有第三像素(P9)的順序值與目前像素 (二〇)的順序值減’則自第三像素㈣開始,沿右方計算呈 =目同顏色值的連續像素長度,做為右方的漸層階數。以 為例’如果802是目前像素,自其第三像素804開 ^右方計算,共有三個顏色相同的像素。所以在此範例 丄右方的漸層階數為3。如果8〇6是目前像素,則自盆 ^像素_開始沿右方計算,共有四個顏色相同的像 素。所以在此範例中,右方的漸層階數為4。 比命另丄方面’ t第—像素(Ρ3)和第三像素(Ρ9)的順序值 二一目剛像素(P0)的順序值相同,則以上述方式分別計算 =像素(Ρ3)和第三像素(Ρ9)的具有相關色值的連續像 素長度三並取其中較短者做為右方的漸層階數。 丄^只知例中,在其餘二個方向執行的計算程序和右方 十异㈣完全對稱,其細節可從右料算程序類推而 侍,因此不予贅述。 計算各方向的漸層階數之後,下一個步驟是根據各方 ^漸層階數以及預設條件,蚊各方向是否需要反鑛齒 &理(步驟55G)° ® 6是上述預設條件的詳細流程。首 31914twf.doc/n 20111216429I00.tw 先,檢查預設條件所判斷的方向(步驟610)。如果是上 方或下方,就檢查此方向的漸層階數是否小於預設常數(步 驟620 )。本實施例的預5又吊數為2。如果此方向的漸層階 -·數小於货設常數,·則決-定此方-向-不需要反鋸齒處理(步驟 630) ’否則決定此方向需要反据齒處理(步驟640)。 接下來,回到步驟610,如果預設條件所判斷的是右 方或左方’就檢查此方向的漸層階數是否小於預設常數(步 驟650)。如果此方向的漸層階數小於預設常數,就檢查 上方或下方是否具有大於或等於預設常數的漸層階數(步 驟660)。如果是,則決定此方向不需要反銀齒處理(步 驟670),否則決定此方向需要反鋸齒處理(步驟68〇)。 此外,在步驟㈣的檢查巾,如果此方向的漸層階數大於 或等於預財數,就決定此方向需要反職處理(步驟 在圖6的流程令,可將上下方向和左右方向互換,互 換後的流程也可㈣行正顧反_處理。 在需處理之後’下-個_ 層塗色程序,^ 根據其漸層階數執行潮 層塗色程序仃反織處理(步驟56G)。所謂的漸 的相鄰像素;入每的方向上’在目前像素 色值之間的漸層色值個::,的顏色值和目前像素的顏 量等於執行漸層塗人漸層色值的相鄰像素數 顏色值在上述漸的Γ的漸層階數。目前像素的 斫曰色值的比重與對應的相鄰像素和目前像 201112164 v 11 v;7-i/029I00-TW 31914twf.d〇c/n 素的距離呈反比。.. j兀成目七像素的反鑛齒處理之後處理器檢查是 否記憶區130的所有像素都已經處理完畢(步驟570)。 1果是’顧至韻·束。‘如果還有像秦未處理·,處,理器120 ::照t的預設順序指定下一個目前像素(步驟580), 530,對下一個目前像素進行反鑛齒處理。 如士二命為例’根據圖6的流程可知,像素702的左方 理,像素704的左方需㈣齒處 以上方向的漸層階 層色值的公式如下。為例’漸層階數為1時’漸 GC(R1) = C(P〇) /2 + C(R1) / 2 色值為填入像素7G2的右方相鄰像素的漸層 ::〇2的顏色值鄉示目前像素7。2 = =彥=。圖7左邊是反鑛齒處理之前的電子地圖, ϊ = 理之後的電子地圖。由於此範例的電 兩色,填人的漸層❹介於黑色與白色之 以圖8Α為例,像辛8〇2的& 漸層階數為3。因此,像㈣ 要填入漸層色,漸層色值的料^料二俯目鄰像素需 GC(Rl) = C(P0)*3/4 + C(Rl)M/4 GC(R2) = C(P0) * 2/4 + C(R2” 2/4 11 201112164The surface has only the third pixel (P9) sequence value and the current pixel (two 〇) sequence value minus ' then from the third pixel (four), along the right side calculated = the same color value of the continuous pixel length, do The gradient order to the right. For example, if 802 is the current pixel, it is calculated from the third pixel 804 to the right, and there are three pixels of the same color. So in this example, the gradient order on the right is 3. If 8 〇 6 is the current pixel, then from the basin ^ pixel _ starting along the right side, there are four pixels of the same color. So in this example, the gradient order on the right is 4. In the case where the order value of the second pixel (Ρ3) and the third pixel (Ρ9) is the same as the order value of the pixel (P0), the pixel (Ρ3) and the third are respectively calculated in the above manner. The contiguous pixel length of the pixel (Ρ9) having the associated color value is taken as the gradation order in which the shorter one is the right side. In the case of 丄^, the calculation program executed in the other two directions is completely symmetrical with the right side (4), and the details can be analogized from the right calculation program, so it will not be described. After calculating the gradation order in each direction, the next step is based on the gradual order of the parties and the preset conditions. Whether the mosquitoes need anti-mineral teeth in all directions (step 55G) ° 6 is the above preset condition Detailed process. First 31914twf.doc/n 20111216429I00.tw First, the direction determined by the preset condition is checked (step 610). If it is above or below, check if the gradient order in this direction is less than the preset constant (step 620). The pre-5 hoist number of this embodiment is 2. If the gradation--number in this direction is less than the set-up constant, then the ----no anti-aliasing process is required (step 630)' otherwise it is determined that this direction requires the inverse tooth processing (step 640). Next, returning to step 610, if the preset condition determines whether it is right or left, it is checked whether the gradation order of the direction is less than a preset constant (step 650). If the gradation order in this direction is less than the preset constant, it is checked whether there is a gradation order greater than or equal to the preset constant above or below (step 660). If so, it is determined that this direction does not require anti-silver tooth processing (step 670), otherwise it is determined that this direction requires anti-aliasing (step 68). In addition, in the inspection towel of step (4), if the gradation order of the direction is greater than or equal to the pre-finance number, it is determined that the direction needs to be counter-processed (the steps in the flow of FIG. 6 can be interchanged between the up-down direction and the left-right direction, The process after the interchange can also be processed in the fourth step. After the processing, the 'lower-one layer coloring program is executed, and the tidal coloring process is performed according to the gradient order (step 56G). The so-called progressive adjacent pixels; the direction of the progressive color values between the current pixel color values in each direction: the color value of the current pixel and the current pixel are equal to the gradient color value The color value of the adjacent pixel number is in the above-mentioned progressive gradation step. The current pixel's color value is proportional to the corresponding adjacent pixel and the current image is 201112164 v 11 v; 7-i/029I00-TW 31914twf.d The distance of 〇c/n is inversely proportional.. j兀 After the anti-mineral tooth processing of seven pixels, the processor checks whether all the pixels of the memory area 130 have been processed (step 570). ·Bundle. 'If there is still something like Qin Wei, ·,,,,,,,,,,,,, The next current pixel is designated (steps 580), 530, and the next current pixel is subjected to anti-mineral processing. For example, according to the flow of FIG. 6, the left side of the pixel 702 and the left side of the pixel 704 are known. The formula for the gradation level color value in the direction above (4) the tooth is as follows. For example, when the gradation order is 1, the gradual GC(R1) = C(P〇) /2 + C(R1) / 2 chromatic value is Fill in the gradient of the adjacent pixel on the right side of the pixel 7G2: the color value of 〇2 shows the current pixel 7. 2 = = Yan =. The left side of Figure 7 is the electronic map before the anti-mineral tooth processing, and the electronic map after the ϊ = Because of the electric two colors of this example, the filling gradient is between black and white, as shown in Fig. 8Α, and the gradation order of 辛8〇2 is 3. Therefore, like (4) to fill in The color of the layer, the color of the gradation color is required to be GC(Rl) = C(P0)*3/4 + C(Rl)M/4 GC(R2) = C(P0) * 2/ 4 + C(R2) 2/4 11 201112164

.J29I00-TW 31914twf.doc/n GC(R3) = C(P0) * 1/4 + C(R3) * 3/4 其中GC(R1)、GCO^'GC^)分別表示填入像素8〇2 的右方第一個、第二個、以及第三個相鄰像素的漸層色值, C(P一0)表,示像素802呦箭色值…观1.).、C(R2卜峨 表不像素802的右方第-個、第二個、以及第三個相鄰像 素原來的顏色值。 一般而言’如果目前像素的某個方向需要反鋸齒處理 而且其漸層階數為n,則目前像素在此方向的η個相鄰像 素需要填入漸層色,漸層色值的公式如下。 # GC(Ni) = C(P0) * (n+l-i)/(n+l) + C(Ni) * i/(n+l) 其中i為從1至η的正整數,GC(Ni)表示填入目前像 素在此方向的第1個相鄰像素的漸層色值,C(P0)表示目前 像素的顏色值,C(Ni)則表示目前像素在此方向的第i個相 鄰像素原來的顏色值。 圖8A是反鋸齒處理之前的電子地圖’圖是圖 的縮小圖,其中有很明顯的鋸齒。圖9Λ是經過反鋸齒處 ,的電子地圖,圖9B是圖9A的縮小圖。原先的多邊線段 籲 疋黑色’背景是白色’依照上述公式,在相鄰像素填入漸 層灰色之後,如圖9B所示,可以去除鋸齒,使電子地圖 較為平滑美觀。圖和圖11是另-組範例,其中圖10 和圖11分別是反鋸齒處理之前和之後的電子地圖。 曰~以上的反鋸齒處理方法都是以單色地圖為範例,如果 疋^色地圖’可以將其色彩空間(color space)的每個分量分 開處S °例如使用RGB (即紅、,綠、藍三原色)色彩空間 12 201112164 vuuy-uu29I00-TW 31914twf.doc/n 、個分量分開,各自進行 的電子地圖,可將其紅、綠 反鑛齒處理之後再合併。 „鑛齒處理方法只需要在儲存電子地圖的 -雜區BG.攝增.加儲存祕㈣娜 的某些實施例中,每個像素的顏色值長度為%位元,^子 地圖使用的顏色不超過扮種,每個像素的顺序值只需要 8位το。所以在這些實施例中,本發明增加的記憶區⑽, ,、§己憶空間只需要原有的記憶區13〇的四分之一。 本發明的反織處理方法不影響原本㈣子地圖繪 製時間’而是在地_製完成之後再處理反_。此外, ^發明的反齡處理方奸針對需要處理⑽素做漸層運 算’可減少非必要的額外計算時間。 以下例舉-些實驗數據,說明本發明一實施例的反鑛 齒處,方法的效能。本貫施例的電子裝置使用195 MHz的 處=器,電子地圖的解析度為32〇χ24〇。下面的表】比較 本實施例中各種反鑛齒處理方法的記憶體消耗.J29I00-TW 31914twf.doc/n GC(R3) = C(P0) * 1/4 + C(R3) * 3/4 where GC(R1), GCO^'GC^) indicate that the pixel is filled in 8〇 The gradation color value of the first, second, and third adjacent pixels on the right side of the 2, C (P 0) table, showing the pixel 802 呦 arrow color value... View 1.)., C (R2 The dice table does not represent the original color values of the first, second, and third adjacent pixels on the right side of the pixel 802. Generally speaking, if the current direction of the pixel requires anti-aliasing and its gradation order For n, the n neighboring pixels of the current pixel in this direction need to be filled with a gradation color, and the formula of the gradation color value is as follows: # GC(Ni) = C(P0) * (n+li)/(n+ l) + C(Ni) * i/(n+l) where i is a positive integer from 1 to η, and GC(Ni) represents the gradation color value of the first adjacent pixel filled in the current pixel in this direction C(P0) represents the color value of the current pixel, and C(Ni) represents the original color value of the i-th adjacent pixel of the current pixel in this direction. FIG. 8A is an electronic map before the anti-aliasing process. Zoom out the picture, which has obvious sawtooth. Figure 9 is an electronic map after anti-aliasing, Figure 9B Figure 9A is a reduced view. The original polygonal line is called black. The background is white. According to the above formula, after the adjacent pixels are filled with the gradient gray, as shown in FIG. 9B, the sawtooth can be removed to make the electronic map smoother and more beautiful. Figure 11 and Figure 11 are another example of the group, wherein Figure 10 and Figure 11 are the electronic maps before and after the anti-aliasing process. 曰 The above anti-aliasing methods are all based on monochrome maps. 'You can separate each component of its color space by S °, for example, using RGB (ie, red, green, and blue primary colors) color space 12 201112164 vuuy-uu29I00-TW 31914twf.doc/n, separate components, The electronic maps that are carried out can be combined with the red and green anti-mineral teeth. „The mineral tooth treatment method only needs to store the electronic map - the miscellaneous area BG. The increase. Some examples of the storage secret (4) Na In the case where the color value of each pixel is % bit length, the color used by the map does not exceed the size of the seed, and the order value of each pixel only needs 8 bits τ. Therefore, in these embodiments, the memory area of the present invention is increased. , , § 忆 忆 space only needs one quarter of the original memory area 13 。. The anti-weaving processing method of the present invention does not affect the original (four) sub-map drawing time 'but after the ground _ system is completed and then processed inverse _ In addition, the invention of the anti-age treatment of the traitor for the need to process (10) to do the gradation operation 'can reduce the unnecessary extra calculation time. The following exemplification - some experimental data, illustrating the anti-mineral tooth of an embodiment of the present invention, The effectiveness of the method. The electronic device of the present embodiment uses a 195 MHz device, and the resolution of the electronic map is 32 〇χ 24 〇. The following table] compares the memory consumption of various anti-mineral tooth treatment methods in this embodiment.

201112164 v ii u7-\7u29I00-TW 31914twf.doc/n 由表l可知,本發明的反鋸齒處理方法,其記憶體消 耗只比不做反鋸齒處理的狀況多出3.3%,只比AGG函式 庫多出2.2%。 下面·的表2比較表1當中各種反鋸齒處理方法繪製十…· 二張不同電子地圖所需的時間。 表2,反鋸齒處理方法的電子地圖繪製時間比較 處理方法和繪製時間(微秒) 無反鋸齒 處理 本發明 方法 AGG 函式庫 2x2 超取樣 4x4 超取樣 地圖'— 27 172 96 520 1667 地圖二 21 142 80 530 1898 地圖二 33 181 217 604 1858 地圖四 54 224 346 655 2054 地圖五 61 226 359 643 1996 地圖六 152 388 1039 828 2245 地圖七 447 739 2536 1840 2922 地圖八 522 729 5496 1660 3261 地圖九 253 459 1225 880 2422 地圖十 230 433 1166 1570 3075 地圖十一 203 353 1687 2176 3182 地圖十二 134 236 162 882 1902 平均時間 178 357 1201 1066 2374 14 201112164201112164 v ii u7-\7u29I00-TW 31914twf.doc/n It can be seen from Table 1 that the anti-aliasing processing method of the present invention consumes only 3.3% more memory than the anti-aliasing process, only the AGG function. The library is 2.2% more. Table 2 below compares the various anti-aliasing methods in Table 1 to plot the time required for two different electronic maps. Table 2, Electronic map drawing time comparison processing method and drawing time (microseconds) of anti-aliasing processing method No anti-aliasing processing AGG library 2x2 oversampling 4x4 oversampling map '- 27 172 96 520 1667 Map 2 142 80 530 1898 Map II 33 181 217 604 1858 Map IV 54 224 346 655 2054 Map V 61 226 359 643 1996 Map VI 152 388 1039 828 2245 Map Seven 447 739 2536 1840 2922 Map Eight 522 729 5496 1660 3261 Map Nine 253 459 1225 880 2422 Map ten 230 433 1166 1570 3075 Map eleven 203 353 1687 2176 3182 Map twelve 134 236 162 882 1902 Average time 178 357 1201 1066 2374 14 201112164

Viiuy-uu29I00-TW 31914twf.doc/n 〇,不糸月的反鋸齒處理方法的地圖繪製時 間退少於其餘三種反織處理方法。因此本發明的電子梦 置與其執仃的反鑛齒處理方法,不僅可提供平滑美觀的^ ,子地圖節省·脊源和#省鱗伽優點。 雖然本發明已以實施例揭露如上,然其並非用以限定 所屬技術領域中具有通常知識者,在不脫離 本發月之精神和範圍内,當可作些許之更動與潤倚,故本 發明之保護範圍當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 圖1是依照本發明一實施例的一種電子裝置的方塊 圖。 t 圖2繪示圖1的記憶區130和140的儲存内容。 程圖 圖3是依照本發明一實施例的像素相對位置示意圖。 圖4是依照本發明一實施例的一種地圖繪製方法的流Viiuy-uu29I00-TW 31914twf.doc/n 〇, the mapping time of the anti-aliasing method of the month is less than the other three anti-weaving methods. Therefore, the electronic dream device of the present invention and its stubborn anti-mineral tooth processing method can not only provide smooth and beautiful ^, sub-map saving, ridge source and # provincial scaly advantages. The present invention has been disclosed in the above embodiments, but it is not intended to limit the scope of the present invention, and the present invention may be modified and manipulated without departing from the spirit and scope of the present invention. The scope of protection is subject to the definition of the scope of the patent application. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of an electronic device in accordance with an embodiment of the present invention. FIG. 2 illustrates the storage contents of the memory areas 130 and 140 of FIG. 1. Figure 3 is a schematic diagram of relative positions of pixels in accordance with an embodiment of the present invention. 4 is a flow of a map drawing method according to an embodiment of the invention.

圖5是圖4其中步驟450的流程p。 圖6是圖5其中步驟550的流程圖。 — 圖7、圖8A、圖8B、圖9A和圖9B是依照本發明一 實施例的反鋸齒處理的示意圖。 圖1〇和圖11是依照本發明一實施例的反鋸齒處理 效果示意圖。 15 201112164 vii w-uu29I00-TW 31914twf.doc/n 【主要元件符號說明】 1、2 :像素順序值 100 :電子裝置 --* '辱貝.-r·- .-λ - 120 :處理器 130、140 :記憶區 410-470、510-580、610-680 :流程步驟 702-706、802-808 :像素 P0-P9 :像素相對位置Figure 5 is a flow chart p of step 450 of Figure 4. 6 is a flow chart of step 550 of FIG. - Figures 7, 8A, 8B, 9A and 9B are schematic views of anti-aliasing processing in accordance with an embodiment of the present invention. 1A and 11 are schematic views showing the effect of anti-aliasing processing according to an embodiment of the present invention. 15 201112164 vii w-uu29I00-TW 31914twf.doc/n [Description of main component symbols] 1, 2: Pixel order value 100: Electronic device--* 'Miscellaneous.-r·- .-λ - 120 : Processor 130 , 140: memory areas 410-470, 510-580, 610-680: process steps 702-706, 802-808: pixels P0-P9: pixel relative position

1616

Claims (1)

201112164 Vll〇y-〇029I00-TW 31914twf.doc/n 七、申請專利ft圍: 1. 一種反鋸齒處理方法,包括: |·* χ· - -· ❿ 在儲存多個像素的一第一記憶區内指定此 以紐俞縣薦ΐ心;; 向、-第三方向、以及一第四方向執行一判斷程:第二方 斷每一上述方向是否有鋸齒; 序,以判 在有鑛齒的每-上述方向執行一計算程序〜 一上述方向的漸層階數; 乂叶异母 ^根據每一上述方向的該漸層階數以及一預 定每一上述方向是否需要反鋸齒處理;以及 \ ,、 在需要反鑛齒處理的每一上述方向,根據 執仃-漸層塗色財,以進行反織處理。 」白數 2·如申請專利範圍第1項所述之反鋸齒處 :該第-方向和該第二方向分別為上下方向方二二 和該第四方向分別為左右方向。 一方向 3.如申請專利範圍第1項所述之反鋸齒處理 該第一方向和該第二方向分別為左右方向,、二 和該第四方向分別為上下方向。 W三方向 令該=斷如程?包專括利範圍第1項所述之反猫齒處理方法,其 在執行該判斷程序的該方向指定一第一像素、一 =素、以及·第三像素,其中該第二像素為該 ^ ===像素’該第—像素和該第三像素相 】像素在與該方向呈四十五度角的兩個方向上的兩個相鄰 17 201112164 vnuy-w29I00-TW 31914twf.doc/n 像素;以及 若該第-像素且/或該第三像素_序值等於該 “的順序值,而且該目前像素的川員序值大於該第二 的廣序值,則判斯該方向有鋸齒-。·, ..,一.—_'、 5‘如申請專利範圍第4項所述之反鑛齒處理方法,在 才曰疋該目前像素的步驟之前更包括: 在 值儲ίΓΓ己Λ區的每—像素的顏色值所對應的順序 憶區的對應位置,其中該順序值表示對 值在該第—記憶區的緣製優先順序,越 優先的顏色值所對應的順序值就越低;以及 越 序值自該第二記憶區讀取該第—記憶區的每—像素的嘴 6.如申請專利範圍第4項所述之 中該計算料包括^ 心朗方去,其 序值;較1第像素、該第三像素、以及該目前像素的嘴 相同素的順序额m目前像素的順序值 計算具有相相該方向, 層階數; 、”、又做為該方向的該漸 相同目前像素的順序值 值的連續像;長;方向計算具有相同顏色 若該第一傻i的該漸層階數;以及 Ά亥第二像素的順序值皆與該目前像 201112164 vnuy-u029I00-TW 31914twf.doc/n 素的順序值相同,則以上述方式分別計算該第一像素和該 第三像素的具有相同顏色值的連續像素長度,並取其中較 短者做為該方向的該漸層階數。 -…7:-如牛讀專利範菌第+. 士壻所.述之,反.鋸齒處理方法,其 中該預設條件包括: 若該第一方向的該漸層階數小於一預設常數,則決定 該第一方向不需要反鋸齒處理,否則決定該第一方向需要 反銀齒處理; 若該第二方向的該漸層階數小於該預設常數,則決定 該第二方向不需要反鋸齒處理’否則決定該第二方向需要 反鑛齒處理; 若該第三方向的該漸層階數小於該預設常數而且該 弟方向或該第二方向具有大於或等於該預設常數的漸層 P白數,則決定該第三方向不需要反雜齒處理,否則決定該 第三方向需要反鋸齒處理;以及201112164 Vll〇y-〇029I00-TW 31914twf.doc/n VII. Applying for patent ft.: 1. An anti-aliasing method, including: |·* χ· - -· 一 A first memory for storing multiple pixels The designated area in the district is recommended by Xinyu County;; a judgment process is performed in the direction of -, the third direction, and a fourth direction: whether the second side breaks each of the above directions or not; Performing a calculation procedure for each of the above directions - a gradation order of the above direction; 乂 leaf 母^ according to the gradation order of each of the above directions and whether an anti-aliasing process is required for each of the above directions; and In each of the above directions in which anti-mineral tooth treatment is required, the reverse weaving process is performed according to the execution-gradual coloring. The number of whites is as follows: The anti-aliasing of the first aspect of the patent application range: the first direction and the second direction are respectively the upper and lower directions, and the fourth direction is the left and right direction, respectively. One direction 3. The anti-aliasing process as described in claim 1 is that the first direction and the second direction are respectively left and right directions, and the second and fourth directions are respectively up and down directions. W three directions to make the = break as the process? Package exclusive range of the anti-tooth processing method described in item 1, which specifies a first pixel, a yin, and a third in the direction in which the determination program is executed a pixel, wherein the second pixel is the ^=== pixel 'the first pixel and the third pixel phase> pixels in two directions in a direction of forty-five degrees with the direction of two adjacent 17 201112164 vnuy -w29I00-TW 31914twf.doc/n pixels; and if the first pixel and/or the third pixel_order value is equal to the "order value", and the current pixel's Chuanren order value is greater than the second wide order Value, then the direction of the sawtooth is -.., .., one.—_', 5', as described in claim 4 of the anti-mineral tooth treatment method, before the step of the current pixel The method further includes: a corresponding position of the sequential memory area corresponding to the color value of each pixel of the value storage area, wherein the order value indicates the priority order of the value in the first memory area, and the priority color The lower the order value corresponding to the value; and the out-of-order value is read from the second memory area The mouth of each pixel of the first-memory area 6. The calculation material includes the center of the method as described in item 4 of the patent application scope, and the order value thereof; the first pixel, the third pixel, and the current The order of the pixel's mouth is the same as the order of the current pixel. The order value of the current pixel is calculated to have the phase, the order of the phase, and the continuous image of the successive value of the current pixel of the direction; Calculating the gradation order having the same color if the first silo i; and the order value of the second pixel of the Άhai is the same as the order value of the current 201112164 vnuy-u029I00-TW 31914twf.doc/n element, In the above manner, the lengths of consecutive pixels having the same color value of the first pixel and the third pixel are respectively calculated, and the shorter one is taken as the gradation order of the direction. -...7:-, as in the case of the veterinary patent, the genus, the anti-aliasing method, wherein the preset condition includes: if the gradation order of the first direction is less than a predetermined constant , determining that the first direction does not require anti-aliasing, otherwise determining that the first direction requires anti-silver tooth processing; if the gradation order of the second direction is less than the preset constant, determining that the second direction does not need Anti-aliasing process 'otherwise determining that the second direction requires anti-mineral tooth processing; if the gradation order of the third direction is less than the preset constant and the second direction or the second direction has greater than or equal to the preset constant The progressive P white number determines that the third direction does not require anti-aliasing, otherwise it is determined that the third direction requires anti-aliasing; ^ 若該第四方向的該漸層階數小於該預設常數而且該 ^一方向或該第二方向具有大於或等於該預設常數的漸層 階數,則決定該第四方向不需要反鋸齒處理,否則決定該 第四方向需要反鋸齒處理。 、^ 8.如申請專利範圍第1項所述之反鋸齒處理方法,苴 中该漸層塗色程序包括: '、 在執行該漸層塗色程序的該方向上,在該目前像素的 素填人每-上述相鄰像素的顏色值和該目前像素的 顏色值之間的漸層色值,其中填人漸層色值的上述相鄰像 19 201112164 vnuy-uu29I00-TW 3l914twf.doc/n ^的數量等树方向的麵層職,該目前像素的 ^上述漸層色值的比重與對應的該相鄰像素和, 的距離呈反比。 Π冢素 —9.;種電子裳置,包括:.· . _ 一第一記憶區,儲存多個像素;以及 ^理器’她該第—記憶區,在該第—記憶區 1二=素’崎目前像素為_心,分別在—第一方向 序;決二二三方向、以及一第四方向執行-_程 i方向執行-計算程序,以計算每—上述方向 t 定每方向的該漸層階數以及—預設條件:二 處理的每:需要反鑛歯處理’並且在需要反鑛齒 序,以進行反理根據該漸層階數執行-漸層塗色程 第:二====:=電:;置,其中該 第-方向分別為左右=下方向’該第三方向和該 u·如申請專利範圍第9項所述 第1向和該第二方向分別裝置’其中該 第四方向分別為上下^右方向’該第三方向和該 列斷12序=請專利範圍第9項所述之電子裝置,其申該 在執行該判斷程序的該方向指定—第— 素、以及一第三像争,豆中 素 第一 京/、中料—像素為該目前像素在 20 201112164 ......329I00-TW 31914twf.doc/n 該方向的相鄰像素,該第一像素和該第三像素分別為診 前像素在與該方向呈四十五度角的兩個方向上的兩二目 像素;以及 省該第1像毒且/或該第三像素的順序值等於該目4 像素的順雜,而且該目雜素的猶鼓_第二傻: 的順序值,則判斷該方向有鋸齒。 豕I 13.如申請專利範圍第12項所述之電子装置, 一第二記憶區,該處理器將該第—記舰的每― ^ 序值儲存在該第二記魅輯應位置,= 且自该弟二記憶區讀取該第一記憶區 龙 :區示對應的該像素的顏色值在該第= ^低。、日;、’越優絲顏色值所對應的順序值就 計算^^請專利軸第12·述之電子裝置,其中該 序值咕对—像素、該第三像素、以及該目前像素的順 相同,則自該第一像與該目前像素的順序值 計算具有相_色=’=計*r的該方向, 層階數; 像素長度’做為財向的該漸 相同,則自該第三序值與該目前像素的順序值 值的連續像素長度,做該方向計算具有相同顏色 為該方向的該漸層階數;以及 21 201112164 …w-J29I00-TW 31914twf.doc/n 第—像素和該第三像素_序值皆與該目前傻 ^ = _上述方式分顺算該第—像素^ 一-象素的具有相同顏色值的連續像素長度,並取其 短者做為該方向的該漸層階數。 、、父 • - . ·ν . __ 15·如申請專利範圍第9項所述之電子 1 預設條件包括: ”干該 :々右該第一方向的該漸層階數小於一預設常數,則決定 該第方向不需要反職處理,否則決定 反鋸齒處理; 两要 ==該第二方向的該漸層階數小於該預設常數,則决定 該第二方向不需要反鋸齒處理,否則決定該第二方向、 反鑛齒處理; 受 右該第三方向的該漸層階數小於該預設常數而足該 方向或該第二方向具有大於或等於該預設常數的 二二,則決定該第三方向不需要反鋸齒處理,否則決定該 一方向需要反鑛齒處理;以及 第 右該第四方向的該漸層階數小於該預設常數而足該 _方向或該第二方向具有大於或等於該預設常數的%層 二,則決定該第四方向不需要反鋸齒處理,否則決定二 弟四方向需要反鋸齒處理。 w 16.如申請專利範圍第9項所述之電子裝置,其中 漸層塗色程序包括: °" *在執行該漸層塗色程序的該方向上,在該目前像紊的 目邱像素填人每—上述浦像素的腕值和該目前像条的 22 201112164 v 11 v;^-u029I00-TW 31914twf.doc/n 顏色值之間的漸層色值,其中填入漸層色值的上述相鄰像 素的數量等於該方向的該漸層階數,該目前像素的顏色值 在上述漸層色值的比重與對應的該相鄰像素和該目前像素 的距離·呈-反士bn ·一一 …·〜 17.如申凊專利範圍第9項所述之電子裝置,其中令 電子裝置為具電子地圖功能的汽車導航裝置、行勤=二 個人數位助理。^ If the gradation order of the fourth direction is less than the preset constant and the directional direction or the second direction has a gradation order greater than or equal to the preset constant, determining that the fourth direction does not need to be reversed Sawtooth processing, otherwise it is decided that the fourth direction requires anti-aliasing. 8. The anti-aliasing processing method of claim 1, wherein the gradient coloring process comprises: ', in the direction in which the progressive coloring process is performed, the pixel in the current pixel Filling in a gradation color value between each of the color values of the adjacent pixels and the color value of the current pixel, wherein the adjacent image of the gradation color value is filled in. 19 201112164 vnuy-uu29I00-TW 3l914twf.doc/n The number of ^ is equal to the face orientation of the tree direction, and the proportion of the above-mentioned gradient color value of the current pixel is inversely proportional to the distance of the corresponding adjacent pixel and . Π冢素—9.; kinds of electronic skirts, including: .· . _ a first memory area, storing a plurality of pixels; and a processor 'here the first memory area, in the first memory area 1 two = The current pixel is _ heart, respectively, in the first direction sequence; the second two three direction, and a fourth direction execution - _i direction execution - calculation program to calculate each direction - each direction The gradation order and the pre-set condition: each of the two treatments: anti-mine treatment is required 'and the anti-mineral tooth order is needed to perform the counter-action according to the gradation order-gradation coloring process number: two ====:=Electrical:; wherein the first direction is left and right = the lower direction respectively, the third direction and the u. 'Where the fourth direction is the upper and lower ^right direction respectively' the third direction and the column breaks the 12th order = the electronic device described in claim 9 of the patent scope, which is intended to be specified in the direction in which the determination program is executed - — prime, and a third image, the first jing in the bean, the middle material, the pixel is the current pixel in 20 201112 164 329I00-TW 31914twf.doc/n adjacent pixels in the direction, the first pixel and the third pixel are respectively two directions of the pre-diagnosis pixel at an angle of forty-five degrees with the direction The upper two binocular pixels; and the first toxic image and/or the third pixel has a sequence value equal to the order of the target pixel, and the order value of the target is Then it is judged that the direction is sawtooth.豕I 13. The electronic device of claim 12, wherein the second memory area stores the value of each of the first ship in the second recording position, And reading the first memory area from the second memory area: the color value of the pixel corresponding to the area is lower at the first = ^. And the date value corresponding to the color value of the more excellent silk is calculated. The electronic device of the patent axis is described in the above, wherein the sequence value is —-pixel, the third pixel, and the current pixel. Similarly, the direction from the first image and the current pixel is calculated to have the phase_color='=count*r direction, the number of layers; the pixel length 'is the same as the fiscal direction, then from the first a three-order value and a continuous pixel length of the current pixel's sequential value, and the direction is calculated to have the same color as the gradation order of the direction; and 21 201112164 ... w-J29I00-TW 31914twf.doc/n - pixel And the third pixel_order value is the same as the current silly ^ = _ the above manner, the first pixel - one pixel has the same color value of the continuous pixel length, and the short is taken as the direction The gradation order. , parent · - . · ν . __ 15 · The electronic 1 preset condition as described in claim 9 includes: "Dry: the right direction of the first direction of the gradation order is less than a predetermined constant , it is determined that the first direction does not require anti-care processing, otherwise the anti-aliasing process is determined; two to == the gradation order of the second direction is less than the preset constant, then it is determined that the second direction does not require anti-aliasing, Otherwise, the second direction and the anti-mineral tooth treatment are determined; the gradation order of the third direction in the right direction is smaller than the preset constant, and the direction or the second direction has a second or second greater than or equal to the preset constant. Determining that the third direction does not require anti-aliasing, otherwise it is determined that the one direction requires anti-orion processing; and the fourth-direction fourth-direction gradation order is less than the preset constant and the _ direction or the second If the direction has a % layer 2 greater than or equal to the preset constant, it is determined that the fourth direction does not require anti-aliasing, otherwise it is determined that the second direction needs anti-aliasing. w 16. As described in claim 9 Electronic device, wherein The gradual coloring process includes: °" * In the direction in which the gradation coloring process is performed, in the current turbulent pixel, each wrist pixel value of the priming pixel and the current image bar are 22 201112164 v 11 v;^-u029I00-TW 31914twf.doc/n a gradation color value between color values, wherein the number of the adjacent pixels filled in the gradation color value is equal to the gradation order of the direction, At present, the color value of the pixel in the above-mentioned gradient color value and the corresponding distance between the adjacent pixel and the current pixel are -reverse bn ·1...~~ 17. As described in claim 9 The electronic device, wherein the electronic device is a car navigation device with an electronic map function, and the commuter = two number of assistants. 23twenty three
TW98131244A 2009-09-16 2009-09-16 Electronic device and anti-aliasing method thereof TWI405146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98131244A TWI405146B (en) 2009-09-16 2009-09-16 Electronic device and anti-aliasing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98131244A TWI405146B (en) 2009-09-16 2009-09-16 Electronic device and anti-aliasing method thereof

Publications (2)

Publication Number Publication Date
TW201112164A true TW201112164A (en) 2011-04-01
TWI405146B TWI405146B (en) 2013-08-11

Family

ID=44909176

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98131244A TWI405146B (en) 2009-09-16 2009-09-16 Electronic device and anti-aliasing method thereof

Country Status (1)

Country Link
TW (1) TWI405146B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530851A (en) * 2013-10-11 2014-01-22 深圳市掌网立体时代视讯技术有限公司 Method and device for eliminating edge sawtooth of digital painting and calligraphy chirography

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5929862A (en) * 1996-08-05 1999-07-27 Hewlett-Packard Co. Antialiasing system and method that minimize memory requirements and memory accesses by storing a reduced set of subsample information
AUPP128498A0 (en) * 1998-01-12 1998-02-05 Canon Kabushiki Kaisha A method for smoothing jagged edges in digital images
US6097400A (en) * 1998-06-01 2000-08-01 Ati Technologies, Inc. Method and apparatus for anti-aliasing post rendering of an image
US6285348B1 (en) * 1999-04-22 2001-09-04 Broadcom Corporation Method and system for providing implicit edge antialiasing
US6982724B2 (en) * 2003-03-25 2006-01-03 Mitsubishi Electric Research Labs, Inc. Method for antialiasing an object represented as a two-dimensional distance field in object-order

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530851A (en) * 2013-10-11 2014-01-22 深圳市掌网立体时代视讯技术有限公司 Method and device for eliminating edge sawtooth of digital painting and calligraphy chirography
CN103530851B (en) * 2013-10-11 2016-07-06 深圳市掌网立体时代视讯技术有限公司 Eliminate method and the device of digital book paintbrush mark edge sawtooth

Also Published As

Publication number Publication date
TWI405146B (en) 2013-08-11

Similar Documents

Publication Publication Date Title
TWI272014B (en) Color compression using an edge data bitmask in a multi-sample anti-aliasing scheme
EP2705501B1 (en) Texturing in graphics hardware
TWI460678B (en) Accessing methods and shared memory systems using the same
KR20160130425A (en) Varying effective resolution by screen location by altering rasterization parameters
ES2277086T3 (en) METHOD AND APPLIANCE FOR CODING TEXTURE INFORMATION.
TWI360805B (en) Display system adn image processing method
JP2018129051A (en) Adjustment of inclination of texture mapping of plurality of rendering of target whose resolution varies according to location of screen
CN103026402B (en) Show compression super tile image
JP2005267639A5 (en)
KR20070005028A (en) A method and system for generating a frame of video data
JP2008500625A (en) Tile-based graphic rendering
JP2014529796A5 (en)
TW202036481A (en) Distance field color palette
CN115330986B (en) Method and system for processing graphics in block rendering mode
CN102722902B (en) Anti-aliasing the improving one's methods of rasterization stage in a kind of graph rendering streamline
CN102622723A (en) Image interpolation based on CUDA (compute unified device architecture) and edge detection
CN109643462B (en) Real-time image processing method based on rendering engine and display device
JP2006317450A5 (en)
US20130114892A1 (en) Method and device for generating a super-resolution image portion
TWI328197B (en) Multi-thread vertex shader, graphics processing unit, and control method thereof
US20140340416A1 (en) Water color gradients on a digital map
TW201112164A (en) Electronic device and anti-aliasing method thereof
US20060061590A1 (en) Low-cost supersampling rasterization
KR101222360B1 (en) Method and apparatus for pixel sampling
CN116758206A (en) Vector data fusion rendering method and device, computer equipment and storage medium