CN102883165B - Image scaling processing method and apparatus - Google Patents

Image scaling processing method and apparatus Download PDF

Info

Publication number
CN102883165B
CN102883165B CN 201210400944 CN201210400944A CN102883165B CN 102883165 B CN102883165 B CN 102883165B CN 201210400944 CN201210400944 CN 201210400944 CN 201210400944 A CN201210400944 A CN 201210400944A CN 102883165 B CN102883165 B CN 102883165B
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
image
color
compression
processing
quality factor
Prior art date
Application number
CN 201210400944
Other languages
Chinese (zh)
Other versions
CN102883165A (en )
Inventor
吕本伟
杨涛
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Grant date

Links

Abstract

本发明公开了一种图片缩放处理方法及设备,涉及图像处理技术领域。 The present invention discloses a method and apparatus for image scaling process, relates to technical field of image processing. 其中方法包括:对输入图片的类型进行判断;在判断出所述输入图片的类型为彩色图片的情况下,获取指示所述彩色图片的压缩率的压缩质量因子;对所述彩色图片进行缩放处理;以及根据所述彩色图片的压缩质量因子,对缩放处理后得到的彩色图片进行图像锐化处理,得到输出彩色图片。 Wherein the method comprises: determining the type of the input image is performed; in the case of determining the type of the input image is a color image, the compression ratio acquisition compression quality factor indicating the color picture; the color image zoom processing ; and according to the color image compression quality factor, obtained after the scaling processing for image sharpening a color image processing, to obtain a color output image. 本发明提供的方法及设备根据彩色图片的压缩率进行图像锐化处理,经过这样的处理之后,原有的低品质的彩色图片的清晰度得到大幅提高。 The method and apparatus of the present invention provides an image sharpening processing according to the compression ratio of the color image, after such treatment, the original low-quality color image clarity is greatly improved.

Description

图片缩放处理方法及设备 Image scaling processing method and apparatus

技术领域 FIELD

[0001] 本发明涉及图像处理技术领域,具体涉及一种将图片进行缩放处理的方法及设备。 [0001] The present invention relates to image processing technologies, and particularly relates to an image processing method and scaling apparatus.

背景技术 Background technique

[0002] 在计算机图像处理中,图片缩放是指通过增加或去除像素对数字图像的尺寸进行调整的过程。 [0002] In the computer image processing, image scaling refers to the process or by increasing the size of the digital image pixel for adjusting removed. 由于要在效率和图像质量(例如平滑度和清晰度)之间做折衷,图片缩放并不是个平庸的过程。 Due to make a trade-off between efficiency and image quality (such as smoothness and clarity), not a mediocre image scaling process. 当前客户端处理图片的工具比较多,如Photoshop和美图秀秀等,通过这些工具可以依据用户喜好对图片进行缩放操作。 The current client tool processing more pictures, such as Photoshop and beauties Xiu Xiu, etc., can operate on the image to zoom through these tools based on user preferences.

[0003] 图片缩放技术包括图片缩小和图片放大两种技术。 [0003] Image scaling technology to enlarge and reduce the image includes two techniques. 图片放大一般用来采用一个较小的图片填充一个较大的屏幕,当图片尺寸增大的时候,组成图片的像素增多,图片看上去就变"柔和"了。 Generally used to use an enlarged image of a small picture to fill a larger screen, when the image size is increased when a picture composed of pixels increases, the picture appears becomes "softer" a. 图片缩小除了用来缩小图片以适应显示区域以外,更多的是用于产生预览图片。 In addition to reduced image reduced to fit the display area other than the image, for generating more preview image. 图片放大技术一般可采用插值算法来实现。 Image amplification techniques may generally be achieved interpolation algorithm. 图片缩小技术可通过抽样(也可称为下采样或降采样)方法来实现。 Image reduction techniques may be implemented by sampling (or downsampling may also be referred to as downsampling) method. 对图片的缩放操作并不能带来更多关于图片的信息,因此经缩放后,图片的质量将不可避免的受到影响。 Picture scaling operation does not lead to more information about the picture, so after scaling, the picture quality will inevitably be affected. 以对JPEG(JointPhotographicExpertsGroup, 联合图像专家组)图片进行缩小为例,通过抽样的方式将去掉图片中的一些像素,这势必造成图片模糊、有颗粒感等问题,如果JPEG图片品质越差,得到的缩略图就越模糊。 In order to JPEG (JointPhotographicExpertsGroup, Joint Photographic Experts Group) images to zoom, for example, by sampling method will remove some of the pixels in the picture, which will inevitably cause a blurry picture, grainy and other issues, if the JPEG picture quality worse, resulting thumbnail fuzzier.

发明内容 SUMMARY

[0004] 鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的图片缩放处理方法和相应的图片缩放处理设备。 [0004] In view of the above problems, the present invention is proposed in order to overcome the above problems or to provide an at least partially solve the above problems image scaling process image scaling method and a corresponding processing apparatus.

[0005] 根据本发明的一个方面,提供了一种图片缩放处理方法,包括步骤:对输入图片的类型进行判断;在判断出输入图片的类型为彩色图片的情况下,获取指示彩色图片的压缩率的压缩质量因子;对彩色图片进行缩放处理;以及根据彩色图片的压缩质量因子,对缩放处理后得到的彩色图片进行图像锐化处理,得到输出彩色图片。 [0005] In accordance with one aspect of the present invention, there is provided a zoom image processing method comprising steps of: determining the type of the input image is performed; in the case of determining the type of the input image is a color image, to obtain compressed image indicating a color compression rate quality factor; color image zoom processing; the color image compression and quality factor, obtained after the scaling processing for image sharpening a color image processing, to obtain a color output image.

[0006] 根据本发明的另一方面,提供了一种图片缩放处理设备,包括:判断模块,适于对输入图片的类型进行判断;压缩质量因子确定模块,适于在判断模块判断出所述输入图片的类型为彩色图片的情况下,获取指示彩色图片的压缩率的压缩质量因子;第一缩放模块, 适于对彩色图片进行缩放处理;以及锐化模块,适于根据彩色图片的压缩质量因子,对缩放处理后得到的彩色图片进行图像锐化处理,得到输出彩色图片。 [0006] According to another aspect of the present invention, there is provided a zoom image processing apparatus, comprising: a determining module, adapted to judge the type of the input picture; compression quality factor determination module, adapted to determining module determines that said the case for the types of input image color images, a compression ratio acquisition compression quality factor indicating the color images; a first scaling module, adapted to perform scaling processing on a color image; and a sharpening module, adapted to compress color images according to the quality of factor, obtained after the scaling processing for image sharpening a color image processing, to obtain a color output image.

[0007] 根据本发明提供的将图片进行缩放处理的方法及设备,通过对输入图片的类型进行判断,在判断出为彩色图片的情况下,获取该彩色图片的压缩质量因子,根据彩色图片的压缩质量因子对缩放处理后的彩色图片进行图像锐化处理,其中压缩质量因子指示出彩色图片的压缩率,也就是说,本发明提供的方法及设备根据彩色图片的压缩率进行图像锐化处理,经过这样的处理之后,原有的低品质的彩色图片的清晰度得到大幅提高。 [0007] Method and apparatus for scaling processing by performing according to the image provided by the invention of the type of the input image is determined, in the case of determining is a color image, to obtain the color image compression quality factor based on the color picture the compression quality factor scaled color image processing image sharpening process, wherein the quality factor indicative of the compression the compression of the color image, that is, a method and apparatus of the present invention provides an image sharpening processing color images according to the compression rate , after this process, the original low-quality color picture clarity is greatly improved.

[0008] 上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段, 而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。 [0008] The above description is only an overview of the technical solution of the present invention, in order to more fully understood from the present invention, but may be implemented in accordance with the contents of the specification, and in order to make the aforementioned and other objects, features and advantages of the present invention can be more apparent from the following specific embodiments cite Patent of the present invention.

