CN102779329B - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- CN102779329B CN102779329B CN201110124750.6A CN201110124750A CN102779329B CN 102779329 B CN102779329 B CN 102779329B CN 201110124750 A CN201110124750 A CN 201110124750A CN 102779329 B CN102779329 B CN 102779329B
- Authority
- CN
- China
- Prior art keywords
- image
- images
- displacement
- resolution
- gradient
- 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.)
- Active
Links
Landscapes
- Image Processing (AREA)
Abstract
本发明提出一种图像处理装置及图像处理方法。图像处理装置包括图像校正模块、物体移动侦测模块以及图像混合模块。图像校正模块估测未选择图像相对于目标图像的区块位移量及全域位移量,并执行位移量校正藉以产生校正后图像。物体移动侦测模块则判断各区块位移量与全域位移量的差值是否大于门限值,藉以产生物体移动指针。图像混合模块依据物体移动指针对目标图像之每一像素点与校正后图像之每一像素点进行算术运算以产生超分辨率图像。本发明能将单张或是多张低分辨率图像放大产生高分辨率图像。
The present invention proposes an image processing device and an image processing method. The image processing device includes an image correction module, an object motion detection module and an image mixing module. The image correction module estimates the block displacement and global displacement of the unselected image relative to the target image, and performs displacement correction to generate a corrected image. The object motion detection module determines whether the difference between the displacement of each block and the global displacement is greater than a threshold value, thereby generating an object motion pointer. The image mixing module performs arithmetic operations on each pixel of the target image and each pixel of the corrected image according to the object motion pointer to generate a super-resolution image. The present invention can enlarge a single or multiple low-resolution images to generate a high-resolution image.
Description
技术领域 technical field
本发明涉及一种图像处理装置及其图像处理方法,且特别涉及超分辨率(super-resolution)图像放大的一种图像处理装置及图像处理方法。The present invention relates to an image processing device and an image processing method thereof, and in particular to an image processing device and an image processing method for super-resolution (super-resolution) image enlargement.
背景技术 Background technique
图像放大技术是图像处理中一项重要的研究方向,而图像内插则是一种有关图像放大技术的方法。一般而言,图像内插仅从单一图像放大来完成,常见的单一图像放大方法包括多项式内插法(polynomialinterpolation)、沿着边缘方向内插法(edge-directedinterpolation)以及以样本为基础的超解析技术(exampled-basedforsuper-resolution)。Image magnification technology is an important research direction in image processing, and image interpolation is a method related to image magnification technology. Generally speaking, image interpolation is only completed by enlarging a single image. Common single image enlarging methods include polynomial interpolation, edge-directed interpolation, and sample-based super-analysis. Technology (exampled-basedforsuper-resolution).
多项式内插法虽然简单且运算速度快,但是常因缺乏图像高频信息而导致放大后的图像模糊,且会产生区块效应(blockeffect)。沿着边缘方向内插法或以样本为基础的超解析技术则需要庞大的运算量。因此,从单一图像放大来完成图像放大的技术,图像质量受到很大的限制。Although the polynomial interpolation method is simple and has a fast operation speed, it often causes the enlarged image to be blurred due to the lack of high-frequency information of the image, and block effect will occur. Edge-wise interpolation or sample-based super-resolution techniques require a huge amount of computation. Therefore, the image quality is greatly limited in the technique of image enlargement from a single image enlargement.
然而,若想利用多张图像序列混合产生放大图像的技术,最常见的副作用就是有鬼影现象。鬼影现象的成因是因为对同一场景进行连续拍摄时,场景中有个别物体在移动,而在混合图像时,是将图像做整体位移(或是相机位移)的校正,并不会对场景中的个别物体做校正,因此图像中若有个别移动的物体,会导致混合后的图像出现鬼影现象。However, if you want to use the technology of mixing multiple image sequences to produce enlarged images, the most common side effect is ghosting. The cause of the ghosting phenomenon is that when taking continuous shots of the same scene, individual objects in the scene are moving, and when mixing images, the overall displacement (or camera displacement) of the image is corrected, which does not affect the overall displacement of the scene. Therefore, if there are individual moving objects in the image, it will cause ghosting in the blended image.
发明内容 Contents of the invention
有鉴于此,本发明提供一种图像处理装置,可将多张低分辨率图像放大产生高分辨率图像,并且先检测图像中是否存在个别物体移动,再混合多张校正后图像以输出超分辨率图像。In view of this, the present invention provides an image processing device that can enlarge multiple low-resolution images to generate high-resolution images, and first detect whether there is movement of individual objects in the images, and then mix multiple corrected images to output super-resolution images rate image.
本发明另提供一种图像处理方法,用于处理多张低分辨率图像放大产生高分辨率图像,且可混合多张校正后图像以产生超分辨率图像。The present invention also provides an image processing method, which is used to process multiple low-resolution images and enlarge them to generate high-resolution images, and can mix multiple corrected images to generate super-resolution images.
本发明提出的一种图像处理装置,用以接收依据多个第一分辨率图像进行放大而产生的多个第二分辨率图像,其中,第二分辨率图像其中之一为目标图像,剩余的第二分辨率图像为多个未选择图像。图像处理装置包括图像校正模块、物体移动检测模块以及图像混合模块。其中,图像校正模块估测未选择图像相对于目标图像的多个区块位移量及多个全域位移量,针对未选择图像执行多个位移量校正,藉以产生多个校正后图像。物体移动检测模块耦接至图像校正模块,判断各区块位移量与相对应的全域位移量的差值是否大于门限值,藉以产生多个物体移动指针。图像混合模块耦接至物体移动检测模块,图像混合模块依据物体移动指针对目标图像的每一像素点与校正后图像的每一像素点进行算术运算以产生第三分辨率图像,此第三分辨率图像的分辨率高于第二分辨率图像的分辨率。An image processing device proposed by the present invention is used to receive a plurality of second-resolution images generated by enlarging a plurality of first-resolution images, wherein one of the second-resolution images is a target image, and the remaining The second resolution image is a plurality of unselected images. The image processing device includes an image correction module, an object movement detection module and an image mixing module. Wherein, the image correction module estimates multiple block displacements and multiple global displacements of the unselected image relative to the target image, and performs multiple displacement corrections on the unselected image, so as to generate multiple corrected images. The object movement detection module is coupled to the image correction module to determine whether the difference between the displacement of each block and the corresponding global displacement is greater than a threshold value, so as to generate a plurality of object movement pointers. The image mixing module is coupled to the object movement detection module, and the image mixing module performs an arithmetic operation on each pixel of the target image and each pixel of the corrected image according to the object movement pointer to generate a third resolution image. The resolution of the high-resolution image is higher than the resolution of the second-resolution image.
在本发明的一实施例中,所述的图像混合模块依据该些物体移动指针设定多个加权,该算术运算为该图像混合模块利用该些加权对该目标图像的每一像素点与该些校正后图像的每一像素点进行加权和。In an embodiment of the present invention, the image blending module sets a plurality of weights according to the moving pointers of the object, and the arithmetic operation is that the image blending module uses the weights to combine each pixel of the target image with the Each pixel of these corrected images is weighted and summed.
在本发明的一实施例中,所述的图像混合模块针对目标图像的每一像素点与校正后图像的每一像素点执行多个方向梯度运算以产生多个梯度差值。In an embodiment of the present invention, the image mixing module performs multiple directional gradient operations on each pixel of the target image and each pixel of the corrected image to generate multiple gradient differences.
在本发明的一实施例中,其中当各区块位移量与相对应的全域位移量的差值大于门限值时,则物体移动检测模块驱动物体移动指针,当各区块位移量与相对应的全域位移量的差值小于门限值时,则物体移动检测模块阻断物体移动指针。In one embodiment of the present invention, when the difference between the displacement of each block and the corresponding global displacement is greater than the threshold value, the object movement detection module drives the object movement pointer, and when the displacement of each block is greater than the corresponding When the difference in global displacement is smaller than the threshold value, the object movement detection module blocks the object movement pointer.
在本发明的一实施例中,其中当物体移动指针为驱动状态时,则图像混合模块将加权设定为零,当物体移动指针为阻断状态时,则图像混合模块将加权设定为梯度差值。In an embodiment of the present invention, when the object moving pointer is in the driving state, the image mixing module sets the weighting to zero, and when the object moving pointer is in the blocked state, the image mixing module sets the weighting to gradient difference.
在本发明的一实施例中,所述的图像混合模块针对目标图像的每一像素点与校正后图像的每一像素点执行方向梯度运算用以产生多个方向梯度值,方向梯度值包括水平方向梯度值、垂直方向梯度值以及对角线方向梯度值。In an embodiment of the present invention, the image mixing module performs a direction gradient operation on each pixel of the target image and each pixel of the corrected image to generate a plurality of direction gradient values, and the direction gradient values include horizontal Directional gradient values, vertical gradient values, and diagonal gradient values.
在本发明的一实施例中,所述的图像混合模块针对目标图像的每一像素点与校正后图像的每一像素点,选择方向梯度值中的数值最大者作为最大梯度值,及选择方向梯度值中的数值最小者作为最小梯度值,各梯度差值则等于最大梯度值与最小梯度值之差。In an embodiment of the present invention, the image mixing module selects the direction gradient value with the largest numerical value as the maximum gradient value for each pixel point of the target image and each pixel point of the corrected image, and selects the direction The smallest gradient value is used as the minimum gradient value, and each gradient difference is equal to the difference between the maximum gradient value and the minimum gradient value.
在本发明的一实施例中,所述的图像校正模块包括区块位移量估测单元以及全域位移量估测单元。区块位移量估测单元分割目标图像与未选择图像为多个区块,并且估测未选择图像相对于目标图像的区块位移量。全域位移量估测单元耦接至区块位移量估测单元,依据区块位移量执行多个全域位移量估测,藉以产生全域位移量。In an embodiment of the present invention, the image correction module includes a block displacement estimation unit and a global displacement estimation unit. The block displacement estimating unit divides the target image and the unselected image into a plurality of blocks, and estimates the block displacement of the unselected image relative to the target image. The global displacement estimating unit is coupled to the block displacement estimating unit, and executes a plurality of global displacement estimations according to the block displacement, so as to generate the global displacement.
在本发明的一实施例中,所述的图像校正模块包括位移量校正单元,利用仿射变换矩阵(Affinetransformationmatrix)执行位移量校正,使未选择图像的起始点位置校正至与目标图像的起始点位置相同。In an embodiment of the present invention, the image correction module includes a displacement correction unit, which uses an affine transformation matrix (Affine transformation matrix) to perform displacement correction, so that the starting point position of the unselected image is corrected to the starting point of the target image same location.
从另一观点来看,本发明提出的一种图像处理方法,用于处理依据多个第一分辨率图像进行放大而产生的多个第二分辨率图像,其中,第二分辨率图像其中之一为一目标图像,剩余的第二分辨率图像为多个未选择图像。图像处理方法包括下列步骤:估测未选择图像相对于目标图像的多个区块位移量及多个全域位移量,针对未选择图像执行多个位移量校正,藉以产生多个校正后图像。此外,判断各区块位移量与相对应的全域位移量的差值是否大于门限值,藉以产生多个物体移动指针。再者,依据物体移动指针对目标图像的每一像素点与校正后图像的每一像素点进行算术运算以产生第三分辨率图像,此第三分辨率图像的分辨率高于第二分辨率图像的分辨率。From another point of view, an image processing method proposed by the present invention is used to process a plurality of second-resolution images generated by enlarging a plurality of first-resolution images, wherein one of the second-resolution images One is a target image, and the remaining second-resolution images are multiple unselected images. The image processing method includes the following steps: estimating multiple block displacements and multiple global displacements of the unselected image relative to the target image, performing multiple displacement corrections on the unselected image, so as to generate multiple corrected images. In addition, it is judged whether the difference between the displacement of each block and the corresponding global displacement is greater than a threshold value, so as to generate a plurality of object movement pointers. Furthermore, an arithmetic operation is performed on each pixel of the target image and each pixel of the corrected image according to the moving pointer of the object to generate a third resolution image, and the resolution of the third resolution image is higher than the second resolution The resolution of the image.
基于上述,本发明能将单张或是多张低分辨率图像放大产生高分辨率图像,并利用多张图像混合以产生出一张具有高质量且富有丰富细节信息的超分辨率图像,在做图像混合前会先判断图像中是否存在个别物体移动,藉此避免混合后的超分辨率图像产生鬼影现象。Based on the above, the present invention can enlarge a single or multiple low-resolution images to generate a high-resolution image, and use multiple images to mix to generate a super-resolution image with high quality and rich detail information. Before image blending, it will be judged whether there are individual objects in the image moving, so as to avoid ghosting in the blended super-resolution image.
为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail with reference to the accompanying drawings.
附图说明 Description of drawings
图1是依照本发明的一实施例所示的图像处理装置的方框图。FIG. 1 is a block diagram of an image processing device according to an embodiment of the present invention.
图2是依照本发明的另一实施例所示的图像处理装置的方框图。FIG. 2 is a block diagram of an image processing device according to another embodiment of the present invention.
图3为本发明的实施例的物体移动检测模块200执行物体移动检测的方法流程图。FIG. 3 is a flowchart of a method for performing object movement detection by the object movement detection module 200 according to an embodiment of the present invention.
图4为本发明的实施例的图像混合模块300针对其中之一像素点执行图像混合的方法流程图。FIG. 4 is a flowchart of a method for performing image blending by the image blending module 300 for one of the pixels according to an embodiment of the present invention.
图5是依照本发明的一实施例所示的图像处理方法的流程图。FIG. 5 is a flowchart of an image processing method according to an embodiment of the present invention.
附图标记:Reference signs:
10:图像处理装置;10: Image processing device;
100:图像校正模块;100: image correction module;
110:区块位移量估测单元;110: block displacement estimation unit;
120:全域位移量估测单元;120: global displacement estimation unit;
130:位移量校正单元;130: displacement correction unit;
200:物体移动检测模块;200: object movement detection module;
300:图像混合模块;300: image mixing module;
Img1_LR~Img4_LR:低分辨率图像;Img1_LR~Img4_LR: low-resolution images;
Img1_HR~Img4_HR:高分辨率图像;Img1_HR~Img4_HR: high resolution image;
CorrImg2_HR~CorrImg4_HR:校正后图像;CorrImg2_HR~CorrImg4_HR: corrected image;
Img1_SR:超分辨率图像;Img1_SR: super-resolution image;
Map2~Map4:物体移动指针;Map2~Map4: object moving pointer;
S310~S370:物体移动检测方法的步骤;S310~S370: steps of the object movement detection method;
S410~S470:对每一像素点执行图像混合的步骤;S410-S470: the step of performing image mixing on each pixel;
S510~S530:图像处理方法的步骤。S510-S530: Steps of the image processing method.
具体实施方式 detailed description
首先请参照图1,图1是依照本发明的一实施例所绘示的图像处理装置的方块图。图像处理装置10用以接收依据多个第一分辨率图像进行放大而产生的多个第二分辨率图像,其中,多个第一分辨率图像可由CMOS感应器的数字图像撷取装置例如是数字相机、数字摄像机(DigitalVideo,DV)等所撷取。CMOS感应器的特点是能高速连拍,因此能对一个场景连续拍摄多个第一分辨率图像。此外,本领域的普通技术人员可视实际需求采用所熟知的图像放大方法来对多个第一分辨率图像进行放大以产生多个第二分辨率图像。图像放大方法包括利用多项式内插方法、沿着边缘方向内插方法或以样本为基础的超解析方法等等。在此须选择第二分辨率图像其中之一为目标图像,剩余的第二分辨率图像则为多个未选择图像。Please refer to FIG. 1 first. FIG. 1 is a block diagram of an image processing device according to an embodiment of the present invention. The image processing device 10 is used to receive a plurality of second-resolution images generated by enlarging a plurality of first-resolution images, wherein the plurality of first-resolution images can be obtained by a digital image capture device of a CMOS sensor such as a digital Captured by cameras, digital video cameras (Digital Video, DV), etc. The CMOS sensor is characterized by high-speed continuous shooting, so it can continuously capture multiple first-resolution images of a scene. In addition, those skilled in the art may use well-known image enlargement methods to enlarge multiple first-resolution images to generate multiple second-resolution images according to actual requirements. Image enlargement methods include using polynomial interpolation methods, interpolation methods along the edge direction, or sample-based super-analysis methods and so on. Here, one of the second-resolution images must be selected as the target image, and the remaining second-resolution images are a plurality of unselected images.
图像处理装置10包括图像校正模块100、物体移动检测模块200以及图像混合模块300。多个第一分辨率图像是对一个场景连续拍摄,当手持图像处理装置10拍摄而发生手振现象时,第一分辨率图像之间会存在着次像素移动(sub-pixelshift),图像校正模块100对此可分别估测每一未选择图像相对于目标图像的多个区块位移量,利用这些区块位移量可决定出每一未选择图像相对于目标图像的全域位移量,图像校正模块100再依据全域位移量对未选择图像执行位移量校正,藉以产生多个校正后图像。The image processing device 10 includes an image correction module 100 , an object movement detection module 200 and an image mixing module 300 . A plurality of first-resolution images are taken continuously for a scene. When hand-held image processing device 10 shoots and hand shake occurs, there will be sub-pixel shift (sub-pixel shift) between the first-resolution images. The image correction module 100 can respectively estimate the multiple block displacements of each unselected image relative to the target image, and use these block displacements to determine the global displacement of each unselected image relative to the target image, and the image correction module 100 performs displacement correction on the unselected images according to the global displacement, so as to generate a plurality of corrected images.
物体移动检测模块200耦接至图像校正模块100,判断各区块位移量与相对应的全域位移量的差值是否大于门限值,藉以产生多个物体移动指针。其中门限值可由使用者依实际需求事先预定,在此不加以限制。接着,与物体移动检测模块200耦接的图像混合模块300可依据物体移动指针对目标图像的每一像素点与校正后图像的每一像素点进行算术运算以产生第三分辨率图像,此第三分辨率图像的分辨率高于第二分辨率图像的分辨率。The object movement detection module 200 is coupled to the image correction module 100 to determine whether the difference between the displacement of each block and the corresponding global displacement is greater than a threshold value, so as to generate a plurality of object movement pointers. The threshold value can be pre-determined by the user according to actual needs, and no limitation is imposed here. Next, the image mixing module 300 coupled to the object movement detection module 200 can perform an arithmetic operation on each pixel of the target image and each pixel of the corrected image according to the object movement pointer to generate a third resolution image. The resolution of the triple resolution image is higher than the resolution of the second resolution image.
也就是说,在各区块位移量与相对应的全域位移量的差值大于门限值时,物体移动检测模块200驱动所产生的物体移动指针。而这个被驱动的物体移动指针所代表的是,在此区块中存在有物体移动的现象。物体移动检测模块200并通过驱动的物体移动指针来指示图像混合模块300不针对此区块做图像混合的动作。相反的,在各区块位移量与相对应的全域位移量的差值不大于门限值时,物体移动检测模块200阻断所产生的物体移动指针,以代表此区块不存在物体移动的现象,因此可以参与图像混合的动作。据此,如先前技术所述的图像出现鬼影现象的问题就可以有效的被解决。That is to say, when the difference between the displacement of each block and the corresponding global displacement is greater than the threshold value, the object movement detection module 200 drives the generated object movement pointer. And this driven object movement pointer represents that there is a phenomenon of object movement in this block. The object movement detection module 200 instructs the image blending module 300 not to perform image blending for this block through the driven object movement pointer. On the contrary, when the difference between the displacement of each block and the corresponding global displacement is not greater than the threshold value, the object movement detection module 200 blocks the generated object movement pointer to represent that there is no object movement in this block , so can participate in the action of image blending. Accordingly, the problem of image ghosting as described in the prior art can be effectively solved.
为了更进一步地说明图像处理装置10的详细运作方式,并使本发明的内容更为明了,以下特举另一实施例作为本发明确实能够据以实施的范例。In order to further illustrate the detailed operation of the image processing device 10 and to make the content of the present invention more clear, another embodiment is exemplified below as an example in which the present invention can indeed be implemented.
图2是依照本发明的另一实施例所示的图像处理装置的方框图,请参照图2。图像处理装置10的图像校正模块100包括区块位移量估测单元110、全域位移量估测单元120以及位移量校正单元130。首先,区块位移量估测单元110用以接收依据4个第一分辨率(本实施例举例为低分辨率)图像Img1_LR、Img2_LR、Img3_LR以及Img4_LR进行放大而产生的4个第二分辨率(本实施例举例为高分辨率)图像Img1_HR、Img2_HR、Img3_HR以及Img4_HR。在本实施例中接收图像的个数以4个为例作说明,但本发明并未限制接收图像的个数。FIG. 2 is a block diagram of an image processing device according to another embodiment of the present invention, please refer to FIG. 2 . The image correction module 100 of the image processing device 10 includes a block displacement estimation unit 110 , a global displacement estimation unit 120 and a displacement correction unit 130 . Firstly, the block displacement estimating unit 110 is used to receive 4 second resolutions ( This embodiment is exemplified by high-resolution) images Img1_HR, Img2_HR, Img3_HR and Img4_HR. In this embodiment, four received images are taken as an example for illustration, but the present invention does not limit the number of received images.
区块位移量估测单元110将目标图像Img1_HR与未选择图像Img2_HR、Img3_HR以及Img4_HR以相同方法分割成多个区块,举例而言,若目标图像与未选择图像大小为P×Q,则可将目标图像与未选择图像分割成M×N个区块,其中M、N、P、Q为大于1的整数,且M小于等于P,N小于等于Q。分割方法可依实际需求做设定并不加以限制。接着,区块位移量估测单元110估测未选择图像Img2_HR、Img3_HR以及Img4_HR的每一区块相对于目标图像Img1_HR的区块位移量,估测方法例如是区块比对方式等等。The block displacement estimation unit 110 divides the target image Img1_HR and the unselected images Img2_HR, Img3_HR, and Img4_HR into multiple blocks in the same way. For example, if the size of the target image and the unselected images is P×Q, then Divide the target image and unselected images into M×N blocks, where M, N, P, and Q are integers greater than 1, and M is less than or equal to P, and N is less than or equal to Q. The division method can be set according to actual needs and is not limited. Next, the block displacement estimating unit 110 estimates the block displacement of each block of the unselected images Img2_HR, Img3_HR, and Img4_HR relative to the target image Img1_HR. The estimation method is, for example, block comparison.
全域位移量估测单元120分别对每一未选择图像Img2_HR、Img3_HR以及Img4_HR进行全域位移量估测。举例来说,全域位移量估测的方法可对多个区块位移量取众数,也就是先将区块位移量进行统计,选择出现最多次的区块位移量作为全域位移量,或是将所有的区块位移量取平均而得到全域位移量等等。因此,每一未选择图像Img2_HR、Img3_HR以及Img4_HR有各自的全域位移量。The global displacement estimation unit 120 respectively performs global displacement estimation on each of the unselected images Img2_HR, Img3_HR and Img4_HR. For example, the method for estimating the global displacement can take the mode of the displacements of multiple blocks, that is, the block displacements are counted first, and the block displacement that occurs the most times is selected as the global displacement, or All block displacements are averaged to obtain the global displacement and so on. Therefore, each of the non-selected images Img2_HR, Img3_HR and Img4_HR has its own global displacement.
位移量校正单元130则根据上述的全域位移量执行位移量校正,位移量校正系利用仿射变换矩阵(Affinetransformationmatrix)将未选择图像Img2_HR、Img3_HR以及Img4_HR的起始点位置校正至与目标图像Img1_HR的起始点相同位置。仿射变换矩阵可以作旋转与移动校正,其中矩阵的系数可由全域位移量所得。基于上述可得到校正后图像CorrImg2_HR、CorrImg3_HR以及CorrImg4_HR。The displacement correction unit 130 performs displacement correction according to the above-mentioned global displacement. The displacement correction uses an affine transformation matrix (Affine transformation matrix) to correct the starting point positions of the unselected images Img2_HR, Img3_HR, and Img4_HR to the starting point positions of the target image Img1_HR. same starting point. The affine transformation matrix can be used for rotation and movement correction, and the coefficients of the matrix can be obtained from the global displacement. Based on the above, the corrected images CorrImg2_HR, CorrImg3_HR and CorrImg4_HR can be obtained.
物体移动检测模块200将每一校正后图像CorrImg2_HR、CorrImg3_HR以及CorrImg4_HR与目标图像Img1_HR分别做物体移动检测,以产生物体移动指针Map2、Map3以及Map4。图3为本发明的实施例的物体移动检测模块200执行物体移动检测的方法流程图,请同时配合参照图2与图3。如步骤S310所示,由图像的第一个像素点开始执行物体移动检测,由于在区块位移量估测单元110与全域位移量估测单元120可获得区块位移量以及全域位移量,因此在步骤S320中,可计算区块位移量和全域位移量之间的差值Diffi,计算公式如下:The object movement detection module 200 performs object movement detection on each of the corrected images CorrImg2_HR, CorrImg3_HR and CorrImg4_HR and the target image Img1_HR to generate object movement pointers Map2, Map3 and Map4. FIG. 3 is a flowchart of a method for performing object movement detection by the object movement detection module 200 according to an embodiment of the present invention. Please refer to FIG. 2 and FIG. 3 together. As shown in step S310, object movement detection is performed from the first pixel of the image, since the block displacement and the global displacement can be obtained in the block displacement estimation unit 110 and the global displacement estimation unit 120, therefore In step S320, the difference Diffi between the block displacement and the global displacement can be calculated, and the calculation formula is as follows:
Diffi=|X_LMi-X_GM|+|Y_LMi-Y_GM|Diff i =|X_LM i -X_GM|+|Y_LM i -Y_GM|
其中,X_LMi、Y_LMi分别代表区块位移量的水平分量与垂直分量,i代表此像素点所属图像的第i个区块,i为大于零的正整数,X_GM、Y_GM代表图像的全域位移量的水平分量与垂直分量。Among them, X_LM i and Y_LM i respectively represent the horizontal component and vertical component of the block displacement, i represents the i-th block of the image to which this pixel belongs, i is a positive integer greater than zero, X_GM, Y_GM represent the global displacement of the image The horizontal and vertical components of the quantity.
接下来在步骤S330,判断此差值Diffi是否大于门限值TH,门限值TH可由本领域普通技术人员依实际情况做预先的设定。若差值Diffi大于门限值TH,则接续步骤S340,物体移动检测模块200驱动物体移动指针(例如为将物体移动指针设定为1),并用以代表此区块存在物体移动。若否,物体移动检测模块200则阻断物体移动指针(例如为将物体移动指针设定为0),代表此区块不存在物体移动。图像中的每一像素点都需经过此流程判断,因此步骤S360判断是否为图像中的最后一个像素点,若是则结束此物体移动检测,若否,则进入下一个像素点的计算与判断。Next, in step S330, it is judged whether the difference Diff i is greater than a threshold TH, which can be preset by those skilled in the art according to the actual situation. If the difference Diff i is greater than the threshold value TH, then continue to step S340, the object movement detection module 200 drives the object movement pointer (for example, setting the object movement pointer to 1) to represent that there is object movement in this block. If not, the object movement detection module 200 blocks the object movement pointer (for example, setting the object movement pointer to 0), which means that there is no object movement in this block. Each pixel in the image needs to be judged through this process, so step S360 judges whether it is the last pixel in the image, if so, end the object movement detection, if not, enter the calculation and judgment of the next pixel.
图像混合模块300将目标图像Img1_HR与校正后图像CorrImg2_HR、CorrImg3_HR以及CorrImg4_HR中的每一个像素点进行混合,混合过程中须配合参考物体移动指针Map2、Map3以及Map4以产生第三分辨率(本实施例举例为超分辨率)图像Img1_SR。举例来说,超分辨率图像Img1_SR的第一个像素点即为目标图像Img1_HR的第一个像素点与校正后图像CorrImg2_HR、CorrImg3_HR以及CorrImg4_HR的第一个像素点混合而成。The image mixing module 300 mixes each pixel in the target image Img1_HR and the corrected images CorrImg2_HR, CorrImg3_HR, and CorrImg4_HR. During the mixing process, the pointers Map2, Map3, and Map4 must be moved in conjunction with the reference object to generate the third resolution (this embodiment An example is the super-resolution) image Img1_SR. For example, the first pixel of the super-resolution image Img1_SR is obtained by mixing the first pixel of the target image Img1_HR with the first pixels of the corrected images CorrImg2_HR, CorrImg3_HR, and CorrImg4_HR.
详细的混合方法请同时配合参照图2与图4,图4为本发明的实施例的图像混合模块300对单一像素点执行图像混合的方法流程图。For the detailed mixing method, please refer to FIG. 2 and FIG. 4 at the same time. FIG. 4 is a flowchart of a method for performing image mixing on a single pixel by the image mixing module 300 according to an embodiment of the present invention.
如步骤S410所示,由第一张图像(例如可为目标图像Img1_HR)开始,图像混合模块300对此像素点执行方向梯度运算以产生方向梯度值,其包括水平方向梯度值H_Gra、垂直方向梯度值V_Gra以及二对角线方向梯度值D-_Gra、D+_Gra(步骤S420)。其中,水平方向梯度值H_Gra为此像素点与二相邻水平方向像素点的灰阶差绝对值之和。垂直方向梯度值V_Gra为此像素点与二相邻垂直方向像素点的灰阶差绝对值之和。对角线方向梯度值D-_Gra、D+_Gra包括此像素点与二相邻第一对角线方向像素点的灰阶差绝对值之和以及此像素点与二相邻第二对角线方向像素点的灰阶差绝对值之和。As shown in step S410, starting from the first image (for example, the target image Img1_HR), the image mixing module 300 performs a direction gradient operation on this pixel to generate a direction gradient value, which includes a horizontal gradient value H_Gra, a vertical gradient value value V_Gra and two diagonal gradient values D−_Gra, D+_Gra (step S420). Wherein, the horizontal direction gradient value H_Gra is the sum of the absolute values of grayscale differences between this pixel point and two adjacent horizontal direction pixel points. The vertical gradient value V_Gra is the sum of the absolute values of the grayscale differences between this pixel and two adjacent vertical pixels. The diagonal direction gradient values D-_Gra, D+_Gra include the sum of the absolute value of the gray scale difference between this pixel point and two adjacent first diagonal pixel points and the gray scale difference between this pixel point and two adjacent second diagonal The sum of the absolute values of the gray scale differences of pixels in the direction.
接着在步骤S430中,图像混合模块300更选择上述方向梯度值中的数值最大者作为最大梯度值Max_Gra,及选择上述方向梯度值中的数值最小者作为最小梯度值Min_Gra。步骤S440则计算此最大梯度值Max_Gra与最小梯度值Min_Gra的梯度差值Diff_Gra。Then in step S430 , the image blending module 300 further selects the largest value among the above-mentioned direction gradient values as the maximum gradient value Max_Gra, and selects the smallest value among the above-mentioned direction gradient values as the minimum gradient value Min_Gra. Step S440 calculates the gradient difference Diff_Gra between the maximum gradient value Max_Gra and the minimum gradient value Min_Gra.
步骤S450判断是否为最后一张图像,若否,则进入下一张图像,直到每一张要做图像混合的图像皆计算出其梯度差值Diff_Gra后,才进入步骤S470。为了避免鬼影现象的产生,因此图像混合模块300必须参考物体移动指针Map2、Map3以及Map4,当物体移动指针Map2、Map3以及Map4在此像素点为1时,代表有物体移动,则将加权Weight设定为0,使得此像素点不会作混合的动作。相反地,当物体移动指针Map2、Map3以及Map4在像素点被设定为0,则图像混合模块300将加权设定为此像素点的梯度差值Diff_Gra,梯度差值Diff_Gra愈大代表图像有纹理或边缘的存在,表示此像素点的图像信息愈重要且更需要保留,因此以梯度差值Diff_Gra当作加权。图像混合模块300利用上述加权对每一张图像的像素点进行加权和,其中加权和FV的计算公式如下:Step S450 judges whether it is the last image, if not, enters the next image, and does not enter step S470 until the gradient difference Diff_Gra of each image to be mixed is calculated. In order to avoid the generation of ghost images, the image mixing module 300 must refer to the object movement pointers Map2, Map3 and Map4. When the object movement pointers Map2, Map3 and Map4 are 1 at this pixel, it means that there is an object moving, and then the weighted Weight If it is set to 0, the pixel will not be blended. On the contrary, when the object movement pointers Map2, Map3 and Map4 are set to 0 at the pixel, the image mixing module 300 will set the weighting to the gradient difference Diff_Gra of this pixel, and the larger the gradient difference Diff_Gra, the image has texture Or the existence of an edge indicates that the image information of this pixel is more important and needs to be preserved, so the gradient difference Diff_Gra is used as the weight. The image mixing module 300 utilizes the above-mentioned weighting to carry out a weighted sum to the pixels of each image, wherein the calculation formula of the weighted sum FV is as follows:
其中,n代表第n张图像,Weight[n]代表第n张图像其中之一像素点的加权,img[n]代表第n张图像其中之一像素点的灰阶值。因此,目标图像Img1_HR与校正后图像CorrImg2_HR、CorrImg3_HR以及CorrImg4_HR中的每一个像素点皆进行如上所述的图像混合后,即可输出超分辨率图像Img1_SR。Among them, n represents the nth image, Weight[n] represents the weight of one of the pixels in the nth image, and img[n] represents the grayscale value of one of the pixels in the nth image. Therefore, the super-resolution image Img1_SR can be output after the target image Img1_HR and each pixel in the corrected images CorrImg2_HR, CorrImg3_HR, and CorrImg4_HR are mixed as described above.
从另一观点来看,图5是依照本发明的一实施例所示的图像处理方法的流程图,用于处理依据多个第一分辨率图像进行放大而产生的多个第二分辨率图像,其中,第二分辨率图像其中之一为目标图像,剩余的第二分辨率图像为多个未选择图像。请参照图5,如步骤S510所示,估测未选择图像相对于目标图像的多个区块位移量及多个全域位移量,针对未选择图像执行多个位移量校正,藉以产生多个校正后图像。在步骤S520中,判断各区块位移量与相对应的全域位移量的差值是否大于门限值,藉以产生多个物体移动指针。最后如步骤S530所述,依据物体移动指针对目标图像的每一像素点与校正后图像的每一像素点进行算术运算以产生第三分辨率图像,此第三分辨率图像的分辨率高于第二分辨率图像的分辨率。From another point of view, FIG. 5 is a flow chart of an image processing method according to an embodiment of the present invention, which is used to process multiple second-resolution images generated by enlarging multiple first-resolution images , wherein one of the second-resolution images is the target image, and the remaining second-resolution images are a plurality of unselected images. Please refer to FIG. 5, as shown in step S510, estimate multiple block displacements and multiple global displacements of the unselected image relative to the target image, and perform multiple displacement corrections on the unselected image, thereby generating multiple corrections after image. In step S520, it is determined whether the difference between the displacement of each block and the corresponding global displacement is greater than a threshold value, so as to generate a plurality of object movement pointers. Finally, as described in step S530, an arithmetic operation is performed on each pixel of the target image and each pixel of the corrected image according to the moving pointer of the object to generate a third resolution image, and the resolution of the third resolution image is higher than The resolution of the second resolution image.
综上所述,本发明能将单张或是多张低分辨率图像放大产生的高分辨率图像,利用多张高分辨率图像混合以产生出一张具有高质量且富有丰富细节信息的超分辨率图像。在做图像混合之前,还会先检测图像中是否存在个别物体移动,存在个别物体移动的图像区域则选择单一图像放大,不做图像混合的动作,藉此可避免多张图像混合容易产生的鬼影现象问题。对于其它须做图像混合的区域,则以梯度差值作为加权,可使混合后的超分辨率图像保持图像锐利度,且可同时去除区块效应及达到降低噪声的功效。In summary, the present invention can magnify a single or multiple low-resolution images to produce a high-resolution image, and use multiple high-resolution images to mix to produce a super image with high quality and rich details. resolution image. Before doing image mixing, it will also detect whether there are individual objects moving in the image. In the image area where individual objects move, select a single image to enlarge, and do not perform image mixing actions, so as to avoid ghosts that are easy to occur when multiple images are mixed. shadow problem. For other areas where image blending is required, the gradient difference is used as weighting, so that the blended super-resolution image can maintain the sharpness of the image, and can simultaneously remove the block effect and achieve the effect of reducing noise.
虽然本发明已以实施例揭示如上,然其并非用以限定本发明,任何所属技术领域的普通技术人员,当可作些许的更动与润饰,而不脱离本发明的精神和范围。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention, and any person skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110124750.6A CN102779329B (en) | 2011-05-13 | 2011-05-13 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110124750.6A CN102779329B (en) | 2011-05-13 | 2011-05-13 | Image processing apparatus and image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102779329A CN102779329A (en) | 2012-11-14 |
CN102779329B true CN102779329B (en) | 2016-03-23 |
Family
ID=47124239
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110124750.6A Active CN102779329B (en) | 2011-05-13 | 2011-05-13 | Image processing apparatus and image processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102779329B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI554105B (en) * | 2015-11-17 | 2016-10-11 | 緯創資通股份有限公司 | Electronic device and image processing method thereof |
CN112489253B (en) | 2018-08-31 | 2022-10-14 | 创新先进技术有限公司 | Unlocking method of intelligent lock, mobile terminal, server and readable storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340540A (en) * | 2007-07-05 | 2009-01-07 | 株式会社日立制作所 | Image display device, image signal processing device, and image signal processing method |
-
2011
- 2011-05-13 CN CN201110124750.6A patent/CN102779329B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340540A (en) * | 2007-07-05 | 2009-01-07 | 株式会社日立制作所 | Image display device, image signal processing device, and image signal processing method |
Non-Patent Citations (4)
Title |
---|
REGION-BASED WEIGHTED-NORM APPROACH TO VIDEO SUPER-RESOLUTION WITH ADAPTIVE REGULARIZATION;Osama A. Omer等;《IEEE International Conference on Acoustics, Speech and Signal Processing, 2009, ICASSP 2009》;20090424;摘要、第833页右栏最后1段 * |
一种视频序列的超分辨率重建算法;韩玉兵等;《电子学报》;20050131;第33卷(第1期);第129页4.2节 * |
基于边缘保持的航拍图像凸集投影超分辨率重建算法;徐美芳等;《液晶与显示》;20101231;第25卷(第6期);876页左栏第2-3段2.3.2节,图3 * |
电子稳像技术中核心算法的研究与实现;张欣宇;《哈尔滨工业大学硕士学位论文》;20051116;第6页第2段-最后1段 * |
Also Published As
Publication number | Publication date |
---|---|
CN102779329A (en) | 2012-11-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI459325B (en) | Digital image processing device and processing method thereof | |
US8644645B2 (en) | Image processing device and processing method thereof | |
JP4869049B2 (en) | Interpolated frame image creation method and interpolated frame image creation apparatus | |
US20120262543A1 (en) | Method for generating disparity map of stereo video | |
CN1319375C (en) | Image zooming method based on edge detection | |
TWI549096B (en) | Image processing device and processing method thereof | |
CN103955930B (en) | Motion parameter estimation method based on gray integral projection cross-correlation function characteristics | |
CN102779335B (en) | Digital image processing device and processing method thereof | |
CN103379255B (en) | Image processing device and processing method thereof | |
JP2004056789A (en) | Resolution and picture quality improving method for small image sensor | |
CN103366342A (en) | Piecewise linear interpolation method applied to video image amplification | |
Chun et al. | Suppressing rolling-shutter distortion of CMOS image sensors by motion vector detection | |
CN114071223A (en) | Generation method, storage medium and terminal device for video frame insertion based on optical flow | |
CN111489292A (en) | Super-resolution reconstruction method and device for video stream | |
US20100026888A1 (en) | Image processing method and system with repetitive pattern detection | |
TW200807330A (en) | Weight-adjusted apparatus and method thereof | |
CN102779329B (en) | Image processing apparatus and image processing method | |
WO2016152358A1 (en) | Image processing device, image processing method and image processing program | |
US8861605B2 (en) | Image processing method with motion estimation and image processing arrangement | |
WO2021179954A1 (en) | Video processing method and apparatus, device, and storage medium | |
CN102572297B (en) | Efficient high-quality video special effect rendering method | |
Gour et al. | Hardware accelerator for real-time image resizing | |
JP2008011476A (en) | Frame interpolation apparatus and frame interpolation method | |
TWI406187B (en) | Fast and high quality image/video interpolation method and apparatus | |
CN105611214A (en) | Method for de-interlacing through intra-field linear interpolation based on multidirectional detection |
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 |