[go: up one dir, main page]

CN1061500C - Device for Uniformly Scaling and Resizing Digital Images - Google Patents

Device for Uniformly Scaling and Resizing Digital Images Download PDF

Info

Publication number
CN1061500C
CN1061500C CN96106993A CN96106993A CN1061500C CN 1061500 C CN1061500 C CN 1061500C CN 96106993 A CN96106993 A CN 96106993A CN 96106993 A CN96106993 A CN 96106993A CN 1061500 C CN1061500 C CN 1061500C
Authority
CN
China
Prior art keywords
line
original
pixel data
register
output
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Lifetime
Application number
CN96106993A
Other languages
Chinese (zh)
Other versions
CN1180273A (en
Inventor
徐荣富
张凤玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Winbond Electronics Corp
Original Assignee
Winbond Electronics Corp
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
Priority claimed from CN95109686A external-priority patent/CN1110017C/en
Application filed by Winbond Electronics Corp filed Critical Winbond Electronics Corp
Priority to CN96106993A priority Critical patent/CN1061500C/en
Publication of CN1180273A publication Critical patent/CN1180273A/en
Application granted granted Critical
Publication of CN1061500C publication Critical patent/CN1061500C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

An apparatus for uniformly scaling digital image sizes, an original digital image having N successive original image data and a destination digital image having M successive destination digital images. M is larger than N, the linear interpolation of the N-th and N + 1-th original image data generates a residual interpolation image data, when the quotient S is obtained by (M-N)/(N-1) and N is the minimum value of N +1 xS which is not less than sxN, the interpolation image data is inserted between the N-th and N + 1-th original image data. M < N, the address generator controls the memory unit to output the selected original image data. Subsequent original image data output by the memory unit is offset from only previous original image data output by the memory unit by a value V or V +1, V being a quotient of N/M.

Description

均匀伸缩数字图像尺寸的装置Device for Uniformly Scaling and Resizing Digital Images

本发明涉及一种图像处理装置,特别是涉及一种能即时二维均匀伸缩数字图像处理尺寸的装置。The invention relates to an image processing device, in particular to a device capable of real-time, two-dimensional and uniform expansion and contraction of digital image processing size.

在多媒体电脑的应用中,具有整合数字图像的能力是非常重要的,将一数字图像(DIGITAL IMAGE)与另一数字图像整合之前,必需将该数字图像先处理,而处理的方法通常是由增加该数字图像尺寸(以下称为伸展(SCALING UP))、减少该数字图像尺寸(以下称为压缩(SCALING DOWN))、剪裁该数字图像的一被选择部分、平移该数字图像的一被选择部分至另一区域等来完成。In the application of multimedia computers, it is very important to have the ability to integrate digital images. Before integrating a digital image (DIGITAL IMAGE) with another digital image, the digital image must be processed first, and the processing method is usually by adding The digital image size (hereinafter referred to as stretching (SCALING UP)), reducing the digital image size (hereinafter referred to as compression (SCALING DOWN)), cropping a selected portion of the digital image, translating a selected portion of the digital image to another area and so on to complete.

上述数字图像的伸展与压缩是由特别设计的电脑来完成,该数字图像包括多数扫描线,每一扫描线还包括有多个像素数据(PIXEL DATA),而该数字图像的伸展是由在每两条扫描线之间执行线性内插(LINEAR INTERPOLATION),而得到介于两扫描线之间的至少一条插补扫描线,及由在每两个扫描像素之间执行线性内插,而得到介于两扫描像素之间的至少一个插补像素数据。而数字图像的压缩则是由删除数字图像的部分扫描线及删除每一个被保留的扫描线的部分像素数据来达成。The stretching and compression of the above-mentioned digital image is accomplished by a specially designed computer. The digital image includes a plurality of scanning lines, and each scanning line also includes a plurality of pixel data (PIXEL DATA), and the stretching of the digital image is performed in each scanning line. Perform linear interpolation (LINEAR INTERPOLATION) between two scanning lines to obtain at least one interpolation scanning line between the two scanning lines, and perform linear interpolation between every two scanning pixels to obtain the interpolation At least one interpolated pixel data between two scanned pixels. The compression of the digital image is achieved by deleting part of the scan lines of the digital image and deleting part of the pixel data of each retained scan line.

对于数字图像的伸展来说,依靠电脑处理原始图像数据的线性内插是相当缓慢,因此,开发出伸展数字图像的各式各样专用的硬件装置。For the stretching of digital images, it is quite slow to rely on computers to process the linear interpolation of raw image data. Therefore, various special hardware devices for stretching digital images have been developed.

这些专用的硬件装置大多数只能伸展数字图像至一有限的面积。当伸展一具有N条扫描线的数字图像时,被插入的扫描线的总数必需是N-1的整数倍,以允许插入在该原始扫描线的每两条扫描线之间的插补扫描线具有相同数目,使得伸展后的图像仍能维持均匀,相同地,当伸展一具有N’个像素数据也是一样地。Most of these dedicated hardware devices can only stretch digital images to a limited area. When stretching a digital image with N scanlines, the total number of scanlines to be inserted must be an integer multiple of N-1 to allow interpolation scanlines to be inserted between every two scanlines of the original scanline With the same number, the stretched image can still maintain uniformity. Similarly, when the stretched image has N' pixel data, the same is true.

一般数字图像的二维伸缩能够依靠一执行图像的可变扩张和缩小的特殊图型处理器使用,或依靠使用一能达到同样结果的专用的硬件装置来达成。先将该原始图像储存在一帧存储器内,该原始图像然后在一第一维(first dimension)中被伸缩,且最终的一维伸缩图像系被储存在该帧存储器。被伸缩的图像然后在一第二维中被伸缩,且最终的二维伸缩图像在被提供至一输出装置之前,如一电脑显示器或者打印机,被储存在该帧存储器内。一般的伸缩方法因为它们需求相当大的存储器,不符合经济效益,尤其是使用大伸缩比时。除此之外,一般的伸缩方法使用大量的处理步骤,因此具有相当差的效率,因为该一维伸缩图像在能够在该第二维中被伸缩之前必须被储存在该帧存储器内,且因为该二维伸缩图像在能够被提供至该输出装置之前必须储存在该帧存储器内,因此,一般的伸缩方法并不适合在现场视频应用中使用。Two-dimensional scaling of general digital images can be achieved by means of a special graphics processor that performs variable expansion and reduction of the image, or by using a dedicated hardware device capable of achieving the same result. The original image is first stored in a frame memory, the original image is then stretched in a first dimension, and the final one-dimensional stretched image is stored in the frame memory. The scaled image is then scaled in a second dimension, and the final 2D scaled image is stored in the frame memory before being provided to an output device, such as a computer monitor or printer. General scaling methods are not economical because of their considerable memory requirements, especially when large scaling ratios are used. In addition, general scaling methods use a large number of processing steps and thus have rather poor efficiency, since the one-dimensional warped image must be stored in the frame memory before it can be scaled in the second dimension, and because The 2D scaled image must be stored in the frame memory before it can be provided to the output device, therefore, general scaling methods are not suitable for use in live video applications.

本发明第一目的在于提供一种能即时二维均匀伸缩数字图像的装置。The first object of the present invention is to provide a device capable of instantaneously and uniformly scaling digital images in two dimensions.

本发明第二目的在于提供一种适合在现场视频应用中使用、成本低且高效率的伸缩装置。A second object of the present invention is to provide a low-cost and high-efficiency telescoping device suitable for use in live video applications.

本发明提供一种装置,能够处理一原始数字图像,以得到一均匀伸缩目的数字图像,该装置包括一用以储存该原始数字图像在其内的帧存储器,该原始数字图像具有若干(N)条连续的原始扫描线和每条原始扫描线若干(N’)个连续的原始像素数据,该装置还包括一用以在垂直方向伸缩该原始数字图像以得到多数(M)条连续的目的扫描线的垂直伸缩单元,以及一用以在水平方向伸缩来自该垂直伸缩单元目的扫描线以得到每条扫描线若干(M’)个连续的目的像素数据的水平伸缩单元。The present invention provides a device capable of processing an original digital image to obtain a digital image for uniform scaling purpose, the device includes a frame memory for storing the original digital image, the original digital image has a number (N) A continuous original scan line and each original scan line several (N') continuous original pixel data, the device also includes a device for stretching the original digital image in the vertical direction to obtain a plurality (M) of continuous purpose scans A vertical stretching unit for a line, and a horizontal stretching unit for horizontally stretching a target scan line from the vertical stretching unit to obtain a number (M') of continuous target pixel data for each scan line.

当该数值(M)比该数值(N)大时,为了使该垂直伸缩单元伸缩该原始数字图像,该垂直伸缩单元包括:一行存储器,该行存储器被连接至该帧存储器,以储存来自该帧存储器的第(n+1)条原始扫描线;一行缓冲器,被连接至该行存储器,以储存第(n)条原始扫描线;一第一线性内插器,被连接至该行存储器和该行缓冲器;以及一垂直伸缩控制器,被连接至该帧存储器、该行缓冲器和该第一线性内插器。该垂直伸缩控制器控制该原始扫描线在该行存储器和该行缓冲器内的储存,且还控制该第一线性内插器来执行来自该行存储器和该行缓冲器的第(n)和第(n+1)条原始扫描线的线性内插,以产生一残余内插扫描线,当(M-N)除以(N-1)得到商数(S)及当(n)为一个满足条件(n+1)×(S)≥(s)×(N)的最小数值时,其中(s)是位于1至(S),该残余内插扫描线被插入在该第(n)和第(n+1)条原始扫描线之间。When the numerical value (M) is greater than the numerical value (N), in order to make the vertical scaling unit scale the original digital image, the vertical scaling unit includes: a line memory connected to the frame memory to store data from the The (n+1) original scanning line of the frame memory; a line buffer, connected to the line memory, to store the (n) original scanning line; a first linear interpolator, connected to the line memory and the line buffer; and a vertical scaling controller connected to the frame memory, the line buffer and the first linear interpolator. The vertical scaling controller controls the storage of the original scan line in the line memory and the line buffer, and also controls the first linear interpolator to perform the (n)th and Linear interpolation of the (n+1)th original scan line to generate a residual interpolated scan line, when (M-N) is divided by (N-1) to get the quotient (S) and when (n) is a satisfying condition (n+1)×(S)≥(s)×(N), where (s) is located between 1 and (S), the residual interpolated scanlines are inserted between the (n)th and Between (n+1) original scan lines.

为了使该垂直伸缩单元在该数值(M)比该数值(N)小时伸缩该原始数字图像,该垂直伸缩控制器包括:In order to make the vertical scaling unit scale the original digital image when the value (M) is smaller than the value (N), the vertical scaling controller includes:

一个第一地址产生器,被连接至该帧存储器,控制该帧存储器以输出该原始扫描线中的第一条,以供储存在该行存储器内,用以产生一数值(U)的第一产生装置,该数值为一个由数值(N)除以数值(M)所得出的商数;A first address generator, connected to the frame memory, controls the frame memory to output the first one of the original scanning lines for storage in the line memory, for generating a first value (U) generating means, the value being a quotient obtained by dividing the value (N) by the value (M);

一个第一数据寄存器;a first data register;

一个第一加法器装置,被连接至该第一产生装置和该第一数据寄存器,将被储存在该第一数据寄存器内的数值和该数值(U)相加得到一个和数;A first adder device, connected to the first generating device and the first data register, adds the value stored in the first data register to the value (U) to obtain a sum;

一个第一计算装置,被连接至该第一加法器装置、该第一地址产生器和该第一数据寄存器,可将该和数与该数值(M)做比较,并使该第一地址产生器来控制该帧存储器,输出该原始扫描线中的另一条,以储存在该行存储器内,该原始扫描线中的另一条,当该和数小于数值(M)时,从由该框图存储器所输出的在先前的原始扫描线偏移一数值(V),而当该和数至少与该数值(M)相等时,由该帧存储器所输出的在先前的原始扫描线偏移一数值(V+1),该数值(V)等于(N)除以(M)所得的商数。当该和数至少与该数值(M)相等时,该第一计算装置在该第一数据寄存器内储存该和数和该数值(M)的差,而当该和数比该数值(M)小时,该第一计算装置在该第一数据寄存器内储存该和数。a first calculation means, connected to the first adder means, the first address generator and the first data register, for comparing the sum with the value (M) and causing the first address to be generated device to control the frame memory, and output the other one of the original scanning lines to be stored in the line memory, and the other one of the original scanning lines, when the sum is less than the value (M), is generated from the frame memory The output at the previous original scan line is offset by a value (V), and when the sum is at least equal to the value (M), the output at the previous original scan line by the frame memory is offset by a value ( V+1), the value (V) is equal to the quotient obtained by dividing (N) by (M). When the sum is at least equal to the value (M), the first calculation means stores the difference between the sum and the value (M) in the first data register, and when the sum is greater than the value (M) hour, the first computing device stores the sum in the first data register.

当该数值(M’)比该数值(N’)大时,为了使该水平伸缩单元伸缩来自该垂直伸缩单元的目的扫描线,该水平伸缩单元包括:When the numerical value (M') is greater than the numerical value (N'), in order to make the horizontal stretching unit stretch the target scan line from the vertical stretching unit, the horizontal stretching unit includes:

一个点寄存器,被连接至该第一线性内插器,以储存来自该第一线性内插器的该扫描线中的一条的第(n’+1)个像素数据;A dot register, connected to the first linear interpolator, to store the (n'+1)th pixel data of one of the scan lines from the first linear interpolator;

一个点缓冲器,被连接至该点寄存器,以储存该等扫描线中的该一条的第(n’)个像素数据;a dot buffer, connected to the dot register, to store the (n')th pixel data of the one of the scan lines;

一个第二线性内插器,被连接至该贴寄存器和该点缓冲器;a second linear interpolator connected to the sticker register and the point buffer;

一个水平伸缩控制器,被连接至该行存储器、该行缓冲器、该点缓冲器及该第二线性内插器。A horizontal scaling controller is connected to the row memory, the row buffer, the point buffer and the second linear interpolator.

该水平伸缩控制器控制该像素数据在该点寄存器和该点缓冲器内的储存,且还控制该第二线性内插器以执行来自该点寄存器和该点缓冲器的该第(n’)和第(n’+1)个像素数据的线性内插,以产生一残余内插像素数据,当(M’-N’)除以(N’-1)得到商数(S’)及当(n’)为一满足条件(n’+1)×(S’)≥(s’)×(N’)的最小数值时,其中(s’)位于1至(S’),该残余内插像素数据被插入在该第(n’)和第(n’+1)条原始扫描线之间。The horizontal scaling controller controls the storage of the pixel data in the point register and the point buffer, and also controls the second linear interpolator to perform the (n')th from the point register and the point buffer and linear interpolation of the (n'+1)th pixel data to produce a residual interpolated pixel data, when (M'-N') is divided by (N'-1) to get the quotient (S') and when When (n') is a minimum value that satisfies the condition (n'+1)×(S')≥(s')×(N'), where (s') is located between 1 and (S'), the residual Interpolated pixel data is inserted between the (n')th and (n'+1)th original scan lines.

当该数值(M’)比该数值(N’)小时,为了使该水平伸缩单元伸缩来自该垂直伸缩单元的目的扫描线,该水平伸缩单元包括:When the value (M') is smaller than the value (N'), in order to make the horizontal stretching unit stretch the target scan line from the vertical stretching unit, the horizontal stretching unit includes:

一个第二地址产生器,被连接至该行存储器,控制该行存储器,以输出该扫描线中一条的第一个原始像素数据,用以产生一数值(U’)的第二产生装置,该数值为一个由数值(N’)除以数值(M’)所得出的商数;a second address generator, connected to the row memory, to control the row memory to output the first original pixel data of one of the scan lines for generating a value (U') second generating means, the The value is a quotient obtained by dividing the value (N') by the value (M');

一个第二数据寄存器;a second data register;

一个第二加法器装置,被连接至该第二产生装置和该第二数据寄存器,将被储存在该第二数据寄存器内的数值和该数值(U’)相加以得到一和数;A second adder means, connected to the second generating means and the second data register, adds the value (U') stored in the second data register to obtain a sum;

一个第二计算装置,被连接至该第二加法器装置、该第二地址产生器和该第二数据寄存器,以将该和数与该数值(M’)做比较,并使该第二地址产生器来控制该行存储器以输出前述扫描线的另一个原始像素数据,当该和数小于数值(M’)时,该扫描线的该另一个原始像素数据,是从由该行存储器所输出的在先前原始像素数据偏移一数值(V’),而当该和数至少与该数值(M’)相等时,是从由该行存储器所输出的在先前的原始像素数据偏移一数值(V’+1),该数值(V’)等于(N’)除以(M’)所得的商数。当该和数至少与该数值(M’)相等时,在该第二数据寄存器内,该第二计算装置储存该和数和该数值(M’)的差,而当该和数比该数值(M’)小时,在该第二数据寄存器内该第二计算装置储存该和数。a second calculation means, connected to the second adder means, the second address generator and the second data register, to compare the sum with the value (M') and make the second address The generator is used to control the line memory to output another original pixel data of the aforementioned scan line. When the sum is less than the value (M'), the other original pixel data of the scan line is output from the line memory The previous original pixel data is offset by a value (V'), and when the sum is at least equal to the value (M'), it is offset by a value from the previous original pixel data output by the line memory (V'+1), the value (V') is equal to the quotient obtained by dividing (N') by (M'). In the second data register, the second calculation means stores the difference between the sum and the value (M') when the sum is at least equal to the value (M'), and when the sum is greater than the value (M') hours, the second calculating means stores the sum in the second data register.

该水平伸缩单元的第二线性内插器的输出能够直接被提供给一输出装置。The output of the second linear interpolator of the horizontal scaling unit can be provided directly to an output device.

下面结合附图及实施例对本发明进行详细说明:Below in conjunction with accompanying drawing and embodiment the present invention is described in detail:

图1是本发明伸缩装置的最佳实施例的示意电路方框图。Fig. 1 is a schematic circuit block diagram of the preferred embodiment of the telescoping device of the present invention.

图2是上述最佳实施例中双线性加法器示意电路方框图。Fig. 2 is a schematic circuit block diagram of the bilinear adder in the above preferred embodiment.

图3是上述最佳实施例中垂直伸缩控制器的示意电路方框图。Fig. 3 is a schematic circuit block diagram of the vertical telescoping controller in the above-mentioned preferred embodiment.

图4是上述垂直伸缩控制器的残余分布器的示意电路方框图。Fig. 4 is a schematic circuit block diagram of the residual distributor of the above-mentioned vertical scaling controller.

图5是上述垂直伸缩控制器的α串列产生器的示意电路方框图。FIG. 5 is a schematic circuit block diagram of the α-series generator of the above-mentioned vertical scaling controller.

图6是上述垂直伸缩控制器的地址产生器的示意电路方框图。FIG. 6 is a schematic circuit block diagram of the address generator of the vertical scaling controller.

图7是上述最佳实施例的垂直伸缩单元当N=5且ΔN=2时的垂直伸展运行的时序图。Fig. 7 is a time sequence diagram of the vertical stretching operation of the vertical stretching unit of the above preferred embodiment when N=5 and ΔN=2.

图8是上述垂直伸缩单元当N=5且ΔN=6时的垂直伸展运行的时序图。FIG. 8 is a timing diagram of the vertical stretching operation of the vertical stretching unit when N=5 and ΔN=6.

图9是上述垂直伸缩单元当N=5且ΔN=2时的垂直压缩运行的时序图。FIG. 9 is a timing diagram of the vertical compression operation of the above-mentioned vertical stretching unit when N=5 and ΔN=2.

图10是最佳实施例的水平伸缩单元当N’=5且ΔN’=2时的水平伸展运行的时序图。Fig. 10 is a timing diagram of the horizontal stretching operation of the horizontal stretching unit of the preferred embodiment when N'=5 and ΔN'=2.

图11是上述水平伸缩单元当N’=5且ΔN’=2时的水平压缩运行的时序图。Fig. 11 is a timing diagram of the horizontal compression operation of the above-mentioned horizontal stretching unit when N'=5 and ΔN'=2.

如图1所示,本发明的均匀伸缩数字图像尺寸的装置的最佳实施例包括一个垂直伸缩单元及一个水平伸缩单元。该垂直伸缩单元能在垂直方向伸展或压缩一数字图像数据,且包括有一个行存储器3、一个行缓冲器4、一个双线性加法器(BILINEAR ADDER)5及一个垂直伸缩控制器6;该水平伸缩单元可在水平方向伸展或压缩一数字图像数据,且包括有一个点寄存器7、一个点缓冲器8、一个双线性加法器9及一个水平伸缩控制器10。As shown in FIG. 1, the preferred embodiment of the device for uniformly stretching digital image size of the present invention includes a vertical stretching unit and a horizontal stretching unit. The vertical scaling unit can stretch or compress a digital image data in the vertical direction, and includes a line memory 3, a line buffer 4, a bilinear adder (BILINEAR ADDER) 5 and a vertical scaling controller 6; The horizontal scaling unit can stretch or compress a digital image data in the horizontal direction, and includes a point register 7 , a point buffer 8 , a bilinear adder 9 and a horizontal scaling controller 10 .

使用时,由本发明的装置所处理的一数字图像最初是被储存在一个帧存储器(FRAME MEMORY)2中,而该数字图像可以来自一个图像解码器或是来自一个图像捕捉系统等数字图像数据源1。该垂直伸缩控制器6控制该帧存储器2,提供该数字图像的一被选择扫描线至该行存储器3,该垂直伸缩控制器6控制该行缓冲器4,储存来自该行存储器3中的前一扫描线,该双线性加法器5接收来自该行存储器3及该行缓冲器4的扫描线数据以及根据来自该垂直伸缩控制器6的一对加权系数α、1-α,执行双线性内插。During use, a digital image processed by the device of the present invention is initially stored in a frame memory (FRAME MEMORY) 2, and this digital image can come from an image decoder or from digital image data sources such as an image capture system 1. The vertical scaling controller 6 controls the frame memory 2 to provide a selected scan line of the digital image to the line memory 3, and the vertical scaling controller 6 controls the line buffer 4 to store the previous line from the line memory 3. One scanning line, the bilinear adder 5 receives the scanning line data from the row memory 3 and the row buffer 4 and performs bilinear sexual interpolation.

该双线性加法器5的输出是由该点寄存器7接收,该水平伸缩控制器10控制该点缓冲器8,以储存一个来自该点寄存器7之前的像素数据。该双线性加法器9从该点寄存器7和该点缓冲器8接收像素数据,并且根据来自该水平伸缩控制器10的一对加权系数α、1-α执行双线性内插。The output of the bilinear adder 5 is received by the dot register 7 , and the horizontal scaling controller 10 controls the dot buffer 8 to store a pixel data from before the dot register 7 . The bilinear adder 9 receives pixel data from the point register 7 and the point buffer 8 , and performs bilinear interpolation according to a pair of weighting coefficients α, 1−α from the pan controller 10 .

图2所示是该双线性加法器5的电路方框图,来自该行缓冲器4且与储存在该帧存储器2的数字图像的第n条扫描线对应的扫描线数据经一寄存器501及一乘法器502被乘以该系数1-α,而来自该行存储器3且与储存在该帧存储器2的数字图像的第n+1条扫描线对应的扫描线数据经一寄存器503及一乘法器504被乘以系数α。当该系数α为分数时(也就是α不等于1也不等于0),将以上得到的乘积经一加法器505相加,则得到一插补扫描线。该双线性加法器5的操作将在下文中详细叙述。What Fig. 2 shows is the circuit block diagram of this bilinear adder 5, from this row buffer 4 and the scanning line data corresponding to the nth scanning line of the digital image stored in this frame memory 2 through a register 501 and a The multiplier 502 is multiplied by the coefficient 1-α, and the scan line data from the line memory 3 and corresponding to the n+1th scan line of the digital image stored in the frame memory 2 passes through a register 503 and a multiplier 504 is multiplied by the coefficient α. When the coefficient α is a fraction (that is, α is neither equal to 1 nor equal to 0), the products obtained above are added by an adder 505 to obtain an interpolated scan line. The operation of the bilinear adder 5 will be described in detail below.

该双线性加法器9的构造与图2中所显示的双线性加法器5构造相似。但是,在该双线性加法器9中,来自该点缓冲器8的像素数据,对应于来自该双线性加法器5的扫描线资料的第n’个像素数据,是被乘以该系数1-α,而来自该点寄存器7的像素数据,对应于来自该双线性加法器5的扫描线数据的第n’+1个像素数据,是被乘以该系数α。因此,该点寄存器7与该垂直伸缩单元的行存储器3同等,而点缓冲器8与该垂直伸缩单元的行缓冲器4同等。The structure of the bilinear adder 9 is similar to that of the bilinear adder 5 shown in FIG. 2 . However, in the bilinear adder 9, the pixel data from the dot buffer 8 corresponding to the n'th pixel data of the scan line data from the bilinear adder 5 is multiplied by the coefficient 1-α, and the pixel data from the dot register 7 corresponding to the n′+1th pixel data of the scan line data from the bilinear adder 5 is multiplied by the coefficient α. Therefore, the point register 7 is equivalent to the line memory 3 of the vertical scaling unit, and the point buffer 8 is equivalent to the line buffer 4 of the vertical scaling unit.

如图3所示,该垂直伸缩控制器6包括有一个可编程的寄存器组30、一个第一计算电路31、一个第二计算电路32、一个第三计算电路33、一个选择器34、一个残余分布器35、一个α串列产生器36及一个地址产生器37。As shown in Figure 3, the vertical scaling controller 6 includes a programmable register group 30, a first calculation circuit 31, a second calculation circuit 32, a third calculation circuit 33, a selector 34, a residual Distributor 35 , an alpha serial generator 36 and an address generator 37 .

该寄存器组30包括有一第一寄存器301,一第二寄存器302及一第三寄存器303,该第一寄存器301是用来储存在该帧存储器2中的数字图像的原始扫描线数据N,该第二寄存器302是用以储存被插入或被删除的扫描线量ΔN,而该第三寄存器303是用以储存一INC/DEC标识38,上述INC/DEC标识38是被用来指示在垂直方向该数字图像数据的伸展或者压缩被执行。该第一计算电路31、第二计算电路32及第三计算电路33分别读取储存在该第一寄存器301、第二寄存器302及第三寄存器303的内容,而该第一计算电路31输出ΔN除以N-1所得到的商数T,而该第二计算电路32输出ΔN除以N-1所得到的商数S。因此,当该数字图像在做伸展处理时,该商数T相当于被插入该数字图像的每两条相邻扫描线间的插补扫描线的最小数,及该商数S相当于均匀分布在该数字影像的原始扫描线间的残余插补扫描线的总数。该第三计算电路33输出N除以N-ΔN的商数U,当该数字图像被压缩时,该商数U相当于被删除的残余扫描线的总数。The register set 30 includes a first register 301, a second register 302 and a third register 303, the first register 301 is used to store the original scan line data N of the digital image in the frame memory 2, the first register 301 The second register 302 is used to store the amount ΔN of scanning lines to be inserted or deleted, and the third register 303 is used to store an INC/DEC flag 38. The above-mentioned INC/DEC flag 38 is used to indicate the Stretching or compression of digital image data is performed. The first calculation circuit 31, the second calculation circuit 32 and the third calculation circuit 33 respectively read the contents stored in the first register 301, the second register 302 and the third register 303, and the first calculation circuit 31 outputs ΔN The quotient T obtained by dividing by N−1, and the second calculation circuit 32 outputs the quotient S obtained by dividing ΔN by N−1. Therefore, when the digital image is being stretched, the quotient T is equivalent to the minimum number of interpolated scan lines inserted between every two adjacent scan lines of the digital image, and the quotient S is equivalent to a uniformly distributed The total number of residual interpolated scanlines between the original scanlines of this digital image. The third calculation circuit 33 outputs the quotient U of dividing N by N-[Delta]N, which corresponds to the total number of deleted residual scan lines when the digital image is compressed.

该选择器34包括一个接收来自该第三计算电路33商数U的第一输入端及一个接收来自该第二计算电路32商数S的第二输入端,以及该选择器34包括一个控制输入端,该控制输入端接收来自该第三寄存器303的INC/DEC标识38,而该选择器34的输出端42与该残余分布器35连接,该残余分布器35还接收来自该第一计算电路31的商数T及包括有一个接收来自该第三寄存器303的INC/DEC标识38的控制输入端及一与该α串列产生器36及该地址产生器37相连的控制输出端39。该残余分布器35决定在该数字图像做伸展处理期间,何时执行残余内插步骤,及当数字图像做压缩处理期间,何时删除一残余扫描线。该α串列产生器36接收来自该第一计算电路31的商数T及来自该第三寄存器30c的INC/DEC标识38,并且产生该双线性加法器的系数α、1-α及该行缓冲器4的一储存指令信号(如图1)。该地址产生器37同样也接收来自该第三寄存器303的1VC/DEC标识38并且提供线地址数据给该帧存储器2。The selector 34 includes a first input terminal receiving the quotient U from the third calculation circuit 33 and a second input terminal receiving the quotient S from the second calculation circuit 32, and the selector 34 includes a control input terminal, the control input terminal receives the INC/DEC flag 38 from the third register 303, and the output terminal 42 of the selector 34 is connected to the residual distributor 35, and the residual distributor 35 also receives the INC/DEC flag 38 from the first calculation circuit The quotient T of 31 includes a control input terminal receiving the INC/DEC flag 38 from the third register 303 and a control output terminal 39 connected to the alpha serial generator 36 and the address generator 37. The residual distributor 35 determines when to perform a residual interpolation step during stretching of the digital image and when to delete a residual scan line during compression of the digital image. The α serial generator 36 receives the quotient T from the first calculation circuit 31 and the INC/DEC flag 38 from the third register 30c, and generates coefficients α, 1-α and the A storage command signal of the row buffer 4 (as shown in FIG. 1 ). The address generator 37 also receives the 1VC/DEC flag 38 from the third register 303 and provides line address data to the frame memory 2 .

如图4所示,该残余分布器35包括一个计算电路40、一个双输入的选择器41、一个中间数据寄存器56、一个双输入的加法器43、一个计算电路44、一个双输入的选择器45、一个时钟调变电路46及一个选择器47。As shown in Figure 4, the residual distributor 35 includes a calculation circuit 40, a double-input selector 41, an intermediate data register 56, a double-input adder 43, a calculation circuit 44, a double-input selector 45 . A clock modulation circuit 46 and a selector 47 .

该计算电路40输出N与ΔN差值。该选择器41具有一接收该计算电路40输出的第一输入端、一接收来自第一寄存器301的数值N的第二输入端及一接收来自该第三寄存器303的INC/DEC标识38的控制输入端。该中间数据寄存器56接收该选择器34的输出42(如图3)及具有一个连接至该双输入加法器43的一输入端的输出端。该加法器43的另一输入端则接收该选择器34的输出端42,该加法器43的输出端与该选择器41的输出端作为一计算电路44的输入端,该计算电路44是将该加法器43的输出扣除该选择器41的输出,当该加法器43的输出大于或等于该选择器41的输出时,该计算电路44在它的一个控制输出端39产生一使能信号。该双输入选择器45包括一接收该加法器43的第一输入端、一接收来自该计算电路44的该加法器43与该选择器41的输出差值的第二输入端、一与该计算电路44的控制输出端39连接的控制输入端及一与该中间数据寄存器56连接的输出端。The calculation circuit 40 outputs the difference between N and ΔN. The selector 41 has a first input terminal receiving the output of the calculation circuit 40, a second input terminal receiving the value N from the first register 301, and a control unit receiving the INC/DEC flag 38 from the third register 303. input. The intermediate data register 56 receives the output 42 of the selector 34 (as shown in FIG. 3 ) and has an output connected to an input of the two-input adder 43 . The other input end of this adder 43 then receives the output end 42 of this selector 34, the output end of this adder 43 and the output end of this selector 41 serve as the input end of a computing circuit 44, and this computing circuit 44 is The output of the adder 43 subtracts the output of the selector 41, and when the output of the adder 43 is greater than or equal to the output of the selector 41, the calculation circuit 44 generates an enable signal at a control output terminal 39 thereof. The dual-input selector 45 includes a first input terminal receiving the adder 43, a second input terminal receiving the output difference between the adder 43 and the selector 41 from the calculation circuit 44, and a connection with the calculation circuit 44. The control input 39 of the circuit 44 is connected to a control input and an output connected to the intermediate data register 56 .

该时钟调变电路46接收该原始输入线时钟及依据该控制输出端39的信号及来自该第一计算电路31的商数T调变该原始输入线时钟。该原始输入线时钟可以显示扫描线时钟,使该垂直扫描运行能够在该原始图像数据被输出,以供显示在一如打印机或者电脑显示器上的输出装置上。当该控制输出端39在高逻辑状态时,该时钟调变电路46输出一除以T+2时钟,且该除以T+2时钟具有该原始输入线时钟的T+2倍的时间延迟,而当该控制输出端39在低逻辑位状态时,该时钟调变电路46输出一除以T+1时钟,且该除以T+1时钟具有该原始输入线时钟的T+1倍的时间延迟。另外,该时钟调变电路46的输出端及该原始输入线时钟与该选择器47的输入端连接,而来自该第三寄存器30C的INC/DEC标识38则用来作为该选择器47的控制输入。该中间数据寄存器56包括一负载端LD,该负载端LD接收来自该选择器47输出的时钟信号mClock1。The clock modulation circuit 46 receives the original input line clock and modulates the original input line clock according to the signal of the control output terminal 39 and the quotient T from the first calculation circuit 31 . The raw input line clock can represent the scan line clock, enabling the vertical scan run to be outputted as raw image data for display on an output device such as a printer or computer monitor. When the control output terminal 39 is in a high logic state, the clock modulation circuit 46 outputs a divided by T+2 clock, and the divided by T+2 clock has a time delay of T+2 times the original input line clock, And when the control output terminal 39 is in the low logic bit state, the clock modulation circuit 46 outputs a clock divided by T+1, and the clock divided by T+1 has a time T+1 times that of the original input line clock Delay. In addition, the output terminal of the clock modulation circuit 46 and the original input line clock are connected to the input terminal of the selector 47, and the INC/DEC flag 38 from the third register 30C is used as the control of the selector 47 enter. The intermediate data register 56 includes a load terminal LD for receiving the clock signal mClock1 output from the selector 47 .

如图5所示,该α串列产生器36包括一系数产生器363、一选择器364及一减法器电路365。该系数产生器363与该计算电路44的控制输出端39连接且接收该原始输入线时钟及来自该第一计算电路31的商数T。当该控制输出端39在高逻辑位状态时,该系数产生器363在连续的(T+2)个原始输入线时钟周期中分别地产生连续的α系数1、1/(T+2)、2/(T+2)、…、(T+1)/(T+2)。当该控制输出端39在低逻辑位状态时,该系数产生器363在连续的(T+1)个原始输入线时钟周期中分别地产生连续的α系数1、1/(T+1)、2/(T+1)、…、T/(T+1)。该选择器364包括一被固定为1的第一输入端、一接收该系数产生器363的输出的第二输入端及一接收该INC/DEC标识38的控制输入端,而输出系数α作为该减法器电路365的一输入,该减法器电路365的另一输入端则被固定为1。该减法器电路365的一输出端输出系数1-α,另一输出端则输出该行缓冲器4(如图1)的储存指令信号。而当该系数1-α。另一输出端则输出该行缓冲器4(如图1)的储存指令信号。而当该系数1-α等于0时(即α=1),该减法器电路365产生该储存指令信号。As shown in FIG. 5 , the α-series generator 36 includes a coefficient generator 363 , a selector 364 and a subtractor circuit 365 . The coefficient generator 363 is connected to the control output terminal 39 of the calculation circuit 44 and receives the original input line clock and the quotient T from the first calculation circuit 31 . When the control output terminal 39 is in a high logic bit state, the coefficient generator 363 generates successive alpha coefficients 1, 1/(T+2), 2/(T+2), ..., (T+1)/(T+2). When the control output terminal 39 is in a low logic bit state, the coefficient generator 363 generates successive alpha coefficients 1, 1/(T+1), 2/(T+1), ..., T/(T+1). The selector 364 includes a first input terminal fixed to 1, a second input terminal receiving the output of the coefficient generator 363, and a control input terminal receiving the INC/DEC flag 38, and the output coefficient α is used as the One input of the subtractor circuit 365 and the other input terminal of the subtractor circuit 365 are fixed at 1. One output terminal of the subtracter circuit 365 outputs the coefficient 1−α, and the other output terminal outputs the storage instruction signal of the row buffer 4 (as shown in FIG. 1 ). And when the coefficient 1-α. The other output end outputs the storage instruction signal of the row buffer 4 (as shown in FIG. 1 ). And when the coefficient 1−α is equal to 0 (ie α=1), the subtracter circuit 365 generates the storage instruction signal.

如图6所示,该地址产生器37包括一计算电路371、一加法器372、一选择器373、一加法器374、一地址寄存器375、一锁存电路376、一时钟调变电路377及一选择器378。As shown in Figure 6, this address generator 37 comprises a calculation circuit 371, an adder 372, a selector 373, an adder 374, an address register 375, a latch circuit 376, a clock modulation circuit 377 and A selector 378.

该计算电路371输出N除以N-ΔN所得到的商数V,该商数V相当于当该数字图像数据被压缩时,在该帧存储器2的数字图像的两被选择扫描线的差数,该商数V及该控制输出39作为该加法器372的输入端,而该加法器372的输出端则作为该选择器373的一输入端,而该选择器373的另一输入端则被固定为1,而该INC/DEC标识38则作为该选择器373的一控制输入端。该选择器373所产生的一差数则被递送至该加法器374。该加法器374的输出端被连接至该地址寄存器375,该地址寄存器375的输出端再被连接至该加法器374,该地址寄存器375有一起始输入端Start,用以设定该帧存储器2中第一条扫描线地址,而该地址寄存器375更具有一负载端LD,用以控制下一地址的更新。The calculation circuit 371 outputs the quotient V obtained by dividing N by N-ΔN, which is equivalent to the difference between the two selected scanning lines of the digital image in the frame memory 2 when the digital image data is compressed. , the quotient V and the control output 39 are used as the input of the adder 372, and the output of the adder 372 is used as an input of the selector 373, and the other input of the selector 373 is used is fixed at 1, and the INC/DEC flag 38 is used as a control input terminal of the selector 373 . A difference generated by the selector 373 is delivered to the adder 374 . The output end of this adder 374 is connected to this address register 375, and the output end of this address register 375 is connected to this adder 374 again, and this address register 375 has an initial input end Start, in order to set this frame memory 2 The address of the first scan line, and the address register 375 further has a load terminal LD for controlling the update of the next address.

该锁存电路376是依该原始输入线时钟对该控制输出端39作取样及保持,该时钟调变电路377接收该原始输入线时钟并依照该锁存电路376的输出与来自该第一计算电路31的商数T调变该原始输入线时钟。该锁存电路376的输出在高位逻辑状态时,该时钟调变电路377输出一除以T+2倍的时间延迟,当该锁存电路376的输出在低逻辑位状态时,该时钟调变电路377输出一除以T+1时钟,且该除以T+1时钟具有该原始输入线时钟的T+1倍的时间延迟。该选择器378接收该原始输入线时钟及该时钟调变电路377的输出,借由该INC/DEC标识38选择一时钟输出mClock2,而该时钟输出mClock2则被该地址寄存器375的负载端LD所接收。The latch circuit 376 samples and holds the control output terminal 39 according to the original input line clock. The quotient T of circuit 31 modulates the original input line clock. When the output of the latch circuit 376 is in a high logic state, the clock modulation circuit 377 outputs a time delay divided by T+2 times. When the output of the latch circuit 376 is in a low logic state, the clock modulation Circuit 377 outputs a divide-by-T+1 clock with a time delay of T+1 times the original input line clock. The selector 378 receives the original input line clock and the output of the clock modulating circuit 377, and selects a clock output mClock2 through the INC/DEC flag 38, and the clock output mClock2 is selected by the load terminal LD of the address register 375 take over.

该水平伸缩控制器10的构造与在图3~6所示的垂直伸缩控制器6的构造相似。该两控制器6、10之间的不重要差别是存在的。例如,在该水平伸缩控制器10中,该可编程寄存器组的第一寄存器是被使用来储存在该帧存储器2中的每条原始扫描线的数字图像的N’个像素数据,而该第二寄存器是被使用来储存每条扫描线的要被内插或者删除的ΔN’个像素数据。该第三寄存器储存一INC/DEC标识,该标识用来指出在一水平方向的数字图像的伸展或者压缩是否要被执行。该第一计算电路产生对应在要被插入在来自该双线性加法器5的扫描线数据的每两个像素数据之间的最小数目的内插像素数据的商数T’。当该数字图像被伸展时,该第二计算电路产生对应于要被均匀分布在来自该双线性加法器5的扫描线数据的像素数据之间的残余内插像素数据的总数的商数S’。当该数字图像被压缩时,该第三计算电路产生对应于要从来自该双线性加法器5的扫描线数据删除的残余像素数据的总数的商数U’。代替一存储命令信号,该水平伸缩控制器10的α串列产生器产生一锁存命令信号给该点缓冲器8。输入至该地址产生器、该α串列产生器和该残余分布器的时钟是原始像素时钟。该原始像素时钟可以为显示点时钟,以致于该水平伸缩运行能够在该原始图像数据被输出,以供显示在该输出装置上。该水平伸缩控制器10的地址寄存器的地址输出是一个被用来控制该行存储器3和该行缓冲器4的点地址。因此,在水平方向的伸展期间,在第n和n+1条原始扫描线和内插扫描线间的所有像素数据,如果有的话,只要通过该双线性加法器。当在垂直和水平方向的压缩时,只有被挑选的一条原始扫描线所选择的一个像素数据通过该双线性加法器5。The structure of the horizontal telescopic controller 10 is similar to that of the vertical telescopic controller 6 shown in FIGS. 3-6 . Insignificant differences between the two controllers 6, 10 exist. For example, in the horizontal scaling controller 10, the first register of the programmable register set is used to store the N' pixel data of the digital image of each original scanning line in the frame memory 2, and the first register The second register is used to store ΔN' pixel data to be interpolated or deleted for each scan line. The third register stores an INC/DEC flag indicating whether stretching or compression of digital images in a horizontal direction is to be performed. The first calculation circuit generates a quotient T' corresponding to the minimum number of interpolated pixel data to be inserted between every two pixel data of the scan line data from the bilinear adder 5. When the digital image is stretched, the second computing circuit generates a quotient S corresponding to the total number of residual interpolated pixel data to be evenly distributed between the pixel data of the scan line data from the bilinear adder 5 '. The third calculation circuit generates a quotient U' corresponding to the total number of residual pixel data to be deleted from the scan line data from the bilinear adder 5 when the digital image is compressed. Instead of a store command signal, the alpha serial generator of the pan controller 10 generates a latch command signal to the dot buffer 8 . The clock input to the address generator, the alpha-serial generator and the residual distributor is a raw pixel clock. The raw pixel clock may be a display dot clock such that the panning operation can be output on the raw image data for display on the output device. The address output of the address register of the horizontal scaling controller 10 is a point address used to control the row memory 3 and the row buffer 4 . Thus, during stretching in the horizontal direction, all pixel data between the nth and n+1th original scan lines and the interpolated scan line, if any, simply passes through the bilinear adder. When compressing in the vertical and horizontal directions, only one selected pixel data of one selected original scanning line passes through the bilinear adder 5 .

因此,本实施例可用来同时执行在垂直方向的伸展或压缩以及在水平方向的伸展或压缩。运行如下所述:Therefore, this embodiment can be used to simultaneously perform expansion or compression in the vertical direction and expansion or compression in the horizontal direction. Run as described below:

A.为了方便最佳实施例的垂直伸展运行说明,提供了一具有五条原始扫描线和每条扫描线有五个像素数据的原始数字图像被伸展得到一具有七条目的扫描线和每条扫描线有五个像素数据的目的数字图像的例子。A. To facilitate the description of the vertical stretch operation of the preferred embodiment, a raw digital image with five raw scan lines and five pixel data per scan line is stretched to obtain a seven-entry scan line with five pixel data per scan line. An example of a digital image for the purpose of pixel data.

如图3所示,该垂直伸缩控制器6的可编程的寄存器组30最初被设定为在该第一寄存器301中储存数字“5”、在该第二寄存器302中储存数字“2”及在该第三寄存器303中储存一逻辑“1”;该数字“5”相当于在该帧存储器2的该原始图像数据的原始扫描线数量N,该数字“2”相当于被插入的扫描线总数△N,在该第三寄存器303的该逻辑1则指示该数字图像数据在该垂直方向的伸展要被执行。然后,该水平伸缩控制器10的可编程规划寄存器组被编程,来指出在每条原始扫描线中有五个像素数据、没有像素数据要被内插在每条原始扫描线、及该原始数字图像在水平方向的伸展要被执行。该第一计算电路31输出ΔN除以N-1所得到的商数T,因为ΔN小于N-1,所以该商数T等于0。该第二计算电路32输出ΔN除以N-1所得到的商数S,在这个例子中,该商数S等于2。该第三计算电路33则为不相关的,因为在伸展操作期间,该选择器34提供该第二计算电路32的输出给该残余分布器35,该水平伸缩控制器10的第一、第二和第三计算电路的输出为0,因为没有水平伸展或压缩运行要被执行。As shown in Figure 3, the programmable register set 30 of the vertical scaling controller 6 is initially set to store the number "5" in the first register 301, store the number "2" in the second register 302 and A logic "1" is stored in the third register 303; the number "5" is equivalent to the original scanning line number N of the original image data in the frame memory 2, and the number "2" is equivalent to the inserted scanning line A total of ΔN, the logic 1 in the third register 303 indicates that stretching of the digital image data in the vertical direction is to be performed. Then, the programmable planning register group of this horizontal scaling controller 10 is programmed, to indicate that there are five pixel data in each original scan line, no pixel data to be interpolated in each original scan line, and the original number Stretching of the image in the horizontal direction is to be performed. The first calculation circuit 31 outputs a quotient T obtained by dividing ΔN by N−1, and since ΔN is smaller than N−1, the quotient T is equal to 0. The second calculation circuit 32 outputs a quotient S obtained by dividing ΔN by N−1, which is equal to 2 in this example. The third computing circuit 33 is irrelevant because during stretching operation, the selector 34 provides the output of the second computing circuit 32 to the residual distributor 35, the first, second and the output of the third calculation circuit is 0 because no horizontal stretching or compression operation is to be performed.

如图1、3、7所示,该地址产生器37的地址寄存器375最初设定储存在该帧存储器2的该原始扫描线的第一原始扫描线的线地址,并且控制该帧存储器2提供该原始扫描线的第一原始扫描线至该行存储器3,同时,该中间数据寄存器56存入该商数S,而后该加法器43再将该商数S及该中间数据寄存器56的内容相加,因为该加法器43的输出为4而小于N(N等于5),因此该计算电路44的控制输出端39在低逻辑位状态,该选择器45将该加法器43的输出提供给该中间数据寄存器56及提供该中间数据寄存器56的时钟输入mClock1为一除以T+1的时钟,因为该商数T等于0,所以该时钟输入mClock1恰好与该原始输入线时钟相同。As shown in Figures 1, 3, and 7, the address register 375 of the address generator 37 initially sets the line address of the first original scanning line stored in the original scanning line of the frame memory 2, and controls the frame memory 2 to provide The first original scan line of this original scan line is sent to this line memory 3, simultaneously, this quotient S is stored in this intermediate data register 56, then this adder 43 compares this quotient S and the content of this intermediate data register 56 again Add, because the output of the adder 43 is 4 and less than N (N equals to 5), so the control output terminal 39 of the calculation circuit 44 is in a low logic bit state, and the selector 45 provides the output of the adder 43 to the The intermediate data register 56 and the clock input mClock1 providing the intermediate data register 56 is a clock divided by T+1, which is exactly the same as the original input line clock because the quotient T is equal to 0.

因为该控制输出端39在低逻辑状态且因为该商数T等于0,所以该系数产生器363提供该数字“1”给该选择器364,因为该INC/DEC标识38在逻辑“1”,该选择器364选择该系数产生器363的输出当作加权系数α,因为该系数α等于1,因此该系数1-α等于0,并且产生该储存指令信号,以方便控制该行缓冲器4储存来自该行存储器3的该原始扫描线的第一原始扫描线,在这一阶段中该双线性加法器5的输出为该原始扫描线的第一原始扫描线。Because the control output 39 is at a low logic state and because the quotient T is equal to 0, the coefficient generator 363 provides the digital "1" to the selector 364 because the INC/DEC flag 38 is at logic "1", The selector 364 selects the output of the coefficient generator 363 as the weighting coefficient α, because the coefficient α is equal to 1, so the coefficient 1-α is equal to 0, and generates the storage command signal to facilitate the control of the row buffer 4 to store The first original scan line of the original scan line from the line memory 3, the output of the bilinear adder 5 at this stage is the first original scan line of the original scan line.

该选择器373提供一等于1的差值给该加法器374,因此,当下一个线时钟mClock2到达时,该加法器374会使该地址寄存器375的输出增加一个单位,藉此控制该帧存储器2,提供该原始扫描线的第二条扫描线至该行存储器3。The selector 373 provides a difference equal to 1 to the adder 374. Therefore, when the next line clock mClock2 arrives, the adder 374 will increase the output of the address register 375 by one unit, thereby controlling the frame memory 2 , providing the second scan line of the original scan line to the line memory 3 .

当下一个线时钟mClock1到达时,该中间数据寄存器56储存该加法器43先前的输出(等于4),在此时,该加法器43的输出(等于6)大于N(等于5),使该计算电路44的控制输出端39在高逻辑状态,该选择器45提供该加法器43的输出及该选择器41的输出的差值给该中间数据寄存器,并且该时钟输入mClock1,此时等于除以T+2时钟,具有该原始输入线时钟两倍的延迟时间。When the next line clock mClock1 arrives, the intermediate data register 56 stores the previous output (equal to 4) of the adder 43. At this time, the output of the adder 43 (equal to 6) is greater than N (equal to 5), making the calculation The control output terminal 39 of the circuit 44 is in a high logic state, and the selector 45 provides the difference between the output of the adder 43 and the output of the selector 41 to the intermediate data register, and the clock input mClock1 is equal to dividing by T+2 clock with twice the delay time of the original input line clock.

该控制输出端39在高逻辑状态,该系数产生器363在一时钟mClock(即二连续的原始输入线时钟)期间产生连续的两输出1及1/2。当该第一原始输入线时钟期间内,因该系数α等于1,所以该双线性加法器5输出该原始扫描线的第二原始扫描线,同时将该第二原始扫描线储存在该行缓冲器4中,在该第二原始输入线时钟期间,该地址寄存器375的内容在下一个时钟输入mClock2时被增加一个单位,此时该系数产生器363的输出等于1/2,该系数α等于1/2,该系数1-α等于1/2,所以没有储荐指令信号产生。因此,该原始扫描线的第二原始扫描线保留在该行缓冲器4中,在这一阶段中该双线性加法器5的输出为该原始扫描线的第二原始扫描线及第三原始扫描线的双线性内插。The control output 39 is at a high logic state, and the coefficient generator 363 generates two consecutive outputs 1 and 1/2 during a clock mClock (ie, two consecutive original input line clocks). During the clock period of the first original input line, because the coefficient α is equal to 1, the bilinear adder 5 outputs the second original scan line of the original scan line, and stores the second original scan line in the row In the buffer 4, during the second original input line clock, the content of the address register 375 is increased by one unit when the next clock is input to mClock2, at this moment, the output of the coefficient generator 363 is equal to 1/2, and the coefficient α is equal to 1/2, the coefficient 1-α is equal to 1/2, so no recommendation signal is generated. Therefore, the second original scan line of the original scan line remains in the row buffer 4, and the output of the bilinear adder 5 at this stage is the second original scan line and the third original scan line of the original scan line. Bilinear interpolation of scanlines.

该中间数据寄存器56的内容在下一时钟输入mClock1到达时被更新为1,也就是该加法器43及该数字N的差值。该加法器43的输出小于N,使得该控制输出端39在低逻辑状态,该选择器45提供该加法器43的输出给该中间数据寄存器56,及提供给该中间数据寄存器56的时钟输入mClock1为除以T+1时钟,且来自该α串列产生器36的系数α等于1。该双线性加法器5的输出为该等原始扫描线的第三原始扫描线,而因为该系数α等于1,因此该原始扫描线的第三原始扫描线被储存在该行缓冲器4中。The content of the intermediate data register 56 is updated to 1 when the next clock input mClock1 arrives, that is, the difference between the adder 43 and the number N. The output of the adder 43 is less than N, so that the control output 39 is in a low logic state, the selector 45 provides the output of the adder 43 to the intermediate data register 56, and the clock input mClock1 of the intermediate data register 56 is divided by the T+1 clock, and the coefficient α from the α-serial generator 36 is equal to 1. The output of the bilinear adder 5 is the third original scan line of the original scan lines, and because the coefficient α is equal to 1, the third original scan line of the original scan line is stored in the line buffer 4 .

该垂直伸缩单元的后续运行与上述相似直到第五条原始扫描线由该双线性加法器5输出为止。The subsequent operation of the vertical scaling unit is similar to the above until the fifth original scan line is output by the bilinear adder 5 .

图7为上述最佳实施例的操作时序图,其中N=5及ΔN=2。FIG. 7 is an operation timing diagram of the above preferred embodiment, where N=5 and ΔN=2.

依上所述,该垂直伸缩控制器6控制该双线性加法器5,执行该原始扫描线的第n条及第n+1条扫描线的双线性内插,其中该第n条扫描线储存在该行缓冲器4中,而该第n+1条扫描线储存在该行存储器3中,以方便当△N除以N-1得到一商数S且当(n+1)×(S)≥(s)×(N)的条件下,n为最小时,制造一插入在该原始扫描线的第n条及第n+1条原始扫描线间的残余插补补扫描线,其中s的范围是从1至S。As mentioned above, the vertical scaling controller 6 controls the bilinear adder 5 to perform bilinear interpolation of the nth and n+1th scanning lines of the original scanning line, wherein the nth scanning line line is stored in the row buffer 4, and the n+1th scanning line is stored in the row memory 3, so that when ΔN is divided by N-1 to obtain a quotient S and when (n+1)× Under the condition of (S)≥(s)×(N), when n is the minimum, create a residual interpolation scan line inserted between the nth and n+1 original scan lines of the original scan line, where s ranges from 1 to S.

如图1所示,由于没有水平伸缩操作要被执行,该水平伸缩控制器10控制该行存储器3和该行缓冲器4来依序提供被储存于其内的像素数据到该双线性加法器5。来自该双线性加法器5的原始扣内插像素数据由该点寄存器7接收,该点寄存器7依次提供该原始和内插像素数据到该双线性加法器9。在这时,该系数α经常等于1,而且该点缓冲器8的输出是由该双线性加法器9所忽略。该双线性加法器9的输出与该双线性加法器5的输出相等而且能够直接被提供到该输出装置(图未示)。As shown in FIG. 1, since no horizontal scaling operation is to be performed, the horizontal scaling controller 10 controls the line memory 3 and the line buffer 4 to sequentially provide the pixel data stored therein to the bilinear addition device 5. The raw plus interpolated pixel data from the bilinear adder 5 is received by the point register 7 which in turn provides the raw and interpolated pixel data to the bilinear adder 9 . At this time, the coefficient α is always equal to 1, and the output of the point buffer 8 is ignored by the bilinear adder 9 . The output of the bilinear adder 9 is equal to the output of the bilinear adder 5 and can be directly provided to the output device (not shown).

在这例子中,ΔN除以N-1所得到商数T为0。如果该商数T不等于0,也就是1N大于或等于N-1,该垂直伸缩控制器6还控制该双线性加法器5执行该原始扫描线的第n条及第n+1条原始扫描线的双线性内插,以制造T个附加的连续插补扫描线插入该原始扫描线的第n条及第n+1条原始扫描线之间。图8是当N=5且ΔN=6时由该最佳实施例所执行的取样垂直伸展运行的时序图。在这个例子中,该商数等于1,且该商数等于2,很明显地,除了两条残余插补扫描线之外,在该原始扫描线的每两条相邻扫描线之间都有一附加的内插扫描线。In this example, the quotient T obtained by dividing ΔN by N-1 is 0. If the quotient T is not equal to 0, that is, 1N is greater than or equal to N-1, the vertical scaling controller 6 also controls the bilinear adder 5 to execute the nth and n+1th original scanning lines of the original scanning line. Bilinear interpolation of scan lines to create T additional consecutive interpolated scan lines inserted between the nth and n+1th original scan lines. Figure 8 is a timing diagram of the sampling vertical stretch operation performed by the preferred embodiment when N=5 and ΔN=6. In this example, the quotient is equal to 1, and the quotient is equal to 2. It is obvious that, except for the two residual interpolated scan lines, there is a Additional interpolated scanlines.

B.在以下的例子中,是一具有五条原始扫描线且每条扫描线有五个像素数据的原始数字图像被压缩,可得到一具有三条目的扫描线且每条扫描线有五个像素数据的目的数字图像。B. In the following example, a raw digital image with five original scan lines and five pixel data per scan line is compressed to obtain a three-entry scan line with five pixel data per scan line digital image.

如图3所示,该编程的寄存器组30被设定为在该第一寄存器301中储存数值“5”、在该第二寄存器302中储存数值“2”及在该第三寄存器303中储存一逻辑“0”。该数值“5”相当于在该帧存储器2中的该原始图像数据的原始扫描线数量N,该数值“2”相当于被删除的扫描线总数ΔN,在该第三寄存器303的该逻辑。则指示该数字图像数据的执行压缩操作。然后该水平伸缩控制器10的可编程规划寄存器组被编程来指出在每条原始扫描线中是有五个像素数据、没有像素数据要被内插于每条原始扫描线、及原始数字图像在水平方向的伸展是要被执行。As shown in Figure 3, the programmed register set 30 is set to store the value "5" in the first register 301, store the value "2" in the second register 302 and store the value "2" in the third register 303. A logic "0". The value “5” corresponds to the number N of original scan lines of the original image data in the frame memory 2 , the value “2” corresponds to the total number of deleted scan lines ΔN, the logic in the third register 303 . Then instructs the digital image data to perform a compression operation. The programmable programming register set of the horizontal scaling controller 10 is then programmed to indicate that there are five pixel data in each original scan line, that no pixel data is to be interpolated in each original scan line, and that the original digital image is Horizontal stretching is to be performed.

压缩操作期间时,该第一及第二计算电路31、32的输出是不相关的,该第三计算电路33输出N除以N-ΔN所得到的商数U,其中N-ΔN是被保留该原始扫描线的数目,在本实施例中,该商数U等于2。该选择器34提供该第三计算电路33的输出给该残余分布器35。During compression operation, the outputs of the first and second computing circuits 31, 32 are uncorrelated, and the third computing circuit 33 outputs the quotient U obtained by dividing N by N-ΔN, where N-ΔN is retained The number of the original scan lines, in this embodiment, the quotient U is equal to 2. The selector 34 provides the output of the third calculation circuit 33 to the residual distributor 35 .

如图1、3、6、9所示,该地址产生器37的地址寄存器375最先设定储存在该帧存储器2中的该原始扫描线的第一原始扫描线的线地址,及在一启始线时钟期间控制该帧存储器2提供该原始扫描线的第一原始扫描线给该行存储器3,同时,该商数U被储存在该中间数据寄存器56中,而后该加法器43再将该商数与该中间数据寄存器56的内容相加,该计算电路44将来自该加法器43的输出减去来自该选择器41的数值N-ΔN,因为该加法器43’的输出在此时等于4且大于N-ΔN(等于3),因此该计算电路44的控制输出端39处于高逻辑状态。该选择器45提供该加法器43的输出与该选择器41的输出间的差值给该中间数据寄存器56,而该原始线时钟借由该选择器47被供给该中间数据寄存器56。As shown in Figures 1, 3, 6, and 9, the address register 375 of the address generator 37 first sets the line address of the first original scanning line stored in the frame memory 2, and in a Control the frame memory 2 to provide the first original scan line of the original scan line to the line memory 3 during the start line clock period, and at the same time, the quotient U is stored in the intermediate data register 56, and then the adder 43 will The quotient is added to the content of the intermediate data register 56, and the calculation circuit 44 subtracts the value N-ΔN from the selector 41 from the output of the adder 43, because the output of the adder 43' is at this time is equal to 4 and greater than N-[Delta]N (equal to 3), so the control output 39 of the calculation circuit 44 is in a high logic state. The selector 45 provides the difference between the output of the adder 43 and the output of the selector 41 to the intermediate data register 56 , and the raw line clock is supplied to the intermediate data register 56 via the selector 47 .

如图3、5所示,因为一逻辑“0”被储存在该第三寄存器303中,因此该选择器364维持该系数α为1,而系数1-α因此等于0,因而该储存指令信号一直被产生,以便于作动该行缓冲器4持续地由该行存储器3储存一原始扫描线,此外,该双线性加法器5的输出一直是该行存储器3的输出。As shown in Figures 3 and 5, because a logic "0" is stored in the third register 303, the selector 364 maintains the coefficient α as 1, and the coefficient 1-α is therefore equal to 0, so the store command signal is always generated so that the line buffer 4 can continuously store an original scan line from the line memory 3 , and the output of the bilinear adder 5 is always the output of the line memory 3 .

如图6所示,该计算电路371输出N除以N-ΔN所得到的商数V,在这个例子中,该商数V等于1,该加法器372产生该商数V与该控制输出端39的即时逻辑状态的和数,此时的逻辑状态为高逻辑状态,该选择器373选择该加法器372的输出(等于2),并且提供相同的输出给该加法器374,因此,该地址寄存器375的输出在下一时钟输入mClock2到达时增加两个单位,藉此控制该帧存储器2,提供该等原始扫描线的第三原始扫描线至该行存储器3。As shown in Figure 6, the calculation circuit 371 outputs the quotient V obtained by dividing N by N-ΔN. In this example, the quotient V is equal to 1, and the adder 372 generates the quotient V and the control output terminal The sum number of the instant logic state of 39, the logic state at this moment is high logic state, and this selector 373 selects the output (equaling 2) of this adder 372, and provides identical output to this adder 374, therefore, this address The output of register 375 is incremented by two units when the next clock input mClock2 arrives, thereby controlling the frame memory 2 to provide the third original scan line of the original scan lines to the row memory 3 .

如图4所示,直到下一个线时钟到达,该中间数据寄存器56储存由该计算电路44计算得到的前一差数“1”,此时,该加法器43的输出(等于3)等于该选择器41的输出,该计算电路44的控制输出端39在高逻辑状态,且该选择器45提供该加法器43的输出与该选择器41的输出间的差数给该中间数据寄存器56。As shown in Figure 4, until the arrival of the next line clock, the intermediate data register 56 stores the previous difference "1" calculated by the calculation circuit 44, at this time, the output of the adder 43 (equal to 3) is equal to the The output of the selector 41 , the control output 39 of the calculation circuit 44 is at a high logic state, and the selector 45 provides the difference between the output of the adder 43 and the output of the selector 41 to the intermediate data register 56 .

如图6所示,该加法器372再一次地产生该商数V与该控制输出端39的即时逻辑状态的和数;该加法器372的输出(等于2)藉由该选择器373被提供至该加法器374,因此,该地址寄存器375的输出在当下一时钟输入mClock2到达时,将再被增加二个单位,藉此控制该帧存储器2提供该原始扫描线的第五原始扫描线给该行存储器3。图9是以此最佳实施例垂直压缩运行的时序图,也就是N=5和ΔN=2。就这例子来说,水平伸缩单元的运行与上述的相同,因此不再重覆。As shown in Figure 6, the adder 372 again produces the sum of the quotient V and the immediate logic state of the control output 39; the output of the adder 372 (equal to 2) is provided via the selector 373 to the adder 374, therefore, the output of the address register 375 will be increased by two units when the next clock input mClock2 arrives, thereby controlling the frame memory 2 to provide the fifth original scan line of the original scan line to The line memory 3. Figure 9 is a timing diagram for the vertical compression operation of this preferred embodiment, ie N=5 and ΔN=2. For this example, the operation of the horizontal scaling unit is the same as described above, so it will not be repeated.

承上所述,该垂直伸缩控制器6的地址产生器37控制该帧存储器2只输出该原始扫描线中的被选择的扫描线。而在该帧存储器2中未被输出的该原始扫描线事实上是被抛弃的,而且,当该残余分布器35的加法器43的输出小于该差数N-ΔN时,由该帧存储器2中被输出的原始扫描线与由该帧存储器2输出的原始扫描线的差数为V,当加法器43的输出至少等于该差数N-ΔN时,由该帧存储器2中被输出的原始扫描线与由该帧存储器2输出的原始扫描线的差数值为V+1。As mentioned above, the address generator 37 of the vertical scaling controller 6 controls the frame memory 2 to output only the selected scan lines in the original scan lines. And in this frame memory 2, this original scanning line that is not output is discarded in fact, and, when the output of the adder 43 of this residue distributor 35 is less than this difference number N-ΔN, by this frame memory 2 The difference between the output original scan line and the original scan line output by the frame memory 2 is V, when the output of the adder 43 is at least equal to the difference N-ΔN, the original output by the frame memory 2 The difference between the scan line and the original scan line output by the frame memory 2 is V+1.

C.以下实施例的水平伸展操作说明中,具有五条原始扫描线且每条扫描线有五个像素数据的原始数字图像被伸展,可得到一具有五条目的扫描线且每条扫描线有七个像素数据。C. In the horizontal stretching operation description of the following embodiment, the original digital image with five original scan lines and five pixel data per scan line is stretched, and a scan line with five entries and seven pixel data per scan line can be obtained .

该垂直伸缩控制器6的可编程寄存器组30开始是被编程来指出在该帧存储器2中是有五条原始扫描线、且该原始数字图像在垂直方向的伸展被执行。然后该水平伸缩控制器10的可编程寄存器组借着善储存数值“5”在该第一寄存器、数值“2”在该第二寄存器、及逻辑“1”在该第三寄存器来被编程。该数值“5”对应于在该帧存储器2内的每条原始扫描线中的像素数据的数量N’。该数值“2”对应于每条扫描线要被内插的像素数据的总量ΔN’。在该第三寄存器内的逻辑“1”指出该原始数字数据在水平方向的伸展是要被执行。The programmable register set 30 of the vertical stretch controller 6 is initially programmed to indicate that there are five original scan lines in the frame memory 2 and that stretching of the original digital image in the vertical direction is performed. The programmable register set of the pan controller 10 is then programmed by storing a value of "5" in the first register, a value of "2" in the second register, and a logic "1" in the third register. The value "5" corresponds to the number N' of pixel data in each original scanning line in the frame memory 2. The value "2" corresponds to the total amount ΔN' of pixel data to be interpolated per scanning line. A logic "1" in the third register indicates that horizontal stretching of the raw digital data is to be performed.

该垂直伸缩控制器6的第一、第二和第三计算电路31,32,33的输出为0,因为没有垂直伸展或压缩运行要被执行。该水平伸缩控制器10的第一计算电路输出由ΔN’除以N’-1所得到的商数T’。该水平伸缩控制器10的第二计算电路输出由ΔN’除以N’-1所得到的商数S’。本实施例中,该商数S’等于2。该水平伸缩控制器10的第三计算电路的输出是没有关系的,因为该第二计算电路的输出在水平伸展运行期间是被提供至该残余分布器。The output of the first, second and third computing circuits 31, 32, 33 of the vertical stretching controller 6 is 0, since no vertical stretching or compression operation is to be performed. The first calculation circuit of the horizontal scaling controller 10 outputs a quotient T' obtained by dividing ΔN' by N'-1. The second computing circuit of the horizontal scaling controller 10 outputs a quotient S' obtained by dividing ΔN' by N'-1. In this embodiment, the quotient S' is equal to 2. The output of the third computing circuit of the panning controller 10 is irrelevant because the output of the second computing circuit is provided to the residual distributor during panning operation.

由于没有垂直伸缩运行要被执行,该垂直伸缩控制器6控制该帧存储器2依序提供该原始扫描线至该行存储器3。该水平伸缩控制器10控制该行存储器3和该行缓冲器4,来依序提供被储存于其内的像素数据至该双线性加法器5。此时,来自该垂直伸缩控制器6的系数α经常等于1,而且该行缓冲器4的输出是被该双线性加法器5所忽略。该双线性加法器5的输出与该行存储器3的输出相等。Since there is no vertical scaling operation to be performed, the vertical scaling controller 6 controls the frame memory 2 to sequentially provide the original scan lines to the row memory 3 . The horizontal scaling controller 10 controls the row memory 3 and the row buffer 4 to sequentially provide the pixel data stored therein to the bilinear adder 5 . At this time, the coefficient α from the vertical scaling controller 6 is always equal to 1, and the output of the line buffer 4 is ignored by the bilinear adder 5 . The output of the bilinear adder 5 is equal to the output of the line memory 3 .

如上所述,该水平伸缩单元的伸展运行实质上与该垂直伸缩单元的伸展运行相似,但是与该垂直伸缩控制器6不同,该水平伸缩控制器10控制该双线性加法器9来执行被储存在该点缓冲器8内的第n’个原始像素数据,及被储存于该点寄存器7内的第n’+1个原始像素数据的双线性内插,可产生一个当ΔN’除以N’-1得到一余S’,当n’为满足条件(n’+1)×(s’)≥(s’)×(N’)的最小数值时,其中(s’)范围从1至(S’),是被插入在该第n’和第n’+1个原始像素数据间的残余内插像素数据。因此,就N’、ΔN’和S’分别等于5,2和2,残余内插像素数据要被插入在一扫描线的第二和第三个原始像素数据之间及在该第四和第五个原始像素数据之间。As mentioned above, the stretching operation of the horizontal scaling unit is substantially similar to that of the vertical scaling unit, but unlike the vertical scaling controller 6, the horizontal scaling controller 10 controls the bilinear adder 9 to perform the The bilinear interpolation of the n'th raw pixel data stored in the dot buffer 8 and the n'+1 raw pixel data stored in the dot register 7 can generate a value when ΔN' is divided by Get a remainder S' with N'-1, when n' is the minimum value that satisfies the condition (n'+1)×(s')≥(s')×(N'), where (s') ranges from 1 to (S'), are residual interpolated pixel data inserted between the n'th and n'+1th original pixel data. Therefore, for N', ΔN' and S' equal to 5, 2 and 2 respectively, the residual interpolated pixel data is to be interpolated between the second and third raw pixel data of a scan line and between the fourth and third Between five raw pixel data.

该水平伸缩控制器10最初设定被储存于该行存储器3的扫描线数据的第一个像素数据的点地址并且控制该行存储器3,来提供该第一个像素数据到该双线性加法器5,可在一起始像素时钟期间由该点寄存器7接收。来自该水平伸缩控制器10的系数α等于1,而且该锁存命令信号产生可控制该点缓冲器8来储令存来自该点寄存器7的该第一个原始像素数据在其内。在这阶段该双线性加法器9的输出该第一个原始像素数据,而且可以被直接提供到该输出装置(图未示)。The horizontal scaling controller 10 initially sets the point address of the first pixel data of the scan line data stored in the line memory 3 and controls the line memory 3 to provide the first pixel data to the bilinear addition device 5, which can be received by the dot register 7 during the initial pixel clock. The coefficient α from the pan controller 10 is equal to 1, and the latch command signal can control the dot buffer 8 to store the first raw pixel data from the dot register 7 therein. The output of the bilinear adder 9 at this stage is the first raw pixel data, and can be directly provided to the output device (not shown).

这时,该水平伸缩控制器10控制该行存储器3来提供第二个原始像素数据到该双线性加法器5,以供该点寄存器7接收。该水平伸缩控制器10在两个连续的原始像素时钟内连续产生两个α系数1和1/2。在该第一原始像素时钟内,该双线性加法器9输出该第二个原始像素数据,而且,在相同的时间,后者是被储存在该点缓冲器8内,因为该系数α等于1。在该第二原始像素时钟内,该行存储器3提供第三个原始像素数据到该双线性加法器5,以供该点寄存器7接收。该系数α现在是等于1/2,而且该第二个原始像素数据依然在该点缓冲器8内。在这阶段,该双线性加法器9的输出为该第二和第三个原始像素数据的双线性内插。At this time, the horizontal scaling controller 10 controls the line memory 3 to provide the second original pixel data to the bilinear adder 5 for the dot register 7 to receive. The horizontal scaling controller 10 continuously generates two alpha coefficients 1 and 1/2 within two consecutive original pixel clocks. In the first raw pixel clock, the bilinear adder 9 outputs the second raw pixel data, and, at the same time, the latter is stored in the dot buffer 8, because the coefficient α is equal to 1. During the second raw pixel clock, the line memory 3 provides the third raw pixel data to the bilinear adder 5 for the dot register 7 to receive. The coefficient α is now equal to 1/2, and the second raw pixel data is still in the dot buffer 8 . At this stage, the output of the bilinear adder 9 is the bilinear interpolation of the second and third raw pixel data.

在下一个原始像素时钟期间,来自该水平伸缩控制器10的系数α重回到1,而且该双线性加法器9的输出同时地被储存于该点缓冲器8内的该第三个原始像素数据。During the next raw pixel clock, the coefficient α from the horizontal scaling controller 10 returns to 1, and the output of the bilinear adder 9 is simultaneously stored in the third raw pixel in the dot buffer 8 data.

该水平伸缩单元的后面的运行与前述相似,直到一扫描线的第五个原始像素数据由该双线性加法器9输出为止。Subsequent operations of the horizontal scaling unit are similar to the foregoing, until the fifth original pixel data of a scan line is output by the bilinear adder 9 .

图10是最佳实施例的水平伸展运行的时序图,也就是N’=5且ΔN’=2。Fig. 10 is a timing diagram of the horizontal stretching operation of the preferred embodiment, that is, N'=5 and ΔN'=2.

在这例子中,由ΔN’除以N’-1所得的商数T’为0。如果该商数T’不是0的话,那ΔN’是大于或与N’-1相等,该水平伸缩器10控制该双线性加法器9来执行一扫描线的第n’和第n’+1个原始像素数据的双线性内插可产生被插入在该第n’与第n’+1个原始像素数据间的连续内插像素数据的额外数量T’。In this example, the quotient T' obtained by dividing ΔN' by N'-1 is zero. If the quotient T' is not 0, then ΔN' is greater than or equal to N'-1, the horizontal scaler 10 controls the bilinear adder 9 to perform the n'th and n'th+ The bilinear interpolation of 1 raw pixel data can generate an additional amount T' of consecutively interpolated pixel data interpolated between the n'th and n'+1th raw pixel data.

D.一具有五条原始扫描线且每条扫描线有五个像素数据的原始数字图像是被压缩,可得到一具有五条目的扫描线且每条扫描线有三个像素数据的目的数字图像。D. An original digital image with five original scan lines and five pixel data per scan line is compressed to obtain a destination digital image with five items of scan lines and three pixel data per scan line.

该垂直伸缩控制器6的可编程寄存器组30是最初被编程来指出在该帧存储器2中是有五条原始扫描线、没有扫描线要被内插、及该原始数字图像在垂直方向的伸展是要被执行。该水平伸缩控制器10的可编程寄存器组借着储存数值“5”在该第一寄存器、数值“2”在该第二寄存器、及逻辑“0”在该第三寄存器来被编程。该数值“5”是对应于该帧存储器2内的数字图像的每条原始扫描线的像素数据的数量N’。该数值“2”是对应于每条扫描线要被删除的像素数据的总量ΔN’。在该第三寄存器内的逻辑“0”可指出该原始数字数据在水平方向的压缩是要被执行的。The programmable register set 30 of the vertical scaling controller 6 is initially programmed to indicate that there are five original scan lines in the frame memory 2, that no scan lines are to be interpolated, and that the vertical stretch of the original digital image is to be executed. The programmable register set of the pan controller 10 is programmed by storing a value of "5" in the first register, a value of "2" in the second register, and a logic "0" in the third register. The value "5" is the number N' of pixel data corresponding to each original scanning line of the digital image in the frame memory 2. The value "2" corresponds to the total amount ΔN' of pixel data to be deleted per scanning line. A logic "0" in the third register may indicate that compression of the raw digital data in the horizontal direction is to be performed.

该垂直伸缩控制器6的第一、第二和第三计算电路31,32,33的输出为0,因为没有垂直伸展或压缩运行要被执行,因此,该垂直伸缩控制器6控制该帧存储器2依序提供该原始扫描线至该行存储器3。该水平伸缩控制器10控制该行存储器3和该行缓冲器4来提供被储存在其内的被选择的像素数据到该双线性加法器5。以本实施例来说,来自该垂直伸缩控制器6的系数α是经常等于1,而该行缓冲器4的输出是被该双线性加法器5所忽略。该双线性加法器5的输出与该行存储器3的输出相等。The output of the first, second and third calculation circuits 31, 32, 33 of the vertical scaling controller 6 is 0, because no vertical stretching or compression operation is to be performed, therefore, the vertical scaling controller 6 controls the frame memory 2. Sequentially provide the original scan lines to the line memory 3. The horizontal scaling controller 10 controls the line memory 3 and the line buffer 4 to provide the selected pixel data stored therein to the bilinear adder 5 . In this embodiment, the coefficient α from the vertical scaling controller 6 is always equal to 1, and the output of the line buffer 4 is ignored by the bilinear adder 5 . The output of the bilinear adder 5 is equal to the output of the line memory 3 .

该水平伸缩单元的压缩运行实质上与该垂直伸缩单元的压缩运行相似的,但是,在该水平伸缩单元中,该水平伸缩控制器10控制该行存储器3和该行缓冲器4只输出被选择的原始像素数据,要由该行存储器3和该行缓冲器4输出的原始像素数据,当该水平伸缩控制器10的残余分布器的加法器的输出小于差(N’-ΔN’)时,由该行存储器3和该行缓冲器4所输出的只在先前的原始像素数据偏移一数值V’,而当其他状态时,由该行存储器3和该行缓冲器4所输出的只在先前的原始像素数据偏移一数值V’+1,该数值V’为N’除以N’-ΔN’所得到的商数。The compression operation of the horizontal scaling unit is substantially similar to the compression operation of the vertical scaling unit, however, in the horizontal scaling unit, the horizontal scaling controller 10 controls the line memory 3 and the line buffer 4 to only output selected The original pixel data of the original pixel data to be output by the line memory 3 and the line buffer 4, when the output of the adder of the residual distributor of the horizontal scaling controller 10 is less than the difference (N'-ΔN'), The output from the line memory 3 and the line buffer 4 is only offset by a value V' in the previous original pixel data, while in other states, the output from the line memory 3 and the line buffer 4 is only in the The previous original pixel data is offset by a value V'+1, and the value V' is the quotient obtained by dividing N' by N'-ΔN'.

该水平伸缩控制器10的第一和第二计算电路的输出在该水平压缩运行期间是没有关系的。该第三计算电路输出由N’除以N’-ΔN’所得的商数U’,N’-ΔN’为每扫描线要被保持的原始像素数据数量,本实施例中,该商数U’是等于2而且是被提供至该水平伸缩控制器10的残余分布器。The outputs of the first and second computing circuits of the panning controller 10 are irrelevant during the panning operation. The third calculation circuit outputs the quotient U' obtained by dividing N' by N'-ΔN', and N'-ΔN' is the number of original pixel data to be kept for each scanning line. In this embodiment, the quotient U ' is equal to 2 and is the residual distributor provided to the pan controller 10 .

该水平伸缩控制器10最初是设定被储存在该行存储器3内的一扫描线数据的第一个像素数据的点地址,并且控制该行存储器3在一起始像素时钟期间提供该第一个像素数据到该双线性加法器5,因为一逻辑“0”是被储存在该水平伸缩控制器10的第三寄存器内,来自该水平伸缩控制器10的系数α被保持在1,因此,该点缓冲器8是被用来持续储存来自该点寄存器7的像素数据,而且该双线性加法器9的输出经常为该点寄存器7的输出。The horizontal scaling controller 10 initially sets the dot address of the first pixel data of a scan line data stored in the line memory 3, and controls the line memory 3 to provide the first pixel data during the initial pixel clock period. Pixel data to the bilinear adder 5, since a logic "0" is stored in the third register of the pan controller 10, the coefficient α from the pan controller 10 is kept at 1, therefore, The dot buffer 8 is used to continuously store the pixel data from the dot register 7 , and the output of the bilinear adder 9 is always the output of the dot register 7 .

这时,该水平伸缩控制器10的残余分布器的加法器的输出是比该差(N’-ΔN’)大,藉此导致偏移数值(V’+1)或2的结果。该水平伸缩控制器10控制该行存储器3和该行缓冲器4来提供被储存在其内的扫描线数据的第三个像素数据到该双线性加法器5以供该点寄存器7接收。At this time, the output of the adder of the residual distributor of the horizontal scaling controller 10 is larger than the difference (N'-ΔN'), thereby resulting in an offset value (V'+1) or 2 results. The horizontal scaling controller 10 controls the line memory 3 and the line buffer 4 to provide the third pixel data of the scan line data stored therein to the bilinear adder 5 for the dot register 7 to receive.

在下一个像素时钟到达时,该水平伸缩控制器10的残余分布器的加法器的输出等于该差(N’-ΔN’),藉此导致一偏移数值(V’+1)或2的结果。该水平伸缩控制器10控制该行存储器3和该行缓冲器4来提供被储存在其内的扫描线数据的第五个像素数据到该双线性加法器5,以供该点寄存器7接收。On arrival of the next pixel clock, the output of the adder of the residual distributor of the horizontal scale controller 10 is equal to the difference (N'-ΔN'), thereby resulting in an offset value (V'+1) or a result of 2 . The horizontal scaling controller 10 controls the line memory 3 and the line buffer 4 to provide the fifth pixel data of the scan line data stored therein to the bilinear adder 5 for the dot register 7 to receive .

图11是本实施例的水平压缩运行的时序图,也就是N’=5且ΔN’=2。Fig. 11 is a timing chart of the horizontal compression operation of this embodiment, that is, N'=5 and ΔN'=2.

综上所述,本发明的装置是一种容许数字图像尺寸的即时二维伸缩的专用硬件装置,因对存储存器要求少及使用较少处理步骤的原因,所以相当便宜,且具有较高效率的结果,该垂直伸缩单元的输出不需储存在一中间帧缓冲器下,被直接提供到该水平伸缩单元,而且因为该水平伸缩单元的输出不需储存在一输出帧缓冲器下,被直接提供到一输出装置,所以本发明很适合作现场的视频应用。To sum up, the device of the present invention is a dedicated hardware device that allows real-time two-dimensional expansion and contraction of the digital image size. Because it requires less memory and uses fewer processing steps, it is quite cheap and has a high As a result of efficiency, the output of the vertical scaling unit does not need to be stored under an intermediate frame buffer and is provided directly to the horizontal scaling unit, and because the output of the horizontal scaling unit does not need to be stored under an output frame buffer, it is Provided directly to an output device, so the present invention is very suitable for live video applications.

Claims (5)

1.一种均匀伸缩数字图像尺寸的装置,该装置包括一个用以储存原始数字图像在其内的帧存储器(2),该原始数字图像具有多(N)条连续的原始扫描线和每条原始扫描线多(N’)个连续的原始像素数据,该装置还包括一个用以在垂直方向伸缩该原始数字图像以得到多(M)条连续的扫描线的垂直伸缩单元,及一个用以在水平方向伸缩来自该垂直伸缩单元的扫描线以得到每条扫描线多(M’)个连续的像素数据的水平伸缩单元,该数值(M)比该数值(N)大,该数值(M’)比该数值(N’)大,其特征在于:1. A device for uniformly stretching the size of a digital image, the device comprising a frame memory (2) for storing an original digital image therein, the original digital image having a plurality (N) of continuous original scan lines and each original scan line Line multiple (N') continuous original pixel data, the device also includes a vertical scaling unit for stretching the original digital image in the vertical direction to obtain multiple (M) continuous scanning lines, and a horizontal stretching unit for The direction stretches the scan line from the vertical stretch unit to obtain a horizontal stretch unit with more (M') continuous pixel data per scan line. The value (M) is greater than the value (N), and the value (M') Greater than this value (N'), characterized by: 该垂直伸缩单元包括:The vertical telescoping unit includes: 一个行存储器(3),被连接至该帧存储器(2),储存来自该帧存储器(2)的笫(n+1)条原始扫描线在其内;A line memory (3), connected to the frame memory (2), stores the (n+1) original scan lines from the frame memory (2) in it; 一个行缓冲器(4),被连接至该行存储器(3),储存第(n)条原始扫描线在其内;A line buffer (4), connected to the line memory (3), stores the (n)th original scan line therein; 第一线性内插器(5),被连接至该行存储器(3)和该行缓冲器(4);a first linear interpolator (5), connected to the row memory (3) and the row buffer (4); 一个垂直伸缩控制器(6),被连接至该帧存储器(2)、该行缓冲器(4)和该第一线性内插器(5);a vertical scaling controller (6), connected to the frame memory (2), the line buffer (4) and the first linear interpolator (5); 该垂直伸缩控制器(6)控制该原始扫描线在该行存储器(3)和该行缓冲器(4)内的储存,该垂直伸缩控制器还控制该第一线性内插器来执行来自该行存储器(3)和该行缓冲器(4)的第(n)和第(n+1)条原始扫描线的线性内插,以产生一残余内插扫描线,当(M-N)除以(N-1)得到商数(S)及当(n)为一个满足条件(n+1)×(S)≥(s)×(N)的最小数值时,其中(s)是从1至(S),该残余内插扫描线被插入在该第(n)和第(n+1)条原始扫描线之间;The vertical scaling controller (6) controls the storage of the original scan line in the row memory (3) and the row buffer (4), and the vertical scaling controller also controls the first linear interpolator to perform Linear interpolation of the (n) and (n+1) original scan lines of the line memory (3) and the line buffer (4) to produce a residual interpolated scan line, when (M-N) is divided by ( N-1) to get the quotient (S) and when (n) is a minimum value that satisfies the condition (n+1)×(S)≥(s)×(N), where (s) is from 1 to ( S), the residual interpolation scan line is inserted between the (n) and (n+1) original scan lines; 该水平伸缩单元包括:The horizontal flex unit includes: 一个点寄存器(7),被连接至该第一线性内插器(5)储存来自该第一线性内插器(5)的该扫描线其中的一条的第(n’+1)个像素数据在其内;A dot register (7), connected to the first linear interpolator (5) to store the (n'+1)th pixel data of one of the scan lines from the first linear interpolator (5) in it; 一个点缓冲器(8),被连接至该点寄存器(7)储存该条扫描线中的第(n’)个像素数据在其内;A dot buffer (8) is connected to the dot register (7) to store (n') pixel data in the scan line; 第二线性内插器(9),被连接至该点寄存器(7)和该点缓冲器(8);A second linear interpolator (9), connected to the point register (7) and the point buffer (8); 一个水平伸缩控制器(10),被连接至该行存储器(3)、该行缓冲器(4)、该点缓冲器(8)和该第二线性内插器(9);A horizontal scaling controller (10), connected to the line memory (3), the line buffer (4), the point buffer (8) and the second linear interpolator (9); 该水平伸缩控制器控制该像素数据在该点寄存器(7)和该点缓冲器(8)内的储存,该水平伸缩控制器(10)还控制该第二线性内插器(9)来执行来自该点寄存器(7)和该点缓冲器(8)的该第(n’)和第(n’+1)个像素数据的线性内插来产生一残余内插像素数据,当(M’-N’)除以(N’-1)得到商数(S’)及当(n’)为一个满足条件(n’+1)×(S’)≥(s’)×(N’)的最小数值时,其中(s’)是从1至(S’),该残余内插像素数据被插入在该第(n’)和第(n’+1)条原始扫描线之间;The horizontal scaling controller controls the storage of the pixel data in the point register (7) and the point buffer (8), and the horizontal scaling controller (10) also controls the second linear interpolator (9) to perform Linear interpolation of the (n')th and (n'+1)th pixel data from the point register (7) and the point buffer (8) to produce a residual interpolated pixel data, when (M' -N') divided by (N'-1) to get the quotient (S') and when (n') is a satisfying condition (n'+1)×(S')≥(s')×(N') , where (s') is from 1 to (S'), the residual interpolated pixel data is inserted between the (n')th and (n'+1)th original scan lines; 该第二线性内插器(9)的输出能够直接被提供至一输出装置。The output of the second linear interpolator (9) can be provided directly to an output device. 2.如权利要求1所述的均匀伸缩数字图像尺寸的装置,其特征在于:2. The device for uniformly stretching digital image size as claimed in claim 1, characterized in that: 该垂直伸缩控制器(6)可进一步控制该第一线性内插器(5)来执行第(n)和第(n+1)条原始扫描线的线性内插,产生一额外数目(T)的连续的内插扫描线,当(M-N)比(N-1)大时,该连续的内插扫描线被插入在该笫(n)和第(n+1)条原始扫描线之间,该数值(T)是与以(M-N)除以(N-1)所得的商数相等。The vertical scaling controller (6) can further control the first linear interpolator (5) to perform linear interpolation of the (n)th and (n+1)th original scan lines, generating an additional number (T) The continuous interpolation scan lines, when (M-N) is greater than (N-1), the continuous interpolation scan lines are inserted between the (n) and (n+1) original scan lines, The value (T) is equal to the quotient obtained by dividing (M-N) by (N-1). 3.如权利要求2所述的均匀伸缩数字图像尺寸的装置,其特征在于:3. The device for uniformly stretching digital image size as claimed in claim 2, characterized in that: 该第一线性内插器(5)是一双线性加法器。The first linear interpolator (5) is a bilinear adder. 4.如权利要求1所述的均匀伸缩数字图像尺寸的装置,其特征在于:4. The device for uniformly stretching digital image size as claimed in claim 1, characterized in that: 该水平伸缩控制器(10)可进一步控制该第二线性内插器(9),来执行来自该第一线性内插器(5)的该扫描线其中的一条的第(n’)和第(n’+1)个像素数据的线性内插,以产生一额外数目(T’)的连续的内插像素数据,当(M’-N’)比(N’-1)大时,该连续的内插像素数据被插入在该第(n’)和第(n’+1)个像素数据之间,该数值(T’)与以(M’-N’)除以(N’-1)所得的商数相等。The horizontal scaling controller (10) can further control the second linear interpolator (9) to perform the (n')th and Linear interpolation of (n'+1) pixel data to generate an additional number (T') of continuous interpolated pixel data, when (M'-N') is greater than (N'-1), the Continuous interpolation pixel data is inserted between the (n')th and (n'+1)th pixel data, the value (T') is divided by (M'-N') by (N'- 1) The resulting quotients are equal. 5.如权利要求4所述的均匀伸缩数字图像尺寸的装置,其特征在于:5. The device for uniformly stretching digital image size as claimed in claim 4, characterized in that: 该第二线性内插器(9)是一双线性加法器。The second linear interpolator (9) is a bilinear adder.
CN96106993A 1995-07-31 1996-07-31 Device for Uniformly Scaling and Resizing Digital Images Expired - Lifetime CN1061500C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN96106993A CN1061500C (en) 1995-07-31 1996-07-31 Device for Uniformly Scaling and Resizing Digital Images

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN95109686.9 1995-07-31
CN95109686A CN1110017C (en) 1995-07-31 1995-07-31 Method and device for uniformly scaling digital image size
CN96106993A CN1061500C (en) 1995-07-31 1996-07-31 Device for Uniformly Scaling and Resizing Digital Images

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN 00106548 Division CN1127846C (en) 1995-07-31 2000-04-11 Device for Uniformly Scaling and Resizing Digital Images

Publications (2)

Publication Number Publication Date
CN1180273A CN1180273A (en) 1998-04-29
CN1061500C true CN1061500C (en) 2001-01-31

Family

ID=25743737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN96106993A Expired - Lifetime CN1061500C (en) 1995-07-31 1996-07-31 Device for Uniformly Scaling and Resizing Digital Images

Country Status (1)

Country Link
CN (1) CN1061500C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4131052B2 (en) 1998-07-17 2008-08-13 ソニー株式会社 Imaging device
US20030058457A1 (en) * 2001-09-21 2003-03-27 Eastman Kodak Company Selecting an image bearing product requiring a particular size converted from a high resolution digital image
CN100380439C (en) * 2005-04-20 2008-04-09 宏芯科技股份有限公司 Method for adjusting synchronization in digital display

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0513516A2 (en) * 1991-05-08 1992-11-19 International Business Machines Corporation Apparatus for and method of reducing a digital image
WO1995010821A1 (en) * 1993-10-08 1995-04-20 Genesis Microchip Inc. Apparatus with reduction/magnification image size processing for producing low-pass filtered images

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0513516A2 (en) * 1991-05-08 1992-11-19 International Business Machines Corporation Apparatus for and method of reducing a digital image
WO1995010821A1 (en) * 1993-10-08 1995-04-20 Genesis Microchip Inc. Apparatus with reduction/magnification image size processing for producing low-pass filtered images

Also Published As

Publication number Publication date
CN1180273A (en) 1998-04-29

Similar Documents

Publication Publication Date Title
CN1229975C (en) Method of pantography according to scale for digital image in embedded system
US7508543B2 (en) Image processor, image processing method, and recording medium on which image processing program is recorded
CN1933540A (en) Image processing device and method for adjusting image size according to data supply speed
CN1351326A (en) Image display device
CN1739116A (en) Apparatus and method for producing thumbnail images and for improving image quality of re-sized images
CN1065146A (en) Image processing method and device
CN1447604A (en) Signal processor
CN1061500C (en) Device for Uniformly Scaling and Resizing Digital Images
US5825367A (en) Apparatus for real time two-dimensional scaling of a digital image
CN1776802A (en) Data output method and device thereof, liquid crystal panel driving device and liquid crystal display device using the same
CN1127846C (en) Device for Uniformly Scaling and Resizing Digital Images
US7760967B2 (en) Image processing apparatus capable of carrying out magnification change process of image
CN1698372A (en) Image data conversion method, conversion circuit, and digital camera
CN1388706A (en) Display and its controlling circuit
JP2007067571A (en) Image processing device
CN102696217A (en) Image enlargement device, image enlargement program, and display apparatus
CN1202496C (en) Method and device for uniformly scaling digital image size
CN1652155A (en) Method and apparatus for changing digital image size
CN1040936C (en) Method and apparatus for converting scanning line of a video signal receiver
CN1719889A (en) Apparatus for implementing video frequency sequential to interlaced conversion and converting method
CN1343958A (en) Method and device for uniformly scaling digital image size
CN1574977A (en) Method and device for changing image size
CN1445999A (en) Method and device of integer transform applicable to image coding and video frequency coding
CN1142092A (en) Method and device for uniformly scaling digital image size
CN1324899C (en) Image enlargement method

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term

Granted publication date: 20010131

EXPY Termination of patent right or utility model