附图说明 BRIEF DESCRIPTION

[0009] 通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。 [0009] By reading the following detailed description of preferred embodiments Hereinafter, a variety of other advantages and benefits to those of ordinary skill in the art will become apparent. 附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。 The drawings are only for purposes of illustrating a preferred embodiment and are not to be considered limiting of the present invention. 而且在整个附图中,用相同的参考符号表示相同的部件。 But throughout the drawings, like parts with the same reference symbols. 在附图中: In the drawings:

[0010] 图1示出了根据本发明一个实施例的对图片进行缩放处理的方法的流程图; [0010] FIG. 1 shows a flowchart of a method for scaling image processing according to one embodiment of the present invention;

[0011] 图2示出了根据本发明另一个实施例的对图片进行缩放处理的方法的流程图;以及 [0011] FIG. 2 shows a flowchart of a method for scaling image processing according to another embodiment of the present invention; and

[0012] 图3示出了根据本发明一个实施例的对图片进行缩放处理的设备的结构示意图。 [0012] FIG. 3 shows a schematic configuration of the image scaling apparatus according to one embodiment of the process of the present invention.

具体实施方式 detailed description

[0013] 下面将参照附图更详细地描述本公开的示例性实施例。 [0013] The following exemplary embodiments of the present disclosure will be described in more detail with reference to the drawings. 虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。 While the exemplary embodiment shows an exemplary embodiment of the present disclosure in the drawings, it should be understood that the present disclosure may be implemented embodiments and should not be set forth herein to limit in various forms. 相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。 Rather, these embodiments are able to more thorough understanding of the present disclosure, and the scope of the present disclosure can be completely conveying to those skilled in the art.

[0014] 图1示出了根据本发明一个实施例的对图片进行缩放处理的方法100的流程图。 [0014] FIG. 1 shows a flow diagram of a method 100 for image scaling process according to one embodiment of the present invention. 本实施例提供的方法主要解决的是在判断出输入图片的类型为彩色图片的情况下,如何对该彩色图片进行缩放处理。 The method provided in this embodiment mainly solved in the case of determining the type of the input image is a color image, how to deal with the color image zoom. 如图1所示,方法100始于步骤S101,其中对输入图片的类型进行判断。 1, the method 100 begins at step S101 in FIG, wherein the type of the input image is determined. 由于输入图片的类型不同导致后续缩放后所作的处理会有所不同,因此在本方法中需要首先对输入图片的类型进行判断,该判断过程主要是确定输入图片是否为彩色图片。 Because different types of the input image results in the subsequent processing will be scaled differently made, it is necessary first of all to the type of the input image is judged in the present process, the process is determined primarily determines whether the input picture image color. 可选地,判断的依据是输入图片的颜色空间,如果输入图片的颜色空间为RGB,那么则确定该输入图片的类型为彩色图片。 Alternatively, the judgment is based on the input image color space, if the input image color space for RGB, it is determined that the type of the input image is a color picture.

[0015] 随后,方法100进入步骤S102,在步骤SlOl中判断出输入图片的类型为彩色图片的情况下,在步骤S102中获取指示彩色图片的压缩率的压缩质量因子。 [0015] Subsequently, the method 100 proceeds to step S102, it is determined that the type of the input image in step SlOl, the acquisition compression quality factor indicative of the compression ratio for the case where the color image is a color image in step S102. 当前互联网中的彩色图片都经过不同程度的压缩处理,以JPEG图片为例,这种类型图片的压缩主要包括四个步骤,分别为颜色转换、DCT变换(DiscreteCosineTransform,离散余弦变换)、量化和编码。 The current Internet color images are compressed to varying degrees, so as to JPEG images, for example, image compression of this type mainly includes four steps, respectively, the color conversion, the DCT transform (DiscreteCosineTransform, discrete cosine transform), quantization and coding . 在量化步骤中会选取压缩质量因子,该压缩质量因子指示了彩色图片的压缩率。 In the quantization step will select compression quality factor, the quality factor indicative of the compression of the color image compression. 若选取的压缩质量因子较大,可大幅度提高压缩比,但图像质量会较差;若选取的压缩质量因子较小,图像的重建质量较好,但压缩比较低。 If large compression quality factor selected, it can greatly improve the compression ratio, but the image quality is poor; if the selected quality factor less compressed, reconstructed image quality is better, but the compression is relatively low. 因此,压缩质量因子是表征彩色图片图像质量的一个因素。 Therefore, compression quality factor is a factor characterizing color picture image quality. 在判断出输入图片的类型为彩色图片的情况下,获取该彩色图片的压缩质量因子,本方法的后续步骤中将用到该压缩质量因子。 In the case of determining the type of the input image is a color image, the color image acquisition compression quality factor, a subsequent step of the method used in the compression quality factor.

[0016] 方法100随后进入步骤S103,其中对彩色图片进行缩放处理。 [0016] Method 100 then proceeds to step S103, the color in which the picture scaling processing. 在获取彩色图片的压缩质量因子之后,按照插值或抽样算法,对彩色图片进行缩放处理。 After acquiring the color picture compression quality factor, according to the interpolation or sampling algorithms for color image to zoom process. 本步骤的缩放处理可以按照现有的方法进行,在此不再赘述。 Scaling process in this step may be performed in a conventional method, which is not repeated herein.

[0017] 应当注意的是,步骤S102和S103之间没有顺序关系,两个步骤可以同时执行、先步骤S103然后步骤S102等,所有这些都在本发明的保护范围之内。 [0017] It should be noted that there is no order between the steps S102 and S103, the two steps may be performed simultaneously, and then step S102 to step S103 and the like, all of which are within the scope of the present invention.

[0018] 随后,在步骤S104中,根据在步骤S102获得的彩色图片的压缩质量因子,对缩放处理后得到的彩色图片进行图像锐化处理,得到输出彩色图片。 [0018] Subsequently, in step S104, in step S102, according to the obtained color image compression quality factor, obtained after the scaling processing for image sharpening a color image processing, to obtain a color output image. 步骤S104所做的图像锐化处理是补偿和增加图像的高频成分,使图像中的地物边界、区域边缘、线条、纹理特征和精细结构特征更加清晰和鲜明。 The image sharpening processing step S104 is made by increasing the image compensation and a high frequency component, so that the image feature boundary, edge regions, lines, texture and fine structural features characteristic clearer and more vivid. 由于在进行图像锐化处理时,图片的噪声部分会得到同样程度的增强,而且对于压缩率越高的图片,其像素丢失情况越为严重,噪声也相应越大,所以本方法对具有不同的压缩质量因子的彩色图片进行不同程度的图像锐化处理。 Since during the image sharpening process, the image noise will be part of the same degree of enhancement, and the higher the compression ratio of the image, which pixels to be dropped more serious cases, the noise is correspondingly larger, so this method has a different compression quality factor of the color image to different degrees of image sharpening. 具体地,压缩质量因子所指示的压缩率越高,图像锐化的锐化度越低,压缩质量因子所指示的压缩率越低,图像锐化的锐化度越高。 Specifically, the higher the compression rate indicated by the quality factor, the lower the sharpening of the image sharpness, the lower the compression rate indicated by the quality factor, the higher the sharpness of the image sharpening. 经过这样的图像锐化处理之后,得到的输出彩色图片的清晰度得到大幅提高。 After such image sharpening, the resulting output color picture clarity is greatly improved.

[0019] 根据本实施例提供的将图片进行缩放处理的方法,通过对输入图片的类型进行判断,在判断出为彩色图片的情况下,获取该彩色图片的压缩质量因子,根据彩色图片的压缩质量因子对缩放处理后的彩色图片进行图像锐化处理,其中压缩质量因子指示出彩色图片的压缩率,也就是说,本实施例提供的方法根据彩色图片的压缩率进行图像锐化处理,经过这样的处理之后,原有的低品质的彩色图片的清晰度得到大幅提高。 [0019] according to the picture provided in this embodiment of the method of scaling process, judged by the type of the input image, in the case of determining is a color image, to obtain the color image compression quality factor, according to the compression of color images quality factor scaled color image processing image sharpening process, wherein the quality factor indicative of the compression the compression of the color image, that is, the method provided in this embodiment performs image sharpening process according to the compression ratio of the color image, after after such treatment, the original low-quality color picture clarity is greatly improved.

