[go: up one dir, main page]

CN105096261A - Image processing device and image processing method - Google Patents

Image processing device and image processing method Download PDF

Info

Publication number
CN105096261A
CN105096261A CN201410200267.5A CN201410200267A CN105096261A CN 105096261 A CN105096261 A CN 105096261A CN 201410200267 A CN201410200267 A CN 201410200267A CN 105096261 A CN105096261 A CN 105096261A
Authority
CN
China
Prior art keywords
image
original image
target
original
prime
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
CN201410200267.5A
Other languages
Chinese (zh)
Other versions
CN105096261B (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.)
Peking University
Original Assignee
Peking University
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
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 Peking University, Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University
Priority to CN201410200267.5A priority Critical patent/CN105096261B/en
Publication of CN105096261A publication Critical patent/CN105096261A/en
Application granted granted Critical
Publication of CN105096261B publication Critical patent/CN105096261B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

本发明提供了一种图像处理装置和图像处理方法,其中图像处理方法包括:对接收到的原始图像进行估算处理,以得到原始图像对应的模糊核;根据模糊核,对原始图像进行迭代处理,以得到清晰的图像;在清晰的图像中确定目标区域,并提取出目标区域对应的目标图像;对目标图像进行透视纠偏处理,以得到目标图像对应的正视图像;对正视图像进行增强处理,以得到结果图像。通过该技术方案,用户在观看图像或视频时,不再受观看角度的影响,站在任何方位观看图像或视频都可以看到清晰度、对比度极高的不存在透视失真的正视图像。

The present invention provides an image processing device and an image processing method, wherein the image processing method includes: performing estimation processing on a received original image to obtain a blur kernel corresponding to the original image; performing iterative processing on the original image according to the blur kernel, In order to obtain a clear image; determine the target area in the clear image, and extract the target image corresponding to the target area; perform perspective correction processing on the target image to obtain the front-view image corresponding to the target image; enhance the front-view image to Get the resulting image. Through this technical solution, users are no longer affected by viewing angles when viewing images or videos, and can see clear, high-contrast, front-facing images without perspective distortion when viewing images or videos from any orientation.

Description

图像处理装置和图像处理方法Image processing device and image processing method

技术领域technical field

本发明涉及图像技术领域,具体而言,涉及一种图像处理装置和一种图像处理方法。The present invention relates to the field of image technology, in particular, to an image processing device and an image processing method.

背景技术Background technique

受目前技术手段的限制,人们在观看图像或视频时,往往无法看到清晰的图像或视频,甚至于只能看到严重透视失真的图像或视频。原因在于,人们在观察图像或视频信息时,往往习惯从主体对象的正面进行观察,这时人们观察到的图像或视频信息就是主观对象原始的状态,即人们会看到清晰的、不失真的图像或视频信息;但人们会常常因为环境的受限,如固定位置的会场,不得不从一个较为倾斜的视角查看图像或视频信息,这时人们看到的图像或视频信息往往不是主观对象的原始状态,而是模糊的或严重透视失真的。Due to the limitations of current technical means, when people watch images or videos, they often cannot see clear images or videos, and even can only see images or videos with severe perspective distortion. The reason is that when people observe images or video information, they are often used to observe from the front of the subject object. At this time, the image or video information observed by people is the original state of the subjective object, that is, people will see clear and undistorted images. image or video information; but people often have to view the image or video information from a relatively oblique perspective due to the limited environment, such as a fixed location. At this time, the image or video information people see is often not subjective. Original, but blurry or severely perspective distorted.

因此,如何使人们可以不受观看方位的影响,无论从哪个方位出发都能到清晰的,不存在透视失真的图像或视频成为亟待解决的问题。Therefore, how to make people not be affected by the viewing orientation, no matter from which orientation they can see clear images or videos without perspective distortion has become an urgent problem to be solved.

发明内容Contents of the invention

本发明正是基于上述问题,提出了一种图像处理装置和一种图像处理方法,可以解决现有技术中存在的图像或视频模糊,透视失真的问题,从而使用户从任何视角都能看到清晰的,不失真的图像。Based on the above problems, the present invention proposes an image processing device and an image processing method, which can solve the problems of image or video blurring and perspective distortion existing in the prior art, so that users can see Clear, undistorted images.

有鉴于此,本发明的一方面,提出了一种图像处理装置,包括:估算处理单元,对接收到的原始图像进行估算处理,以得到所述原始图像对应的模糊核;迭代处理单元,连接至所述估算处理单元,根据所述模糊核,对所述原始图像进行迭代处理,以得到所述原始图像对应的清晰的图像;区域确定单元,连接至所述迭代处理单元,在所述清晰的图像中确定目标区域,并提取出所述目标区域对应的目标图像;纠偏处理单元,连接至所述区域确定单元,对所述目标图像进行透视纠偏处理,以得到所述目标图像对应的正视图像;增强处理单元,连接至所述纠偏处理单元,对所述正视图像进行增强处理,以得到结果图像。In view of this, an aspect of the present invention proposes an image processing device, including: an estimation processing unit that performs estimation processing on the received original image to obtain a blur kernel corresponding to the original image; an iterative processing unit connected to To the estimation processing unit, perform iterative processing on the original image according to the blur kernel, so as to obtain a clear image corresponding to the original image; a region determination unit, connected to the iterative processing unit, in the clear Determine the target area in the image, and extract the target image corresponding to the target area; the deviation correction processing unit is connected to the area determination unit, and performs perspective deviation correction processing on the target image to obtain the front view corresponding to the target image Image; an enhancement processing unit, connected to the deviation correction processing unit, to perform enhancement processing on the front view image to obtain a result image.

在该技术方案中,对原始图像或视频进行处理后,得到该图像或视频的模糊核,该模糊核的作用在于便于对图像或视频进行去模糊;去模糊后就会看到清晰的图像,但是在观察时,依然存在透视失真,无法看到图像的本来面貌;因此需要锁定该清晰图像或视频的主要区域,然后对该区域进行透视矫正,使其成为正视图像,再观察时就不再存在透视失真,就会观察到图像或视频的本身面貌;对该正视图像进行增强处理后,正视图像清晰度和对比度得到了进一步的提高,用户的体验效果也会明显增强;因此,该技术方案,可以对图像或视频进行去模糊,并对其进行透视矫正和增强,从而使用户无论从哪种角度出发,都能看到清晰度、对比度极高的不失真图像。In this technical solution, after processing the original image or video, the blur kernel of the image or video is obtained, and the function of the blur kernel is to facilitate deblurring of the image or video; after deblurring, a clear image can be seen, However, when observing, there is still perspective distortion, and the original appearance of the image cannot be seen; therefore, it is necessary to lock the main area of the clear image or video, and then perform perspective correction on this area to make it a front-view image, and it will no longer be visible when observing again. If there is perspective distortion, the image or video itself will be observed; after the enhanced processing of the front-view image, the clarity and contrast of the front-view image will be further improved, and the user's experience effect will also be significantly enhanced; therefore, the technical solution , can deblur images or videos, and perform perspective correction and enhancement on them, so that users can see undistorted images with high clarity and high contrast no matter from which angle they start.

在上述技术方案中,优选地,所述估算处理单元依据下列公式对所述原始图像进行估算处理:In the above technical solution, preferably, the estimation processing unit performs estimation processing on the original image according to the following formula:

minmin kk αα || || xx ** kk -- ythe y || || 22 22 ++ ββ || || kk || || 11

其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为卷积操作,α,β为所述模糊核的权重值。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, and α, β are the weight values of the blur kernel.

在该技术方案中,估算处理的目的在于得到原始图像的模糊核,在模糊核已知的情况下恢复出清晰的原始图像的,而得到模糊核这个非常重要的信息,会使去卷积工作变得更容易,因此,该技术方案可以简化去模糊工作,有利于将原始的模糊图像快速还原为清晰的模糊图像。In this technical solution, the purpose of the estimation process is to obtain the blur kernel of the original image, and restore a clear original image when the blur kernel is known, and obtaining the very important information of the blur kernel will make the deconvolution work becomes easier, therefore, this technical solution can simplify the deblurring work, and is beneficial to quickly restore the original blurred image to a clear blurred image.

其中,可以先对原始图像进行平滑处理,从而得到预处理图像,这里的平滑处理采用现有的平滑处理技术实现即可,在此不再赘述。Wherein, the original image can be smoothed first, so as to obtain the preprocessed image, and the smoothing here can be realized by using the existing smoothing technology, which will not be repeated here.

在上述技术方案中,优选地,所述迭代处理单元依据下列公式对所述原始图像进行迭代处理:In the above technical solution, preferably, the iterative processing unit performs iterative processing on the original image according to the following formula:

minmin xx γγ || || xx ** kk -- ythe y || || 22 22 ++ || || ▿▿ uu ythe y || || αα ++ || || ▿▿ vv ythe y || || αα ,,

其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为所述卷积操作,为所述原始图像的横向梯度,为所述原始图像的纵向梯度,α,γ为权重参数。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, is the transverse gradient of the original image, is the longitudinal gradient of the original image, and α and γ are weight parameters.

在该技术方案中,将得到的模糊核代入迭代公式即可还原出清晰的图像,同时,α,γ和这两项梯度参数,可以通过调整梯度信息在最后还原出的清晰的图像中所占的权重,从而使还原出的图像横向、纵向比例协调。In this technical scheme, a clear image can be restored by substituting the obtained blur kernel into the iterative formula. At the same time, α, γ and these two gradient parameters can be adjusted by adjusting the proportion of the gradient information in the final restored clear image. weight, so that the horizontal and vertical proportions of the restored image are coordinated.

在上述技术方案中,优选地,在所述清晰的图像中确定目标区域,具体包括:提取所述清晰的图像的边缘进行霍夫变换,以创建霍夫参数空间,并在所述霍夫参数空间中寻找累加器峰值以检测直线;将检测到的所述直线按照斜率分成四边形的四个组,并使用枚举的方法获得其中所有四边形的顶点,以得到顶点集;使用Harris角点检测对所述清晰的图像进行顶点检测,并将所述顶点集中的顶点与使用所述Harris角点检测得到的顶点进行匹配,以找到最大最主要的四边形作为所述目标区域。In the above technical solution, preferably, determining the target area in the clear image specifically includes: extracting the edge of the clear image and performing Hough transform to create a Hough parameter space, and using the Hough parameter Find the peak value of the accumulator in the space to detect the straight line; divide the detected straight line into four groups of quadrilaterals according to the slope, and use the enumeration method to obtain the vertices of all the quadrilaterals to obtain the vertex set; use Harris corner detection pair Vertex detection is performed on the clear image, and the vertices in the vertex set are matched with vertices obtained by using the Harris corner point detection to find the largest and most dominant quadrilateral as the target area.

