[go: up one dir, main page]

CN101329762A - Fidelity Evaluation Method Based on Context-Dependent Image Resizing - Google Patents

Fidelity Evaluation Method Based on Context-Dependent Image Resizing Download PDF

Info

Publication number
CN101329762A
CN101329762A CNA2008101176782A CN200810117678A CN101329762A CN 101329762 A CN101329762 A CN 101329762A CN A2008101176782 A CNA2008101176782 A CN A2008101176782A CN 200810117678 A CN200810117678 A CN 200810117678A CN 101329762 A CN101329762 A CN 101329762A
Authority
CN
China
Prior art keywords
image
point
stripe
fidelity
energy
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.)
Granted
Application number
CNA2008101176782A
Other languages
Chinese (zh)
Other versions
CN100583145C (en
Inventor
刘永进
姜昌浩
钟力立
丁剑飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN200810117678A priority Critical patent/CN100583145C/en
Publication of CN101329762A publication Critical patent/CN101329762A/en
Application granted granted Critical
Publication of CN100583145C publication Critical patent/CN100583145C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

基于内容相关图像尺寸调整的保真度评测方法,属于图像保真度评估技术,其特征在于,包括以下步骤:A.利用需要评估的能量函数,通过seam carving算法,对预先选择的图像进行内容相关的尺寸缩放;B.在调整后的图中寻找原图的对应点;C.将调整后的图与原图进行比较,并根据比较结果得到该能量函数的保真度评估结果;还公开了一种seam carving算法中不同能量函数的图像保真度评测系统,包括:参考图像数据库、seam caving算法单元和保真度评估单元;本发明技术方案可以对内容相关的尺寸变化后的图像进行保真度评测,由此实现该图像在不同能量函数下的内容相关尺寸变化后的图像保真度评测。

Figure 200810117678

The fidelity evaluation method based on content-dependent image size adjustment belongs to the image fidelity evaluation technology, and is characterized in that it comprises the following steps: A. utilizing the energy function to be evaluated, and carrying out the content of the pre-selected image through the seam carving algorithm Relevant size scaling; B. Find the corresponding points of the original image in the adjusted image; C. Compare the adjusted image with the original image, and obtain the fidelity evaluation result of the energy function according to the comparison results; also disclosed An image fidelity evaluation system with different energy functions in the seam carving algorithm is provided, including: a reference image database, a seam caving algorithm unit and a fidelity evaluation unit; Fidelity evaluation, thereby realizing the image fidelity evaluation after the content-related size of the image is changed under different energy functions.

Figure 200810117678

Description

基于内容相关图像尺寸调整的保真度评测方法 Fidelity Evaluation Method Based on Context-Dependent Image Resizing

技术领域 technical field

本发明涉及图像保真度评估技术,特别涉及基于内容相关尺寸调整技术的图像保真度评测方法。The invention relates to image fidelity evaluation technology, in particular to an image fidelity evaluation method based on content-dependent size adjustment technology.

背景技术 Background technique

现代社会中,我们接触的显示屏幕越来越多。从小的如照相机屏幕、手机屏幕,到大的如电脑显示器、电影屏幕等尺寸变化范围很大,而且长宽比例也有不同。因此要求同样的图像能够变化为不同的尺寸显示在尺寸不一、长宽比不一的屏幕上。现有的技术都是通过简单的图像拉伸或剪切,对于长宽比相同的屏幕利用拉伸尚且还好,可是对于长宽比不同的屏幕就会导致图像主题内容变形或丢失信息。而在数字电视、智能手机已经逐渐普及的今天,这样的结果是无法让人满意的。而内容相关图像尺寸调整技术是一种利用计算机算法对图像进行处理,以实现主题内容基本不变的技术。在硬件系统日趋完善的同时,我们可以很清楚地看到内容相关尺寸调整技术广阔的发展前景。In modern society, we are exposed to more and more display screens. There is a wide range of sizes from small ones such as camera screens and mobile phone screens to large ones such as computer monitors and movie screens, and the aspect ratios are also different. Therefore, it is required that the same image can be changed into different sizes and displayed on screens with different sizes and different aspect ratios. Existing technologies use simple image stretching or cropping. For screens with the same aspect ratio, using stretching is still good, but for screens with different aspect ratios, it will cause image subject content to be deformed or lose information. Today, when digital TV and smart phones are gradually popularized, such a result is unsatisfactory. The content-dependent image resizing technology is a technology that uses computer algorithms to process images so that the subject content is basically unchanged. While the hardware system is becoming more and more perfect, we can clearly see the broad development prospects of content-dependent resizing technology.

在内容相关图像尺寸调整技术中,常使用seam carving算法。【seam carving算法相关内容及具体实施及操作参见Shai Avidan,Ariel Shamir,Seam Carving for Content-Aware ImageResizing ACM Transactions on Graphics,Volume 26,Number 3,(SIGGRAPH 2007)】简单地说,seam carving算法就是尽量在不改变图像连续性的情况下把能量比较低的点去掉,以适应目标尺寸。而对于能量的定义就是要把与周围颜色区别大的点赋予较高的能量值,因为人眼对它们的识别性更强,同时可以把我们想要留下的内容赋予较高的能量值,以满足使用者的需求。In content-related image resizing technology, the seam carving algorithm is often used. [See Shai Avidan, Ariel Shamir, Seam Carving for Content-Aware ImageResizing ACM Transactions on Graphics, Volume 26, Number 3, (SIGGRAPH 2007) for the relevant content and specific implementation and operation of the seam carving algorithm] Simply put, the seam carving algorithm is to try to Remove the points with lower energy without changing the continuity of the image to adapt to the target size. The definition of energy is to assign higher energy values to the points that are greatly different from the surrounding colors, because the human eye is more recognizable to them, and at the same time, we can assign higher energy values to the content we want to leave, to meet the needs of users.

可见seam carving算法基于energy function单元,也就是我们说的能量函数。可以说,能量函数是seam carving算法的核心与灵魂,不同能量函数会产生不同seam,这样经过seamcarving算法形成的调整图也会有差别。It can be seen that the seam carving algorithm is based on the energy function unit, which is what we call the energy function. It can be said that the energy function is the core and soul of the seam carving algorithm. Different energy functions will produce different seams, so the adjustment map formed by the seamcarving algorithm will also be different.

最常见的能量函数是图像的梯度函数,它的定义是每一点的能量值为该点在横向上的梯度值的绝对值加上在纵向上的梯度值的绝对值;较常用的还有其他边缘检测算子,如Prewitt算子,Sobel算子等。The most common energy function is the gradient function of the image. Its definition is that the energy value of each point is the absolute value of the gradient value of the point in the horizontal direction plus the absolute value of the gradient value in the vertical direction; more commonly used are other Edge detection operators, such as Prewitt operator, Sobel operator, etc.

目前,人们都是采用人眼直接观察的方式比较各种能量函数方法的优劣。但进行此类心理物理学实验显然存在单调乏味、昂贵、周期长、不易自动化操作和不易复制等缺点。而目前新的能量函数方式层出不穷,每出现一个新的能量函数就迅速进行一次心理物理学实验是不现实的,而利于计算机来进行模拟智能评测显然是最理想的方式。At present, people use direct observation with human eyes to compare the pros and cons of various energy function methods. However, such psychophysical experiments obviously have disadvantages such as tedious, expensive, long cycle, difficult to automate and difficult to replicate. At present, new energy function methods are emerging in an endless stream. It is unrealistic to quickly conduct a psychophysical experiment every time a new energy function appears, and it is obviously the most ideal way to use computers to simulate intelligence evaluation.

发明内容: Invention content:

有鉴于此,本发明的一个主要目的在于,提供一种图像保真度评测方法,能够提高对seamcarving算法中不同能量函数进行评估的准确性和效率。In view of this, a main purpose of the present invention is to provide a method for evaluating image fidelity, which can improve the accuracy and efficiency of evaluating different energy functions in the seamcarving algorithm.

本发明的另一个主要目的在于,提供一种图像保真度评测系统,能够提高对seam carving算法中不同能量函数进行评估的准确性和效率。Another main purpose of the present invention is to provide an image fidelity evaluation system, which can improve the accuracy and efficiency of evaluating different energy functions in the seam carving algorithm.

所述评估方法如下:The evaluation method described is as follows:

步骤(1):初始化,在所述计算机中建立以下各单元,构建一个评测系统:Step (1): Initialize, set up the following units in the computer to build an evaluation system:

参考图像数据库单元,存有待处理的参考图像资料,包括:原图,能量图,条纹seam图;The reference image database unit stores reference image data to be processed, including: original image, energy image, and fringe seam image;

条纹切割算法单元,在输入待测能量函数后,通过条纹切割seam carving算法对载入的所述参考图像进行内容相关的图像尺寸调整,同时在调整过程中记录下所述原图各点在所述调整结束后得到的后图上的对应点的位置,其中设有:能量计算单元,条纹寻找单元,调整图像尺寸单元以及对应点计算单元,其中:The strip cutting algorithm unit, after inputting the energy function to be measured, performs content-related image size adjustment on the loaded reference image through the strip cutting seam carving algorithm, and records the position of each point in the original image during the adjustment process. The position of the corresponding point on the rear map obtained after the adjustment is completed, wherein there are: an energy calculation unit, a fringe search unit, an image size adjustment unit and a corresponding point calculation unit, wherein:

所述的能量计算单元,载入需要评估的能量函数并从所述参考图像数据库载入原图,对原图中的点的能量进行计算,生成能量图,再将能量图载入所述参考图像数据库;The energy calculation unit loads the energy function to be evaluated and loads the original image from the reference image database, calculates the energy of points in the original image to generate an energy map, and then loads the energy map into the reference image database;

所述的条纹寻找单元,从所述的能量计算单元载入能量图,利用条纹切割seam carving算法寻找条纹线得到条纹seam图,再将条纹seam图载入所述参考图像数据库;The fringe search unit loads the energy map from the energy calculation unit, uses the fringe cutting seam carving algorithm to find fringe lines to obtain a fringe seam map, and then loads the fringe seam map into the reference image database;

所述的调整图像尺寸单元,从所述的条纹寻找单元输入条纹seam图,依照预先载入所述计算机的目标尺寸逐次地去掉能量最低的一条条纹,得到所述的后图;The image size adjustment unit inputs the fringe seam image from the fringe search unit, and successively removes a fringe with the lowest energy according to the target size preloaded into the computer to obtain the rear image;

所述的对应点计算单元,从所述的条纹寻找单元载入条纹seam图,计算原图中条纹两侧点在所述后图中的对应点的位置:初始时,原图上各点的对应点位置即为当前所在位置,在每去掉一个条纹时:若被去掉的条纹是垂直条纹,则位于该条纹左边的点的所述对应点位置不变;若被去掉的条纹是水平条纹,则位于该条纹上边的点的所述对应点位置不变;若被去掉的条纹是垂直条纹,则位于该条纹右边的点的所述对应点位置沿水平方向向左移动一个单位;若被去掉的条纹是水平条纹,则位于该条纹下边的点的所述对应点位置沿垂直方向向上移动一个单位;The corresponding point calculation unit loads the stripe seam map from the stripe search unit, and calculates the positions of the points on both sides of the stripes in the original image in the corresponding points in the rear image: initially, each point on the original image The position of the corresponding point is the current position, and each time a stripe is removed: if the removed stripe is a vertical stripe, the corresponding point position of the point to the left of the stripe remains unchanged; if the removed stripe is a horizontal stripe, Then the position of the corresponding point of the point above the stripe remains unchanged; if the removed stripe is a vertical stripe, the position of the corresponding point of the point on the right side of the stripe moves to the left by one unit in the horizontal direction; if removed If the stripe is a horizontal stripe, the position of the corresponding point of the point below the stripe moves upward by one unit in the vertical direction;

保真度评估单元,比较原图上点及其在后图上对应点的窗口矩阵之间的差异,从而计算所述后图的保真度值,并依据此量化结果得到保真度的评估结果;The fidelity evaluation unit compares the difference between the point on the original image and the window matrix of the corresponding point on the subsequent image, so as to calculate the fidelity value of the latter image, and obtain the fidelity evaluation based on the quantitative result result;

所述某点的窗口矩阵是指:某点在该点所在图上的以该点为中心的一个9*9的矩形窗口,其内容为位于该窗口中点的信号值;The window matrix of a certain point refers to: a 9*9 rectangular window centered on a certain point on the graph where the point is located, and its content is the signal value at the midpoint of the window;

步骤(2):所述计算机依次按以下步骤进行所述的保真度评测方法,Step (2): The computer carries out the described fidelity evaluation method according to the following steps successively,

步骤(2.1),从所述能量计算单元依据输入的需要评估的能量函数,原图输出能量图;从条纹寻找单元依据能量图利用条纹切割算法输出条纹seam图;从调整图像尺寸单元依据设定的目标尺寸和条纹seam图向所述保真度评估单元输出所述后图,从所述对应点计算单元输出原图上各个点与该点在所述后图的位置之间的各个一一对应关系到所述的保真度评估单元中;Step (2.1), from the energy calculation unit according to the energy function of the input needs evaluation, the original image output energy map; from the stripe search unit using the stripe cutting algorithm to output the stripe seam graph according to the energy graph; from the adjustment image size unit according to the setting The target size and the striped seam figure output the back figure to the fidelity evaluation unit, and each point between each point on the original picture and the position of the point in the back figure is output from the corresponding point calculation unit Corresponding to the fidelity evaluation unit;

步骤(2.2),所述保真度评估单元按以下步骤进行保真度评估:Step (2.2), the fidelity evaluation unit performs the fidelity evaluation according to the following steps:

步骤(2.2.1),把载入的后图从红绿蓝三基色空间RGB转换到lαβ颜色空间,其中,l表示非颜色的亮度通道,α表示彩色的黄蓝通道,β表示彩色的红绿通道,找出所有的所述条纹两侧的点;若某点上下左右四点中有一点属于某个条纹则所述的某点即为所述某个条纹的两侧的点;Step (2.2.1), converting the loaded back image from the red, green and blue primary color space RGB to the lαβ color space, wherein l represents the brightness channel of non-color, α represents the yellow and blue channel of color, and β represents the red color of color Green channel, find all the points on both sides of the stripe; if one of the four points above, below, left, and right of a certain point belongs to a certain stripe, then the certain point is the point on both sides of the certain stripe;

步骤(2.2.2),计算步骤(2.2.1)得到的条纹两侧点的单个对应点的9*9矩阵窗口的单个颜色通道的保真度值Q:Step (2.2.2), calculating the fidelity value Q of a single color channel of the 9*9 matrix window of the single corresponding point of the points on both sides of the stripe obtained in step (2.2.1):

QQ == δδ xyxy δδ xx δδ ythe y 22 xyxy ‾‾ (( xx ‾‾ )) 22 ++ (( ythe y ‾‾ )) 22 22 δδ xx δδ ythe y δδ xx 22 ++ δδ ythe y 22

其中,x是所述原图的窗口矩阵中的点在某一个通道上的信号值;y是后图的对应点窗口矩阵中的点在此通道上的信号值,x,y是窗口矩阵中的点在某一个通道上的信号值的平均值,δx,δy是方差,δxy是协方差;Among them, x is the signal value of a point in the window matrix of the original image on a certain channel; y is the signal value of a point in the window matrix of the corresponding point in the following figure on this channel, and x, y are in the window matrix The average value of the signal value of the point on a certain channel, δx, δy is the variance, δxy is the covariance;

步骤(2.2.3),对所有待计算的所述后图上的对应点的保真度值按l、α、β三个通道分别进行算术平均,得到 Q z = ( Σ i = 1 M Q i ) / M 其中,z=l,α,β,M为对应点的个数;Step (2.2.3), the fidelity value of the corresponding point on all described back figure to be calculated is carried out arithmetic mean respectively by 1, α, β three channels, obtains Q z = ( Σ i = 1 m Q i ) / m Wherein, z=l, α, β, M is the number of corresponding points;

步骤(2.2.4),把l、α、β三个通道的对应点的保真度值Ql、Qα、Qβ加权几何平均后得到整幅图的保真度值 Q colour = ω l Q l 2 + ω α Q α 2 + ω β Q β 2 . In step (2.2.4), the fidelity values Q l , Q α , and Q β of the corresponding points of the three channels l, α , and β are weighted and geometrically averaged to obtain the fidelity value of the entire image Q color = ω l Q l 2 + ω α Q α 2 + ω β Q β 2 .

由上述方法可见,利用需要评估的能量函数,通过seam carving算法对预先选择的图像进行内容相关的尺寸缩放,并在调整图像的过程中计算原图和后图的点的位置之间的对应关系,最后将原图上点与对应点的窗口矩阵进行比较,得到量化的图像保真度评估结果,降低了评估的延迟性,得到了客观、精确的评估效果。It can be seen from the above method that using the energy function that needs to be evaluated, the content-related size scaling of the pre-selected image is performed through the seam carving algorithm, and the corresponding relationship between the positions of the original image and the post-image is calculated during the process of adjusting the image , and finally compare the point on the original image with the window matrix of the corresponding point to obtain the quantified image fidelity evaluation result, which reduces the evaluation delay and obtains an objective and accurate evaluation effect.

附图说明 Description of drawings

图1保真度评测系统示例性结构图Figure 1 Exemplary structure diagram of the fidelity evaluation system

图2保真度评测系统评估过程示意图Figure 2 Schematic diagram of the evaluation process of the fidelity evaluation system

图3保真度评测方法的示例性流程图Fig. 3 Exemplary flowchart of fidelity evaluation method

图4实施例中保真度方法流程图The flow chart of the fidelity method in the embodiment of Fig. 4

图5条纹seam线及对应点矩阵窗口示意图Figure 5 Schematic diagram of striped seam line and corresponding point matrix window

具体实施方式 Detailed ways

根据上述的第一个主要目的,本发明提供了一种图像保真度评测方法,包括以下步骤:According to the above-mentioned first main purpose, the present invention provides a method for evaluating image fidelity, comprising the following steps:

A利用需要评估的能量函数,通过seam carving算法,对预先选择的图像进行内容相关的尺寸缩放。A uses the energy function that needs to be evaluated to perform content-dependent size scaling on pre-selected images through the seam carving algorithm.

B在后图中寻找原图的对应点。B finds the corresponding points in the original image in the latter image.

C将后图与原图进行比较,并根据比较结果得到该能量函数的保真度评估结果。C compares the latter image with the original image, and obtains the fidelity evaluation result of the energy function according to the comparison result.

步骤A所述对图像进行内容相关的尺寸缩放为:在图像上选定需要保留的主题内容后,利用需要评估的能量函数,通过seam carving算法对图像进行基于主题内容的任意尺寸的图像缩放。The content-related scaling of the image in step A is as follows: After selecting the subject content to be retained on the image, using the energy function to be evaluated, the image is scaled to any size based on the subject content through the seam carving algorithm.

步骤B所述寻找原图和后图上的点的位置之间的对应关系:在增减seam线调整原图尺寸的同时,寻找后图上原图各点的对应点。。Find the corresponding relationship between the positions of the points on the original image and the subsequent image as described in step B: while adjusting the size of the original image by increasing or decreasing the seam line, find the corresponding points of each point on the original image on the subsequent image. .

步骤C所述根据比较结果得到评估结果为:只比较原图中seam线相邻两侧点与其后图上对应点的窗口矩阵之间的差异,从而计算后图的匹配值,得到量化的比较结果。In step C, the evaluation result obtained according to the comparison result is: only compare the difference between the points on the adjacent sides of the seam line in the original image and the window matrix of the corresponding point on the subsequent image, so as to calculate the matching value of the latter image and obtain a quantitative comparison result.

根据上述的第二个主要目的,本发明提供一种图像保真度评测系统,包括:参考图像数据库、seam carving算法单元、保真度评估单元。According to the above second main purpose, the present invention provides an image fidelity evaluation system, comprising: a reference image database, a seam carving algorithm unit, and a fidelity evaluation unit.

所述参考图像数据库提供要处理的参考图像资料。其中包括:原图,能量图,条纹seam图。之所以这样设计,是出于对某些能量函数的作者知识产权的保护。即如原作者不愿提供能量函数的代码,可以仅提供原图的能量图或条纹seam图,同样可以实现评测。The reference image database provides reference image material to be processed. These include: original image, energy image, and seam image. The reason for this design is to protect the author's intellectual property rights of certain energy functions. That is to say, if the original author is unwilling to provide the code of the energy function, he can only provide the energy map or the seam pattern of the original image, and the evaluation can also be realized.

所述seam carving算法单元将载入待测能量函数,并通过seam carving算法对参考图像进行内容相关的图像尺寸调整。同时将在调整过程中记录下原图各点在后图上的对应点。The seam carving algorithm unit will load the energy function to be measured, and perform content-related image size adjustment on the reference image through the seam carving algorithm. At the same time, the corresponding points of each point in the original image on the subsequent image will be recorded during the adjustment process.

所述保真度评估单元将后图与原图进行匹配度计算,利用图像变化特点,通过之比较原图seam线两侧点与其对应点的窗口矩阵之间的差异,从而计算后图的保真度值,得到量化的比较结果并根据比较结果得到算法保真度的评估结果。The fidelity evaluation unit calculates the degree of matching between the rear image and the original image, and compares the difference between the points on both sides of the seam line of the original image and the window matrix of the corresponding point by using the image change characteristics, thereby calculating the retention of the rear image. The truth value, get the quantified comparison result and get the evaluation result of the algorithm fidelity according to the comparison result.

为使本发明的目的、技术方案及优点更加清楚明白,以下参照附图并举实施例,对本发明进一步详细说明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and examples.

本发明中保真度评测方法的基本思想是:利用需要评估的能量函数,通过seam carving算法,对预先选择的图像进行内容相关的尺寸缩放。在后图中寻找原图的对应点。将后图与原图进行比较,并根据比较结果得到该能量函数的保真度评估结果。如图3所示The basic idea of the fidelity evaluation method in the present invention is to use the energy function to be evaluated to perform content-related size scaling on the pre-selected image through the seam carving algorithm. Find the corresponding points in the original image in the latter image. Compare the latter image with the original image, and obtain the fidelity evaluation result of the energy function according to the comparison result. As shown in Figure 3

图1为本发明中图像保真度评测系统的示例性结构图。如图1所示,本发明的图像保证评测系统包括:参考图像数据库11、seam carving算法单元12、保真度评估单元13。而seamcarving算法单元本身包括能量计算单元121、寻找seam单元122、调整尺寸单元123、对应点计算单元124。FIG. 1 is an exemplary structural diagram of an image fidelity evaluation system in the present invention. As shown in FIG. 1 , the image guarantee evaluation system of the present invention includes: a reference image database 11 , a seam carving algorithm unit 12 , and a fidelity evaluation unit 13 . The seamcarving algorithm unit itself includes an energy calculation unit 121 , a seam search unit 122 , a size adjustment unit 123 , and a corresponding point calculation unit 124 .

图2为本发明中保真度评测系统评估过程示意图。如图2所示,本发明的评估过程为:Fig. 2 is a schematic diagram of the evaluation process of the fidelity evaluation system in the present invention. As shown in Figure 2, the evaluation process of the present invention is:

参考图像数据库11将预先存储的参考图像提供给seam carving算法单元12和保真度评估单元13,参考图像数据库中可能包括普通图、能量图和条纹seam图。The reference image database 11 provides pre-stored reference images to the seam carving algorithm unit 12 and the fidelity evaluation unit 13, and the reference image database may include ordinary images, energy images and fringe seam images.

seam carving算法单元12利用需要评估的能量函数,通过seam carving算法,对预先选择的图像进行内容相关的尺寸缩放,同时在后图中寻找原图的对应点。将后图和原图各点对应关系提供给保真度评估单元13;其中能量计算单元121利用能量函数由图像的色彩信息计算,得到原图的能量图,如已提供能量图则跳过121单元;寻找seam单元122利用seam carving的算法由能量图计算,得到条纹seam图,如已提供条纹seam图则跳过121、122两个单元。调整尺寸单元123根据条纹seam图和目标尺寸,通过增减seam线来调整图像大小,得到后图。计算对应点单元124计算后图与原图的对应关系,得到后图上原图各点的对应点。The seam carving algorithm unit 12 uses the energy function to be evaluated to perform content-related size scaling on the pre-selected image through the seam carving algorithm, and at the same time finds the corresponding point in the original image in the subsequent image. Provide the corresponding relationship between each point of the rear image and the original image to the fidelity evaluation unit 13; wherein the energy calculation unit 121 uses the energy function to calculate from the color information of the image to obtain the energy map of the original image, and skip 121 if the energy map has been provided unit; looking for the seam unit 122 using the seam carving algorithm to calculate from the energy map to obtain the striped seam map, if the striped seam map has been provided, the two units 121 and 122 are skipped. The resizing unit 123 adjusts the size of the image by increasing or decreasing the seam line according to the fringe seam image and the target size to obtain the rear image. The corresponding point calculation unit 124 calculates the corresponding relationship between the rear image and the original image, and obtains the corresponding points of each point in the original image on the latter image.

保真度评估单元13将利用原图、后图及点的对应关系,对后图与原图上的对应点的窗口矩阵进行比较,并根据比较结果得到待测能量函数下seam carving算法保真度的评估结果。The fidelity evaluation unit 13 will use the corresponding relationship between the original image, the rear image and the points, compare the window matrix of the corresponding points on the rear image and the original image, and obtain the fidelity of the seam carving algorithm under the energy function to be measured according to the comparison result. Degree assessment results.

下面,结合具体实施例,对本发明中的图像保真度评测方法进行详细说明。In the following, the image fidelity evaluation method in the present invention will be described in detail in combination with specific embodiments.

步骤41,初始化。Step 41, initialization.

载入原图,选择能量函数,设置目标大小。Load the original image, select the energy function, and set the target size.

步骤42,能量计算。Step 42, energy calculation.

利用需要评估的能量函数,对原图各点的能量进行计算,生成能量图步骤43,寻找seam。Use the energy function to be evaluated to calculate the energy of each point in the original image, and generate an energy graph. Step 43 is to search for seam.

根据上步提供的能量图,利用seam carving算法寻找seam线,进而得到条纹seam图According to the energy map provided in the previous step, use the seam carving algorithm to find the seam line, and then get the striped seam map

步骤44,调整图像尺寸。Step 44, adjust image size.

依照目标尺寸每次去除当前能量最低的一条seam线。得到后图According to the target size, the seam line with the lowest current energy is removed each time. After getting the picture

步骤45,对应点计算。Step 45, corresponding point calculation.

初始时每点的对应点位置即为该点当前所在位置,每去掉一个seam,seam左边(垂直seam)或上边(水平seam)的点的对应点位置不变,seam右边(垂直seam)或下边(水平seam)的点的对应点位置左移(垂直seam)或上移(水平seam)一个单位。此步骤同步骤44交替进行。Initially, the corresponding point position of each point is the current position of the point. Every time a seam is removed, the corresponding point position of the point on the left side of the seam (vertical seam) or the top side (horizontal seam) remains unchanged, and the right side of the seam (vertical seam) or bottom side (Horizontal seam) The corresponding point position of the point is moved left (vertical seam) or up (horizontal seam) by one unit. This step is performed alternately with step 44.

步骤46,保真度评估。Step 46, fidelity evaluation.

首先将图像从RGB颜色空间转化到lαβ颜色空间(其中,l表示非颜色的亮度通道,α表示彩色的黄蓝通道,β表示彩色的红绿通道),然后找出所有的seam两侧的点。由于seam有横向的也有纵向的,seam两侧的点的定义是:若某点上下左右四点中有一点属于某一条seam,则此点算作seam两侧的点。计算这些seam两侧点的单个对应点9×9矩形窗口(如图5)单个颜色通道的保真度值,此保真度值的计算方法如下:First convert the image from the RGB color space to the lαβ color space (where l represents the brightness channel of non-color, α represents the yellow and blue channel of color, and β represents the red and green channel of color), and then find all the points on both sides of the seam . Since seam has horizontal and vertical, the definition of points on both sides of seam is: if one of the four points above, below, left, and right of a certain point belongs to a certain seam, then this point is counted as the point on both sides of seam. Calculate the fidelity value of a single color channel of a single corresponding point 9×9 rectangular window (as shown in Figure 5) of the points on both sides of the seam. The calculation method of this fidelity value is as follows:

QQ == δδ xyxy δδ xx δδ ythe y 22 xyxy ‾‾ (( xx ‾‾ )) 22 ++ (( ythe y ‾‾ )) 22 22 δδ xx δδ ythe y δδ xx 22 ++ δδ ythe y 22

其中x是原图的窗口矩阵中的点在某一个通道上的信号值,y后图的对应点窗口矩阵中的点在此通道上的信号值,x,y是窗口矩阵中的点在某一个通道上的信号值的平均值,δx,δy是方差,δxy是协方差。Where x is the signal value of a point in the window matrix of the original image on a certain channel, y is the signal value of a point in the window matrix of the corresponding point in the subsequent image on this channel, x, y are the points in the window matrix in a certain channel The mean value of the signal value on a channel, δx, δy is the variance, δxy is the covariance.

然后对所有需计算的对应点的每个通道的保真度值取平均,得到Then average the fidelity values of each channel for all corresponding points to be calculated to obtain

Q z = ( Σ i = 1 M Q i ) / M , ( z = l , α , β ) , 每通道的标准值为1。 Q z = ( Σ i = 1 m Q i ) / m , ( z = l , α , β ) , The standard value is 1 per channel.

再将三个通道的对应点保真度的值加权平均后得到Then the weighted average of the corresponding point fidelity values of the three channels is obtained

QQ colourcolor == ωω ll QQ ll 22 ++ ωω αα QQ αα 22 ++ ωω ββ QQ ββ 22

此即为整幅图的保真度值,现各通道取系数为1,故总Q值的标准值为

Figure A20081011767800094
This is the fidelity value of the whole image. Now the coefficient of each channel is 1, so the standard value of the total Q value is
Figure A20081011767800094

将得到的保真度值与标准值

Figure A20081011767800101
比较,越接近标准值,说明被评测算法的保真度效果越好。Compare the resulting fidelity value with the standard value
Figure A20081011767800101
Comparison, the closer to the standard value, the better the fidelity effect of the evaluated algorithm.

其中,步骤46中采用计算公式 Q = δ xy δ x δ y 2 xy ‾ ( x ‾ ) 2 + ( y ‾ ) 2 2 δ x δ y δ x 2 + δ y 2 , 是由于它计算简单,与主观质量评价关联性较强,能够很好地从亮度、对比度、结构三个子方面得到一个总的相似性度量作为质量客观评价标准。该方法充分考虑了图像的结构信息和人类视觉的特性,从图像内容的理解功能出发,通过数学建模估算出人眼对图像质量的主观视觉感受,使结构相似性计算模型符合图像处理应用的本质。关于此公式参见【Zhou Wang and Alan C.Bovik,AUniversal Image Quality Index,IEEE Signal Processing Letters,vol.9,no.3,pp.81-84,March2002】Wherein, the calculation formula is adopted in step 46 Q = δ xy δ x δ the y 2 xy ‾ ( x ‾ ) 2 + ( the y ‾ ) 2 2 δ x δ the y δ x 2 + δ the y 2 , It is because it is simple to calculate and has a strong correlation with subjective quality evaluation, and can obtain a total similarity measure from the three sub-aspects of brightness, contrast, and structure as an objective quality evaluation standard. This method fully considers the structural information of the image and the characteristics of human vision. Starting from the understanding function of the image content, the subjective visual perception of the human eye on the image quality is estimated through mathematical modeling, so that the structural similarity calculation model meets the requirements of image processing applications. Nature. For this formula, see [Zhou Wang and Alan C.Bovik, AUniversal Image Quality Index, IEEE Signal Processing Letters, vol.9, no.3, pp.81-84, March2002]

Claims (2)

1、基于内容相关图像尺寸调整的保真度评测方法,其特征在于,所述方法是在计算机中按以下步骤实现的:1. A method for evaluating fidelity based on content-related image size adjustment, characterized in that the method is implemented in a computer according to the following steps: 步骤(1):初始化,在所述计算机中建立以下各单元,构建一个评测系统:Step (1): Initialize, set up the following units in the computer to build an evaluation system: 参考图像数据库单元,存有待处理的参考图像资料,包括:原图,能量图,条纹seam图;The reference image database unit stores reference image data to be processed, including: original image, energy image, and fringe seam image; 条纹切割算法单元,在输入待测能量函数后,通过条纹切割seam carving算法对载入的所述参考图像进行内容相关的图像尺寸调整,同时在调整过程中记录下所述原图各点在所述调整结束后得到的后图上的对应点的位置,其中设有:能量计算单元,条纹寻找单元,调整图像尺寸单元以及对应点计算单元,其中:The strip cutting algorithm unit, after inputting the energy function to be measured, performs content-related image size adjustment on the loaded reference image through the strip cutting seam carving algorithm, and records the position of each point in the original image during the adjustment process. The position of the corresponding point on the rear map obtained after the adjustment is completed, wherein there are: an energy calculation unit, a fringe search unit, an image size adjustment unit and a corresponding point calculation unit, wherein: 所述的能量计算单元,载入需要评估的能量函数并从所述参考图像数据库载入原图,对原图中的点的能量进行计算,生成能量图,再将能量图载入所述参考图像数据库;The energy calculation unit loads the energy function to be evaluated and loads the original image from the reference image database, calculates the energy of points in the original image to generate an energy map, and then loads the energy map into the reference image database; 所述的条纹寻找单元,从所述的能量计算单元载入能量图,利用条纹切割seam carving算法寻找条纹线得到条纹seam图,再将条纹seam图载入所述参考图像数据库;The fringe search unit loads the energy map from the energy calculation unit, uses the fringe cutting seam carving algorithm to find fringe lines to obtain a fringe seam map, and then loads the fringe seam map into the reference image database; 所述的调整图像尺寸单元,从所述的条纹寻找单元输入条纹seam图,依照预先载入所述计算机的目标尺寸逐次地去掉能量最低的一条条纹,得到所述的后图;The image size adjustment unit inputs the fringe seam image from the fringe search unit, and successively removes a fringe with the lowest energy according to the target size preloaded into the computer to obtain the rear image; 所述的对应点计算单元,从所述的条纹寻找单元载入条纹seam图,计算原图中条纹两侧点在所述后图中的对应点的位置:初始时,原图上各点的对应点位置即为当前所在位置,在每去掉一个条纹时:若被去掉的条纹是垂直条纹,则位于该条纹左边的点的所述对应点位置不变;若被去掉的条纹是水平条纹,则位于该条纹上边的点的所述对应点位置不变;若被去掉的条纹是垂直条纹,则位于该条纹右边的点的所述对应点位置沿水平方向向左移动一个单位;若被去掉的条纹是水平条纹,则位于该条纹下边的点的所述对应点位置沿垂直方向向上移动一个单位;The corresponding point calculation unit loads the stripe seam map from the stripe search unit, and calculates the positions of the points on both sides of the stripes in the original image in the corresponding points in the rear image: initially, each point on the original image The position of the corresponding point is the current position, and each time a stripe is removed: if the removed stripe is a vertical stripe, the corresponding point position of the point to the left of the stripe remains unchanged; if the removed stripe is a horizontal stripe, Then the position of the corresponding point of the point above the stripe remains unchanged; if the removed stripe is a vertical stripe, the position of the corresponding point of the point on the right side of the stripe moves to the left by one unit in the horizontal direction; if removed If the stripe is a horizontal stripe, the position of the corresponding point of the point below the stripe moves upward by one unit in the vertical direction; 保真度评估单元,比较原图上点及其在后图上对应点的窗口矩阵之间的差异,从而计算所述后图的保真度值,并依据此量化结果得到保真度的评估结果;The fidelity evaluation unit compares the difference between the point on the original image and the window matrix of the corresponding point on the subsequent image, so as to calculate the fidelity value of the latter image, and obtain the fidelity evaluation based on the quantitative result result; 所述某点的窗口矩阵是指:某点在该点所在图上的以该点为中心的一个9*9的矩形窗口,其内容为位于该窗口中点的信号值;The window matrix of a certain point refers to: a 9*9 rectangular window centered on a certain point on the graph where the point is located, and its content is the signal value at the midpoint of the window; 步骤(2):所述计算机依次按以下步骤进行所述的保真度评测方法,Step (2): The computer carries out the described fidelity evaluation method according to the following steps successively, 步骤(2.1),从所述能量计算单元依据输入的需要评估的能量函数,原图输出能量图;从条纹寻找单元依据能量图利用条纹切割算法输出条纹seam图;从调整图像尺寸单元依据设定的目标尺寸和条纹seam图向所述保真度评估单元输出所述后图,从所述对应点计算单元输出原图上各个点与该点在所述后图的位置之间的各个一一对应关系到所述的保真度评估单元中;Step (2.1), from the energy calculation unit according to the energy function of the input needs evaluation, the original image output energy map; from the stripe search unit using the stripe cutting algorithm to output the stripe seam graph according to the energy graph; from the adjustment image size unit according to the setting The target size and the striped seam figure output the back figure to the fidelity evaluation unit, and each point between each point on the original picture and the position of the point in the back figure is output from the corresponding point calculation unit Corresponding to the fidelity evaluation unit; 步骤(2.2),所述保真度评估单元按以下步骤进行保真度评估:Step (2.2), the fidelity evaluation unit performs the fidelity evaluation according to the following steps: 步骤(2.2.1),把载入的后图从红绿蓝三基色空间RGB转换到|αβ颜色空间,其中,|表示非颜色的亮度通道,α表示彩色的黄蓝通道,β表示彩色的红绿通道,找出所有的所述条纹两侧的点;若某点上下左右四点中有一点属于某个条纹则所述的某点即为所述某个条纹的两侧的点;Step (2.2.1), convert the loaded image from the red, green and blue primary color space RGB to the |αβ color space, where | represents the brightness channel of non-color, α represents the yellow and blue channel of color, and β represents the color space Red and green channels, find all the points on both sides of the stripe; if one of the four points above, below, left, and right of a certain point belongs to a certain stripe, then the certain point is the point on both sides of the certain stripe; 步骤(2.2.2),计算步骤(2.2.1)得到的条纹两侧点的单个对应点的9*9矩阵窗口的单个颜色通道的保真度值Q:Step (2.2.2), calculating the fidelity value Q of a single color channel of the 9*9 matrix window of the single corresponding point of the points on both sides of the stripe obtained in step (2.2.1): QQ == δδ xyxy δδ xx δδ ythe y 22 xyxy ‾‾ (( xx ‾‾ )) 22 ++ (( ythe y ‾‾ )) 22 22 δδ xx δδ ythe y δδ xx 22 ++ δδ ythe y 22 其中,x是所述原图的窗口矩阵中的点在某一个通道上的信号值;y是后图的对应点窗口矩阵中的点在此通道上的信号值,x,y是窗口矩阵中的点在某一个通道上的信号值的平均值,δx,δy是方差,δxy是协方差;Among them, x is the signal value of a point in the window matrix of the original image on a certain channel; y is the signal value of a point in the window matrix of the corresponding point in the following figure on this channel, and x, y are in the window matrix The average value of the signal value of the point on a certain channel, δx, δy is the variance, δxy is the covariance; 步骤(2.2.3),对所有待计算的所述后图上的对应点的保真度值按|、α、β三个通道分别进行算术平均,得到 Q z = ( Σ i = 1 M Q i ) / M 其中,z=l,α,β,M为对应点的个数;Step (2.2.3), the fidelity value of the corresponding point on all the described back graphs to be calculated is carried out arithmetic mean respectively according to |, α, β three channels, obtains Q z = ( Σ i = 1 m Q i ) / m Wherein, z=l, α, β, M is the number of corresponding points; 步骤(2.2.4),把|、α、β三个通道的对应点的保真度值Ql、Qα、Qβ加权几何平均后得到整幅图的保真度值 Q colour = ω l Q l 2 + ω α Q α 2 + ω β Q β 2 . In step (2.2.4), the fidelity values Q l , Q α , and Q β of the corresponding points of the three channels |, α , and β are weighted and geometrically averaged to obtain the fidelity value of the entire image Q color = ω l Q l 2 + ω α Q α 2 + ω β Q β 2 . 2、基于内容相关图像尺寸调整的保真度评测方法,其特征与1的区别在于,步骤(2.2.4),把|、α、β三个通道的对应点的保真度值Ql、Qα、Qβ直接按照 Q colour = Q l 2 + Q α 2 + Q β 2 得到整幅图的保真度值,其他特征及步骤与1相同。2. The fidelity evaluation method based on content-related image resizing, which is characterized by the difference from 1 in that in step (2.2.4), the fidelity values Q l , Q α , Q β directly according to Q color = Q l 2 + Q α 2 + Q β 2 Get the fidelity value of the whole image, other features and steps are the same as 1.
CN200810117678A 2008-08-04 2008-08-04 Method for evaluating adjustable dimension fidelity based on content relevant image Expired - Fee Related CN100583145C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810117678A CN100583145C (en) 2008-08-04 2008-08-04 Method for evaluating adjustable dimension fidelity based on content relevant image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810117678A CN100583145C (en) 2008-08-04 2008-08-04 Method for evaluating adjustable dimension fidelity based on content relevant image

Publications (2)

Publication Number Publication Date
CN101329762A true CN101329762A (en) 2008-12-24
CN100583145C CN100583145C (en) 2010-01-20

Family

ID=40205558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810117678A Expired - Fee Related CN100583145C (en) 2008-08-04 2008-08-04 Method for evaluating adjustable dimension fidelity based on content relevant image

Country Status (1)

Country Link
CN (1) CN100583145C (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795350A (en) * 2010-04-07 2010-08-04 浙江大学 Non-linear image double amplifying method based on relevance detection
CN102073985A (en) * 2010-12-23 2011-05-25 清华大学 Method and device for objectively evaluating scaled image quality by matching pixel points
CN101609547B (en) * 2009-07-16 2011-12-07 复旦大学 Seamless image splicing processing method based on accumulated energy
CN101650824B (en) * 2009-09-23 2011-12-28 清华大学 Content erotic image zooming method based on conformal energy
CN103050110A (en) * 2012-12-31 2013-04-17 华为技术有限公司 Method, device and system for image adjustment
CN107145887A (en) * 2017-03-31 2017-09-08 天津工业大学 A seam-cropped image location forensics method for object deletion
CN112199268A (en) * 2019-07-08 2021-01-08 中移互联网有限公司 A software compatibility testing method and electronic device
CN112368629A (en) * 2018-06-29 2021-02-12 镭亚股份有限公司 Multiview display and method with dynamically reconfigurable multiview pixels

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609547B (en) * 2009-07-16 2011-12-07 复旦大学 Seamless image splicing processing method based on accumulated energy
CN101650824B (en) * 2009-09-23 2011-12-28 清华大学 Content erotic image zooming method based on conformal energy
CN101795350A (en) * 2010-04-07 2010-08-04 浙江大学 Non-linear image double amplifying method based on relevance detection
CN102073985A (en) * 2010-12-23 2011-05-25 清华大学 Method and device for objectively evaluating scaled image quality by matching pixel points
CN102073985B (en) * 2010-12-23 2012-05-09 清华大学 Method and device for objective quality evaluation of zoomed images based on pixel point matching
CN103050110A (en) * 2012-12-31 2013-04-17 华为技术有限公司 Method, device and system for image adjustment
CN107145887A (en) * 2017-03-31 2017-09-08 天津工业大学 A seam-cropped image location forensics method for object deletion
CN107145887B (en) * 2017-03-31 2019-10-01 天津工业大学 A kind of seam cutting framing evidence collecting method deleted for object
CN112368629A (en) * 2018-06-29 2021-02-12 镭亚股份有限公司 Multiview display and method with dynamically reconfigurable multiview pixels
CN112199268A (en) * 2019-07-08 2021-01-08 中移互联网有限公司 A software compatibility testing method and electronic device
CN112199268B (en) * 2019-07-08 2023-08-15 中移互联网有限公司 A software compatibility testing method and electronic equipment

Also Published As

Publication number Publication date
CN100583145C (en) 2010-01-20

Similar Documents

Publication Publication Date Title
US11610082B2 (en) Method and apparatus for training neural network model used for image processing, and storage medium
Battisti et al. Objective image quality assessment of 3D synthesized views
CN109829930B (en) Face image processing method and device, computer equipment and readable storage medium
CN101329762A (en) Fidelity Evaluation Method Based on Context-Dependent Image Resizing
EP1984893B1 (en) Method and apparatus for modifying a moving image sequence
US8248410B2 (en) Synthesizing detailed depth maps from images
US8884980B2 (en) System and method for changing hair color in digital images
US8538147B2 (en) Methods and appartuses for restoring color and enhancing electronic images
CN102867295B (en) A kind of color correction method for color image
CN109658330B (en) Color development adjusting method and device
CN1319375C (en) Image zooming method based on edge detection
CN107705264B (en) Image processing method, electronic equipment and device with storage function
US20170079599A1 (en) Moisture feeling evaluation device, moisture feeling evaluation method, and moisture feeling evaluation program
CN101360250A (en) Immersion generation method and system and factor control, content analysis and parameter prediction method
CN110866882B (en) Hierarchical joint bilateral filtering depth map inpainting method based on depth confidence
KR101624801B1 (en) Matting method for extracting object of foreground and apparatus for performing the matting method
JP2013506212A (en) Volume image data processing
CN105976351A (en) Central offset based three-dimensional image quality evaluation method
CN102360513A (en) Object illumination moving method based on gradient operation
CN113436284A (en) Image processing method and device, computer equipment and storage medium
CN109523469B (en) Image scaling method and device
CN110889806A (en) Adaptive gain image enhancement method based on fractional order multi-scale entropy fusion
KR101215666B1 (en) Method, system and computer program product for object color correction
CN111641822B (en) A Repositioning Stereo Image Quality Evaluation Method
CN103685858A (en) Real-time video processing method and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100120

Termination date: 20180804