[0020] 图2示出了根据本发明另一个实施例的对图片进行缩放处理的方法200的流程图。 [0020] Figure 2 illustrates a flowchart of a method for scaling image processing according to another embodiment of the present invention 200. 如图2所示,方法200始于步骤S201,其中对输入图片的类型进行判断。 2, the method 200 begins at step S201, the type in which the input image is determined. 由于输入图片的类型不同导致后续缩放后所作的处理会有所不同,因此在本方法中需要首先对输入图片的类型进行判断,该判断过程主要是确定输入图片是彩色图片还是灰度图片。 Because different types of the input image results in the subsequent processing will be scaled differently made, it is necessary first of all to the type of the input picture is determined in the present method, the determination process determines that the input image is mainly a color image or grayscale image. 可选地,判断的依据是输入图片的颜色空间,如果输入图片的颜色空间为灰度,那么则确定该输入图片的类型为灰度图片,执行步骤S202 ;如果输入图片的颜色空间为RGB,那么则确定该输入图片的类型为彩色图片,执行步骤S204。 Alternatively, the determination is based on the input image color space, if the input image is a grayscale color space, then it is determined that the type of the input image into a grayscale image, step S202; if the input image color space is RGB, then the type of the input image is determined as a color picture, to step S204.

[0021] 在步骤S201中判断出输入图片的类型为灰度图片的情况下,方法200进入步骤S202,在步骤S202中对灰度图片进行缩放处理。 The case where [0021] the input image is determined in step S201 that the gradation image type, the method 200 proceeds to step S202, at step S202, the gray picture scaling processing. 按照插值或抽样算法,对灰度图片进行缩放处理。 According to interpolation or sampling algorithm, the gray image to zoom process. 本步骤的缩放处理可以按照现有的方法进行,在此不再赘述。 Scaling process in this step may be performed in a conventional method, which is not repeated herein.

[0022] 在步骤S202中对灰度图片进行缩放处理之后,方法200进入步骤S203,其中将缩放处理后得到的灰度图片进行直方图均衡化处理,得到输出灰度图片。 [0022] After S202, the gray scaling image processing step, the method 200 proceeds to step S203, the gray-scale image in which the after-treatment was subjected to histogram equalization, to obtain output gray image. 对于灰色图片,本方法采用直方图均衡化方法对其进行处理,能增强图片对比度。 For gray image, the method using histogram equalization method to process it, can enhance the contrast of the picture. 直方图均衡化是图像处理领域中利用图像直方图对图片对比度进行调整的方法。 Histogram equalization is a method of using the image field of image processing on the image histogram to adjust the contrast. 图像直方图的横坐标表示亮度分布, 纵坐标表示像素分布。 The abscissa represents the luminance histogram distribution, and the ordinate represents a pixel distribution. 它能够显示一张图片中色调的分布情况,揭示图片中每一个亮度级别下像素出现的数量。 It is possible to display a distribution picture hue, the number of images to reveal a brightness level of each pixel occur. 根据这些数值所绘出的图像形态,可以初步判断图片的曝光情况。 The image depicted morphology of these values, you can initially determine exposure photographs. 无论图片是有丰富的高光表现还是曝光过度,或者有饱满的细部暗调还是细节分辨不清, 图像直方图都能很直观的显示。 Whether the picture is a wealth of high performance light or overexposed, or have full detail and shadow detail or confusion, the image histogram can be very intuitive display. 直方图均衡化方法通过使用累积函数对灰度值进行"调整" 以实现对比度的增强。 Histogram equalization method using the cumulative function of the gradation value "tuned" to achieve a contrast enhancement. 直方图均衡化处理的"中心思想"是把原始图像的灰度直方图从比较集中的某个灰度区间变成在全部灰度范围内的均匀分布。 Histogram equalization process "central idea" is the gray-level histogram of the original image from a gray scale more concentrated within the range becomes uniform distribution of the entire gray scale. 直方图均衡化就是对图像进行非线性拉伸,重新分配图像像素值,使一定灰度范围内的像素数量大致相同。 Histogram equalization is nonlinear stretching of the image, re-assigned image pixel value, the number of pixels in a certain gradation range is substantially the same. 简单说就是把给定图像的直方图分布改变成"均匀"分布的直方图分布。 Simply put, is given to a histogram distribution of an image is changed to "even" histogram distribution.

[0023] 对于一个灰度图片,设1^表示灰度i出现的次数,图片中灰度为i的像素出现概率为: [0023] For a grayscale image, the gradation provided a ^ i indicates the number of occurrence of gray-scale image is an occurrence probability of pixel i:

Figure CN102883165BD00061

[0025] 其中,L是图片中所有的灰度数,n是图片中所有的像素数,px实际上是该图片的直方图,将其归一化到[0, 1]范围内。 [0025] where, L is the number of all gray scale image, n is the number of all pixels in the image, px fact that the image histogram, which is normalized to the range [0, 1].

[0026] 把c作为对应于? [0026] c as the corresponding? !£的累计概率函数,定义为: ! £ cumulative probability function, defined as:

Figure CN102883165BD00071

[0028] c是图片的累计归一化直方图。 [0028] c is the picture of the cumulative normalized histograms.

[0029] 创建一个形式为y=T(x)的变化函数,对于原始图片中的每个值它就产生一个y, 这样y的累计概率函数就可以在所有值范围内进行线性化,转换公式定义为: [0029] Create a form y = T (x) function changes, for each value of the original picture generates a y, y of such a cumulative probability function can be linearized, the conversion formula in all range defined as:

[0030] Yi=T(Xi)=c(i) (3) [0030] Yi = T (Xi) = c (i) (3)

[0031] 注意T将不同的等级映射到[0, 1]域,为了将这些值映射回它们最初的域,需要在结果上应用下面的简单变换: [0031] T Note that the mapping of different levels to [0, 1] field, in order to map these values ​​back to their original domain need to be applied in the following simple transformation results:

[0032] Yi' =Y1 •(max-min)+min(4) [0032] Yi '= Y1 • (max-min) + min (4)

[0033] 其中,max表示图片中的灰度最大值,min表示图片中的灰度最小值。 [0033] wherein, max represents the maximum value of the gradation picture, min represents the minimum value of the gradation picture.

[0034] 由于灰度图片经过缩放后像素丢失而变得模糊,通过上述直方图均衡化处理方法可以使图片的像素倾向于占据整个可能的灰度级且分布均匀,从而达到增强图片前景、背景间的对比度的目的,使得输出灰度图片更为清晰。 [0034] Since the image after gradation scaled pixel loss becomes blurred, can tend to occupy the entire pixel image may be a gray level and evenly distributed by the above-described histogram equalization method, so as to achieve enhanced image foreground, background the contrast between the object, such that the output gradation image clearer.

[0035] 上面描述了灰度图像上使用直方图均衡化的方法,但是通过将这种方法分别用于图像RGB颜色值的红色、绿色和蓝色分量,从而也可以对彩色图像进行处理。 [0035] The above-described histogram equalization method using the gray scale image, however, may be processed so that a color image by this method are used for red, green and blue components of the RGB color values ​​of the image.