在该技术方案中,目标区域为四边形,四边形的四个顶点是通过将顶点集中的多个顶点与Harris角点检测得到的多个顶点进行匹配获得的,该方法相比于只通过枚举方法或只通过Harris角点确定四边形的四个顶点而言,更能准确地确定出的四边形的四个顶点。因此,本技术方案可以确保在清晰图像中搜索出四边形是最大的最主要的,进而确保了该四边形包含了原图像中的大部分信息。In this technical solution, the target area is a quadrilateral, and the four vertices of the quadrilateral are obtained by matching the multiple vertices in the vertex set with the multiple vertices obtained by Harris corner point detection. This method is compared to the enumeration method only Or in terms of determining the four vertices of the quadrilateral only through the Harris corner points, the four vertices of the quadrilateral can be determined more accurately. Therefore, the technical solution can ensure that the quadrilateral found in the clear image is the largest and most important, thereby ensuring that the quadrilateral contains most of the information in the original image.

其中,霍夫变换是图像处理中从图像中识别几何形状的基本方法之一,霍夫变换不受图形旋转的影响,易于进行几何图形的快速变化,应用很广泛,也有很多改进算法。最基本的霍夫变换是从黑白图像中检测直线。Harris角点检测算法是一种常见的基于模板的检测算法,该检测算法主要考虑像素领域点的灰度变化,即图像亮度的变化,并将与相邻亮度对比足够大的点定义为角点。Among them, the Hough transform is one of the basic methods for recognizing geometric shapes from images in image processing. The Hough transform is not affected by the rotation of the graphics, and it is easy to change the geometry quickly. It is widely used and there are many improved algorithms. The most basic Hough transform is to detect straight lines from black and white images. The Harris corner detection algorithm is a common template-based detection algorithm. This detection algorithm mainly considers the grayscale changes of points in the pixel field, that is, the changes in image brightness, and defines points that are sufficiently large in contrast to adjacent brightness as corner points. .

在上述技术方案中,优选地,所述透视纠偏处理具体包括:根据所述目标区域的四个顶点和所述原始图像,确定所述目标图像和所述原始图像对应的纠偏参数,并根据所述纠偏参数确定所述目标图像中的每个像素点,其中,根据以下公式确定所述目标图像和所述原始图像对应的纠偏参数:In the above technical solution, preferably, the perspective deflection processing specifically includes: determining the deflection correction parameters corresponding to the target image and the original image according to the four vertices of the target area and the original image, and The deviation correction parameters determine each pixel in the target image, wherein the deviation correction parameters corresponding to the target image and the original image are determined according to the following formula:

xx ′′ ythe y ′′ == xx ythe y 11 00 00 00 -- xx ′′ xx -- xx ′′ ythe y 00 00 00 xx ythe y 11 -- ythe y ′′ xx -- ythe y ′′ ythe y aa bb cc dd ee ff gg hh ..

其中,x,y为所述原始图像中像素点的坐标,x′,y′为所述目标区域中像素点的坐标,a,b,c,d,e,f,g和h为所述纠偏参数。Wherein, x, y are the coordinates of the pixels in the original image, x', y' are the coordinates of the pixels in the target area, a, b, c, d, e, f, g and h are the coordinates of the pixels in the target area Correction parameters.

在该技术方案中,根据正视图像中四边形的四个顶点和透视图像中该四个点的对应位置,就可以计算出正视图像与透视图像之间的纠偏参数,根据该纠偏参数,透视图像中的像素点可以被一一映射在正视图像中,最终将整个原始图像校正为正视图像,且该正视图像不再存在透视失真的问题,同时,该图像处理装置也可以统计纠偏后的正视图像的直方图,并对其进行直方图均衡化以进一步提高该正视图像的对比度,之后再对该正视图像的边缘位置进行锐化以进一步提高文字的清晰度。因此,本技术方案,可以矫正透视图像,并提高其对比度和清晰度,从而使用户无论站在什么方位都可以看到清晰的,对比度很高的不失真的图像。In this technical solution, according to the corresponding positions of the four vertices of the quadrilateral in the front view image and the four points in the perspective image, the deviation correction parameter between the front view image and the perspective image can be calculated. The pixels can be mapped one by one in the front-view image, and finally the entire original image is corrected into a front-view image, and the front-view image no longer has the problem of perspective distortion. At the same time, the image processing device can also count the corrected front-view image. Histogram, and perform histogram equalization to further improve the contrast of the front-view image, and then sharpen the edge position of the front-view image to further improve the clarity of the text. Therefore, this technical solution can correct the perspective image and improve its contrast and clarity, so that no matter where the user stands, he can see a clear, high-contrast and undistorted image.

在上述技术方案中,优选地,还包括:显示单元,用于根据接收到的显示命令,对原始图像,目标图像和/或所述结果图像进行显示。In the above technical solution, preferably, further comprising: a display unit, configured to display the original image, the target image and/or the resultant image according to the received display command.

在该技术方案中,可以将原始图像和中间处理过程中得到的目标图像和最终结果图像展示给用户,这样,便于用户的查看。其中,将目标图像展示给用户,用户还可以根据自己的需要对目标图像对应的目标区域进行调整,比如,目标图像对应的目标区域其实并不是用户想要查看的区域,此时,用户可以将自己想要查看的区域设定为目标区域,这样,可以使得最后得到的结果图像符合用户的查看需求。In this technical solution, the original image, the target image obtained during the intermediate processing, and the final result image can be displayed to the user, which is convenient for the user to view. Among them, the target image is displayed to the user, and the user can also adjust the target area corresponding to the target image according to his needs. For example, the target area corresponding to the target image is not actually the area that the user wants to view. At this time, the user can set The area you want to view is set as the target area, so that the final result image can meet the user's viewing requirements.

本发明的另一方面,提出了一种图像处理方法,包括:对接收到的原始图像进行估算处理,以得到所述原始图像对应的模糊核;根据所述模糊核,对所述原始图像进行迭代处理,以得到所述原始图像对应的清晰的图像;在所述清晰的图像中确定目标区域,并提取出所述目标区域对应的目标图像;对所述目标图像进行透视纠偏处理,以得到所述目标图像对应的正视图像;对所述正视图像进行增强处理,以得到结果图像。In another aspect of the present invention, an image processing method is proposed, including: performing estimation processing on the received original image to obtain a blur kernel corresponding to the original image; according to the blur kernel, performing Iterative processing to obtain a clear image corresponding to the original image; determining a target area in the clear image, and extracting a target image corresponding to the target area; performing perspective correction processing on the target image to obtain A front-view image corresponding to the target image; performing enhancement processing on the front-view image to obtain a result image.

在该技术方案中,对原始图像或视频进行处理后,得到该图像或视频的模糊核,该模糊核的作用在于便于对图像或视频进行去模糊;去模糊后人们就会看到清晰的图像,但是在观察时,依然存在透视失真,无法看到图像的本来面貌;因此需要锁定该清晰图像或视频的主要区域,然后对该区域进行透视矫正,使其成为正视图像,再观察时就不再存在透视失真,就会观察到图像或视频的本身面貌;对该正视图像进行增强处理后,正视图像清晰度和对比度得到了进一步的提高,用户的体验效果也会明显增强;因此,该技术方案,可以对图像或视频进行去模糊,并对其进行透视矫正和增强,从而使用户无论从哪种角度出发,都能看到清晰度、对比度极高的不失真图像。In this technical solution, after the original image or video is processed, the blur kernel of the image or video is obtained, and the function of the blur kernel is to facilitate deblurring of the image or video; after deblurring, people will see a clear image , but when observing, there is still perspective distortion, and the original appearance of the image cannot be seen; therefore, it is necessary to lock the main area of the clear image or video, and then perform perspective correction on this area to make it a front-view image, so that it will not be visible when observing again. If there is perspective distortion again, the image or video itself will be observed; after the enhanced processing of the front-view image, the clarity and contrast of the front-view image will be further improved, and the user's experience effect will also be significantly enhanced; therefore, this technology The solution can deblur images or videos, and perform perspective correction and enhancement on them, so that users can see undistorted images with high clarity and high contrast no matter from which angle they start.

在上述技术方案中,优选地,根据下列公式对所述原始图像进行估算处理:In the above technical solution, preferably, the original image is estimated according to the following formula:

minmin kk αα || || xx ** kk -- ythe y || || 22 22 ++ ββ || || kk || || 11

其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为卷积操作,α,β为所述模糊核的权重值。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, and α, β are the weight values of the blur kernel.

在该技术方案中,估算处理的目的在于得到原始图像的模糊核,在模糊核已知的情况下恢复出清晰的原始图像的,而得到模糊核这个非常重要的信息,会使去卷积的工作变得更容易,因此,该技术方案可以简化去模糊工作,有利于将原始的模糊图像快速还原为清晰的模糊图像。In this technical solution, the purpose of the estimation process is to obtain the blur kernel of the original image, and restore a clear original image when the blur kernel is known, and obtaining the very important information of the blur kernel will make the deconvolution The work becomes easier, therefore, the technical solution can simplify the deblurring work, and is beneficial to quickly restore the original blurred image to a clear blurred image.

其中,可以先对原始图像进行平滑处理,从而得到预处理图像,这里的平滑处理采用现有的平滑处理技术实现即可,在此不再赘述。Wherein, the original image can be smoothed first, so as to obtain the preprocessed image, and the smoothing here can be realized by using the existing smoothing technology, which will not be repeated here.

在上述技术方案中,优选地,根据下列公式对所述原始图像进行迭代处理:In the above technical solution, preferably, the original image is iteratively processed according to the following formula:

minmin xx γγ || || xx ** kk -- ythe y || || 22 22 ++ || || ▿▿ uu ythe y || || αα ++ || || ▿▿ vv ythe y || || αα ,,

