TW416231B - Zooming method for digital image - Google Patents
Zooming method for digital image Download PDFInfo
- Publication number
- TW416231B TW416231B TW88108059A TW88108059A TW416231B TW 416231 B TW416231 B TW 416231B TW 88108059 A TW88108059 A TW 88108059A TW 88108059 A TW88108059 A TW 88108059A TW 416231 B TW416231 B TW 416231B
- Authority
- TW
- Taiwan
- Prior art keywords
- pixel
- image
- new
- digital image
- area
- Prior art date
Links
Landscapes
- Image Processing (AREA)
Abstract
Description
416231416231
五、發明說明(i) 【發明之範圍】 的方法,且特別係 月梁或具有L CD之 攻果的方法。 本發明係有關於一種數位影像處埂 為一種應用於螢幕影像之處理’可使電 裝置之數位影像處理具有均勻平滑縮故 【發明之背景】 當電腦螢幕上的影像由於 理時,需要對其進行縮小或放 (raster image )而言,其影 )所組成,如螢幕影像便是由 彩組合起來便產生了完整的數 素是固定且有限的,因此在放 它的解析度,同時也可能產生 方式,是通過均勻地刪除或插 ,假如在影像放大或縮小處理 素或刪除像素而不作進一步處 馬賽克(mosaic)或畸變等失 因此’對於灰階或全彩( 理’傳統縮放的方法一般採用 内插和高階内插法來改善轉換 像為高頻時也難以避免馬賽克 則是操作上速度較慢。 【發明之概述】 太大或太+不利於顯示或處 大。對於點陣式影像 像是由許多的像素(Pixel 光點組成,每一個像素的色 位影像°由於構成影像的像 大知s小或是旋轉時就會影響 失真。一般縮放數位影像的 入景;^像之像素來實現,然而 時僅單純地插入最鄰近的像 理的話,形成的影像將產生 真的現象。 f u 1 1 c ο 1 〇 r )的數位影像處 所謂的雙線性(b i 1 i n e a r ) 效果°然而,別者在數位影 或畸變的產生,後者的缺點 a 1鑑於此’本發明的目的就是針對上述影像縮放的問 題提出種達成均勻平滑縮放效果的方法’並且其處理V. Description of the invention (i) The method of the scope of the invention, and particularly the method of attacking the moon beam or having an L CD. The invention relates to a kind of digital image processing which is a kind of processing applied to the screen image, which can make the digital image processing of the electric device have uniform and smooth shrinkage. [Background of the invention] When the image on the computer screen is processed, it needs to be processed. In terms of reduction or enlargement (raster image), for example, the screen image is combined by color to produce a complete number of primes. It is fixed and limited, so it is possible to put it at the same resolution. The generation method is by uniformly deleting or interpolating. If the image is enlarged or reduced, or pixels are deleted without further mosaic or distortion, so 'for grayscale or full-color (physical) traditional scaling methods are generally Interpolation and high-order interpolation methods are used to improve the conversion of images to high frequencies. It is difficult to avoid mosaics, but the operation is slow. [Summary of the Invention] Too large or too + is not conducive to display or large. For dot matrix images The image is composed of many pixels (Pixel light spots, each pixel's color bit image °) Because the image constituting the image is small or rotated, it will affect the image. Distortion. Generally, the digital image is scaled into the scene; the pixels of the image are used to achieve it. However, if the nearest image is simply inserted, the resulting image will have a real phenomenon. Fu 1 1 c ο 1 〇r) The so-called bi 1 inear effect at the digital image ° However, the others have the disadvantages of digital image or distortion, the shortcomings of the latter a 1 In view of this, the purpose of the present invention is to propose a uniformity for the above-mentioned image scaling problem. Method for smooth scaling effect 'and its processing
416231 五、發明說明(2) 影像縮放的迷度也快。 · 根據上述本發明之目的’提供的數位影像縮小大方法 可分成兩大#驟來說明: 首先決定出縮放後新影像之像素位置,以獲得圍繞新 衫像之像素康仏的區域。係採用區域映射的方式,依據舊 影像在水平及垂直兩個方向欲縮小或放大的比例值,將舊 影像原有的像素(以下文中之f表示)之座標位置分別對 應至新影像的像素(以下文中之主— & ^ 1 +山^ §表不)之座標位置。 而後決定出鈿放後新影像之徐一 的菸作而山雈w<像素育料°對於影像縮小 的钿作而s ,舊景》像中部份的傍 影像,針對新影像之像素g的像素將被刪除不會對應至新 素:f及其鄰近未能對應於新影像料取得’係以舊影像之像 岣而獲得,其中構成新影像之之像素點的資料,取其平 像上係為以像素f為—頂SJt 6c象素g的這些像素,在舊影 』只點所形成 放大的操作而言,新影像中有名乂〜的—矩形。至於對影像 像而是需額外產生的像素,舊部份的像素則不會對應舊影 素將對應至新影像中—齡 & v像中構成一矩形的四點像 干乂人的拓# 分別為W和丨ί ) ’其像素資料取〜"*(假設水平和垂直長度 距離反比原則用類似插值的方彳于的方式係由這四個像素按 算出新影像矩形中任—像素與$獲得’詳細的過程為:計 離dx和dy,再以(w-dx ) ^ ^其矩形頂點的水平和垂直距 影像矩形之四個像素的資料H dy)為權值,計算出以舊 據此,一數位影像若為水主的加權平均數即可。 放大的情況,便可分別藉由1平及垂直方向皆同時縮小或 迷缩玫的步驟獲得新影像.416231 V. Description of the invention (2) The fascination of image zooming is also fast. · The digital image reduction method provided according to the purpose of the present invention described above can be divided into two major steps: First, determine the pixel position of the new image after zooming to obtain an area around the pixels of the new shirt image. The area mapping method is used to map the coordinates of the original pixels of the old image (represented by f in the following) to the pixels of the new image ( The position of the coordinates of the master in the following — & ^ 1 + mountain ^ §). Then it was decided to produce a new image of Xu Yi's smoke work while the mountain stream w < pixel breeding °. For the reduced image work, the part of the old image in the old scene image, for the pixel g of the new image The pixels will be deleted and will not correspond to the new prime: f and its neighbors fail to correspond to the acquisition of the new image material. 'It is obtained by the image of the old image. The data of the pixel points constituting the new image is taken on the flat image These pixels are based on the pixel f as the top SJt 6c pixel g. In the old image, only the dots are enlarged. In the new image, there is a well-known rectangle. As for the image image, but additional pixels are needed, the old pixels will not correspond to the old pixels and will correspond to the new image—the age & v image constitutes a rectangular four-point image with dry people. # W and 丨 respectively) 'The pixel data is taken from ~ " * (assuming that the principle of inverse ratio of horizontal and vertical length distance is similar to the interpolation method. The four pixels are used to calculate any pixel in the new image rectangle—pixel and The detailed process of $ obtaining is: dx and dy are separated, and (w-dx) ^ ^ the horizontal and vertical distances of the rectangle vertices from the four pixels of the image rectangle (H dy) are used as weights to calculate the old value. According to this, a digital image may be a weighted average of the water owners. In the case of zooming in, you can obtain new images through the steps of zooming out or zooming in both horizontally and vertically.
416231 五、發明說明〔3) 而若為水平縮小垂直放大或水平放大垂直縮小的情況’則 必須先產生一中間影像,此中間影像同樣是以上述的縮放 步驟,先針對舊影像水平方向所要縮小/放大的比例,而 視垂直方向放大/縮小的比例為1所形成的影像;之後1 以相類似的步驟,針對舊影像垂直方向所要放大/縮小的 比例,此時則視水平方向縮小/放大的比例為1 ’將中間 影像對應至所要縮放結果的新影像;當然,上述中,影像 之水平或垂直方向的縮放處理順序可對調,同樣地,放大 或縮小的處理順序也可對調。 為讓本發明之上述和其他目的、特徵、和優點能更明 顯易懂,下文特舉一較:佳實施例,並配合所附圖式,作詳 細說明如下。 【圖式說明】 第1圖繪示以格點圖表示螢幕影像中各像素的局部圖 示; 第2圖繪示圖1之螢幕影像經水平縮小到4 0 %,垂 直縮小到5 0 %後所形成的新影像; 第3圖繪示圖1之螢幕影像經水平放大到3 2 0 %, 垂直放大到2 0 0 %後所形成的新影像; 第4圖繪示圖1之螢幕影像在垂直方向要縮小到6 0 %,水平方向要放大到1 6 0 %所產生的一中間影像; 第5圖繪示圖1之螢幕影像經垂直縮小到6 0 %,水 平放大到1 6 0 %,經圖4之中間影像後所形成的新影 像;以及416231 V. Description of the invention (3) In the case of horizontal reduction, vertical enlargement, or horizontal enlargement and vertical reduction ', an intermediate image must be generated first. This intermediate image is also the same as the above-mentioned zooming step, and the old image is first reduced horizontally. / Enlarged ratio, and the vertical enlarged / reduced ratio is 1; the subsequent 1 is similar to the old image for the vertical enlarged / reduced ratio of the old image. At this time, the horizontal direction is reduced / enlarged. The ratio is 1 ', which corresponds to the intermediate image to the new image to be scaled. Of course, in the above, the horizontal or vertical scaling processing order of the image can be reversed. Similarly, the enlargement or reduction processing order can also be reversed. In order to make the above and other objects, features, and advantages of the present invention more comprehensible, a comparative example is given below in conjunction with the preferred embodiments, and the following detailed description is given in conjunction with the accompanying drawings. [Illustration of the figure] Figure 1 shows a partial icon representing each pixel in the screen image with a grid diagram; Figure 2 shows the screen image of Figure 1 reduced horizontally to 40% and vertically reduced to 50% The new image formed; Figure 3 shows the new image formed by horizontally enlarging the screen image of Figure 1 to 320% and vertically zooming to 200%; Figure 4 shows the screen image of Figure 1 at An intermediate image generated by reducing the vertical direction to 60% and horizontally to 160%; Figure 5 shows the screen image of Figure 1 reduced vertically to 60% and horizontally enlarged to 160% , A new image formed after the intermediate image in Figure 4; and
第6頁 416231 五 '發明說明(4) 第6圖繪示本發明數位影像縮放方法的步驟流程圖。 【發明之詳細說明】 本發明方法對縮放螢幕影像的步驟可分成兩部份來說 明: 一、 計算縮放前後螢幕影像之像素座標的映射;以及 二、 計算縮放後新影像之像素資料: 對於縮小,在依新影像之像素座標為中心的區域中對 舊影像之像素求均值。 對於放大,在依舊座標為中心的區域中按距離反比原 則產生一系列新像素^ 以下將配合「第1〜5圖」詳細說明本發明對於縮小 及放大前後之螢幕影像座標映射關係,以及新影像素資料 的算法。 首先說明圖示中標示的意義: 以 f (i, j),i = 0,1 …,Μ - 1 ; j = 0 , 1 …,N -1 代表 Μ 行 N 列的 原影像之像素資料,在圖示中標示為f 1,j。 以g(x,y) ,x = 0,1 ‘··,!? — 1 ; y = 0, 1 .··,S-1 代表Ri亍S 歹!J 的 新影像之像素資料,在圖示中標示為g i,j。 per代表原影像放大/縮小到新影像的比例值。 算法的第一步: 計算原影像與新影像之像素座標間的關係: X = ( i * p e r )的整數部份 y = (j*per)的整數部份 算法的第二步:Page 6 416231 Five 'Explanation of the invention (4) Figure 6 shows a flowchart of the steps of the digital image scaling method of the present invention. [Detailed description of the invention] The method of the present invention can be divided into two parts to explain the steps of zooming the screen image: 1. Calculating the mapping of the pixel coordinates of the screen image before and after scaling; and 2. Calculating the pixel data of the new image after scaling: For zooming out , Average the pixels of the old image in the area centered on the pixel coordinates of the new image. For zooming, a series of new pixels are generated based on the inverse distance principle in the area where the coordinates are still the center ^ The following will describe in detail the mapping relationship of the screen image coordinates before and after reduction and enlargement, and the new image in conjunction with "Figures 1 to 5" Algorithm for pixel data. First, the meaning of the labels in the icon will be explained: f (i, j), i = 0,1…, M-1; j = 0, 1…, N -1 represents the pixel data of the original image of M rows and N columns, It is labeled f 1, j in the illustration. With g (x, y), x = 0,1 ‘· ,! ? — 1; y = 0, 1 ....., S-1 represents the pixel data of the new image of Ri 亍 S 歹! J, which is marked as g i, j in the icon. Per represents the scaling value of the original image to the new image. First step of the algorithm: Calculate the relationship between the pixel coordinates of the original image and the new image: X = (i * p r r) integer part y = (j * per) integer part Second step of the algorithm:
416231416231
416231 五、發明說明(6) 步 按照算法的第 新影像之像素位置 (0, 〇) (0, 1) (〇, 2) (1,0) (1, 1) (1,2) (2, 0) (2,1) (2, 2) 原影像之像素位置 (0, 0) (0, 3) (0, 5) (2,0) (2,3) (2, 5) (4,0) (4, 3) (4, 5) 等等。 按照算法的第二步: ),以f ( 0 , 0 )為頂點 ,f (0, 2),f (1,0), ,對這一矩形中的所 「圖1和2」中g ( 0, 〇 )對應f ( 〇, 加上不在新螢幕影像中出現的f ( 0,1) ί (1, 1 ),f (1, 2 )六個像素組成一矩形 有像素取平均得到新的像素g ( 0,0 )。 即 g(0, 0) = ( f(0,0) + f(0, 1 ) + f(Ο, 2) + f(1, 0) + f(1,1 ) + f(1,2) )/6 同理 g(0,l) = ( f(0, 3) + f(0, 4) + f(1 , 3) + f (1,4) )/4 g (1,0 ) = ( f ( 2,0 ) + f ( 2,1 ) + f ( 2,2 ) + f ( 3,0 ) + f (3, 1 ) + f(3, 2) )/6416231 V. Description of the invention (6) Step According to the algorithm, the pixel position of the new image (0, 〇) (0, 1) (〇, 2) (1,0) (1, 1) (1,2) (2 , 0) (2,1) (2, 2) Pixel position of original image (0, 0) (0, 3) (0, 5) (2,0) (2,3) (2, 5) (4 , 0) (4, 3) (4, 5) and so on. According to the second step of the algorithm:), with f (0, 0) as vertices, f (0, 2), f (1, 0), for g (in Figures 1 and 2) in this rectangle ( 0, 〇) corresponds to f (〇, plus f (0,1) ί (1, 1), f (1, 2), which does not appear in the new screen image. Pixel g (0,0). That is g (0, 0) = (f (0,0) + f (0, 1) + f (Ο, 2) + f (1, 0) + f (1,1 ) + f (1,2)) / 6 Similarly, g (0, l) = (f (0, 3) + f (0, 4) + f (1, 3) + f (1,4)) / 4 g (1,0) = (f (2,0) + f (2,1) + f (2,2) + f (3,0) + f (3, 1) + f (3, 2) ) / 6
416231 五、發明說明(Ό g(l,l) = ( f(2, 3) + f(2, 4) + f(3, 3) + f (3, 4) )/4 以此類推° 底下將對水平/垂直方向同時放大的情形,舉一實際 的操作作說明。 請參照「第1 、3圖」,「圖1」之原影像經水平方 向放大到3 2 0%,垂直方向放大到2 0 0%後形成「圖 按照算法的第一步: 新影像之像素位置 (0, 0) (0,3) (0,6) (2,0) (2, 3) (2, 6) (4,0) (4,3) (4,6) 原影像之像素位置 (0, 0) (0, 1) (0, 2) (1,0) (1,1) (1,2) (2, 0) (2,1) (2, 2) 等等。 按照算法的第二步: 舊影像中f(0, 0),f(0, ,在新影像中形成以g ( 0, 0 ) 頂點的矩形,在這次計算中 2) ,g(l,〇) ,g(l,l) ,g(l, 1 ),f ( 1,0 ),f (1,1 )四個像素 ,g(0, 3),g(2, 0),g(2, 3)為 將產生g(0,0),g(0,l),g(0, 2)這六個像素。其中W=2,416231 V. Description of the invention (Ό g (l, l) = (f (2, 3) + f (2, 4) + f (3, 3) + f (3, 4)) / 4 etc. The actual horizontal and vertical magnification will be explained with reference to actual operation. Please refer to "Figures 1 and 3". The original image of "Figure 1" is magnified horizontally to 3 2 0% and vertically to After 2 0 0%, "the graph follows the first step of the algorithm: the pixel position of the new image (0, 0) (0,3) (0,6) (2,0) (2, 3) (2, 6) (4,0) (4,3) (4,6) Pixel position of original image (0, 0) (0, 1) (0, 2) (1,0) (1,1) (1,2) (2, 0) (2,1) (2, 2), etc. According to the second step of the algorithm: f (0, 0), f (0,) in the old image, and g (0, 0) rectangle with vertices, in this calculation 2), g (l, 〇), g (l, l), g (l, 1), f (1,0), f (1,1) four pixels , G (0, 3), g (2, 0), g (2, 3) are six pixels that will produce g (0,0), g (0, l), and g (0, 2). Among them W = 2,
第10頁 416231 五、發明說明¢8) H = 3,現在計算g(l, 1)像素,其與g(〇, 0)(對應f (0, 0)) 的 dx=l,dy=l,與 g(0,3)(對應f(0,l))的 dx = l,dy = 2, 與g(2, 0)(對應Kl,〇))的dx = l,dy = l,與g(2, 3)(對應 f ( 1, 1 ))的 dx二 1 ,dy = 2 ’ 因而: g(i, 1):( f(0, 0)*((2-1)+(3-1))+ f(0,1)^((2-1)+(3-2))+ f(l, 0)^((2-1)+(3^1))+Page 10 416231 V. Description of the invention ¢ 8) H = 3, now calculate g (l, 1) pixels, dx = l, dy = l with g (〇, 0) (corresponding to f (0, 0)) With dx = l, dy = 2 for g (0,3) (corresponding to f (0, l)), and dx = l, dy = l for g (2, 0) (corresponding to K1, 0), and g (2, 3) (corresponding to f (1, 1)) dx two 1, dy = 2 'thus: g (i, 1) :( f (0, 0) * ((2-1) + (3 -1)) + f (0,1) ^ ((2-1) + (3-2)) + f (l, 0) ^ ((2-1) + (3 ^ 1)) +
Kl,1)木((2 - 1) + (3-2)) )/ (((2-1Η(3-1)Η((2-1) + (3-2)η ((2-1)+(3-1))+((2-1)+(3-2))) 同理 g ( Ο,Ο ) = ( f ( Ο,Ο )木((2 - Ο Η ( 3 - Ο )) + f ( Ο,1 ) * (( 2 - Ο ) + ( 3 - 3 )) + f(1, 0)^((3-0)+(2-2))+ f(l, 1)^((2-2) + (3^3)) )/ (((2^0)+(3-0))+((2-0)+(3-3))+ ((3-0)+(2-2))+((2-2)+(3-3))) g(0, 1) = ( f(0, 0)^((2-0) + (3-1)) + K〇, 1 )*((2-0) + (3-2)) + f(1, 0)*((2-2)+(3-l))+ f(l, 1)^((2-2) + (3-2)) )/ (((2-0)+(3-1))+((2-0)+(3-2))+ ((2-2)+(3-1))+((2-2)+(3-2))) g(0, 2) = ( f (0, 0)^((2-0)4-(3-2)) +Kl, 1) wood ((2-1) + (3-2))) / (((2-1Η (3-1) Η ((2-1) + (3-2) η ((2-1 ) + (3-1)) + ((2-1) + (3-2))) Similarly, g (Ο, Ο) = (f (Ο, Ο) wood ((2-Ο Η (3-Ο )) + f (Ο, 1) * ((2-Ο) + (3-3)) + f (1, 0) ^ ((3-0) + (2-2)) + f (l, 1 ) ^ ((2-2) + (3 ^ 3))) / (((2 ^ 0) + (3-0)) + ((2-0) + (3-3)) + ((3- 0) + (2-2)) + ((2-2) + (3-3))) g (0, 1) = (f (0, 0) ^ ((2-0) + (3-1 )) + K〇, 1) * ((2-0) + (3-2)) + f (1, 0) * ((2-2) + (3-l)) + f (l, 1) ^ ((2-2) + (3-2))) / (((2-0) + (3-1)) + ((2-0) + (3-2)) + ((2-2 ) + (3-1)) + ((2-2) + (3-2))) g (0, 2) = (f (0, 0) ^ ((2-0) 4- (3-2 )) +
第il頁 416231 五、發明說明(9) f(0, 1)*((2-0H(3 - 1)) + f(l, 0)*((2-2)+(3-2))+ f(l, 1)*((2-2)+(3-1)) )/ (((2-0)+(3-2))+((2-0)+(3-1))+ ((2-2)+(3-2))+((2-2)+(3-1))) g(l,0)=( f(〇, 0)^((2-1)+(3-0))+ f(0,1)^((2-1)+(3-3))+ f(l,0)^((2-1)+(3-0))+ f(l, 1)木((2-1)+(3-3)) )/ (((2^1)+(3-0))+((2-1)+(3-3))+ ((2-1)十(3-0))K(2-1) + (3-3))) g(l, 2)二(f(0, 0)*((2-1)+(3-2))+ f(0,1)^((2-1)+(3-1))+ f(l, 0)^((2-1)+(3-2))+ f(l, 1)*((2-1)+(3-1)) )/ . (((2-1)+(3-2))+((2-1)+(3-1))+ ((2-1)+(3-2))+((2-1)+(3-1))) 以此類推。 底下將對水平/垂直方向互有放大縮小的情形,舉一 實際的操作作說明。 請再參照「第1及4、5圖」,「圖1」之原影像經 垂直方向縮小到6 〇 %,水平方向放大到1 6 0 %後形成 圖5」’ 「圖4」為產生的中間影像。 首先處理原影像經垂直方向縮小到5 〇 %,此時視水Page il 416231 V. Description of the invention (9) f (0, 1) * ((2-0H (3-1)) + f (l, 0) * ((2-2) + (3-2)) + f (l, 1) * ((2-2) + (3-1))) / (((2-0) + (3-2)) + ((2-0) + (3-1) ) + ((2-2) + (3-2)) + ((2-2) + (3-1))) g (l, 0) = (f (〇, 0) ^ ((2-1 ) + (3-0)) + f (0,1) ^ ((2-1) + (3-3)) + f (l, 0) ^ ((2-1) + (3-0)) + f (l, 1) wood ((2-1) + (3-3))) / (((2 ^ 1) + (3-0)) + ((2-1) + (3-3) ) + ((2-1) ten (3-0)) K (2-1) + (3-3))) g (l, 2) two (f (0, 0) * ((2-1) + (3-2)) + f (0,1) ^ ((2-1) + (3-1)) + f (l, 0) ^ ((2-1) + (3-2)) + f (l, 1) * ((2-1) + (3-1))) /. (((2-1) + (3-2)) + ((2-1) + (3-1) ) + ((2-1) + (3-2)) + ((2-1) + (3-1))) and so on. In the following, the horizontal and vertical directions will zoom in and out each other, and the actual operation will be explained. Please refer to "Figures 1 and 4, and 5" again. The original image of "Figure 1" is reduced to 60% in the vertical direction and enlarged to 160% in the horizontal direction to form Figure 5 "" Figure 4 "is generated Intermediate image. First, the original image is reduced to 50% in the vertical direction.
第12頁 416231 五、發明說明αο) 平方向縮小至1 0 0 % t(x,,y’)。 按照算法的第一步 原影像之像素位置 (0, 0) (0, 1) (0, 2) (2, 0) (2, 1) 產生「圖4」之中間影像 中間影像之像素位置 (0, 0) (0,1) (0, 2) (1,0) (2,2) (1,2) (4, 0) (2, 0) (4, 1) (2, 1) (4, 2) (2, 2) 等等。 按照第二步,求均值變為一維中的幾個點取平均: t(0, 0)=( f(0, 0)+f(1, 0) )/2 t(0, 1) = ( f(0, l) + f(l, 1) )/2 t(l, 0) = ( f(2, 0) + f (3, 0) )/2 t(l, 1) = ( f(2, l) + f(3, 1) )/2 以此類推。 接著處理中間影像經水平方向放大到1 6 Ο %,此時 視垂直方向放大至1 ◦ 0 %,得到「圖5」之新影像g (X, y) 〇 按照算法的第一步:Page 12 416231 V. Description of the invention αο) The horizontal direction is reduced to 100% t (x ,, y '). According to the first step of the algorithm, the pixel position of the original image is (0, 0) (0, 1) (0, 2) (2, 0) (2, 1). 0, 0) (0,1) (0, 2) (1,0) (2,2) (1,2) (4, 0) (2, 0) (4, 1) (2, 1) ( 4, 2) (2, 2) and so on. According to the second step, the mean value becomes several points in one dimension and averaged: t (0, 0) = (f (0, 0) + f (1, 0)) / 2 t (0, 1) = (f (0, l) + f (l, 1)) / 2 t (l, 0) = (f (2, 0) + f (3, 0)) / 2 t (l, 1) = (f (2, l) + f (3, 1)) / 2 and so on. Then, the intermediate image is enlarged to 16 % in the horizontal direction, and then enlarged to 1 ◦ 0% in the vertical direction. The new image g (X, y) of “Figure 5” is obtained. According to the first step of the algorithm:
第13頁 416231 g(〇, 1) t(l, 2)*((1-m(2-((1-0)+(2-0))+((1 ((1-1)+(2-0))+((1 ((1^0)+(1-0)) D) 〇)) -0))+((1 -0))+((1 1-0)+(2-1-0)+(2-1-1 ) + (2- 五、發明說明(11) 中間影像之像素位置 (0, 0) (0, 1) (0, 2) (1,0) (1,1) (1,2) (2,0) (2, 1 ) (2, 2) 等等。 按照算法的第二步: g(0, 0)=( t(0, 0 (0,1)*(( (1, 〇)*(( (1,1)木(( ((1-0)+(1 ((1-1)+(1 t(0,1)^(( t(0,2)*(( t(l,!)*(( 新影像之像素位置 (0, 0) (0, 1) (0, 3) (1,0) (1,1) (1, 3) (2, 0) (2, 1 ) (2, 3) 1-0)+(1-1^1)+(1-1-1) + (1-1)) )/ -0)+(1-1))+ -1)+(1-1))) 0)) + 2)) + 〇)) + 2)) )/ -0)+(2-2))+ -1)+(2-2)))416231 g (〇, 1) t (l, 2) * ((1-m (2-((1-0) + (2-0)) + ((1 ((1-1) + ( 2-0)) + ((1 ((1 ^ 0) + (1-0)) D) 〇)) -0)) + ((1 -0)) + ((1 1-0) + (2 -1-0) + (2-1-1) + (2- V. Description of the invention (11) Pixel position of the intermediate image (0, 0) (0, 1) (0, 2) (1,0) ( 1,1) (1,2) (2,0) (2, 1) (2, 2) etc. Follow the second step of the algorithm: g (0, 0) = (t (0, 0 (0, 1) * (((1, 〇) * (((1,1) wood (((1-0) + (1 ((1-1) + (1 t (0,1) ^ ((t ( 0,2) * ((t (l,!) * ((Pixel position of new image (0, 0) (0, 1) (0, 3) (1,0) (1,1) (1, 3 ) (2, 0) (2, 1) (2, 3) 1-0) + (1-1 ^ 1) + (1-1-1) + (1-1))) / -0) + ( 1-1)) + -1) + (1-1))) 0)) + 2)) + 〇)) + 2))) / -0) + (2-2)) + -1) + ( 2-2))))
第14頁 五、發明說明(12) g(〇,2)-( t(0,1)^((1-0)+(2-1))+ t(0,2)^((1-0)+(2-1))+ t(l,1 )*((1-1 ) + (2-1 )) + t(l,2)*(U-m(2-l)) )/ (((1-0)+(2-1))+((1-0)+(2-1))+ ((1-1)+(2-1))+((1-1)+(2-1))) g(l-0)"( t(l,〇)^((l-〇)+(l-〇))+ t(l, 1)*((1-0)+(1-1))+ t(2,〇)*((i-i)+(i-〇))+ t ( 2,1)氺((:l -1) +(:i - i)) ) / ((〇-0)Kl-0)) + ((l-0)Kl-l)) + ((1-1)+(1-0))+((1-1)+(1-1))) 以此類推。 最後’凊參照「第6圖」’說明本發明對上述數位影 像進行縮故的流程。 =T 1 :程序開始時,首先判斷影像是要水平放大嗎 ?不論是水平放或縮小,然後都繼續判斷是否為垂直放大 乂驟2、3 :判斷是否為垂直方向是放大還是縮小 步驟4 :若是水平放大垂直放大’則計算水放 垂直放大之像素位置映射。 大 步驟5 ’貫現水平和垂直兩方向之放大。 步驟6 1是水平放大垂直縮小’則可先 產生中間影像。 丁 ^ +放Page 14 V. Description of the invention (12) g (〇, 2)-(t (0,1) ^ ((1-0) + (2-1)) + t (0,2) ^ ((1- 0) + (2-1)) + t (l, 1) * ((1-1) + (2-1)) + t (l, 2) * (Um (2-l))) / (( (1-0) + (2-1)) + ((1-0) + (2-1)) + ((1-1) + (2-1)) + ((1-1) + (2 -1))) g (l-0) " (t (l, 〇) ^ ((l-〇) + (l-〇)) + t (l, 1) * ((1-0) + ( 1-1)) + t (2, 〇) * ((ii) + (i-〇)) + t (2,1) 氺 ((: l -1) + (: i-i))) / ( (〇-0) Kl-0)) + ((l-0) Kl-1)) + ((1-1) + (1-0)) + ((1-1) + (1-1)) ) And so on. Finally, the process of reducing the digital image according to the present invention will be described with reference to "Fig. 6". = T 1: At the beginning of the program, first determine whether the image is to be enlarged horizontally? Whether it is horizontally enlarged or reduced, then continue to determine whether it is vertically enlarged. Steps 2 and 3: Determine whether it is vertically enlarged or reduced. Step 4: If it is “horizontal magnification and vertical magnification”, the pixel position mapping of water magnification and vertical magnification is calculated. Large step 5 'realizes horizontal and vertical magnification. Step 61 1 is to zoom in horizontally and zoom out vertically, then the intermediate image can be generated first. Ding ^ + put
第丨5頁 416231 五、發明說明(13) 步驟7 :然後在中間影像的基礎上進行垂直縮小’產 生新影像之像素。 步驟8 :若是水平縮小垂直放大,則可先進行垂直放 大,產生中間影像。 步驟9 :然後在中間影像的基礎上進行水平縮小,產 生新影像之像素。 步驟1 0 :若是水平縮小垂直縮小,則計算水平縮 小,垂直縮小之像素位置映射。 步驟1 1 .貫現水平和垂直兩個方向之縮小。 其中放大算法及縮小算法如前述。 雖然本發明已以一較佳實施例揭露如上,然其並非用 以限定本發明,任何熟習此技藝者,在不脫離本發明之精 神和範圍内,當可作些許之更動與潤飾,例如本發明方法 中,新影像之像素座標是以取原影像之像素座標乘上縮放 比例值後的整數部份,當然也可採用四捨五入或無條件進 位方式計算出新影像之像素座標;此外,縮小時均值計算 的像素選擇也可採用其它的選取方式;同理,放大時亦然 ;再者,若處理水平縮小垂直放大或水平放大垂直縮小的 影像縮放情況時,影像之水平或垂直方向的縮放處理順序 可對調,同樣放大或縮小的處理順序也可對調。因此本發 明之保護範圍當視後附之申請專利範圍所界定者為準。Page 丨 416231 V. Description of the invention (13) Step 7: Then, perform vertical reduction based on the intermediate image to generate pixels of a new image. Step 8: If it is zoomed out horizontally and vertically, it can be zoomed up first to generate an intermediate image. Step 9: Then reduce horizontally on the basis of the intermediate image to generate pixels for the new image. Step 10: If it is horizontal reduction and vertical reduction, calculate the pixel position mapping of horizontal reduction and vertical reduction. Step 11 1. Reach the horizontal and vertical reduction. The enlargement and reduction algorithms are as described above. Although the present invention has been disclosed as above with a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can make some modifications and retouching without departing from the spirit and scope of the present invention. In the method of the invention, the pixel coordinate of the new image is an integer portion obtained by multiplying the pixel coordinate of the original image by the scaling value. Of course, the pixel coordinates of the new image can also be calculated by rounding or unconditional rounding; in addition, the mean value at the time of reduction Calculated pixel selection can also use other selection methods; the same is true when zooming in; furthermore, if horizontal zoom vertical zoom or horizontal zoom vertical zoom image scaling is processed, the horizontal or vertical zoom processing order of the image It can be reversed, and the processing order of enlargement or reduction can also be reversed. Therefore, the scope of protection of the present invention shall be determined by the scope of the attached patent application.
第16頁Page 16
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW88108059A TW416231B (en) | 1999-05-18 | 1999-05-18 | Zooming method for digital image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW88108059A TW416231B (en) | 1999-05-18 | 1999-05-18 | Zooming method for digital image |
Publications (1)
Publication Number | Publication Date |
---|---|
TW416231B true TW416231B (en) | 2000-12-21 |
Family
ID=21640735
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW88108059A TW416231B (en) | 1999-05-18 | 1999-05-18 | Zooming method for digital image |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW416231B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7760967B2 (en) | 2004-11-05 | 2010-07-20 | Casio Computer Co., Ltd. | Image processing apparatus capable of carrying out magnification change process of image |
-
1999
- 1999-05-18 TW TW88108059A patent/TW416231B/en not_active IP Right Cessation
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7760967B2 (en) | 2004-11-05 | 2010-07-20 | Casio Computer Co., Ltd. | Image processing apparatus capable of carrying out magnification change process of image |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5058341B2 (en) | Image processing method | |
JP2550530B2 (en) | Video signal processing method | |
TW432293B (en) | Image processing in which polygon is divided | |
JP2005339313A (en) | Method and apparatus for presenting image | |
CN109461174A (en) | Video object area tracking method and video plane advertisement method for implantation and system | |
JP2008257752A (en) | Perspective editing tool to two-dimensional image | |
JP2002531907A (en) | Electronic keystone correction for electronic devices with visual display | |
JPS61143879A (en) | Method and apparatus for calculating pixel value | |
JP2002109531A (en) | Panorama image navigation system using neural network for correcting distortion of image | |
CN107146197A (en) | A kind of reduced graph generating method and device | |
JP2004287517A (en) | Virtual viewpoint image generating method, virtual viewpoint image generating device, virtual viewpoint image generating program and recording medium | |
TW416231B (en) | Zooming method for digital image | |
US6529642B1 (en) | Method for enlarging/reducing digital images | |
KR100633029B1 (en) | Method of Analyzing and Modifying a Footprint | |
KR20010024416A (en) | Static image generation method and device | |
KR20100044977A (en) | Method for video interpolation and computer recordable medium storing the method | |
JPH11242753A (en) | Method and device for three-dimensional plotting | |
JPH06301792A (en) | Texture mapping device | |
JP2591337B2 (en) | Moving image generation method and motion vector calculation method | |
US6674922B1 (en) | Image processing method, image processing apparatus, and storage medium | |
JPS5972568A (en) | Picture converter | |
JP2830339B2 (en) | Image conversion method | |
JP7527532B1 (en) | IMAGE POINT CLOUD DATA PROCESSING APPARATUS, IMAGE POINT CLOUD DATA PROCESSING METHOD, AND IMAGE POINT CLOUD DATA PROCESSING PROGRAM | |
JP2008217547A (en) | Method of generating free eye point image | |
JPH0227486A (en) | Picture enlarging/reducing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GD4A | Issue of patent certificate for granted invention patent | ||
MM4A | Annulment or lapse of patent due to non-payment of fees |