[0036] 在步骤S201中判断出输入图片的类型为彩色图片的情况下,方法200进入步骤S204,在步骤S204中获取指示彩色图片的压缩率的压缩质量因子。 [0036] It is determined in step S201 that the type of the input image is a case of a color image, the method 200 proceeds to step S204, acquires the compression quality factor indicative of the compression ratio of the color image in step S204. 当前互联网中的彩色图片都经过不同程度的压缩处理,为了能更好的理解压缩质量因子的来源及作用,这里以JPEG图片为例介绍图片压缩的处理过程。 The current Internet color pictures have been varying degrees of compression processing, in order to better understand the origin and role of compression quality factor, here an example to introduce the JPEG picture compression process picture. JPEG图片压缩主要分为以下四个步骤来完成: JPEG Image compression is divided into the following four steps to complete:

[0037] (1)颜色转换。 [0037] (1) The color conversion.

[0038] 由于JPEG只支持YUV颜色模式的数据结构,而不支持RGB颜色模式的数据结构, 所以在将彩色图片进行压缩之前,必须将彩色图片的颜色模式转换为RGB颜色模式。 [0038] Since only supports JPEG data structures YUV color modes, and does not support the data structure of the RGB color model, so before you compress a color picture, color pictures must be converted to RGB color mode color mode.

[0039] (2)DCT变换。 [0039] (2) DCT transform.

[0040] 将图像信号在频率域上进行变换,分离出高频信息和低频信息。 [0040] converting the image signal in the frequency domain, the separated high frequency information and low frequency information. 后续将对图像的高频部分(即图像细节)进行压缩,以达到压缩图像数据的目的。 Will follow the high frequency portion of the image (i.e. image detail) is compressed, the compressed image data in order to achieve the object.

[0041] (3)量化。 [0041] (3) quantization.

[0042] 由于在后续编码过程中使用的码本都是整数,因此需要对DCT变换后的频率系数进行量化,将其转换为整数。 [0042] Since the code used in the subsequent encoding process according to the present are integers, it is necessary for the frequency coefficients quantized DCT transform, to convert it to an integer. 在这一过程中,会选取压缩质量因子,该压缩质量因子指示了彩色图片的压缩率。 In this process, will select the compression quality factor, quality factor indicates the compression ratio of the compression of color images. 根据压缩质量因子进行量化处理后,得到的量化值都是近似值,和原始图像的数据之间有了差异,这一差异是造成图像压缩后失真的主要原因。 The quality factor compressed quantized, the quantized values ​​obtained are approximate, and with the difference between the original image data, the main reason for this difference is the distortion caused by image compression. 因此,压缩质量因子的选取至为重要,若选取的压缩质量因子较大,可大幅度提高压缩比,但图像质量会较差;若选取的压缩质量因子较小,图像的重建质量较好,但压缩比较低。 Thus, to select the compression quality factor is important, if the selected compression quality factor is larger, can greatly improve the compression ratio, but the image quality is poor; if the selected compression quality factor is small, better reconstructed image quality, but the compression is relatively low. ISO已经制定了一组供JPEG代码实现者使用的标准量化值。 ISO has developed a set of standard JPEG quantization values ​​for the code used by implementors.

[0043] (4)编码。 [0043] (4) coding.

[0044] 从前面的过程可以看出,从颜色转换完成到编码之前,图像并没有得到进一步的压缩,DCT变换和量化可以说是为编码阶段所做的准备工作。 [0044] As can be seen from the preceding process, from the color conversion is completed before the coding, the image has not been further compression, the DCT transform and quantization can be said that the preparation is done by encoding stage. 编码可以采用两种机制:一是O值的行程长度编码;二是熵编码。 Coding may be employed two mechanisms: First run length encoded value O; second entropy coding. 在JPEG中,采用曲徊序列,即以图像数据矩阵对角线的法线方向作"之"字排列图像数据矩阵中的元素。 In JPEG, the use of a curved irresolute sequence, i.e., the normal direction of the image data matrix as the diagonal element "and" character image data are arranged in a matrix. 这样做的优点是使得靠近图像数据矩阵左上角、值比较大的元素排列在行程的前面,而行程的后面所排列的图像数据矩阵元素基本上为〇值。 The advantage of this is that the value of the square near the top left corner of the image data matrix value is relatively large elements arranged in front of the stroke, and the image data matrix elements arranged substantially behind the stroke. 行程长度编码是非常简单和常用的编码方式,在此不再赘述。 Run length encoding is very simple and common encoding mode, which will not be repeated herein. 编码实际上是一种基于统计特性的编码方法。 Coding is actually a coding method based on statistical properties. 在JPEG中允许采用霍夫曼编码或者算术编码。 In the JPEG allows Huffman coding or arithmetic coding.

[0045] 通过上述JPEG图片的压缩过程可以看到,压缩质量因子是可灵活控制的,不同的实现对压缩质量因子也有不同的定义,举例来说: [0045] The compression process can be seen through the above-described JPEG image compression quality factor variable control, to achieve different compression quality factors may also have different definitions, for example:

[0046] IJG(IndependentJPEGGroup,独立JPEG小组)采用的压缩质量因子度量等级是1~99,且1指不图片的压缩率最低,99指不图片的压缩率最尚; [0046] IJG (IndependentJPEGGroup, Independent JPEG Group) uses compression quality factor is a measure of grade 1 to 99, and 1 means the lowest compression rate is not the picture, 99 refers to the compression rate is not the best picture yet;

[0047] Photoshop(-种图像处理软件)定义了1~12级的压缩质量因子; [0047] Photoshop (- kinds of image processing software) having 1 to 12 defines the compression quality factor;

[0048] Apple(苹果)定义了0~4级的压缩质量因子; [0048] Apple (apple) defines the level of compression quality factor 0 to 4;

[0049]PaintShopPro(-种图像编辑软件)采用的压缩质量因子度量等级也是1~99, 但与IJG相反的是,1指示图片的压缩率最高,99指示图片的压缩率最低。 [0049] PaintShopPro (- kinds of image editing software) used in compression quality factor is a measure of grade 1 to 99, but the IJG contrast, picture compression ratio of 1 indicates the highest and lowest compression ratio of 99 indicates the picture.

[0050] 针对上述若干种不同定义的压缩质量因子,可以将其转化为统一的度量等级。 [0050] For the above-defined number of different compression quality factor, it can be converted to a uniform level metric. 例如,在分析彩色图片的内容获取彩色图片的压缩质量因子之后,可以将它转化为IJG定义的度量等级,可选地,通过采用JPEGdump工具就可实现该功能。 For example, after analyzing the contents of the color image acquired color image compression quality factor, it can be converted to metric defined level IJG, alternatively, this function can be achieved by using JPEGdump tool. 需要说明的是,本发明不仅限于将压缩质量因子转化为IJG定义的度量等级,也可以转化为其他类型定义的度量等级,本发明对此不做限制。 Incidentally, the present invention is not limited to the compression quality metrics class IJG conversion factor defined, it may be converted to the metric levels of the other type definition, not limited in the present invention.

[0051] 方法200随后进入步骤S205,其中将彩色图片的格式由原有格式转换为PNG格式(PortableNetworkGraphicFormat,流式网络图形格式)。 [0051] Method 200 then proceeds to step S205, where the color image converted from the original format to PNG format (PortableNetworkGraphicFormat, Portable Network Graphics format). 由于PNG格式的图片处理过程为无损过程,本方法选择在缩放处理之前将彩色图片的格式(如JPEG格式)转换为PNG 格式,相对于其它格式来说,对PNG格式的彩色图片进行缩放处理,可以降低对清晰度的影响。 Since the image processing PNG format is a lossless process, prior to the present method of selecting the scaling processing color image formats (e.g., JPEG format) converted to PNG format, with respect to the other formats, a color image is performed scaling processing PNG format, you can reduce the impact on clarity.

[0052] 随后,在步骤S206中,对彩色图片进行缩放处理。 [0052] Subsequently, in step S206, the color image to zoom process. 具体地,按照插值或抽样算法, 对彩色图片进行缩放处理。 Specifically, according to the interpolation or sampling algorithms for color image to zoom process. 步骤S206的缩放处理可以按照现有的方法进行,在此不再赘述。 Step S206 is the scaling processing can be performed according to conventional methods, it is not repeated here.