其中,其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为所述卷积操作,为所述原始图像的横向梯度,为所述原始图像的纵向梯度,α,γ为权重参数.Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, is the transverse gradient of the original image, is the longitudinal gradient of the original image, α, γ are weight parameters.

在该技术方案中,将得到的模糊核代入迭代公式即可还原出清晰的图像,同时,,α,γ这两项梯度参数,可以调整梯度信息在最后还原出的清晰的图像中所占的权重,从而使还原出的图像横向和纵向比例协调。In this technical solution, a clear image can be restored by substituting the obtained blur kernel into the iterative formula. At the same time, the two gradient parameters, α and γ, can adjust the proportion of the gradient information in the final restored clear image. Weight, so that the horizontal and vertical proportions of the restored image are coordinated.

在上述技术方案中,优选地,在所述清晰的图像中确定目标区域,具体包括:提取所述清晰的图像的边缘进行霍夫变换,以创建霍夫参数空间,并在所述霍夫参数空间中寻找累加器峰值以检测直线;将检测到的所述直线按照斜率分成四边形的四个组,并使用枚举的方法获得其中所有四边形的顶点,以得到顶点集;使用Harris角点检测对所述清晰的图像进行顶点检测,并将所述顶点集中的顶点与使用所述Harris角点检测得到的顶点进行匹配,以找到最大最主要的四边形作为所述目标区域。In the above technical solution, preferably, determining the target area in the clear image specifically includes: extracting the edge of the clear image and performing Hough transform to create a Hough parameter space, and using the Hough parameter Find the peak value of the accumulator in the space to detect the straight line; divide the detected straight line into four groups of quadrilaterals according to the slope, and use the enumeration method to obtain the vertices of all the quadrilaterals to obtain the vertex set; use Harris corner detection pair Vertex detection is performed on the clear image, and the vertices in the vertex set are matched with vertices obtained by using the Harris corner point detection to find the largest and most dominant quadrilateral as the target area.

在该技术方案中,目标区域为四边形,四边形的四个顶点是通过将顶点集中的很多顶点与Harris角点检测得到的多个顶点进行匹配获得的,该方法相比于只通过枚举方法或只通过Harris角点确定四边形的四个顶点而言,更能准确地确定出的四边形的四个顶点。因此,本技术方案可以确保在清晰图像中搜索出四边形是最大的最主要的,进而确保了该四边形包含了原图像中的大部分信息。In this technical scheme, the target area is a quadrilateral, and the four vertices of the quadrilateral are obtained by matching many vertices in the vertex set with the multiple vertices obtained by Harris corner point detection. Compared with only enumeration methods or In terms of determining the four vertices of the quadrilateral only through the Harris corner points, the four vertices of the quadrilateral can be determined more accurately. Therefore, the technical solution can ensure that the quadrilateral found in the clear image is the largest and most important, thereby ensuring that the quadrilateral contains most of the information in the original image.

其中,霍夫变换是图像处理中从图像中识别几何形状的基本方法之一,霍夫变换不受图形旋转的影响,易于进行几何图形的快速变化,应用很广泛,也有很多改进算法。最基本的霍夫变换是从黑白图像中检测直线。Harris角点检测算法是一种常见的基于模板的检测算法,该检测算法主要考虑像素领域点的灰度变化,即图像亮度的变化,并将与相邻亮度对比足够大的点定义为角点。Among them, the Hough transform is one of the basic methods for recognizing geometric shapes from images in image processing. The Hough transform is not affected by the rotation of the graphics, and it is easy to change the geometry quickly. It is widely used and there are many improved algorithms. The most basic Hough transform is to detect straight lines from black and white images. The Harris corner detection algorithm is a common template-based detection algorithm. This detection algorithm mainly considers the grayscale changes of points in the pixel field, that is, the changes in image brightness, and defines points that are sufficiently large in contrast to adjacent brightness as corner points. .

在上述技术方案中,优选地,所述透视纠偏处理具体包括:根据所述目标区域的四个顶点和所述原始图像,确定所述目标图像和所述原始图像对应的纠偏参数,并根据所述纠偏参数确定所述目标图像中的每个像素点,In the above technical solution, preferably, the perspective deflection processing specifically includes: determining the deflection correction parameters corresponding to the target image and the original image according to the four vertices of the target area and the original image, and The correction parameters determine each pixel in the target image,

其中,根据以下公式确定所述目标图像和所述原始图像对应的纠偏参数:Wherein, the deviation correction parameters corresponding to the target image and the original image are determined according to the following formula:

xx ′′ ythe y ′′ == xx ythe y 11 00 00 00 -- xx ′′ xx -- xx ′′ ythe y 00 00 00 xx ythe y 11 -- ythe y ′′ xx -- ythe y ′′ ythe y aa bb cc dd ee ff gg hh ..

其中,x,y为所述原始图像中像素点的坐标,x′,y′为所述目标区域中像素点的坐标,a,b,c,d,e,f,g和h为所述纠偏参数。Wherein, x, y are the coordinates of the pixels in the original image, x', y' are the coordinates of the pixels in the target area, a, b, c, d, e, f, g and h are the Correction parameters.

在该技术方案中,根据正视图像中四边形的四个顶点和透视图像中该四个点的对应位置,就可以计算出正视图像与透视图像之间的纠偏参数,根据该纠偏参数,透视图像中的像素点可以被一一映射在正视图像中,最终将整个原始图像校正为正视图像,且该正视图像不再存在透视失真的问题,同时,该图像处理装置也可以统计纠偏后的正视图像的直方图,并对其进行直方图均衡化以进一步提高该正视图像的对比度,之后再对该正视图像的边缘位置进行锐化以进一步提高文字的清晰度。因此,本技术方案,可以矫正透视图像,并提高其对比度和清晰度,从而使用户无论站在什么方位都可以看到清晰的,对比度很高的不失真的图像。In this technical solution, according to the corresponding positions of the four vertices of the quadrilateral in the front view image and the four points in the perspective image, the deviation correction parameter between the front view image and the perspective image can be calculated. The pixels can be mapped one by one in the front-view image, and finally the entire original image is corrected into a front-view image, and the front-view image no longer has the problem of perspective distortion. At the same time, the image processing device can also count the corrected front-view image. Histogram, and perform histogram equalization to further improve the contrast of the front-view image, and then sharpen the edge position of the front-view image to further improve the clarity of the text. Therefore, this technical solution can correct the perspective image and improve its contrast and clarity, so that no matter where the user stands, he can see a clear, high-contrast and undistorted image.

在上述技术方案中,优选地,还包括:根据接收到的显示命令,对原始图像,目标图像和/或所述结果图像进行显示。In the above technical solution, preferably, further comprising: displaying the original image, the target image and/or the resultant image according to the received display command.

在该技术方案中,可以将原始图像和中间处理过程中得到的目标图像和最终结果图像展示给用户,这样,便于用户的查看。其中,将目标图像展示给用户,用户还可以根据自己的需要对目标图像对应的目标区域进行调整,比如,目标图像对应的目标区域其实并不是用户想要查看的区域,此时,用户可以将自己想要查看的区域设定为目标区域,这样,可以使得最后得到的结果图像符合用户的查看需求。In this technical solution, the original image, the target image obtained during the intermediate processing, and the final result image can be displayed to the user, which is convenient for the user to view. Among them, the target image is displayed to the user, and the user can also adjust the target area corresponding to the target image according to his needs. For example, the target area corresponding to the target image is not actually the area that the user wants to view. At this time, the user can set The area you want to view is set as the target area, so that the final result image can meet the user's viewing requirements.

通过以上技术方案,用户观看图像时,不再受观看角度的限制,从任何角度观看都可以看到清晰的,不失真的正视图像。Through the above technical solution, the user is no longer limited by the viewing angle when watching the image, and can see a clear and undistorted front-view image from any angle.

附图说明Description of drawings

图1示出了根据本发明的一个实施例的图像处理装置的结构示意图;FIG. 1 shows a schematic structural diagram of an image processing device according to an embodiment of the present invention;

图2示出了根据本发明的一个实施例的图像处理方法的流程图;Fig. 2 shows the flowchart of the image processing method according to an embodiment of the present invention;

图3示出了根据本发明的另一个实施例的图像处理方法的具体流程图;FIG. 3 shows a specific flowchart of an image processing method according to another embodiment of the present invention;

图4A至图4D示出了根据本发明的实施例的图像处理结果的屏幕截图。4A to 4D illustrate screenshots of image processing results according to an embodiment of the present invention.

具体实施方式Detailed ways

为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。In order to understand the above-mentioned purpose, features and advantages of the present invention more clearly, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.

在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是,本发明还可以采用其他不同于在此描述的其他方式来实施,因此,本发明的保护范围并不受下面公开的具体实施例的限制。In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described here. Therefore, the protection scope of the present invention is not limited by the specific details disclosed below. EXAMPLE LIMITATIONS.

图1示出了根据本发明的一个实施例的图像处理装置的结构示意图。Fig. 1 shows a schematic structural diagram of an image processing device according to an embodiment of the present invention.

如图1所示,根据本发明的一个实施例的图像处理装置100,包括:估算处理单元102,对接收到的原始图像进行估算处理,以得到所述原始图像对应的模糊核;迭代处理单元104,连接至所述估算处理单元102,根据所述模糊核,对所述原始图像进行迭代处理,以得到所述原始图像对应的清晰的图像;区域确定单元106,连接至所述迭代处理单元104,在所述清晰的图像中确定目标区域,并提取出所述目标区域对应的目标图像;纠偏处理单元108,连接至所述区域确定单元106,对所述目标图像进行透视纠偏处理,以得到所述目标图像对应的正视图像;增强处理单元110,连接至所述纠偏处理单元108,对所述正视图像进行增强处理,以得到结果图像。As shown in FIG. 1, an image processing device 100 according to an embodiment of the present invention includes: an estimation processing unit 102, which performs estimation processing on a received original image to obtain a blur kernel corresponding to the original image; an iterative processing unit 104, connected to the estimation processing unit 102, performing iterative processing on the original image according to the blur kernel, so as to obtain a clear image corresponding to the original image; an area determination unit 106, connected to the iterative processing unit 104. Determine the target area in the clear image, and extract the target image corresponding to the target area; the deviation correction processing unit 108 is connected to the area determination unit 106, and performs perspective deviation correction processing on the target image to Obtain the front view image corresponding to the target image; the enhancement processing unit 110 is connected to the deviation correction processing unit 108, and performs enhancement processing on the front view image to obtain a result image.

