CN1061500C - Device for Uniformly Scaling and Resizing Digital Images - Google Patents
Device for Uniformly Scaling and Resizing Digital Images Download PDFInfo
- 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
Links
- 230000006835 compression Effects 0.000 description 20
- 238000007906 compression Methods 0.000 description 20
- 238000010586 diagram Methods 0.000 description 16
- 238000004091 panning Methods 0.000 description 5
- 238000000034 method Methods 0.000 description 4
- 230000008602 contraction Effects 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000001568 sexual effect Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
Abstract
Description
本发明涉及一种图像处理装置,特别是涉及一种能即时二维均匀伸缩数字图像处理尺寸的装置。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
使用时,由本发明的装置所处理的一数字图像最初是被储存在一个帧存储器(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
该双线性加法器5的输出是由该点寄存器7接收,该水平伸缩控制器10控制该点缓冲器8,以储存一个来自该点寄存器7之前的像素数据。该双线性加法器9从该点寄存器7和该点缓冲器8接收像素数据,并且根据来自该水平伸缩控制器10的一对加权系数α、1-α执行双线性内插。The output of the
图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
该双线性加法器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
如图3所示,该垂直伸缩控制器6包括有一个可编程的寄存器组30、一个第一计算电路31、一个第二计算电路32、一个第三计算电路33、一个选择器34、一个残余分布器35、一个α串列产生器36及一个地址产生器37。As shown in Figure 3, the
该寄存器组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
该选择器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/
如图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/
该时钟调变电路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
如图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 α-
如图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
该锁存电路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
该水平伸缩控制器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
因此,本实施例可用来同时执行在垂直方向的伸展或压缩以及在水平方向的伸展或压缩。运行如下所述: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
如图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
因为该控制输出端39在低逻辑状态且因为该商数T等于0,所以该系数产生器363提供该数字“1”给该选择器364,因为该INC/DEC标识38在逻辑“1”,该选择器364选择该系数产生器363的输出当作加权系数α,因为该系数α等于1,因此该系数1-α等于0,并且产生该储存指令信号,以方便控制该行缓冲器4储存来自该行存储器3的该原始扫描线的第一原始扫描线,在这一阶段中该双线性加法器5的输出为该原始扫描线的第一原始扫描线。Because the
该选择器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
当下一个线时钟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
该控制输出端39在高逻辑状态,该系数产生器363在一时钟mClock(即二连续的原始输入线时钟)期间产生连续的两输出1及1/2。当该第一原始输入线时钟期间内,因该系数α等于1,所以该双线性加法器5输出该原始扫描线的第二原始扫描线,同时将该第二原始扫描线储存在该行缓冲器4中,在该第二原始输入线时钟期间,该地址寄存器375的内容在下一个时钟输入mClock2时被增加一个单位,此时该系数产生器363的输出等于1/2,该系数α等于1/2,该系数1-α等于1/2,所以没有储荐指令信号产生。因此,该原始扫描线的第二原始扫描线保留在该行缓冲器4中,在这一阶段中该双线性加法器5的输出为该原始扫描线的第二原始扫描线及第三原始扫描线的双线性内插。The
该中间数据寄存器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
该垂直伸缩单元的后续运行与上述相似直到第五条原始扫描线由该双线性加法器5输出为止。The subsequent operation of the vertical scaling unit is similar to the above until the fifth original scan line is output by the
图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
如图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
在这例子中,Δ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
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
压缩操作期间时,该第一及第二计算电路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
如图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
如图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
如图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
如图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
承上所述,该垂直伸缩控制器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
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
该垂直伸缩控制器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
由于没有垂直伸缩运行要被执行,该垂直伸缩控制器6控制该帧存储器2依序提供该原始扫描线至该行存储器3。该水平伸缩控制器10控制该行存储器3和该行缓冲器4,来依序提供被储存于其内的像素数据至该双线性加法器5。此时,来自该垂直伸缩控制器6的系数α经常等于1,而且该行缓冲器4的输出是被该双线性加法器5所忽略。该双线性加法器5的输出与该行存储器3的输出相等。Since there is no vertical scaling operation to be performed, the
如上所述,该水平伸缩单元的伸展运行实质上与该垂直伸缩单元的伸展运行相似,但是与该垂直伸缩控制器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
该水平伸缩控制器10最初设定被储存于该行存储器3的扫描线数据的第一个像素数据的点地址并且控制该行存储器3,来提供该第一个像素数据到该双线性加法器5,可在一起始像素时钟期间由该点寄存器7接收。来自该水平伸缩控制器10的系数α等于1,而且该锁存命令信号产生可控制该点缓冲器8来储令存来自该点寄存器7的该第一个原始像素数据在其内。在这阶段该双线性加法器9的输出该第一个原始像素数据,而且可以被直接提供到该输出装置(图未示)。The
这时,该水平伸缩控制器10控制该行存储器3来提供第二个原始像素数据到该双线性加法器5,以供该点寄存器7接收。该水平伸缩控制器10在两个连续的原始像素时钟内连续产生两个α系数1和1/2。在该第一原始像素时钟内,该双线性加法器9输出该第二个原始像素数据,而且,在相同的时间,后者是被储存在该点缓冲器8内,因为该系数α等于1。在该第二原始像素时钟内,该行存储器3提供第三个原始像素数据到该双线性加法器5,以供该点寄存器7接收。该系数α现在是等于1/2,而且该第二个原始像素数据依然在该点缓冲器8内。在这阶段,该双线性加法器9的输出为该第二和第三个原始像素数据的双线性内插。At this time, the
在下一个原始像素时钟期间,来自该水平伸缩控制器10的系数α重回到1,而且该双线性加法器9的输出同时地被储存于该点缓冲器8内的该第三个原始像素数据。During the next raw pixel clock, the coefficient α from the
该水平伸缩单元的后面的运行与前述相似,直到一扫描线的第五个原始像素数据由该双线性加法器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
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
该垂直伸缩控制器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
该水平伸缩单元的压缩运行实质上与该垂直伸缩单元的压缩运行相似的,但是,在该水平伸缩单元中,该水平伸缩控制器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
该水平伸缩控制器10的第一和第二计算电路的输出在该水平压缩运行期间是没有关系的。该第三计算电路输出由N’除以N’-ΔN’所得的商数U’,N’-ΔN’为每扫描线要被保持的原始像素数据数量,本实施例中,该商数U’是等于2而且是被提供至该水平伸缩控制器10的残余分布器。The outputs of the first and second computing circuits of the panning
该水平伸缩控制器10最初是设定被储存在该行存储器3内的一扫描线数据的第一个像素数据的点地址,并且控制该行存储器3在一起始像素时钟期间提供该第一个像素数据到该双线性加法器5,因为一逻辑“0”是被储存在该水平伸缩控制器10的第三寄存器内,来自该水平伸缩控制器10的系数α被保持在1,因此,该点缓冲器8是被用来持续储存来自该点寄存器7的像素数据,而且该双线性加法器9的输出经常为该点寄存器7的输出。The
这时,该水平伸缩控制器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
在下一个像素时钟到达时,该水平伸缩控制器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
图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)
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)
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)
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 |
-
1996
- 1996-07-31 CN CN96106993A patent/CN1061500C/en not_active Expired - Lifetime
Patent Citations (2)
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 |