[0053] 在步骤S206中对彩色图片进行缩放处理之后,方法200进入步骤S207,其中将缩放处理后的彩色图片的格式由PNG格式转换为原有格式。 [0053] After S206, the color image zoom processing step, the method 200 proceeds to step S207, where the scaled color image format processed by the PNG format to a native format. 为了得到更小的字节数,将缩放处理后的彩色图片再转换为原有格式(如JPEG格式)。 In order to obtain a smaller number of bytes, after the color image scaling process and then converted to native format (e.g., JPEG format).

[0054] 上述步骤S205和步骤S207是本发明的可选步骤,本发明也可以直接对原始格式的彩色图片进行缩放处理,而无需进行格式转换。 [0054] The step S205 and step S207 is an optional step of the present invention, the present invention may be a color original image scaling processing format directly, without the need for format conversion. 不过在进行格式转换的情况下,得到的彩色图片的清晰度会更为良好。 However, the case of performing format conversion, the resulting resolution color images will be more favorable.

[0055] 应当注意的是,步骤S204与步骤S205-S207中的任一步骤之间没有顺序关系,步骤S204可以与步骤S205-S207中的任一步骤同时执行、也可在步骤S205-S207中的任一步骤之后执行,所有这些都在本发明的保护范围之内。 [0055] It should be noted that there is no sequence relationship between any of S205-S207 in a step S204 and step step step may be performed simultaneously with the steps S204-S207 S205 in any of the steps, but also in the step S205-S207 after performing any of the steps, all of which are within the scope of the present invention.

[0056] 随后,在步骤S208中,将缩放处理后得到的彩色图片与指示不同锐化度的高斯信号进行卷积处理,得到输出彩色图片。 [0056] Subsequently, in step S208, the zoom signal indicates a Gaussian color picture sharpness different post-treatment was subjected to convolution processing, output color images obtained. 本方法采用将彩色图片与高斯信号进行卷积处理的方式来达到图像锐化的目的,其中高斯信号所指示的锐化度由高斯信号中的参数所决定, 而高斯信号中的参数的大小是根据在步骤S204获得的彩色图片的压缩质量因子确定的。 The method of the present embodiment uses a Gaussian color picture signal convolution processing to achieve the purpose of sharpening the image, wherein the sharpness signal indicative of the Gaussian is determined by the Gaussian parameters, and the size parameter is a Gaussian signal according to obtained in step S204 color picture compression quality factor determined. 设彩色图片为f(X,y),高斯信号为g(r,0 ),那么经过卷积处理得到的输出彩色图片为: Provided color image is f (X, y), Gaussian signal g (r, 0), then after the convolution process color output images is obtained:

[0057]R(x,y)=f(x,y)*g(r, 〇) (5) [0057] R (x, y) = f (x, y) * g (r, square) (5)

[0058] 其中,1~和〇都是高斯信号中的参数,r为高斯信号的均值,〇为高斯信号的方差。 [0058] wherein 1 is square and Gaussian parameters, r is the mean Gaussian signals, square variance of the Gaussian. 1~和〇的值的大小是根据彩色图片的压缩质量因子而确定的。 1 to the value and size of the square image is compressed according to the color quality factor determined.

[0059] 以IJG定义的度量等级的压缩质量因子Q为例: [0059] The compression quality metrics class to IJG Q factor defined as an example:

[0060]若Q^95,r=5, 〇=0•4 ; [0060] When Q ^ 95, r = 5, square = 0 • 4;

[0061]若90 <Q〈95,r=5, 〇=0• 3; [0061] When 90 <Q <95, r = 5, square = 0 • 3;

[0062]若85 <Q〈90,r=5, 〇=0• 2; [0062] When 85 <Q <90, r = 5, square = 0 • 2;

[0063] 若Q〈85,不进行锐化处理。 [0063] When Q <85, sharpening processing is not performed.

[0064] 上述高斯信号的参数的具体数值是本发明提供的实施例之一,但不能作为是对本发明的限制。 Specific value [0064] parameters of the Gaussian signal is one of the embodiments of the present invention provides, but not as a limitation on the present invention.

[0065] 根据本实施例提供的将图片进行缩放处理的方法,通过对输入图片的类型进行判断,在判断出为灰度图片的情况下,对缩放处理后的灰度图片进行直方图均衡化处理,使灰度图片的像素倾向于占据整个可能的灰度级且分布均匀,从而达到了增强图片前景、背景间的对比度的目的,使得输出灰度图片更为清晰。 Method [0065] The scaled image processing according to the present embodiment is provided, by the type of the input image to judge, in a case where the gradation is judged that the image of gray scaled image histogram equalization processing processing, gradation image occupies the entire pixel tends possible gray level and uniformly distributed, thereby achieving enhanced image foreground, the contrast between the background object, so that output gradation image clearer. 而在判断出为彩色图片的情况下,获取该彩色图片的压缩质量因子,根据彩色图片的压缩质量因子对缩放处理后的彩色图片进行图像锐化处理,其中压缩质量因子指示出彩色图片的压缩率,也就是说,本实施例提供的方法根据彩色图片的压缩率对彩色图片进行不同程度的图像锐化处理,经过这样的处理之后, 原有的低品质的图片的清晰度得到大幅提高。 In the case of determining the color of the image, acquire the color image compression quality factor scaled color image processing in accordance with the image sharpening process color image compression quality factor, wherein the compression quality factor indicating the color image compression rate, that is to say, the method of the present embodiment is provided with different degrees of image sharpening a color image according to the compression ratio of a color image, after such treatment, the original low-resolution image quality is greatly improved. 总而言之,利用本实施例提供的方法可以对任何类型的图片的缩放处理进行优化,使得缩放处理后的图片更为清晰,该方法特别适用于对图片进行企业级的批量处理。 In summary, the present embodiment using the method provided can be scaled to any type of image processing is optimized, so that the image scaling process more clearly, the method is particularly suitable for the picture enterprise batch processing.

[0066] 图3示出了根据本发明一个实施例的对图片进行缩放处理的设备的结构示意图。 [0066] FIG. 3 shows a schematic configuration of the image scaling apparatus according to one embodiment of the process of the present invention. 如图3所示,该图片缩放设备300包括判断模块310、压缩质量因子确定模块320、第一缩放模块330和锐化模块340。 As shown in FIG. 3, the image scaling apparatus 300 includes a determining module 310, the compression quality factor determination module 320, a first scaling module 330 and a sharpening module 340.

[0067] 在图片缩放设备300中,判断模块310接收外界传送过来的输入图片,对输入图片的类型进行判断。 [0067] In the image scaling apparatus 300, the determining module 310 receives an input image transmitted from the outside, of the type of the input image is determined. 由于输入图片的类型不同导致对图片缩放后所作的处理会有所不同,因此在本设备中判断模块310需要首先对输入图片的类型进行判断,该判断过程主要是确定输入图片是彩色图片还是灰度图片。 Because different types of the input image results in image scaling made after treatment will vary, and therefore need to first module 310 determines the type of the input image is judged in the present apparatus, the determination process determines that the input image is mainly a color image or gray of the picture. 可选地,判断的依据是输入图片的颜色空间,如果输入图片的颜色空间为灰度,那么则确定该输入图片的类型为灰度图片;如果输入图片的颜色空间为RGB,那么则确定该输入图片的类型为彩色图片。 Alternatively, the determination is based on the input image color space, if the input image is a grayscale color space, then it is determined that the type of the input image into a grayscale image; If the input image color space is RGB, it is determined that the enter the type of picture color pictures.