在该技术方案中,对原始图像或视频进行处理后,得到该图像或视频的模糊核,该模糊核的作用在于便于对图像或视频进行去模糊;去模糊后人们就会看到清晰的图像,但是在观察时,依然存在透视失真,无法看到图像的本来面貌;因此需要锁定该清晰图像或视频的主要区域,然后对该区域进行透视矫正,使其成为正视图像,再观察时就不再存在透视失真,就会观察到图像或视频的本身面貌;对该正视图像进行增强处理后,正视图像清晰度和对比度得到了进一步的提高,用户的体验效果也会明显增强;因此,该技术方案,可以对图像或视频进行去模糊,并对其进行透视矫正和增强,从而使用户无论从哪种角度出发,都能看到清晰度、对比度极高的不失真图像。In this technical solution, after the original image or video is processed, the blur kernel of the image or video is obtained, and the function of the blur kernel is to facilitate deblurring of the image or video; after deblurring, people will see a clear image , but when observing, there is still perspective distortion, and the original appearance of the image cannot be seen; therefore, it is necessary to lock the main area of the clear image or video, and then perform perspective correction on this area to make it a front-view image, so that it will not be visible when observing again. If there is perspective distortion again, the image or video itself will be observed; after the enhanced processing of the front-view image, the clarity and contrast of the front-view image will be further improved, and the user's experience effect will also be significantly enhanced; therefore, this technology The solution can deblur images or videos, and perform perspective correction and enhancement on them, so that users can see undistorted images with high clarity and high contrast no matter from which angle they start.

在上述技术方案中,优选地,所述估算处理单元102依据下列公式对所述原始图像进行估算处理:In the above technical solution, preferably, the estimation processing unit 102 performs estimation processing on the original image according to the following formula:

minmin kk αα || || xx ** kk -- ythe y || || 22 22 ++ ββ || || kk || || 11

其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为卷积操作,α,β为所述模糊核的权重值。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, and α, β are the weight values of the blur kernel.

在该技术方案中,估算处理的目的在于得到原始图像的模糊核,因为,我们是利用非盲去卷积去模糊的,也就是在模糊核已知的情况下恢复出清晰的原始图像的,而得到模糊核这个非常重要的信息,会使去卷积的工作变得更容易,因此,该技术方案可以简化去模糊工作,有利于将原始的模糊图像快速还原为清晰的模糊图像。In this technical solution, the purpose of the estimation process is to obtain the blur kernel of the original image, because we use non-blind deconvolution to deblur, that is, to restore a clear original image when the blur kernel is known. Obtaining the very important information of the blur kernel will make the work of deconvolution easier. Therefore, this technical solution can simplify the work of deblurring, and is conducive to quickly restoring the original blurred image to a clear blurred image.

其中,可以先对原始图像进行平滑处理,从而得到预处理图像,这里的平滑处理采用现有的平滑处理技术实现即可,在此不再赘述。Wherein, the original image can be smoothed first, so as to obtain the preprocessed image, and the smoothing here can be realized by using the existing smoothing technology, which will not be repeated here.

在上述技术方案中,优选地,所述迭代处理单元104依据下列公式对所述原始图像进行迭代处理:In the above technical solution, preferably, the iterative processing unit 104 iteratively processes the original image according to the following formula:

minmin xx γγ || || xx ** kk -- ythe y || || 22 22 ++ || || ▿▿ uu ythe y || || αα ++ || || ▿▿ vv ythe y || || αα ,,

其中,其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为所述卷积操作,为所述原始图像的横向梯度,为所述原始图像的纵向梯度,α,γ为权重参数。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, is the transverse gradient of the original image, is the longitudinal gradient of the original image, and α and γ are weight parameters.

在该技术方案中,将得到的模糊核代入迭代公式即可还原出清晰的图像,同时,α,γ为权重参数。这两项梯度参数,可以调整梯度信息在最后还原出的清晰的图像中所占的权重,从而使还原出的图像横向和纵向比例协调。In this technical solution, a clear image can be restored by substituting the obtained blur kernel into an iterative formula, and at the same time, α and γ are weight parameters. These two gradient parameters can adjust the weight of the gradient information in the final restored clear image, so that the horizontal and vertical proportions of the restored image are coordinated.

在上述技术方案中,优选地,在所述清晰的图像中确定目标区域,具体包括:提取所述清晰的图像的边缘进行霍夫变换,以创建霍夫参数空间,并在所述霍夫参数空间中寻找累加器峰值以检测直线;将检测到的所述直线按照斜率分成四边形的四个组,并使用枚举的方法获得其中所有四边形的顶点,以得到顶点集;使用Harris角点检测对所述清晰的图像进行顶点检测,并将所述顶点集中的顶点与使用所述Harris角点检测得到的顶点进行匹配,以找到最大最主要的四边形作为所述目标区域。In the above technical solution, preferably, determining the target area in the clear image specifically includes: extracting the edge of the clear image and performing Hough transform to create a Hough parameter space, and using the Hough parameter Find the peak value of the accumulator in the space to detect the straight line; divide the detected straight line into four groups of quadrilaterals according to the slope, and use the enumeration method to obtain the vertices of all the quadrilaterals to obtain the vertex set; use Harris corner detection pair Vertex detection is performed on the clear image, and the vertices in the vertex set are matched with vertices obtained by using the Harris corner point detection to find the largest and most dominant quadrilateral as the target area.

在该技术方案中,所述目标区域为四边形,四边形的四个顶点是通过将顶点集中的多个顶点与Harris角点检测得到的多个顶点进行匹配获得的,该方法相比于只通过枚举方法或只通过Harris角点确定四边形的四个顶点而言,更能准确地确定出的四边形的四个顶点。因此,本技术方案可以确保在清晰图像中搜索出四边形是最大的最主要的,进而确保了该四边形包含了原图像中的大部分信息。In this technical solution, the target area is a quadrilateral, and the four vertices of the quadrilateral are obtained by matching a plurality of vertices in the vertex set with a plurality of vertices obtained by Harris corner point detection. For example, the four vertices of the quadrilateral can be determined more accurately by using the method or only by Harris corner points. Therefore, the technical solution can ensure that the quadrilateral found in the clear image is the largest and most important, thereby ensuring that the quadrilateral contains most of the information in the original image.

其中,霍夫变换是图像处理中从图像中识别几何形状的基本方法之一,霍夫变换不受图形旋转的影响,易于进行几何图形的快速变化,应用很广泛,也有很多改进算法。最基本的霍夫变换是从黑白图像中检测直线。Harris角点检测算法是一种常见的基于模板的检测算法,该检测算法主要考虑像素领域点的灰度变化,即图像亮度的变化,并将与相邻亮度对比足够大的点定义为角点。Among them, the Hough transform is one of the basic methods for recognizing geometric shapes from images in image processing. The Hough transform is not affected by the rotation of the graphics, and it is easy to change the geometry quickly. It is widely used and there are many improved algorithms. The most basic Hough transform is to detect straight lines from black and white images. The Harris corner detection algorithm is a common template-based detection algorithm. This detection algorithm mainly considers the grayscale changes of points in the pixel field, that is, the changes in image brightness, and defines points that are sufficiently large in contrast to adjacent brightness as corner points. .

在上述技术方案中,优选地,所述透视纠偏处理具体包括:根据所述目标区域的四个顶点和所述原始图像,确定所述目标图像和所述原始图像对应的纠偏参数,并根据所述纠偏参数确定所述目标图像中的每个像素点,其中,根据以下公式确定所述目标图像和所述原始图像对应的纠偏参数:In the above technical solution, preferably, the perspective deflection processing specifically includes: determining the deflection correction parameters corresponding to the target image and the original image according to the four vertices of the target area and the original image, and The deviation correction parameters determine each pixel in the target image, wherein the deviation correction parameters corresponding to the target image and the original image are determined according to the following formula:

xx ′′ ythe y ′′ == xx ythe y 11 00 00 00 -- xx ′′ xx -- xx ′′ ythe y 00 00 00 xx ythe y 11 -- ythe y ′′ xx -- ythe y ′′ ythe y aa bb cc dd ee ff gg hh ..

其中,x,y为所述原始图像中像素点的坐标,x′,y′为所述目标区域中像素点的坐标,a,b,c,d,e,f,g和h为所述纠偏参数。Wherein, x, y are the coordinates of the pixels in the original image, x', y' are the coordinates of the pixels in the target area, a, b, c, d, e, f, g and h are the Correction parameters.

在该技术方案中,根据正视图像中四边形的四个顶点和透视图像中该四个点的对应位置,就可以计算出正视图像与透视图像之间的纠偏参数,根据该纠偏参数,透视图像中的像素点可以被一一映射在正视图像中,最终将整个原始图像校正为正视图像,且该正视图像不再存在透视失真的问题,同时,该图像处理装置100也可以统计纠偏后的正视图像的直方图,并对其进行直方图均衡化以进一步提高该正视图像的对比度,之后再对该正视图像的边缘位置进行锐化以进一步提高文字的清晰度。因此,本技术方案,可以矫正透视图像,并提高其对比度和清晰度,从而使用户无论站在什么方位都可以看到清晰的,对比度很高的不失真的图像。In this technical solution, according to the corresponding positions of the four vertices of the quadrilateral in the front view image and the four points in the perspective image, the deviation correction parameter between the front view image and the perspective image can be calculated. The pixels can be mapped one by one in the front-view image, and finally the entire original image is corrected into the front-view image, and the front-view image no longer has the problem of perspective distortion. At the same time, the image processing device 100 can also count the corrected front-view image histogram, and perform histogram equalization to further improve the contrast of the front-view image, and then sharpen the edge position of the front-view image to further improve the clarity of the text. Therefore, this technical solution can correct the perspective image and improve its contrast and clarity, so that no matter where the user stands, he can see a clear, high-contrast and undistorted image.

在上述技术方案中,优选地,还包括:显示单元112,用于根据接收到的显示命令,对原始图像,目标图像和/或所述结果图像进行显示。In the above technical solution, preferably, further comprising: a display unit 112, configured to display the original image, the target image and/or the resultant image according to the received display command.

在该技术方案中,可以将原始图像和中间处理过程中得到的目标图像和最终结果图像展示给用户,这样,便于用户的查看。其中,将目标图像展示给用户,用户还可以根据自己的需要对目标图像对应的目标区域进行调整,比如,目标图像对应的目标区域其实并不是用户想要查看的区域,此时,用户可以将自己想要查看的区域设定为目标区域,这样,可以使得最后得到的结果图像符合用户的查看需求。In this technical solution, the original image, the target image obtained during the intermediate processing, and the final result image can be displayed to the user, which is convenient for the user to view. Among them, the target image is displayed to the user, and the user can also adjust the target area corresponding to the target image according to his needs. For example, the target area corresponding to the target image is not actually the area that the user wants to view. At this time, the user can set The area you want to view is set as the target area, so that the final result image can meet the user's viewing requirements.

图2示出了根据本发明的一个实施例的图像处理方法的流程图。Fig. 2 shows a flowchart of an image processing method according to an embodiment of the present invention.

如图2所示,根据本发明的实施例的图像处理方法,包括以下步骤:步骤202,对接收到的原始图像进行估算处理,以得到所述原始图像对应的模糊核;步骤204,根据所述模糊核,对所述原始图像进行迭代处理,以得到所述原始图像对应的清晰的图像;步骤206,在所述清晰的图像中确定目标区域,并提取出所述目标区域对应的目标图像;步骤208,对所述目标图像进行透视纠偏处理,以得到所述目标图像对应的正视图像;步骤210,对所述正视图像进行增强处理,以得到结果图像。As shown in FIG. 2 , the image processing method according to the embodiment of the present invention includes the following steps: step 202, perform estimation processing on the received original image to obtain the blur kernel corresponding to the original image; step 204, according to the The blur kernel is used to iteratively process the original image to obtain a clear image corresponding to the original image; step 206, determine the target area in the clear image, and extract the target image corresponding to the target area ; Step 208, performing perspective correction processing on the target image to obtain a front view image corresponding to the target image; Step 210, performing enhancement processing on the front view image to obtain a result image.

在该技术方案中,对原始图像或视频进行处理后,得到该图像或视频的模糊核,该模糊核的作用在于便于对图像或视频进行去模糊;去模糊后人们就会看到清晰的图像,但是在观察时,依然存在透视失真,无法看到图像的本来面貌;因此需要锁定该清晰图像或视频的主要区域,然后对该区域进行透视矫正,使其成为正视图像,再观察时就不再存在透视失真,就会观察到图像或视频的本身面貌;对该正视图像进行增强处理后,正视图像清晰度和对比度得到了进一步的提高,用户的体验效果也会明显增强;因此,该技术方案,可以对图像或视频进行去模糊,并对其进行透视矫正和增强,从而使用户无论从哪种角度出发,都能看到清晰度、对比度极高的不失真图像。In this technical solution, after the original image or video is processed, the blur kernel of the image or video is obtained, and the function of the blur kernel is to facilitate deblurring of the image or video; after deblurring, people will see a clear image , but when observing, there is still perspective distortion, and the original appearance of the image cannot be seen; therefore, it is necessary to lock the main area of the clear image or video, and then perform perspective correction on this area to make it a front-view image, so that it will not be visible when observing again. If there is perspective distortion again, the image or video itself will be observed; after the enhanced processing of the front-view image, the clarity and contrast of the front-view image will be further improved, and the user's experience effect will also be significantly enhanced; therefore, this technology The solution can deblur images or videos, and perform perspective correction and enhancement on them, so that users can see undistorted images with high clarity and high contrast no matter from which angle they start.

在上述技术方案中,优选地,根据下列公式对所述原始图像进行估算处理:In the above technical solution, preferably, the original image is estimated according to the following formula:

minmin kk αα || || xx ** kk -- ythe y || || 22 22 ++ ββ || || kk || || 11

其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为卷积操作,α,β为所述模糊核的权重值。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, and α, β are the weight values of the blur kernel.

在该技术方案中,估算处理的目的在于得到原始图像的模糊核,在模糊核已知的情况下恢复出清晰的原始图像的,而得到模糊核这个非常重要的信息,会使去卷积的工作变得更容易,因此,该技术方案可以简化去模糊工作,有利于将原始的模糊图像快速还原为清晰的模糊图像。In this technical solution, the purpose of the estimation process is to obtain the blur kernel of the original image, and restore a clear original image when the blur kernel is known, and obtaining the very important information of the blur kernel will make the deconvolution The work becomes easier, therefore, the technical solution can simplify the deblurring work, and is beneficial to quickly restore the original blurred image to a clear blurred image.

其中,可以先对原始图像进行平滑处理,从而得到预处理图像,这里的平滑处理采用现有的平滑处理技术实现即可,在此不再赘述。Wherein, the original image can be smoothed first, so as to obtain the preprocessed image, and the smoothing here can be realized by using the existing smoothing technology, which will not be repeated here.

在上述技术方案中,优选地,根据下列公式对所述原始图像进行迭代处理:In the above technical solution, preferably, the original image is iteratively processed according to the following formula:

minmin xx γγ || || xx ** kk -- ythe y || || 22 22 ++ || || ▿▿ uu ythe y || || αα ++ || || ▿▿ vv ythe y || || αα ,,

其中,其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为所述卷积操作,为所述原始图像的横向梯度,为所述原始图像的纵向梯度,α,γ为权重参数。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, is the transverse gradient of the original image, is the longitudinal gradient of the original image, and α and γ are weight parameters.

在该技术方案中,将得到的模糊核代入迭代公式即可还原出清晰的图像,同时,这两项梯度参数,可以调整梯度信息在最后还原出的清晰的图像中所占的权重,从而使还原出的图像横向和纵向比例协调。In this technical solution, a clear image can be restored by substituting the obtained blur kernel into the iterative formula, and at the same time, and These two gradient parameters can adjust the weight of the gradient information in the final restored clear image, so that the horizontal and vertical proportions of the restored image are coordinated.

在上述技术方案中,优选地,在所述清晰的图像中确定目标区域,具体包括:提取所述清晰的图像的边缘进行霍夫变换,以创建霍夫参数空间,并在所述霍夫参数空间中寻找累加器峰值以检测直线;将检测到的所述直线按照斜率分成四边形的四个组,并使用枚举的方法获得其中所有四边形的顶点,以得到顶点集;使用Harris角点检测对所述清晰的图像进行顶点检测,并将所述顶点集中的顶点与使用所述Harris角点检测得到的顶点进行匹配,以找到最大最主要的四边形作为所述目标区域。In the above technical solution, preferably, determining the target area in the clear image specifically includes: extracting the edge of the clear image and performing Hough transform to create a Hough parameter space, and using the Hough parameter Find the peak value of the accumulator in the space to detect the straight line; divide the detected straight line into four groups of quadrilaterals according to the slope, and use the enumeration method to obtain the vertices of all the quadrilaterals to obtain the vertex set; use Harris corner detection pair Vertex detection is performed on the clear image, and the vertices in the vertex set are matched with the vertices obtained by using the Harris corner point detection to find the largest and most dominant quadrilateral as the target area.

在该技术方案中,目标区域为四边形,四边形的四个顶点是通过将顶点集中的多个顶点与Harris角点检测得到的很多顶点进行匹配获得的,该方法相比于只通过枚举方法或只通过Harris角点确定四边形的四个顶点而言,更能准确地确定出的四边形的四个顶点。因此,本技术方案可以确保在清晰图像中搜索出四边形是最大的最主要的,进而确保了该四边形包含了原图像中的大部分信息。In this technical solution, the target area is a quadrilateral, and the four vertices of the quadrilateral are obtained by matching a plurality of vertices in the vertex set with many vertices obtained by Harris corner point detection. This method is compared to only enumeration method or In terms of determining the four vertices of the quadrilateral only through the Harris corner points, the four vertices of the quadrilateral can be determined more accurately. Therefore, the technical solution can ensure that the quadrilateral found in the clear image is the largest and most important, thereby ensuring that the quadrilateral contains most of the information in the original image.

其中,霍夫变换是图像处理中从图像中识别几何形状的基本方法之一,霍夫变换不受图形旋转的影响,易于进行几何图形的快速变化,应用很广泛,也有很多改进算法。最基本的霍夫变换是从黑白图像中检测直线。Harris角点检测算法是一种常见的基于模板的检测算法,该检测算法主要考虑像素领域点的灰度变化,即图像亮度的变化,并将与相邻亮度对比足够大的点定义为角点。Among them, the Hough transform is one of the basic methods for recognizing geometric shapes from images in image processing. The Hough transform is not affected by the rotation of the graphics, and it is easy to change the geometry quickly. It is widely used and there are many improved algorithms. The most basic Hough transform is to detect straight lines from black and white images. The Harris corner detection algorithm is a common template-based detection algorithm. This detection algorithm mainly considers the grayscale changes of points in the pixel field, that is, the changes in image brightness, and defines points that are sufficiently large in contrast to adjacent brightness as corner points. .

在上述技术方案中,优选地,所述透视纠偏处理具体包括:根据所述目标区域的四个顶点和所述原始图像,确定所述目标图像和所述原始图像对应的纠偏参数,并根据所述纠偏参数确定所述目标图像中的每个像素点,In the above technical solution, preferably, the perspective deflection processing specifically includes: determining the deflection correction parameters corresponding to the target image and the original image according to the four vertices of the target area and the original image, and The correction parameters determine each pixel in the target image,

其中,根据以下公式确定所述目标图像和所述原始图像对应的纠偏参数:Wherein, the deviation correction parameters corresponding to the target image and the original image are determined according to the following formula:

xx ′′ ythe y ′′ == xx ythe y 11 00 00 00 -- xx ′′ xx -- xx ′′ ythe y 00 00 00 xx ythe y 11 -- ythe y ′′ xx -- ythe y ′′ ythe y aa bb cc dd ee ff gg hh ..

其中,x,y为所述原始图像中像素点的坐标,x′,y′为所述目标区域中像素点的坐标,a,b,c,d,e,f,g和h为所述纠偏参数。Wherein, x, y are the coordinates of the pixels in the original image, x', y' are the coordinates of the pixels in the target area, a, b, c, d, e, f, g and h are the Correction parameters.