[0068] 压缩质量因子确定模块320在判断模块310判断出输入图片的类型为彩色图片的情况下,获取指示彩色图片的压缩率的压缩质量因子。 [0068] The compression quality factor determination module 320 in a case where the determining module 310 determines that the input picture is a color picture type, a compression ratio acquisition compression quality factor indicating the color images. 当前互联网中的彩色图片都经过不同程度的压缩处理,以JPEG图片为例,这种类型图片的压缩主要包括四个步骤,分别为颜色转换、DCT变换、量化和编码,这四个步骤的详细过程可以参见上述方法实施例中的描述。 The current Internet color images are compressed to varying degrees, so as to JPEG images, for example, image compression of this type mainly includes four steps, respectively, the color conversion, the DCT transform, quantization and coding, four steps detailed see above described process may be the method in the embodiment. 在量化步骤中会选取压缩质量因子,该压缩质量因子指示了彩色图片的压缩率。 In the quantization step will select compression quality factor, the quality factor indicative of the compression of the color image compression. 若选取的压缩质量因子较大,可大幅度提高压缩比,但图像质量会较差;若选取的压缩质量因子较小,图像的重建质量较好,但压缩比较低。 If large compression quality factor selected, it can greatly improve the compression ratio, but the image quality is poor; if the selected quality factor less compressed, reconstructed image quality is better, but the compression is relatively low. 因此,压缩质量因子是表征彩色图片图像质量的一个因素。 Therefore, compression quality factor is a factor characterizing color picture image quality. 在判断出输入图片的类型为彩色图片的情况下,压缩质量因子确定模块320 获取该彩色图片的压缩质量因子。 In the case of determining the type of the input image is a color image, the compression quality factor determination module 320 acquires the color image compression quality factors. 可选地,压缩质量因子确定模块320具体适于通过分析彩色图片的内容获取彩色图片的压缩质量因子,将压缩质量因子转化为IJG的度量等级, 例如通过采用JPEGdump工具就可实现该功能。 Alternatively, the compression factor determining the quality of the compression module 320 adapted to acquire the quality factor specific color image by analyzing the content of the color images, compression quality factor is a measure of the conversion of IJG level, this function can be achieved e.g. by using JPEGdump tool. 之后,压缩质量因子确定模块320将压缩质量因子输出给锐化模块340。 Thereafter, the compression quality factor determination module 320 outputs the compressed mass to a sharpening factor module 340.

[0069] 第一缩放模块330对彩色图片进行缩放处理。 [0069] The scaling module 330 of the first color picture scaling processing. 具体地,第一缩放模块330按照插值或抽样算法,对彩色图片进行缩放处理。 Specifically, a first scaling module 330 in accordance with an interpolation or decimation algorithms, color picture scaling processing.

[0070] 锐化模块340根据彩色图片的压缩质量因子,对缩放处理后得到的彩色图片进行图像锐化处理,得到输出彩色图片。 [0070] Sharpening module 340 according to the color image compression quality factor, obtained after the scaling processing for image sharpening a color image processing, to obtain a color output image. 其中,压缩质量因子所指示的压缩率越高,锐化模块340 进行图像锐化的锐化度越低。 Wherein, the higher the compression rate indicated by the quality factor, the lower the sharpening module 340. Sharpening image sharpness.

[0071] 可选地,锐化模块340可以包括:锐化处理模块341和参数获取模块342,其中,锐化处理模块341将缩放处理后得到的彩色图片与指示不同锐化度的高斯信号进行卷积处理,得到输出彩色图片并输出;参数获取模块342根据彩色图片的压缩质量因子确定高斯信号中的参数的大小,高斯信号所指示的锐化度由高斯信号中的参数所决定。 [0071] Alternatively, sharpening module 340 may include: a processing module 341 and the sharpening parameter obtaining module 342, wherein the sharpening process module 341 and the scaled color image signals indicative of different Gaussian sharpness was subjected to post-treatment convolution processing, and outputs the obtained output color image; sharpness parameter obtaining module 342 sizing parameters Gaussian signal, indicative of a Gaussian signal is determined by the parameters of the Gaussian color picture compression factor determined in accordance with the quality. 其中锐化处理模块341对彩色图片进行锐化处理的详细过程可以参见上述方法实施例中的相关描述。 Wherein the detailed procedure of the sharpening processing module 341 for color image sharpening processing may refer to the above method in the embodiment related description.

[0072] 可选地,图片缩放设备300还可以包括格式转换模块350,该格式转换模块350适于将彩色图片的格式由原有格式转换为PNG格式,以及将缩放处理后得到的彩色图片的格式由PNG格式转换为原有格式。 [0072] Alternatively, image scaling apparatus 300 may further include a format conversion module 350, the format converting module 350 is adapted to convert the color from the original image format is PNG format, and the color scale of the image obtained after processing format conversion from the PNG format to the original format. 由于PNG格式的图片处理过程为无损过程,本设备选择在缩放处理之前将彩色图片的格式(如JPEG格式)转换为PNG格式,相对于其它格式来说,对PNG格式的彩色图片进行缩放处理,可以降低对清晰度的影响。 Since the image processing PNG format is a lossless process, prior to the present apparatus selects the scaling processing color image formats (e.g., JPEG format) converted to PNG format, with respect to the other formats, a color image is performed scaling processing PNG format, you can reduce the impact on clarity.

[0073] 进一步的,图片缩放设备300还可以包括第二缩放模块360和直方图均衡化处理模块370。 [0073] Further, the image scaling apparatus 300 may further include a second scaling module 360, and a histogram equalization processing module 370. 其中,第二缩放模块360在判断模块310判断出输入图片的类型为灰度图片的情况下,对灰度图片进行缩放处理。 Wherein the second scaling module 360 ​​in determining module 310 determines the type of the input image is the gradation image, the gradation image scaling process. 第二缩放模块360可按照插值或抽样算法,对灰度图片进行缩放处理。 The second scaling module 360 ​​in accordance with an interpolation or decimation algorithms, gray scaling image processing. 直方图均衡化处理模块370对缩放处理后得到的灰度图片进行直方图均衡化处理,得到输出灰度图片并输出。 Histogram equalization module 370 obtained after the scaling processing grayscale image histogram equalization processing, and outputs the resulting output tone image. 对于灰色图片,本设备采用直方图均衡化方法对其进行处理,能增强图片对比度。 For gray image, the device uses histogram equalization method to process it, can enhance the contrast of the picture. 直方图均衡化处理模块370对灰度图片进行直方图均衡化处理的详细过程可以参见上述方法实施例的相关描述。 Details histogram equalization process module 370 gray scale image histogram equalization process may refer to the above description of the embodiments related to the method.

[0074] 根据本实施例提供的将图片进行缩放处理的设备,通过判断模块对输入图片的类型进行判断,在判断出为灰度图片的情况下,直方图均衡化处理模块对缩放处理后的灰度图片进行直方图均衡化处理,使灰度图片的像素倾向于占据整个可能的灰度级且分布均勾,从而达到了增强图片前景、背景间的对比度的目的,使得输出灰度图片更为清晰。 [0074] The apparatus for image scaling process according to the present embodiment is provided, for determination of the type of the input image by the determining module, in a case where it is determined that the grayscale image, histogram equalization processing module scaled image pixel intensity histogram equalization processing, gradation tends to occupy the entire image may be a gray level distribution and average hook, so as to achieve enhanced image foreground, the contrast between the background object, so that output gradation image more It is clear. 而在判断出为彩色图片的情况下,压缩质量因子确定模块获取该彩色图片的压缩质量因子,锐化模块根据彩色图片的压缩质量因子对缩放处理后的彩色图片进行图像锐化处理,其中压缩质量因子指示出彩色图片的压缩率,也就是说,本实施例提供的设备根据彩色图片的压缩率对彩色图片进行不同程度的图像锐化处理,经过这样的处理之后,原有的低品质的图片的清晰度得到大幅提高。 In the case of determining the color of the image, compression quality factor determination module that acquires color image compression quality factor, sharpening module scaled color image processing in accordance with the image sharpening process color image compression quality factors, wherein the compressed quality factor indicating the compression of the color image, that is, the device of the present embodiment provided with different degrees of image sharpening a color image according to the compression ratio of a color image, after such treatment, the original low quality Image clarity is greatly improved. 总而言之,利用本实施例提供的设备可以对任何类型的图片的缩放处理进行优化,使得缩放处理后的图片更为清晰,该设备特别适用于对图片进行企业级的批量处理。 In summary, with the present apparatus according to an embodiment of the process can be scaled to any type of image will be optimized so that the image scaling process more clearly, the apparatus is particularly suitable for the picture enterprise batch processing.