在该技术方案中,根据正视图像中四边形的四个顶点和透视图像中该四个点的对应位置,就可以计算出正视图像与透视图像之间的纠偏参数,根据该纠偏参数,透视图像中的像素点可以被一一映射在正视图像中,最终将整个原始图像校正为正视图像,且该正视图像不再存在透视失真的问题,同时,该图像处理装置也可以统计纠偏后的正视图像的直方图,并对其进行直方图均衡化以进一步提高该正视图像的对比度,之后再对该正视图像的边缘位置进行锐化以进一步提高文字的清晰度。因此,本技术方案,可以矫正透视图像,并提高其对比度和清晰度,从而使用户无论站在什么方位都可以看到清晰的,对比度很高的不失真的图像。In this technical solution, according to the corresponding positions of the four vertices of the quadrilateral in the front view image and the four points in the perspective image, the deviation correction parameter between the front view image and the perspective image can be calculated. The pixels can be mapped one by one in the front-view image, and finally the entire original image is corrected into a front-view image, and the front-view image no longer has the problem of perspective distortion. At the same time, the image processing device can also count the corrected front-view image. Histogram, and perform histogram equalization to further improve the contrast of the front-view image, and then sharpen the edge position of the front-view image to further improve the clarity of the text. Therefore, this technical solution can correct the perspective image and improve its contrast and clarity, so that no matter where the user stands, he can see a clear, high-contrast and undistorted image.

在上述技术方案中,优选地,还包括:根据接收到的显示命令,对原始图像,目标图像和/或所述结果图像进行显示。In the above technical solution, preferably, further comprising: displaying the original image, the target image and/or the resultant image according to the received display command.

在该技术方案中,可以将原始图像和中间处理过程中得到的目标图像和最终结果图像展示给用户,这样,便于用户的查看。其中,将目标图像展示给用户,用户还可以根据自己的需要对目标图像对应的目标区域进行调整,比如,目标图像对应的目标区域其实并不是用户想要查看的区域,此时,用户可以将自己想要查看的区域设定为目标区域,这样,可以使得最后得到的结果图像符合用户的查看需求。In this technical solution, the original image, the target image obtained during the intermediate processing, and the final result image can be displayed to the user, which is convenient for the user to view. Among them, the target image is displayed to the user, and the user can also adjust the target area corresponding to the target image according to his needs. For example, the target area corresponding to the target image is not actually the area that the user wants to view. At this time, the user can set The area you want to view is set as the target area, so that the final result image can meet the user's viewing requirements.

图3示出了根据本发明的另一个实施例的图像处理方法的具体流程图。Fig. 3 shows a specific flowchart of an image processing method according to another embodiment of the present invention.

如图3所示,根据本发明的另一个实施例的图像处理方法,包括以下步骤:As shown in Figure 3, the image processing method according to another embodiment of the present invention includes the following steps:

步骤302:用基于正则化稀疏性先验条件估算输入图像模糊核,具体为求解下式如下:Step 302: Estimate the blur kernel of the input image with the prior condition based on regularization sparsity, specifically to solve the following formula:

minmin kk αα || || xx ** kk -- ythe y || || 22 22 ++ ββ || || kk || || 11 ,,

其中,y为原始图像,x为对原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为卷积操作,α,β为所述模糊核的权重值。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, and α, β are the weight values of the blur kernel.

步骤304:将得到的模糊核代入以下反卷积求解公式以得到清晰图像x:Step 304: Substituting the obtained blur kernel into the following deconvolution formula to obtain a clear image x:

minmin xx γγ || || xx ** kk -- ythe y || || 22 22 ++ || || ▿▿ uu ythe y || || αα ++ || || ▿▿ vv ythe y || || αα ,,

其中,x、y与上述定义相同,为原始图像的横向梯度,为原始图像的纵向梯度,且在实际应用中可以设定γ=3000,α=0.8。Wherein, x, y are the same as the above definition, is the horizontal gradient of the original image, is the longitudinal gradient of the original image, and in practical applications, γ=3000, α=0.8 can be set.

步骤306:根据去模糊后的清晰图像,提取图像边缘,对其进行霍夫变换后,在霍夫参数空间通过寻找累加器峰值的方法检测直线并将检测出的直线段按照斜率分成四边形的四个组,然后使用枚举的方法确定四边形的顶点。最后,将顶点集的点与使用Harris角点检测得到的顶点相匹配,以找到最大最主要的四边形。Step 306: According to the clear image after deblurring, extract the edge of the image, perform Hough transform on it, detect the straight line by finding the peak value of the accumulator in the Hough parameter space, and divide the detected straight line segment into four quadrilateral parts according to the slope. group, and then use the enumeration method to determine the vertices of the quadrilateral. Finally, match the points of the vertex set with the vertices obtained using Harris corner detection to find the largest and most dominant quadrilateral.

步骤308:将最终确定的四边形显示给用户,其中,允许用户对四边形检测结果进行修正,如果用户不修改检测出的四边形,则执行步骤310;反之,则重新执行步骤306,依次循环,直到用户对检测四边形满意,则开始执行步骤310。Step 308: Display the finally determined quadrilateral to the user, wherein the user is allowed to correct the quadrilateral detection result, if the user does not modify the detected quadrilateral, perform step 310; otherwise, re-execute step 306, and loop in turn until the user If the detected quadrilateral is satisfied, step 310 is executed.

步骤310:透视变换可以将透视图像变换回正视图像,其坐标转换关系可以被表示为如下的矩阵形式:Step 310: The perspective transformation can transform the perspective image back to the front view image, and its coordinate transformation relationship can be expressed as the following matrix form:

xx ′′ ythe y ′′ == xx ythe y 11 00 00 00 -- xx ′′ xx -- xx ′′ ythe y 00 00 00 xx ythe y 11 -- ythe y ′′ xx -- ythe y ′′ ythe y aa bb cc dd ee ff gg hh ..

其中x,y为原始图像中像素点的坐标,x′,y′为目标(四边形)区域中像素点的坐标,a-h是纠偏参数。透视纠偏之前,我们要先根据目标区域的四个顶点的坐标和原始图像中对应的四个点的坐标,以确定目标图像和所述原始图像对应的纠偏参数,然后根据计算出的纠偏参数,将原始图像中的像素点一一映射到目标图像中。然而,校正后的正视图像包含的像素点一般比透视图像的像素点少,所以正视图像上会出现一些空洞(反之,会出现覆盖的情况)。为了填补这些空洞,需要对校正后的图像进行了一次逆变换,具体过程为:将正视图像上空洞区域内的点利用下列公式一一映射回透视失真的原图像上,找到空洞区域内的点在原透视图像上的位置(x,y),并将该位置所对应的像素点的内容填补到正视图像上,即可填补正视图像上的空洞。Among them, x, y are the coordinates of the pixels in the original image, x', y' are the coordinates of the pixels in the target (quadrilateral) area, and a-h are the deviation correction parameters. Before perspective correction, we need to determine the correction parameters corresponding to the target image and the original image according to the coordinates of the four vertices of the target area and the coordinates of the corresponding four points in the original image, and then according to the calculated correction parameters, Map the pixels in the original image to the target image one by one. However, the rectified front-view image generally contains fewer pixels than the perspective image, so some holes will appear on the front-view image (conversely, coverage will appear). In order to fill these holes, it is necessary to perform an inverse transformation on the corrected image. The specific process is: use the following formula to map the points in the hole area on the orthographic image back to the original image with perspective distortion, and find the points in the hole area Position (x, y) on the original perspective image, and fill the content of the pixel point corresponding to the position on the front view image, so as to fill the hole in the front view image.

xx == (( hfhf -- ee )) xx ′′ ++ (( bb -- hchc )) ythe y ′′ ++ (( ecec -- bfb f )) (( ege.g. -- dhd h )) xx ′′ ++ (( ahah -- bgbg )) ythe y ′′ ++ (( dbdb -- aeae )) ,, ythe y == (( dd -- fgfg )) xx ′′ ++ (( cgcg -- aa )) ythe y ′′ ++ (( afaf -- dcdc )) (( ege.g. -- dhd h )) xx ′′ ++ (( ahah -- bgbg )) ythe y ′′ ++ (( dbdb -- aeae )) ,,

其中,上述公式即为将正视图像上的空洞点映射回原透视图像的公式,且该公式中的参数含义与上相同一般情况下,但是利用该公式求出的x这和y都不是整数,所以可以通过双三次插值方法计算正视图像上的空洞点在原透视图像上对应的像素位置,其中,双三次插值方法是一种更加复杂的插值方法,它能创造出比双线性插值风平滑的图像边缘,可以更好地填补空洞。Among them, the above formula is the formula for mapping the hollow point on the front-view image back to the original perspective image, and the meaning of the parameters in the formula is the same as above. In general, but the x and y obtained by using this formula are not integers. Therefore, the bicubic interpolation method can be used to calculate the corresponding pixel position of the hole point on the orthographic image on the original perspective image. Among them, the bicubic interpolation method is a more complex interpolation method, which can create smoother than bilinear interpolation. Image edges, which can better fill holes.

步骤312:统计纠偏后图像的直方图,对其进行直方图均衡化以提高图像的对比度。然后利用高斯反卷积锐化纠偏后图像的边缘位置以提高文字的清晰度。Step 312: Statize the histogram of the image after skew correction, and perform histogram equalization on it to improve the contrast of the image. Then use Gaussian deconvolution to sharpen the edge position of the corrected image to improve the clarity of the text.

通过以上步骤,就可以使模糊的图像或视频变得清晰,使透视失真图像或视频变为正视图像,这样用户无论站在什么方位观看图片或视频都可以图像或视频原始的面貌,看到清晰的正视图像。Through the above steps, the blurred image or video can be made clear, and the perspective distorted image or video can be turned into a front view image, so that no matter where the user stands to watch the picture or video, they can see the original appearance of the image or video clearly. frontal image of .

具体地,本发明不仅能对图像进行正视处理,同样可以对视频等进行正视处理,如果处理的是视频,则将视频逐帧作为图像依次进行步骤302到步骤312的处理。Specifically, the present invention can not only perform front-view processing on images, but also on video, etc., and if the processing is video, the video is processed frame by frame as an image in sequence from step 302 to step 312.

图4A至图4D示出了根据本发明的实施例的图像处理结果的屏幕截图。4A to 4D illustrate screenshots of image processing results according to an embodiment of the present invention.

其中,图4A示出了原始的图像,该图像是模糊的;图4B示出了经过去模糊的图像,该图像显然比图4A清晰,但依然是透视失真图,存在一定角度的倾斜,不完全符合用户的观看习惯;图4C示出了经过透视纠偏的图像,该正视图像已完全符合用户的观看习惯,不存在任何透视失真现象;图4D示出了经过直方图均衡化和边缘锐化的正视图像,该图像与4C相比,对比度和清晰度更高。Among them, Fig. 4A shows the original image, which is blurred; Fig. 4B shows the deblurred image, which is obviously clearer than Fig. 4A, but it is still a perspective distortion map, and there is a certain angle of inclination. It fully conforms to the user's viewing habits; Figure 4C shows the image that has been corrected for perspective, and the front view image is completely in line with the user's viewing habits without any perspective distortion; Compared with 4C, this image has higher contrast and clarity.

以上结合附图详细说明了本发明的技术方案,通过本发明的技术方案,用户在观看图像或视频时,可以不受观看角度的影响,无论站在任何方位观看图像或视频都可以看到清晰度、对比度极高的不存在透视失真的正视图像。The technical solution of the present invention has been described in detail above in conjunction with the accompanying drawings. Through the technical solution of the present invention, when users watch images or videos, they are not affected by viewing angles, and they can see clearly High-resolution, high-contrast front-view images without perspective distortion.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (12)

1.一种图像处理装置,其特征在于,包括:1. An image processing device, characterized in that, comprising: 估算处理单元,对接收到的原始图像进行估算处理,以得到所述原始图像对应的模糊核;an estimation processing unit, performing estimation processing on the received original image to obtain a blur kernel corresponding to the original image; 迭代处理单元,连接至所述估算处理单元,根据所述模糊核,对所述原始图像进行迭代处理,以得到所述原始图像对应的清晰的图像;An iterative processing unit, connected to the estimation processing unit, performs iterative processing on the original image according to the blur kernel, so as to obtain a clear image corresponding to the original image; 区域确定单元,连接至所述迭代处理单元,在所述清晰的图像中确定目标区域,并提取出所述目标区域对应的目标图像;an area determining unit, connected to the iterative processing unit, determining a target area in the clear image, and extracting a target image corresponding to the target area; 纠偏处理单元,连接至所述区域确定单元,对所述目标图像进行透视纠偏处理,以得到所述目标图像对应的正视图像;a deviation correction processing unit, connected to the area determination unit, and performing perspective deviation correction processing on the target image to obtain a front view image corresponding to the target image; 增强处理单元,连接至所述纠偏处理单元,对所述正视图像进行增强处理,以得到结果图像。The enhancement processing unit is connected to the deviation correction processing unit, and performs enhancement processing on the front view image to obtain a result image. 2.根据权利要求1所述的图像处理装置,其特征在于,所述估算处理单元依据下列公式对所述原始图像进行估算处理:2. The image processing device according to claim 1, wherein the estimation processing unit performs estimation processing on the original image according to the following formula: minmin kk αα || || xx ** kk -- ythe y || || 22 22 ++ ββ || || kk || || 11 其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为卷积操作,α,β为所述模糊核的权重值。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, and α, β are the weight values of the blur kernel. 3.根据权利要求1所述的图像处理装置,其特征在于,所述迭代处理单元依据下列公式对所述原始图像进行迭代处理:3. The image processing device according to claim 1, wherein the iterative processing unit performs iterative processing on the original image according to the following formula: minmin xx γγ || || xx ** kk -- ythe y || || 22 22 ++ || || ▿▿ uu ythe y || || αα ++ || || ▿▿ vv ythe y || || αα ,, 其中,其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为所述卷积操作,为所述原始图像的横向梯度,为所述原始图像的纵向梯度,α,γ为权重参数。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, is the transverse gradient of the original image, is the longitudinal gradient of the original image, and α and γ are weight parameters. 4.根据权利要求1所述的图像处理装置,其特征在于,在所述清晰的图像中确定目标区域,具体包括:4. The image processing device according to claim 1, wherein determining the target area in the clear image comprises: 提取所述清晰的图像的边缘进行霍夫变换,以创建霍夫参数空间,并在所述霍夫参数空间中寻找累加器峰值以检测直线;Extracting the edge of the clear image and performing Hough transform to create a Hough parameter space, and finding the accumulator peak in the Hough parameter space to detect a straight line; 将检测到的所述直线按照斜率分成四边形的四个组,并使用枚举的方法获得其中所有四边形的顶点,以得到顶点集;Divide the detected straight lines into four groups of quadrilaterals according to their slopes, and use an enumeration method to obtain vertices of all quadrilaterals to obtain a vertex set; 使用Harris角点检测对所述清晰的图像进行顶点检测,并将所述顶点集中的顶点与使用所述Harris角点检测得到的顶点进行匹配,以找到最大最主要的四边形作为所述目标区域。Use Harris corner detection to perform vertex detection on the clear image, and match the vertices in the vertex set with the vertices obtained by using the Harris corner detection to find the largest and most dominant quadrilateral as the target area. 5.根据权利要求1所述的图像处理装置,其特征在于,所述透视纠偏处理具体包括:5. The image processing device according to claim 1, wherein the perspective correction processing specifically comprises: 根据所述目标区域的四个顶点和所述原始图像,确定所述目标图像和所述原始图像对应的纠偏参数,并根据所述纠偏参数确定所述目标图像中的每个像素点,determining deviation correction parameters corresponding to the target image and the original image according to the four vertices of the target area and the original image, and determining each pixel in the target image according to the deviation correction parameters, 其中,根据以下公式确定所述目标图像和所述原始图像对应的纠偏参数:Wherein, the deviation correction parameters corresponding to the target image and the original image are determined according to the following formula: xx ′′ ythe y ′′ == xx ythe y 11 00 00 00 -- xx ′′ xx -- xx ′′ ythe y 00 00 00 xx ythe y 11 -- ythe y ′′ xx -- ythe y ′′ ythe y aa bb cc dd ee ff gg hh .. 其中,x,y为所述原始图像中像素点的坐标,x′,y′为所述目标区域中像素点的坐标,a,b,c,d,e,f,g和h为所述纠偏参数。Wherein, x, y are the coordinates of the pixels in the original image, x', y' are the coordinates of the pixels in the target area, a, b, c, d, e, f, g and h are the coordinates of the pixels in the target area Correction parameters. 6.根据权利要求1至5中任一项所述的图像处理装置,其特征在于,还包括:6. The image processing device according to any one of claims 1 to 5, further comprising: 显示单元,连接至所述纠偏处理单元,用于根据接收到的显示命令,对原始图像,目标图像和/或所述结果图像进行显示。A display unit, connected to the deviation correction processing unit, for displaying the original image, the target image and/or the resultant image according to the received display command. 7.一种图像处理方法,其特征在于,包括:7. An image processing method, characterized in that, comprising: 对接收到的原始图像进行估算处理,以得到所述原始图像对应的模糊核;Estimating the received original image to obtain a blur kernel corresponding to the original image; 根据所述模糊核,对所述原始图像进行迭代处理,以得到所述原始图像对应的清晰的图像;performing iterative processing on the original image according to the blur kernel to obtain a clear image corresponding to the original image; 在所述清晰的图像中确定目标区域,并提取出所述目标区域对应的目标图像;determining a target area in the clear image, and extracting a target image corresponding to the target area; 对所述目标图像进行透视纠偏处理,以得到所述目标图像对应的正视图像;Performing perspective deflection processing on the target image to obtain a front view image corresponding to the target image; 对所述正视图像进行增强处理,以得到结果图像。Perform enhancement processing on the orthographic image to obtain a result image. 8.根据权利要求7所述的图像处理方法,其特征在于,根据下列公式对所述原始图像进行估算处理:8. The image processing method according to claim 7, wherein the original image is estimated according to the following formula: minmin kk αα || || xx ** kk -- ythe y || || 22 22 ++ ββ || || kk || || 11 其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为卷积操作,α,β为所述模糊核的权重值。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, and α, β are the weight values of the blur kernel. 9.根据权利要求7所述的图像处理方法,其特征在于,根据下列公式对所述原始图像进行迭代处理:9. The image processing method according to claim 7, wherein the original image is iteratively processed according to the following formula: minmin xx γγ || || xx ** kk -- ythe y || || 22 22 ++ || || ▿▿ uu ythe y || || αα ++ || || ▿▿ vv ythe y || || αα ,, 其中,其中,y为所述原始图像,x为对所述原始图像进行平滑处理得到的预处理图像,k为所述模糊核,*为所述卷积操作,为所述原始图像的横向梯度,为所述原始图像的纵向梯度,α、γ为权重参数。Wherein, y is the original image, x is the preprocessed image obtained by smoothing the original image, k is the blur kernel, * is the convolution operation, is the transverse gradient of the original image, is the longitudinal gradient of the original image, and α and γ are weight parameters. 10.根据权利要求7所述的图像处理方法,其特征在于,在所述清晰的图像中确定目标区域,具体包括:10. The image processing method according to claim 7, wherein determining the target area in the clear image comprises: 提取所述清晰的图像的边缘进行霍夫变换,以创建霍夫参数空间,并在所述霍夫参数空间中寻找累加器峰值以检测直线;Extracting the edge of the clear image and performing Hough transform to create a Hough parameter space, and finding the accumulator peak in the Hough parameter space to detect a straight line; 将检测到的所述直线按照斜率分成四边形的四个组,并使用枚举的方法获得其中所有四边形的顶点,以得到顶点集;Divide the detected straight lines into four groups of quadrilaterals according to their slopes, and use an enumeration method to obtain vertices of all quadrilaterals to obtain a vertex set; 使用Harris角点检测对所述清晰的图像进行顶点检测,并将所述顶点集中的顶点与使用所述Harris角点检测得到的顶点进行匹配,以找到最大最主要的四边形作为所述目标区域。Use Harris corner detection to perform vertex detection on the clear image, and match the vertices in the vertex set with the vertices obtained by using the Harris corner detection to find the largest and most dominant quadrilateral as the target area. 11.根据权利要求7所述的图像处理方法,其特征在于,所述透视纠偏处理具体包括:11. The image processing method according to claim 7, wherein the perspective correction processing specifically comprises: 根据所述目标区域的四个顶点和所述原始图像,确定所述目标图像和所述原始图像对应的纠偏参数,并根据所述纠偏参数确定所述目标图像中的每个像素点,determining deviation correction parameters corresponding to the target image and the original image according to the four vertices of the target area and the original image, and determining each pixel in the target image according to the deviation correction parameters, 其中,根据以下公式确定所述目标图像和所述原始图像对应的纠偏参数:Wherein, the deviation correction parameters corresponding to the target image and the original image are determined according to the following formula: xx ′′ ythe y ′′ == xx ythe y 11 00 00 00 -- xx ′′ xx -- xx ′′ ythe y 00 00 00 xx ythe y 11 -- ythe y ′′ xx -- ythe y ′′ ythe y aa bb cc dd ee ff gg hh .. 其中,x,y为所述原始图像中像素点的坐标,x′,y′为所述目标区域中像素点的坐标,a,b,c,d,e,f,g和h为所述纠偏参数。Wherein, x, y are the coordinates of the pixels in the original image, x', y' are the coordinates of the pixels in the target area, a, b, c, d, e, f, g and h are the coordinates of the pixels in the target area Correction parameters. 12.根据权利要求7至11中任一项所述的图像处理方法,其特征在于,还包括:12. The image processing method according to any one of claims 7 to 11, further comprising: 根据接收到的显示命令,对原始图像,目标图像和/或所述结果图像进行显示。The original image, the target image and/or the resultant image are displayed according to the received display command.
CN201410200267.5A 2014-05-13 2014-05-13 Image processing apparatus and image processing method Expired - Fee Related CN105096261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410200267.5A CN105096261B (en) 2014-05-13 2014-05-13 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410200267.5A CN105096261B (en) 2014-05-13 2014-05-13 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
CN105096261A true CN105096261A (en) 2015-11-25
CN105096261B CN105096261B (en) 2018-04-17