[0075] 在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。 [0075] The algorithms and displays are not provided, the virtual system or other device inherently related to any particular computer. 各种通用系统也可以与基于在此的示教一起使用。 Various general-purpose systems may also be used with the teachings herein based. 根据上面的描述,构造这类系统所要求的结构是显而易见的。 According to the above description, the configuration of such a system requires a structure will be apparent. 此外,本发明也不针对任何特定编程语言。 Further, the present invention is not to any particular programming language. 应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。 It should be appreciated that a variety of programming languages ​​may be utilized to achieve the present invention described herein, the above description and specific language is made to the disclosure of preferred embodiments of the present invention.

[0076] 在此处所提供的说明书中,说明了大量具体细节。 [0076] In the description provided herein, numerous specific details are described. 然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。 However, it can be understood that the embodiments of the present invention may be practiced without these specific details. 在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。 In some examples, not shown in detail in well-known methods, structures and techniques, so as not to obscure the understanding of this description.

[0077] 类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。 [0077] Similarly, it should be understood that the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects in the description of exemplary embodiments of the present invention, various features of the invention are sometimes grouped into a single together embodiment, FIG, or the description thereof. 然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。 However, the methods disclosed herein should not be interpreted as reflecting an intention: that the claimed invention requires more features than in each of the claims expressly recited. 更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。 More specifically, as reflected in the book as the following claims, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. 因此, 遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。 Thus, the claims following the specific embodiments are hereby incorporated into this Detailed Description explicitly, with each claim itself as a separate embodiment of the present invention.

[0078] 本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。 [0078] Those skilled in the art can understand may be made to change adaptively embodiment device module and provided them with one or more devices different from this embodiment of the. 可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。 The embodiments may be modules or units into one module or component or components or units, and in addition they can be divided into a plurality of sub-modules or sub-units or sub-assemblies. 除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。 Any method other than such features and / or process, or at least some of the units are mutually exclusive, any combination of the present specification (including the accompanying claims, abstract and drawings) All of the features disclosed in, or disclosed herein and such All process units or equipment combination. 除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。 Unless expressly stated otherwise, each feature of the present specification (including the accompanying claims, abstract and drawings) may be provided by the same disclosed, characterized equivalents or similar purpose may be substituted.

[0079] 此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。 [0079] Moreover, those skilled in the art will appreciate that although in some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant in the present within the scope of the invention and form different embodiments. 例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。 For example, in one embodiment any forth in the following claims, it may be claimed in any combination used.

[0080] 本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。 Example [0080] The various components of the present invention may be implemented in hardware, or as software modules running on one or more processors, or in a combination thereof. 本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的将图片进行缩放处理的设备中的一些或者全部部件的一些或者全部功能。 Those skilled in the art will appreciate that a microprocessor may be used or a digital signal processor (DSP) to implement in practice, some or all of the functions of the scaling processing apparatus in accordance with some or all of the components of the embodiment of the present invention, image . 本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。 The present invention may also be implemented as a part or all of the device or apparatus programs for performing the methods described herein (e.g., computer programs and computer program products). 这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。 Such a program implementing the present invention may be stored on a computer-readable medium, or may have the form of one or more signals. 这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。 Such signals can be downloaded from the Internet website, or provided on a carrier signal, or in any other form.

[0081] 应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。 [0081] It should be noted that the embodiments of the present invention, the above-described embodiments illustrate rather than limit the invention, and those skilled in the art without departing from the scope of the appended claims may be devised alternative embodiments. 在权利要求中, 不应将位于括号之间的任何参考符号构造成对权利要求的限制。 In the claims, should not be limited by any reference signs located claimed configured to claims between parentheses. 单词"包含"不排除存在未列在权利要求中的元件或步骤。 The word "comprising" does not exclude the presence of elements or steps not listed in the appended claims. 位于元件之前的单词"一"或"一个"不排除存在多个这样的元件。 Preceding an element of the word "a" or "an" does not exclude the presence of a plurality of such elements. 本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。 The present invention by means of hardware comprising several distinct elements, and by means of a suitably programmed computer implemented. 在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。 Unit claims enumerating several means, several of these means may be embodied by the same item of hardware. 单词第一、第二、以及第三等的使用不表示任何顺序。 Word of the first, second, and third, etc. does not denote any order. 可将这些单词解释为名称。 These words can be interpreted as names.