Family

ID=54576613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410200267.5A Expired - Fee Related CN105096261B (en) 2014-05-13 2014-05-13 Image processing apparatus and image processing method

Country Status (1)

Country Link
CN (1) CN105096261B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018058476A1 (en) * 2016-09-29 2018-04-05 华为技术有限公司 Image correction method and device
CN109754381A (en) * 2019-01-03 2019-05-14 广东小天才科技有限公司 Image processing method and system
CN110765304A (en) * 2019-10-22 2020-02-07 珠海研果科技有限公司 Image processing method, image processing device, electronic equipment and computer readable medium
CN110796602A (en) * 2019-10-30 2020-02-14 福州大学 Method for reducing distortion after image perspective transformation
CN111145101A (en) * 2018-11-03 2020-05-12 广州灵派科技有限公司 Modular image processing method and device
CN112588621A (en) * 2020-11-30 2021-04-02 山东农业大学 Agricultural product sorting method and system based on visual servo
CN114821044A (en) * 2022-05-31 2022-07-29 中煤科工机器人科技有限公司 A Gradient Transform-Based Method for Recognition of Square Pointer Instrument Numbers

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1397050A (en) * 2000-09-27 2003-02-12 皇家菲利浦电子有限公司 Method and apparatus for providing image to be displayed on screen
US20030048959A1 (en) * 2001-08-28 2003-03-13 John Peterson Methods and apparatus for shifting perspective in a composite image
CN101510268A (en) * 2009-03-20 2009-08-19 南京航空航天大学 Automatic identification method for secret related drawings
CN101625760A (en) * 2009-07-28 2010-01-13 谭洪舟 Method for correcting certificate image inclination
CN101639938A (en) * 2009-08-28 2010-02-03 浙江大学 Image restoration method based on double-edge wave filter and margin deconvolution
CN102194212A (en) * 2010-03-08 2011-09-21 佳能株式会社 Image processing method, device and system
CN102326379A (en) * 2008-12-31 2012-01-18 浦项工科大学校产学协力团 Method for removing blur from image and recording medium on which the method is recorded
CN102509281A (en) * 2011-11-24 2012-06-20 浙江大学 Double-image planar motion blur eliminating method based on transparency
CN102750679A (en) * 2012-06-28 2012-10-24 西安电子科技大学 Blind deblurring method for image quality evaluation
CN103337058A (en) * 2013-07-05 2013-10-02 西北工业大学 Image blind restoration method based on blurred noise image pair joint optimization

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1397050A (en) * 2000-09-27 2003-02-12 皇家菲利浦电子有限公司 Method and apparatus for providing image to be displayed on screen
US20030048959A1 (en) * 2001-08-28 2003-03-13 John Peterson Methods and apparatus for shifting perspective in a composite image
CN102326379A (en) * 2008-12-31 2012-01-18 浦项工科大学校产学协力团 Method for removing blur from image and recording medium on which the method is recorded
CN101510268A (en) * 2009-03-20 2009-08-19 南京航空航天大学 Automatic identification method for secret related drawings
CN101625760A (en) * 2009-07-28 2010-01-13 谭洪舟 Method for correcting certificate image inclination
CN101639938A (en) * 2009-08-28 2010-02-03 浙江大学 Image restoration method based on double-edge wave filter and margin deconvolution
CN102194212A (en) * 2010-03-08 2011-09-21 佳能株式会社 Image processing method, device and system
CN102509281A (en) * 2011-11-24 2012-06-20 浙江大学 Double-image planar motion blur eliminating method based on transparency
CN102750679A (en) * 2012-06-28 2012-10-24 西安电子科技大学 Blind deblurring method for image quality evaluation
CN103337058A (en) * 2013-07-05 2013-10-02 西北工业大学 Image blind restoration method based on blurred noise image pair joint optimization

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
DILIP KRISHNAN 等: "Blind Deconvolution Using a Normalized Sparsity Measure", 《CVPR 2011》 *
JIEJING ZHOU DEN等: "Research on Distortion Correction of QR Code Images", 《IJCST 2012》 *
唐梦 等: "基于正则化方法的图像盲去模糊", 《计算机应用研究》 *
王晓鸥: "基于扩展卡尔曼滤波的摄像机标定方法研究", 《中国优秀硕士学位论文全文库 信息科技辑》 *
黄珂 等: "QR 码图像几何校正算法的研究", 《计算机工程与应用》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018058476A1 (en) * 2016-09-29 2018-04-05 华为技术有限公司 Image correction method and device
CN109690611A (en) * 2016-09-29 2019-04-26 华为技术有限公司 A kind of method for correcting image and device
CN109690611B (en) * 2016-09-29 2021-06-22 华为技术有限公司 Image correction method and device
CN111145101A (en) * 2018-11-03 2020-05-12 广州灵派科技有限公司 Modular image processing method and device
CN109754381A (en) * 2019-01-03 2019-05-14 广东小天才科技有限公司 Image processing method and system
CN110765304A (en) * 2019-10-22 2020-02-07 珠海研果科技有限公司 Image processing method, image processing device, electronic equipment and computer readable medium
CN110796602A (en) * 2019-10-30 2020-02-14 福州大学 Method for reducing distortion after image perspective transformation
CN112588621A (en) * 2020-11-30 2021-04-02 山东农业大学 Agricultural product sorting method and system based on visual servo
CN112588621B (en) * 2020-11-30 2022-02-08 山东农业大学 Agricultural product sorting method and system based on visual servo
CN114821044A (en) * 2022-05-31 2022-07-29 中煤科工机器人科技有限公司 A Gradient Transform-Based Method for Recognition of Square Pointer Instrument Numbers
CN114821044B (en) * 2022-05-31 2024-05-03 中煤科工机器人科技有限公司 Square pointer instrument indication recognition method based on gradient transformation

Also Published As

Publication number Publication date
CN105096261B (en) 2018-04-17

Similar Documents

Publication Publication Date Title
CN105096261B (en) Image processing apparatus and image processing method
US10630956B2 (en) Image processing method and apparatus
US9142009B2 (en) Patch-based, locally content-adaptive image and video sharpening
US9519996B2 (en) Virtual view generating method and apparatus
US8837854B2 (en) Image processing method for boundary resolution enhancement
Baghaie et al. Structure tensor based image interpolation method
US10198801B2 (en) Image enhancement using self-examples and external examples
WO2019057041A1 (en) Method, device, and electronic apparatus for image enhancement
CN102665062B (en) A kind ofly make method that target object image in video is stable and device
Vijayanagar et al. Refinement of depth maps generated by low-cost depth sensors
Zeng et al. Image super-resolution employing a spatial adaptive prior model
CN104867111A (en) Block-blur-kernel-set-based heterogeneous video blind deblurring method
US7826678B2 (en) Adaptive image sharpening method
US10007970B2 (en) Image up-sampling with relative edge growth rate priors
CN109785264A (en) Image enchancing method, device and electronic equipment
CN105741243B (en) A kind of Restoration method of blurred image
CN105184825A (en) Indoor-scene-oriented mobile augmented reality method
CN110490886A (en) A kind of method for automatically correcting and system for certificate image under oblique viewing angle
CN102547067B (en) Improved bicubic interpolation video scaling method
Liu et al. An MRF-based depth upsampling: Upsample the depth map with its own property
US9336573B2 (en) Self-adaptive image edge correction device and method thereof
Tian et al. Dual regularization-based image resolution enhancement for asymmetric stereoscopic images
CN102831583B (en) Method for super-resolution of image and video based on fractal analysis, and method for enhancing super-resolution of image and video
Cho et al. A new visual comfort-based stereoscopic image retargeting method
JP2019016865A (en) Image processing device and image processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220623

Address after: 100871 No. 5, the Summer Palace Road, Beijing, Haidian District

Patentee after: Peking University

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871 No. 5, the Summer Palace Road, Beijing, Haidian District

Patentee before: Peking University

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230407

Address after: 100871 No. 5, the Summer Palace Road, Beijing, Haidian District

Patentee after: Peking University

Address before: 100871 No. 5, the Summer Palace Road, Beijing, Haidian District

Patentee before: Peking University

Patentee before: New founder holdings development Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

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: 20180417