Claims (10)

  1. 1. 一种图片缩放处理方法,包括: 对输入图片的类型进行判断; 在判断出所述输入图片的类型为彩色图片的情况下,获取指示所述彩色图片的压缩率的压缩质量因子; 对所述彩色图片进行缩放处理;以及将缩放处理后得到的彩色图片与指示不同锐化度的高斯信号进行卷积处理,得到输出彩色图片,其中高斯信号所指示的锐化度由高斯信号中的参数所决定,而所述高斯信号中的参数的大小是根据所述彩色图片的压缩质量因子确定的,设彩色图片为f( x,y),高斯信号为g(r, 〇),经过卷积处理得到的输出彩色图片为:R(x,y) =f(x,y)*g(r, 〇); 其中,1~和〇都是高斯信息中的参数,r为高斯信息的均值,〇为高斯信息的方差,r 和〇的值的大小是根据彩色图片的压缩质量因子而确定的。 An image scaling processing method comprising: determining the type of input picture; when determining the type of the input image is a color image, the compression ratio acquisition compression quality factor indicating the color images; for the color picture scaling processing; and a scaled signal indicative of a color different Gaussian image sharpness after treatment was subjected to convolution processing, to obtain the output color image, wherein the sharpness signal is indicated by a Gaussian signal in Gaussian the determined parameter and the size parameter of the Gaussian signal is determined based on the quality of the color picture compression factor is provided a color image f (x, y), Gaussian signal g (r, square), after rolling treating the resulting product of a color output image is: R (x, y) = f (x, y) * g (r, square); wherein 1 is the Gaussian square and parameter information, r is the mean Gaussian information , the size of the square is the variance value, r and Gaussian square color image information is compressed according to the determined quality factor.
  2. 2. 根据权利要求1所述的方法,其中所述压缩质量因子所指示的压缩率越高,图像锐化的锐化度越低。 2. The method according to claim 1, wherein the higher the compression factor of the compression ratio as indicated by mass, the lower the sharpening of the image sharpness.
  3. 3. 根据权利要求1或2所述的方法,在所述对彩色图片进行缩放处理之前还包括:将所述彩色图片的格式由原有格式转换为流式网络图形格式; 在所述对彩色图片进行缩放处理之后还包括:将缩放处理后得到的彩色图片的格式由流式网络图形格式转换为原有格式。 3. The method of claim 1 or claim 2, prior to the color image zoom processing further comprising: the color format of the original image is converted into a streaming format Network Graphics; the color after the image scaling process further comprising: after the scaling processing to obtain a color image format conversion by the stream of the original network graphics format.
  4. 4. 根据权利要求1所述的方法,所述获取所述彩色图片的压缩质量因子的步骤包括: 通过分析所述彩色图片的内容获取彩色图片的压缩质量因子,将所述压缩质量因子转化为独立JPEG小组的度量等级。 4. The method according to claim 1, said step of acquiring said compression quality factor of color images comprising: capturing a color image compression by analyzing the content of the quality factor of a color picture, the compression quality factor into independent metric grade JPEG group.
  5. 5. 根据权利要求1所述的方法,还包括: 在判断出所述输入图片的类型为灰度图片的情况下,按照插值或抽样算法,对所述灰度图片进行缩放处理; 对缩放处理后得到的灰度图片进行直方图均衡化处理,得到输出灰度图片。 5. The method according to claim 1, further comprising: in the case of determining the type of the input image is a gray image, or sampling of an interpolation algorithm, the grayscale image scaling process; scaling processing after the obtained image to grayscale histogram equalization, to obtain output gray image.
  6. 6. -种图片缩放处理设备,包括: 判断模块,适于对输入图片的类型进行判断; 压缩质量因子确定模块,适于在所述判断模块判断出所述输入图片的类型为彩色图片的情况下,获取指示所述彩色图片的压缩率的压缩质量因子; 第一缩放模块,适于对所述彩色图片进行缩放处理;以及锐化处理模块,适于将缩放处理后得到的彩色图片与指示不同锐化度的高斯信号进行卷积处理,得到输出彩色图片; 参数获取模块,适于根据所述彩色图片的压缩质量因子确定所述高斯信号中的参数的大小,高斯信号所指示的锐化度由高斯信号中的参数所决定; 设彩色图片为f(x,y),高斯信号为g(r,〇),经过卷积处理得到的输出彩色图片为: R(x, y) = f (x, y)*g(r, 〇); 其中,1~和〇都是高斯信息中的参数,r为高斯信息的均值,〇为高斯信息的方差,r 和〇的值的大小是根 6. - kind of image scaling processing apparatus, comprising: a determining module, adapted to judge the type of the input picture; compression quality factor determination module, adapted to the case of the determination means determines the type of the input image is a color image next, obtaining a quality factor indicating the compression rate of the compressed color images; a first scaling module, adapted to perform scaling processing of the color image; and a color image indicative of the sharpening process module adapted obtained after the scaling processing different sharpness Gaussian convolution processing signals to obtain an output color image; parameter obtaining module, adapted to determine the size of the sharpening parameters of the Gaussian, Gaussian indicated according to the color image compression quality factors degree determined by the Gaussian parameters; set the color image is f (x, y), Gaussian signal g (r, square), obtained through the convolution process color output images is: R (x, y) = f (x, y) * g (r, square); wherein 1 is the Gaussian square parameters and information, r is the mean Gaussian information size value for the square of the variance, r and Gaussian square root information 彩色图片的压缩质量因子而确定的。 Color picture compression quality factor determined.
  7. 7. 根据权利要求6所述的设备,所述压缩质量因子所指示的压缩率越高,所述锐化处理模块进行图像锐化的锐化度越低。 7. The apparatus according to claim 6, the higher the compression rate compression quality factor indicated by the sharpening processing module lower image sharpening sharpness.
  8. 8. 根据权利要求6或7所述的设备,还包括: 格式转换模块,适于将所述彩色图片的格式由原有格式转换为流式网络图形格式,以及将缩放处理后得到的彩色图片的格式由流式网络图形格式转换为原有格式。 8. The apparatus according to claim 6 or claim 7, further comprising: a format conversion module, adapted to the format of the original color picture is converted into a streaming format Network Graphics format, and the scale of the color image obtained after processing format conversion by the stream of the original network graphics format.
  9. 9. 根据权利要求6所述的设备,所述压缩质量因子确定模块具体适于通过分析所述彩色图片的内容获取彩色图片的压缩质量因子,将所述压缩质量因子转化为独立JPEG小组的度量等级。 9. The apparatus of claim 6, wherein said compression quality factor determination module is adapted to obtain a color image compression by analyzing the content of the quality factor of a color picture, the compression quality factor into the Independent JPEG Group metric grade.
  10. 10. 根据权利要求6所述的设备,还包括: 第二缩放模块,适于在所述判断模块判断出所述输入图片的类型为灰度图片的情况下,按照插值或抽样算法,对所述灰度图片进行缩放处理; 直方图均衡化处理模块,适于对缩放处理后得到的灰度图片进行直方图均衡化处理, 得到输出灰度图片。 10. The apparatus according to claim 6, further comprising: a second scaling module, adapted to a case where the determination means determines the type of the input image is a gradation image, or sampling of an interpolation algorithm, of the scaling processing said image to grayscale; histogram equalization processing module adapted to process the obtained gray scale image histogram equalization process to obtain output gray image.
CN 201210400944 2012-10-19 2012-10-19 Image scaling processing method and apparatus CN102883165B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201210400944 CN102883165B (en) 2012-10-19 2012-10-19 Image scaling processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201210400944 CN102883165B (en) 2012-10-19 2012-10-19 Image scaling processing method and apparatus

Publications (2)

Publication Number Publication Date
CN102883165A true CN102883165A (en) 2013-01-16
CN102883165B true CN102883165B (en) 2015-10-07

Family

ID=47484280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201210400944 CN102883165B (en) 2012-10-19 2012-10-19 Image scaling processing method and apparatus

Country Status (1)

Country Link
CN (1) CN102883165B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103606161A (en) * 2013-12-03 2014-02-26 山东中医药大学 Method and system for processing medical image
CN105138694A (en) * 2015-09-21 2015-12-09 合一网络技术(北京)有限公司 Method and device for graphics interchange format (GIF) recording
CN105631467A (en) * 2015-12-18 2016-06-01 小米科技有限责任公司 Method and device for displaying picture

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162104B2 (en) * 2002-08-30 2007-01-09 W.W. Grainger, Inc. System and method for image compression, storage, and retrieval
US8442344B2 (en) * 2006-08-07 2013-05-14 Qualcomm Incorporated Adaptive spatial image filter for filtering image information
CN102129644A (en) * 2011-03-08 2011-07-20 北京理工大学 Intelligent advertising system having functions of audience characteristic perception and counting
CN102868847B (en) * 2012-10-19 2014-12-10 北京奇虎科技有限公司 Image type based processing method and device

Also Published As

Publication number Publication date Type
CN102883165A (en) 2013-01-16 application

Similar Documents

Publication Publication Date Title
US7894684B2 (en) Visual processing device, visual processing method, program, display device, and integrated circuit
US7020332B2 (en) Method and apparatus for enhancing a digital image by applying an inverse histogram-based pixel mapping function to pixels of the digital image
US20100226547A1 (en) Multi-Modal Tone-Mapping of Images
US20110229019A1 (en) Scene Adaptive Brightness/Contrast Enhancement
WO2014130343A2 (en) Display management for high dynamic range video
JP2003134352A (en) Image processing method and apparatus, and program therefor
WO2014025588A1 (en) Image processing for hdr images
US20100080485A1 (en) Depth-Based Image Enhancement
CN101340511A (en) Adaptive video image enhancing method based on lightness detection
CN102231264A (en) Dynamic contrast enhancement device and method
CN101707666A (en) Adjusting method and device with high dynamic range
Bandoh et al. Recent advances in high dynamic range imaging technology
JP2004159311A (en) Image processing apparatus and image processing method
US7983511B1 (en) Methods and apparatus for noise reduction in digital images
US7613338B2 (en) Image processing method and apparatus, program, and storage medium
JP2004310475A (en) Image processor, cellular phone for performing image processing, and image processing program
CN101809617A (en) Enhancing dynamic ranges of images
US20080226191A1 (en) Picture processing apparatus and method
JP2004530368A (en) Image quality improvement method and apparatus for the
CN102257531A (en) High dynamic range image combining
Lee et al. A space-variant luminance map based color image enhancement
US20120093433A1 (en) Dynamic Adjustment of Noise Filter Strengths for use with Dynamic Range Enhancement of Images
CN101305397A (en) Method for forming image based on a plurality of image framesImage processing system and digital camera
US20130257887A1 (en) System for improved image enhancement
CN104240194A (en) Low-light-level image enhancement algorithm based on parabolic function

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model