WO2012068902A1 - 提高文本图像清晰度的方法及系统 - Google Patents

提高文本图像清晰度的方法及系统 Download PDF

Info

Publication number
WO2012068902A1
WO2012068902A1 PCT/CN2011/077904 CN2011077904W WO2012068902A1 WO 2012068902 A1 WO2012068902 A1 WO 2012068902A1 CN 2011077904 W CN2011077904 W CN 2011077904W WO 2012068902 A1 WO2012068902 A1 WO 2012068902A1
Authority
WO
WIPO (PCT)
Prior art keywords
point
image
matching
text
feature
Prior art date
Application number
PCT/CN2011/077904
Other languages
English (en)
French (fr)
Inventor
黄灿
龙腾
镇立新
Original Assignee
上海合合信息科技发展有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海合合信息科技发展有限公司 filed Critical 上海合合信息科技发展有限公司
Publication of WO2012068902A1 publication Critical patent/WO2012068902A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30176Document

Definitions

  • the invention belongs to the technical field of image processing, and relates to a method for improving the sharpness of an image, in particular to a method for improving the sharpness of a text image. Meanwhile, the present invention also relates to a system for improving the sharpness of a text image. Background technique
  • the camera of a mobile phone has a limited number of pixels.
  • the average pixel of a mobile phone camera is between 3 million and 5 million. Therefore, for a large document, you need to take all the details of the document. , is unlikely.
  • the technical problem to be solved by the present invention is to provide a method for improving the sharpness of a text image, which can improve the sharpness of the entire document image.
  • the present invention further provides a system for improving the sharpness of a text image, which can improve the sharpness of the entire document image.
  • the present invention uses the following technical solutions:
  • a method for improving the sharpness of a text image first taking a document image, then taking a close-up shot of each partial region of the document, and then extracting these clear local region images and feature points of the original document image, and then matching to obtain a partial image Matching feature points with the original document image, calculating a perspective transformation matrix of the partial image to the original document image according to the feature point pair, and then transforming the clear partial image according to the perspective change matrix, and replacing the transformed partial image with the original document
  • the area in which the image is located using this alternative to ultimately improve the clarity of the entire document image.
  • a method of improving the sharpness of a text image comprising the steps of:
  • a method for capturing an entire text image To: Adjust the distance of the camera from the text. When the text to be shot just fills the entire screen of the phone, press the capture button to get the initial text image.
  • step S2 the distance of the camera is adjusted to make the camera closer to the text; when the local area of the text to be captured occupies the setting range of the entire text area, the shooting button is pressed; At this time, since the camera is closer to the text, the text in the obtained partial image will be more clear.
  • the method for performing feature matching between the partial image and the entire text image includes:
  • S31 determining a feature key point of interest
  • S32 extracting a feature vector descriptor of a region around the key point
  • S33 matching each feature vector descriptor by the Euclidean distance of the feature point
  • step S33 the matching strategy adopts the nearest neighbor proportional matching: for the feature point matching of the two images, to find the corresponding matching point with a certain feature point in the first image, find the feature in the second image.
  • the two feature points closest to the Euclidean distance if the distance of the nearest point a ' is divided by the distance of the second near point ° ⁇ . ⁇ If the value is less than the set value, the nearest point is considered to be the matching point, otherwise it will not be received.
  • the method for calculating the perspective transformation matrix according to the matched feature point pairs is:
  • the perspective change matrix is a 3 x 3 matrix, making
  • the method for transforming the partial image by the perspective transformation matrix is:
  • each pixel of the partial image is transformed according to the perspective change matrix to obtain a transformed partial image, and the changed partial image is in the same coordinate system as the entire text image.
  • the step S6 includes: calculating an effective area, and pasting the transformed partial image according to the effective area;
  • the effective area is calculated as: Four vertices of the partial image before the change, the upper left point, the upper right point, the lower left point, and the lower right point.
  • the four points are transformed by the perspective change matrix to obtain the transformed position coordinates, and then the effective inscribed rectangles of the four transformed vertices are calculated, and the inscribed rectangle represents the effective area to be pasted;
  • the method of pasting a partial image according to the effective area is as follows: By using the calculated pasted area, the pixel of the original text image is directly replaced with the partial image pixel in the area to be pasted.
  • a method of improving the sharpness of a text image comprising the steps of:
  • Step 110 Obtain a full picture of the text
  • Step 120 The camera is moved closer to a local area of the text to obtain a clear local image to be pasted
  • Step 130 Perform feature matching on the partial image and the text full image
  • Step 140 judging whether the feature matching is successful; judging criterion: whether the feature point pair on the matching reaches the set value, and if the perspective change matrix cannot be calculated if the value is lower than the set value, the judgment is a failure, and the process proceeds to the step.
  • Step 150 calculate the perspective change matrix between the two images by using the feature points on the matching obtained in step 130, and Transforming the partial image according to a perspective change matrix;
  • Step 160 replacing the transformed partial image with a corresponding area of the original text full image
  • Step 170 judge: whether there are other partial areas that need to be photographed; if still, go to the step
  • step 180 shooting the next area of text, if there is no local area to be photographed, go to step 180;
  • a system for improving the sharpness of a text image comprising:
  • a camera unit for taking an entire text image and for capturing various local areas of the text
  • the feature point matching unit is configured to extract the local area image and the feature points of the original whole image, perform matching, and obtain corresponding matching feature points of the partial image and the original text image;
  • a perspective transformation matrix calculation unit configured to calculate a perspective transformation matrix of the partial image to the original text image according to the feature point pair
  • the method for performing feature matching between a partial image and a whole text image by the feature point matching unit includes:
  • Step 131 Determine a feature key point of interest
  • Step 132 Extract a feature vector descriptor of a region around the key point
  • Step 133 match each feature vector descriptor by a Euclidean distance of the feature point
  • the matching strategy adopts the nearest neighbor proportional matching: For the feature point matching of the two images, to find the corresponding matching point with a certain feature point in the first image, find the closest to the feature point in the second image. Two feature points, if the distance d of the nearest point divided by the distance d s of the second near point is less than the set threshold, the nearest point is considered to be a matching point, otherwise it is not received;
  • the method for calculating the perspective transformation matrix by the perspective transformation matrix calculation unit according to the matched feature point pairs is: calculating a perspective change matrix between planes of two text images according to the feature point pairs on the matching of the two images; setting src_points The coordinate of the matching point of the plane in the whole text image, the size is 2xN, where N is the number of points; the dstjpoints is the matching point coordinate of the plane where the partial image is located, the size is 2xN; the perspective change matrix is 3 ⁇ 3 Matrix, making Replacement page (Article 26) Where ( , , 1 ) is the coordinates of a point in dst_points, ( ⁇ , , 1) is the coordinates of a point in src_point; the 3x3 perspective change matrix of the output is such that the sum of back projection errors is the smallest, that is, the following formula is the smallest:
  • the partial image transform unit transforms the partial image by the perspective transformation matrix: after obtaining the perspective change matrix, each pixel of the partial image is transformed according to the perspective change matrix to obtain the transformed partial image, and the changed
  • the partial image will be in the same coordinate system as the entire text image;
  • the integration unit includes: an effective area calculation unit, and an attachment unit for pasting the transformed partial image according to the effective area;
  • the calculation method of the effective area calculation unit is: changing four vertices of the partial image before, changing the upper left point, the upper right point, the lower left point, and the lower right point; the four points are transformed by the perspective change matrix to obtain the transformed position coordinates. Then calculating a valid inscribed rectangle of the four transformed vertices, the inscribed rectangle representing the effective area to be pasted;
  • the method for the pasting unit to paste the partial image according to the effective area is: replacing the pixels of the original text image with the partial image pixels by using the calculated pasting area and the area to be pasted.
  • a smartphone or a digital camera which requires a general arithmetic and storage device, including a CPU of a certain frequency (central processing unit), a memory for use in computing, and a use.
  • CPU of a certain frequency central processing unit
  • a memory for use in computing
  • a smart phone or digital camera should have an auto focus function.
  • the invention has the following advantages: the method and the system for improving the sharpness of the text image proposed by the invention adopt the techniques of image processing, computer vision and the like, and use multiple clear partial document images to replace the original document area, through this Alternative methods improve the clarity of the image and make the text easier to distinguish.
  • the invention solves the problem that the user photographs when shooting a large document using the camera
  • FIG. 1 is a flow chart of a method for improving the sharpness of a text image according to the present invention.
  • Figure 2 is a schematic diagram of acquiring an entire text image.
  • FIG. 3 is a schematic diagram of acquiring a partial text image.
  • Figure 4 is a schematic diagram of the acquired partial text image.
  • FIG. 5 is a schematic diagram of feature matching between a partial image and an original image of the document. detailed description
  • the present invention discloses a method for improving the sharpness of a text image by first taking a document image, then photographing each partial region of the document at a close distance, and then extracting these clear local region images and feature points of the original document image. Then, matching is performed to obtain corresponding matching feature points of the partial image and the original document image, and according to the feature point pair, the perspective transformation matrix of the partial image to the original document image is calculated, and then the clear partial image is transformed according to the perspective change matrix, and the transformation is performed.
  • the subsequent partial image replaces the area where the original document image is located, and this alternative method finally improves the sharpness of the entire document image.
  • Step 110 Obtain a full text of the text.
  • Step 120 The camera is moved closer to the local area of the text to obtain a clear partial image to be pasted.
  • Step 130 The partial image is matched with the full text of the text.
  • the method for feature matching between a partial image and an initial text image is:
  • SIFT scale invariant Features
  • SIFT-based feature matching involves three steps: First, determine the feature detection of interest. Second, extract the feature vector descriptor of the area around the key point. Third, the feature vectors are described by feature vectors. The method of measurement generally uses Euclidean distance.
  • Matching strategy uses nearest neighbor proportional matching: For example, for feature point matching of two images, to find the corresponding matching point with a feature point in the first image, find the feature point in the second image. From the nearest two feature points, if the distance of the nearest point £ ⁇ divided by the distance of the second near point ⁇ is less than the set threshold, the nearest point is considered to be the matching point, otherwise it is not received. The accuracy of this matching method is relatively high. Because it is a matching point, the first neighboring point represents the correct matching point, and the second neighboring point is the incorrect matching point. In general, the distance of the incorrect point is greater than the distance of the correct point. This can be launched. The ratio of ⁇ is relatively small. If it is not a matching point, since the first near and second near feature vectors are all mismatched, the distance difference between the two is relatively small, so the ratio will be compared.
  • Step 140 It is judged whether the feature matching is successful. Judging criteria: Whether the feature point pairs on the matching reach more than four, such as less than four, the perspective change matrix cannot be calculated, then it is judged as failure, go to step 170, if the number of points of the feature matching pair exceeds four, it is judged as successful. , Go to step 150.
  • Step 150 Calculate the feature points on the matching obtained by step 130, and calculate between the two images.
  • the perspective matrix is transformed and the partial image is transformed according to the perspective change matrix.
  • the method for calculating the perspective transformation matrix from the matched feature point pairs is:
  • the through-change matrix (homgraphy matrix) between the planes of the two text images is calculated.
  • srcjDoints is the matching point coordinate of the plane in the initial text image, and the size is 2xN, where N is the number of points.
  • dst_points is the matching point coordinate of the plane where the partial image is located, and the size is 2xN.
  • Homography is a 3 x 3 matrix, making
  • each pixel of the partial image is transformed according to the homography matrix to obtain a transformed partial image, so that the partial image after the sub-variation is in the same coordinate system as the initial text image.
  • Step 160 replacing the transformed partial image with the corresponding region of the original document full image; comprising: calculating the effective region, and pasting the transformed partial image according to the effective region.
  • the four vertices of the partial image before the change the upper left point, the upper right point, the lower left point, and the lower right point.
  • the four points are transformed by the perspective change matrix to obtain the transformed position coordinates, and then the effective inscribed rectangles of the four transformed vertices are calculated.
  • the inscribed rectangle represents the effective area to be pasted.
  • Step 170 Judging: Whether there are other partial areas that need to be photographed. If so, go to step 120 and take the next area of the text. If there is no local area to be shot, go to step 180.
  • the method for improving the sharpness of a text image proposed by the present invention uses a technique of image processing, computer vision, and the like to replace a region of an original document with a plurality of clear partial document images. Improves the sharpness of the image and makes the text easier to distinguish.
  • the present invention solves the problem that a user takes a picture that is blurred when shooting a large document using the camera.
  • Embodiment 2
  • the embodiment discloses a system for improving the sharpness of a text image, the system comprising: an imaging unit, a feature point matching unit, a perspective transformation matrix calculation unit, a partial image transformation unit, and an integration unit.
  • the camera unit is used to capture the entire text image while simultaneously capturing various local areas of the text.
  • the feature point matching unit is configured to extract the local area image and the feature points of the original whole image, and perform matching to obtain corresponding matching feature points of the partial image and the original text image.
  • the perspective transformation matrix calculation unit is configured to calculate a perspective transformation matrix of the partial image to the original text image according to the feature point pair.
  • the partial image transform unit is configured to transform the clear partial image according to the perspective change matrix.
  • the integration unit is used to replace the transformed partial image with the corresponding region in the entire text image.
  • the method for the feature matching unit to perform feature matching between the partial image and the whole text image includes: Step 131: determining a feature key point of interest; Step 132: Extracting a feature vector descriptor of a region around the key point; Step 133, The Euclidean distance of the feature points matches each feature vector descriptor.
  • Matching strategy using nearest neighbor proportional match For feature point matching of two images, to find and Corresponding matching points of a feature point in an image, and finding two feature points closest to the Euclidean distance of the feature point in the second image, if the distance d of the closest point is divided by the distance d of the second near point If s ⁇ ond is less than the set threshold, the nearest point is considered to be a matching point, otherwise it is not received.
  • the perspective transformation matrix calculation unit calculates the perspective transformation matrix according to the matched feature point pairs as follows: According to the feature point pairs on the matching of the two images, the perspective change matrix between the planes of the two text images is calculated.
  • src_points and dst_points are Cartesian coordinates, and for N points, the size is 2 ⁇ ⁇ .
  • the homogeneous coordinates are used. Homogeneous coordinates use ⁇ + 1 component to describe the Cartesian coordinates of the ⁇ dimension.
  • the 2D homogeneous coordinate is a new component 1 added to the Cartesian coordinates (x, y), which becomes (x, y, l).
  • the point (1, 2) in Cartesian coordinates is (1, 2, 1) in homogeneous coordinates.
  • the output 3x3 perspective change matrix minimizes the sum of back projection errors, ie the following minimum: ⁇ (( ⁇ ' ⁇ x ' +h > ⁇ ' + ⁇ y h( 3 ⁇ 4 1 +/? 22 + 3 ⁇ 4 3) 2)
  • the partial image transform unit transforms the partial image by the perspective transformation matrix: after obtaining the perspective change matrix, each pixel of the partial image is transformed according to the perspective change matrix to obtain the transformed partial image, and the changed The partial image will be in the same coordinate system as the entire text image.
  • the integration unit includes: an effective area calculation unit, and an attachment unit for pasting the transformed partial image according to the effective area.
  • the calculation method of the effective area calculation unit is: changing four vertices of the partial image before, left
  • the method for the pasting unit to paste the partial image according to the effective area is: replacing the pixels of the original text image with the partial image pixels by using the calculated pasting area and the area to be pasted.

Abstract

本发明揭示了一种提高文本图像清晰度的方法及系统,先拍摄一幅文档图像,接着近距离拍摄文档的各个局部区域;然后提取这些清晰的局部区域图像以及原文档图像的特征点,接着进行匹配,得到局部图像与原文档图像的对应匹配特征点;根据特征点对,计算局部图像到原文档图像的透视变换矩阵;然后按照透视变化矩阵将清晰的局部图像进行变换,将变换后的局部图像去替代原来文档图像所在的区域。本发明采用图像处理、计算机视觉等领域的技术,利用多幅清晰的局部文档图像去替代原来文档的所在区域,通过这种替代方式提高了图像的清晰度,也使文字更容易辨别。本发明解决了用户使用相机在拍摄一幅较大文档时,拍摄到的文本图片模糊不清的问题。

Description

提高文本图像清晰度的方法及系统 技术领域
本发明属于图像处理技术领域, 涉及一种提高图像清晰度的方法, 尤其涉 及一种提高文本图像清晰度的方法; 同时, 本发明还涉及一种提高文本图像清 晰度的系统。 背景技术
随着智能相机性能的提升, 目前自带的数码相机已经成为了智能手机的标 准配置了。 人们经常用手机上的相机来扫描或者拍摄文本图像。 而目前的智能 手机上的扫描仪功能, 都是先用相机拍摄文本图片后, 再加上一些图像预处 理, 就得到最终的扫描结果。 这种手机扫描仪存在一个比较明显的缺点就是当 所拍摄的文本(文档) 比较大时, 由于相机相对离的较远, 此时得到的图像中 文字分辨率比较低, 噪声大, 导致文本图片中的很多文字都不是很清楚。
引起字体模糊的主要原因是:
( 1 ) 手机的相机像素有限, 一般的手机相机拍出来的照片像素都是介于 三百万至五百万之间, 因此对于一幅较大的文档时, 要想拍清楚文档的所有细 节, 是不太可能的。
( 2 ) 由于要拍摄出完整的文档, 文档较大时必然要使相机离得比较远, 因此在较远时, 镜头对平面文档的对焦不可能非常准确, 此时必会引起文本图 像的模糊。
对于提高图像的清晰度和分辨率的方法中, 专利 "United States Patent 7106914: Bayesian image super resolution " 和专利 " United States Patent 7613363 :Image superresolution through edge extraction and contrast enhancement 介绍了提高图像分辨率使图像更清楚的方法。 中国专利 CN200910153544.0 也 公开了一种适用于压缩域的视频超分辨率方法, 充分利用前后多帧的信息来超 分辨率重建目标帧, 主要包括以下步骤: 首先, 解压缩低分辨视频, 得到各种 信息; 然后, 利用得到的信息, 使用贝叶斯框架, 来分别得到当前窗口内的各 单幅超分辨率图像; 最后, 利用当前窗口内的各单幅超分辨率图像来重建目标 帧的最终的超分辨率图像。
上述方案均通过拍摄多幅相同分辨率的图像, 然后通过一定的算法处理从 而提高文本图像的清晰度, 这类方法的一大缺点就是所花时间较长, 而且对提 高文本图像的清晰度效果不是很明显, 不太适合用于手机平台, 也不适合处理 文本图像。 发明内容
本发明所要解决的技术问题是: 提供一种提高文本图像清晰度的方法, 可 提高整个文档图像的清晰度。
此外, 本发明进一步提供一种提高文本图像清晰度的系统, 可提高整个文 档图像的清晰度。
为解决上述技术问题, 本发明釆用如下技术方案:
一种提高文本图像清晰度的方法, 先拍摄一幅文档图像, 接着近距离拍摄 文档的各个局部区域, 然后提取这些清晰的局部区域图像以及原文档图像的特 征点, 接着进行匹配, 得到局部图像与原文档图像的对应匹配特征点, 根据特 征点对, 计算局部图像到原文档图像的透视变换矩阵, 然后按照透视变化矩阵 将清晰的局部图像进行变换, 将变换后的局部图像去替代原来文档图像所在的 区域, 利用这种替代方式最后提高整个文档图像的清晰度。
一种提高文本图像清晰度的方法, 所述方法包括如下步骤:
51、 拍摄整幅文本图像;
52、 拍摄该文本的各个局部区域;
53、 提取局部区域图像以及原整幅图像的特征点, 进行匹配, 得到局部图 像与原文本图像的对应匹配特征点;
54、 根据特征点对, 计算局部图像到原文本图像的透视变换矩阵;
55、 按照透视变化矩阵将清晰的局部图像进行变换;
S6、 将变换后的局部图像替代整幅文本图像中对应的区域。
作为本发明的一种优选方案, 所述步骤 S1 中, 拍摄整幅文本图像的方法 为: 调整相机离文本的距离, 当要拍摄的文本恰好充满整个手机屏幕, 此时按 下拍摄按钮, 得到初始的文本图像。
作为本发明的一种优选方案, 所述步骤 S2 中, 调整相机的距离, 使相机 离文本更近些; 当所要拍摄的文本局部区域占整个文本面积的设定范围时, 按 下拍摄按钮; 此时由于相机距离文本较近, 所获得局部图像中的文字将更加清 楚。
作为本发明的一种优选方案, 所迷步驟 S3 中, 局部图像跟整幅文本图像 进行特征匹配的方法包括:
S31 , 确定感兴趣的特征关键点; S32, 提取关键点周围区域的特征向量描 述子; S33 , 通过特征点的欧式距离来匹配各个特征向量描迷子;
步骤 S33 中, 匹配策略采用最近邻比例匹配: 对于二幅图像的特征点匹 配, 要查找与第一幅图像中某个特征点的对应匹配点, 则在第二幅图像中找出 与该特征点欧式距离最近的二个特征点, 如果最近点的距离 a '除以第二近点 的距离 °^。^小于设定闹值, 则认为该最近点为匹配点, 否则不接收。
作为本发明的一种优选方案, 所述步骤 S4 中, 根据匹配的特征点对计算 透视变换矩阵的方法为:
根据二幅图像的匹配上的特征点对, 计算二幅文本图像所在平面之间的透 视变化矩阵;
设定 src_points 为整幅文本图像中所在平面的匹配点坐标, 大小为 2xN, 其中, N表示点的数目; 设定 dst_points 为局部图像所在平面的匹配点坐标, 大小为 2x ;
透视变化矩阵为 3 x 3的矩阵, 使得
Figure imgf000005_0001
其中 , .,1)为 dst_points—个点的坐标, (x ,1)为 src__point—个点的坐 输出的 3x3的透视变化矩阵, 使得反投影错误总和最小, 即下式最小:
换 细 26
Figure imgf000006_0001
作为本发明的一种优选方案, 所述步骤 S5 中, 通过透视变换矩阵对局部 图像进行变换的方法为:
得到透视变化矩阵之后, 将局部图像的每个像素点按照透视变化矩阵进行 变换, 得到变换后的局部图像, 变化后的局部图像将和整幅文本图像处于同一 坐标系下。
作为本发明的一种优选方案, 所述步骤 S6 包括: 计算有效区域, 将变换 后的局部图像按照有效区域进行粘贴;
有效区域的计算方法为: 变化之前局部图像的四个顶点, 左上点, 右上 点, 左下点, 右下点。 这个四个点通过透视变化矩阵变换, 得到变换后的位置 坐标, 然后计算这四个变换后顶点的有效的内接矩形, 此内接矩形代表要要粘 贴的有效区域;
按照有效区域进行粘贴局部图像的方法为: 通过计算出来的粘贴区域, 将 要进行粘贴的区域中, 直接用局部图像像素替代原始文本图像的像素。 一种提高文本图像清晰度的方法, 所述方法包括如下步骤:
步骤 110, 获取文本全图;
步骤 120, 将相机离的近些, 拍摄文本的局部区域, 得到待粘贴的清晰局 部图像;
步骤 130, 将局部图像与文本全图进行特征匹配;
步骤 140, 判断特征匹配是否成功; 判断标准: 匹配上的特征点对是否达 到设定值, 如低于设定值, 无法计算透视变化矩阵, 则判断为失败, 转到步骤
170, 如特征匹配对的点数达到或超过设定值, 判断匹配成功, 转到步骤 150; 步骤 150, 通过步骤 130得到的匹配上的特征点, 计算二幅图像之间的透 视变化矩阵, 并将局部图像依照透视变化矩阵进行变换;
步骤 160, 将变换后的局部图像替代原文本全图的相应区域;
步骤 170, 判断: 是否还有需要拍摄的其它局部区域; 如还有, 转到步驟
120, 拍摄文本的下一个区域, 如没有要拍摄的局部区域, 则转到步骤 180;
替换页 (细则第 26条) 步骤 180, 结束。 一种提高文本图像清晰度的系统, 所述系统包括:
摄像单元, 用以拍摄整幅文本图像, 同时用于拍摄该文本的各个局部区 域;
特征点匹配单元, 用以提取局部区域图像以及原整幅图像的特征点, 进行 匹配, 得到局部图像与原文本图像的对应匹配特征点;
透视变换矩阵计算单元, 用以根据特征点对, 计算局部图像到原文本图像 的透视变换矩阵;
局部图像变换单元, 用以按照透视变化矩阵将清晰的局部图像进行变换; 整合单元, 用以将变换后的局部图像替代整幅文本图像中对应的区域。 作为本发明的一种优选方案, 所述特征点匹配单元将局部图像跟整幅文本 图像进行特征匹配的方法包括:
步骤 131, 确定感兴趣的特征关键点; 步骤 132, 提取关键点周围区域的 特征向量描述子; 步骤 133, 通过特征点的欧式距离来匹配各个特征向量描述 子;
匹配策略采用最近邻比例匹配: 对于二幅图像的特征点匹配, 要查找与第 一幅图像中某个特征点的对应匹配点, 则在第二幅图像中找出与该特征点欧式 距离最近的二个特征点, 如果最近点的距离 d 除以第二近点的距离 ds 小 于设定阈值, 则认为该最近点为匹配点, 否则不接收;
所述透视变换矩阵计算单元根据匹配的特征点对计算透视变换矩阵的 方法为: 根据二幅图像的匹配上的特征点对, 计算二幅文本图像所在平面之 间的透视变化矩阵; 设定 src_points 为整幅文本图像中所在平面的匹配点坐 标, 大小为 2xN, 其中, N表示点的数目; 设定 dstjpoints 为局部图像所在平 面的匹配点坐标, 大小为 2xN; 透视变化矩阵为 3 χ 3的矩阵, 使得
Figure imgf000007_0001
替换页 (细则第 26条) 其中( , ,1)为 dst_points中一个点的坐标, (^, ,1)为 src_point中一个点 的坐标; 输出的 3x3 的透视变化矩阵, 使得反投影错误总和最小, 即下式最 小:
y + yi + ^3 )2 , xi + yi + y ) .
所述局部图像变换单元通过透视变换矩阵对局部图像进行变换的方法为: 得到透视变化矩阵之后, 将局部图像的每个像素点按照透视变化矩阵进行变 换, 得到变换后的局部图像, 变化后的局部图像将和整幅文本图像处于同一坐 标系下;
所述整合单元包括: 有效区域计算单元, 用以将变换后的局部图像按照有 效区域进行粘贴的粘贴单元;
所述有效区域计算单元的计算方法为: 变化之前局部图像的四个顶点, 左 上点, 右上点, 左下点, 右下点; 这个四个点通过透视变化矩阵变换, 得到变 换后的位置坐标, 然后计算这四个变换后顶点的有效的内接矩形, 此内接矩形 代表要要粘贴的有效区域;
所述粘贴单元按照有效区域进行粘贴局部图像的方法为: 通过计算出来的 粘贴区域, 将要进行粘贴的区域中, 直接用局部图像像素替代原始文本图像的 像素。 为了实行本发明, 一般需具备如下硬件条件: 智能手机或者数码相机, 该 设备中需要有一般的运算和存储装置, 包括一定频率的 CPU (中央处理器) , 有一定用来运算的内存和用来存储系统软件, 应用软件和各种数据的存储空间 等。 智能手机或者数码相机要有自动对焦的功能。 本发明的有益效果在于: 本发明提出的提高文本图像清晰度的方法及系 统, 采用图像处理, 计算机视觉等领域的技术, 利用多幅清晰的局部文档图像 去替代原来文档的所在区域, 通过这种替代方式提高了图像的清晰度, 也使文 字更容易辨别。 本发明解决了用户使用相机在拍摄一幅较大文档时, 拍摄到的
替换页 (细则第 26条) 文本图片模糊不清的问题。 附图说明
图 1为本发明提高文本图像清晰度方法的流程图。
图 2为获取整幅文本图像的示意图。
图 3为获取局部文本图像的示意图。
图 4为获取的局部文本图像的示意图。
图 5为局部图像跟文档原图进行特征匹配的示意图。 具体实施方式
下面结合附图详细说明本发明的优选实施例。
实施例一
本发明揭示了本发明提供了一种提高文本图像清晰度的方法, 先拍摄一幅 文档图像, 接着近距离拍摄文档的各个局部区域, 然后提取这些清晰的局部区 域图像以及原文档图像的特征点, 接着进行匹配, 得到局部图像与原文档图像 的对应匹配特征点, 根据特征点对, 计算局部图像到原文档图像的透视变换矩 阵, 然后按照透视变化矩阵将清晰的局部图像进行变换, 将变换后的局部图像 去替代原来文档图像所在的区域, 利用这种替代方式最后提高整个文档图像的 清晰度。
请参阅图 1 , 本实施例中, 提高文本图像清晰度的方法的具体步骤如下: 【步骤 110】获取文本全图。
获取初始文本图像的方式为:
调整相机离文档的距离, 当要拍摄的文档恰好充满整个手机屏幕, 此时按 下拍摄按钮, 得到初始的文本图像。 初始文本图像获取的示例见图 1。
【步骤 120】将相机离的近些, 拍摄文本的局部区域, 得到待粘贴的清晰 局部图像。
获取局部图像的拍摄方式为:
调整相机的距离, 使相机离文档更近些, 当所要拍摄的文档局部区域占整 个文档面积的 1/6至 1/3时(具体大小由用户自主决定), 按下拍摄按钮, 此时 由于相机距离文档较近, 所获得局部图像中的文字将更加清楚。 局部图像拍摄 的示例见图 2、 图 3。
【步骤 130】将局部图像与文本全图进行特征匹配。
局部图像跟初始文本图像进行特征匹配的方法为:
在现有技术中, 提取图像中的特征点, 然后根据特征点的描述子进行匹配 的方法有很多, 其中 SIFT ( scale invariant Features )就是一种很好的尺度不变 局部特征, 它对平移、 旋转、 尺度、 亮度变化具有不变性, 同时对一定范围内 的噪声、 仿射变换以及光照变化也都保持一定程度的鲁棒性。 (Lowe, D. Distinctive image features from scale-invariant keypoints, IJCV, volume 60, pages 91 110,2004 )。 基于 SIFT 的特征匹配包括三个步骤: 第一, 确定感兴趣的特 征关键点 (feature detection )。 第二, 提取关键点周围区域的特征向量描述子 ( feature description )。 第三, 各个特征向量描述子之间的匹配 ( feature matching )。 度量的方法一般釆用欧式距离。
匹配策略釆用最近邻比例匹配: 比如对于二幅图像的特征点匹配, 要查找 与第一幅图像中某个特征点的对应匹配点, 则在第二幅图像中找出与该特征点 欧式距离最近的二个特征点, 如果最近点的距离 £^除以第二近点的距离 ∞ 小于设定阔值, 这认为该最近点为匹配点, 否则不接收。 这种匹配方法 准确率比较高, 因为是匹配点的话, 第一近邻点代表正确匹配点, 则第二近邻 点为不正确匹配点。 一般情况下, 不正确点的距离要比正确点的距离大。 由此 可以推出 。^ 的比值比较小。 如果不是匹配点, 由于第一近和第二近的特 征向量都是不匹配, 二者的距离差异性比较小, 因此 比值将会比较接
Figure imgf000010_0001
近 1。 通过最近邻匹配, 设置合理的比例阔值, 一般设置为 0.7 , 就可以很好的 找出匹配点。 图像之间特征匹配的示例见图 4。
【步骤 140】判断特征匹配是否成功。 判断标准: 匹配上的特征点对是否 达到四个以上, 如低于四个, 无法计算透视变化矩阵, 则判断为失败, 转到步 骤 170, 如特征匹配对的点数超过四个, 判断为成功, 转到步骤 150。
【步骤 150】通过步骤 130得到的匹配上的特征点, 计算二幅图像之间的 透视变化矩阵, 并将局部图像依照透视变化矩阵进行变换。
根据匹配的特征点对计算透视变换矩阵的方法为:
根据二幅图像的匹配上的特征点对, 计算二幅文本图像所在平面之间的透 视变化矩阵 ( homography矩阵)。
在这里假设 srcjDoints 为初始文本图像中所在平面的匹配点坐标, 大小为 2xN, 这儿 N表示点的数目。 假设 dst_points 为局部图像所在平面的匹配点坐 标, 大小为 2xN。
homography 为 3 x 3的矩阵, 使得
Figure imgf000011_0001
其中 O , 1)为 dst_points—个点的坐标, 为 src_point—个点的坐 输出的 3x3 的 homography 矩阵, 使得反投影错误总和最小, 即下式最 小:
y ((χ' 、xi + ^ > I ( .' + 3 )2) 通过透视变换矩阵对局部图像进行变换的方法为:
得到透视变化矩阵(homography矩阵)之后, 将局部图像的每个像素点按 照 homography 矩阵进行变换, 得到变换后的局部图像, 这样子变化后的局部 图像将和初始文本图像处于同一坐标系下。
【步骤 160】将变换后的局部图像, 替代原文档全图的相应区域; 包括: 计算有效区域, 将变换后的局部图像按照有效区域进行粘贴。
有效区域的计算的方法为:
变化之前局部图像的四个顶点, 左上点, 右上点, 左下点, 右下点。 这个 四个点通过透视变化矩阵变换, 得到变换后的位置坐标, 然后计算这四个变换 后顶点的有效的内接矩形, 此内接矩形代表要要粘贴的有效区域。
将变换后的局部图像, 按照有效区域进行粘贴的方法为:
通过上面计算出来的粘贴区域, 将要进行粘贴的区域中, 直接用局部图像
替换页(细则第 26条) 像素替代原始文本图像的像素。
【步骤 170】判断: 是否还有需要拍摄的其它局部区域。 如还有, 转到步 骤 120 , 拍摄文本的下一个区域, 如没有要拍摄的局部区域, 则转到步骤 180。
【步骤 180】 结束。 综上所述, 本发明提出的提高文本图像清晰度的方法, 釆用图像处理, 计 算机视觉等领域的技术, 利用多幅清晰的局部文档图像去替代原来文档的所在 区域, 通过这种替代方式提高了图像的清晰度, 也使文字更容易辨别。 本发明 解决了用户使用相机在拍摄一幅较大文档时, 拍摄到的文本图片模糊不清的问 题。 实施例二
本实施例揭示一种提高文本图像清晰度的系统, 所述系统包括: 摄像单 元、 特征点匹配单元、 透视变换矩阵计算单元、 局部图像变换单元、 整合单 元。
摄像单元用以拍摄整幅文本图像, 同时用于拍摄该文本的各个局部区域。 特征点匹配单元用以提取局部区域图像以及原整幅图像的特征点, 进行匹 配, 得到局部图像与原文本图像的对应匹配特征点。
透视变换矩阵计算单元用以根据特征点对, 计算局部图像到原文本图像的 透视变换矩阵。
局部图像变换单元用以按照透视变化矩阵将清晰的局部图像进行变换。 整合单元用以将变换后的局部图像替代整幅文本图像中对应的区域。
所述特征点匹配单元将局部图像跟整幅文本图像进行特征匹配的方法包 括: 步骤 131 , 确定感兴趣的特征关键点; 步骤 132 , 提取关键点周围区域的 特征向量描述子; 步骤 133 , 通过特征点的欧式距离来匹配各个特征向量描述 子。
匹配策略釆用最近邻比例匹配: 对于二幅图像的特征点匹配, 要查找与第 一幅图像中某个特征点的对应匹配点, 则在第二幅图像中找出与该特征点欧式 距离最近的二个特征点, 如果最近点的距离 d 除以第二近点的距离 ds∞ond小 于设定阈值, 则认为该最近点为匹配点, 否则不接收。
所述透视变换矩阵计算单元根据匹配的特征点对计算透视变换矩阵的 方法为: 根据二幅图像的匹配上的特征点对, 计算二幅文本图像所在平面之 间的透视变化矩阵。
设定 src_points 为初始文本图像中所在平面的匹配点坐标, 大小为 2xN, 其中, N表示点的数目; 设定 dst_points 为局部图像所在平面的匹配点坐标, 大小为 2xN; 透视变化矩阵为 3 x 3的矩阵, 使得
Figure imgf000013_0001
其中(χ,., yt , 1)为 dst_points点对应的齐次坐标 , (xt' , , 1)为 src_points点对应 的齐次坐标。
在计算匹配点的阶段, 得到 src_points和 dst_points是笛卡尔坐标, 对于 N 个点, 大小是 2 χ Ν。 而在计算透视变化矩阵 Η 时, 釆用的是齐次坐标。 齐次 坐标用 Ν + 1 个分量来描述 Ν 维的笛卡尔坐标。 比如, 2D 齐次坐标是在笛 卡尔坐标 (x, y)的基础上增加一个新分量 1 , 变成 (x, y,l)。 例如: 笛卡尔坐标中 的点 (1, 2) 在齐次坐标中就是 (1, 2, 1)。
输出的 3x3的透视变化矩阵, 使得反投影错误总和最小, 即下式最小: Υ ((χ' ^x' +h>^' +^y h( ¾1 +/?22 + ¾3)2) 所述局部图像变换单元通过透视变换矩阵对局部图像进行变换的方法为: 得到透视变化矩阵之后, 将局部图像的每个像素点按照透视变化矩阵进行变 换, 得到变换后的局部图像, 变化后的局部图像将和整幅文本图像处于同一坐 标系下。
所述整合单元包括: 有效区域计算单元, 用以将变换后的局部图像按照有 效区域进行粘贴的粘贴单元。
所述有效区域计算单元的计算方法为: 变化之前局部图像的四个顶点, 左
替换页 (细则第 26条) 上点, 右上点, 左下点, 右下点; 这个四个点通过透视变化矩阵变换, 得到变 换后的位置坐标, 然后计算这四个变换后顶点的有效的内接矩形, 此内接矩形 代表要要粘贴的有效区域。
所述粘贴单元按照有效区域进行粘贴局部图像的方法为: 通过计算出来的 粘贴区域, 将要进行粘贴的区域中, 直接用局部图像像素替代原始文本图像的 像素。 这里本发明的描述和应用是说明性的, 并非想将本发明的范围限制在上述 实施例中。 这里所披露的实施例的变形和改变是可能的, 对于那些本领域的普 通技术人员来说实施例的替换和等效的各种部件是公知的。 本领域技术人员应 该清楚的是, 在不脱离本发明的精神或本质特征的情况下, 本发明可以以其它 形式、 结构、 布置、 比例, 以及用其它组件、 材料和部件来实现。 在不脱离本 发明范围和精神的情况下, 可以对这里所披露的实施例进行其它变形和改变。

Claims

权利要求书 、 一种提高文本图像清晰度的方法, 其特征在于, 所述方法包括如下步骤: 步骤 110, 获取文本全图; 方法为: 调整相机离文本的距离, 当要拍摄 的文本恰好充满整个手机屏幕, 此时按下拍摄按钮, 得到初始的文本图 像;
步骤 120, 调整相机与文件间的距离, 拍摄文本的局部区域, 得到待粘 贴的清晰局部图像;
步骤 130, 将局部图像与文本全图进行特征匹配; 特征匹配的方法包 括: 步骤 131 , 确定感兴趣的特征关键点; 步骤 132, 提取关键点周围区域 的特征向量描述子; 步骤 133,通过特征点的欧式距离来匹配各个特征向量 描述子; 步骤 133 中, 匹配策略采用最近邻比例匹配: 对于二幅图像的特 征点匹配, 要查找与第一幅图像中某个特征点的对应匹配点, 则在第二幅 图像中找出与该特征点欧式距离最近的二个特征点, 如果最近点的距离 ^ (除以第二近点的距离 e 小于设定阔值, 则认为该最近点为匹配点, 否则不接收;
步骤 140, 判断特征匹配是否成功; 判断标准: 匹配上的特征点对是否 达到设定值, 如低于设定值, 无法计算透视变化矩阵, 则判断为失败, 转 到步骤 170, 如特征匹配对的点数达到或超过设定值, 判断匹配成功, 转到 步骤 150;
步骤 150, 通过步骤 130得到的匹配上的特征点, 计算二幅图像之间的 透视变化矩阵, 并将局部图像依照透视变化矩阵进行变换; 其中, 根据匹 配的特征点对计算透视变换矩阵的方法为: 居二幅图像的匹配上的 特征点对, 计算二幅文本图像所在平面之间的透视变化矩阵; 设定 src_points为初始文本图像中所在平面的匹配点坐标, 大小为 2xN, 其中, N表示点的数目; 设定 dst_points为局部图像所在平面的匹配点坐标, 大小 为 2xN; 透视变化矩阵为 3 x 3的矩阵, 使得 Si
Figure imgf000015_0001
13 替换页(细则第 26条) 其中 Ο,, ,Ι)为 dst_points中一个点的坐标, (x;, ., 1)为 src_point中一个 点的坐标; 输出的 3x3 的 枧变化矩阵, 使得反投影错误总和最小, 即下 式最小:
((Χ' ^ + + hl3 f I (γ' + + ^ γ) ; 其中, 通过透视变换矩阵对局部图像进行变换的方法为: 得到透视变化 矩阵之后, 将局部图像的每个像素点按照透视变化矩阵进行变换, 得到变 换后的局部图像, 变化后的局部图像将和初始文本图像处于同一坐标系 下;
步骤 160, 将变换后的局部图像替代原文本全图的相应区域; 步骤 160 包括: 计算有效区域, 将变换后的局部图像按照有效区域进行粘贴; 有效 区域的计算方法为: 变化之前局部图像的四个顶点, 左上点, 右上点, 左 下点, 右下点; 这个四个点通过透视变化矩阵变换, 得到变换后的位置坐 标, 然后计算这四个变换后顶点的有效的内接矩形, 此内接矩形代表要要 粘贴的有效区域; 按照有效区域进行粘贴局部图像的方法为: 通过计算出 来的粘贴区域, 将要进行粘贴的区域中, 直接用局部图像像素替代原始文 本图像的像素;
步骤 170, 判断: 是否还有需要拍摄的其它局部区域; 如还有, 转到步 骤 120, 拍摄文本的下一个区域, 如没有要拍摄的局部区域, 则转到步骤 180;
步骤 180, 结束。 、 一种提高文本图像清晰度的方法, 其特征在于, 所述方法包括如下步骤:
51、 拍摄整幅文本图像;
52、 拍摄该文本的各个局部区域;
53、 提取局部区域图像以及原整幅图像的特征点, 进行匹配, 得到局 部图像与原文本图像的对应匹配特征点;
54、 根据特征点对, 计算局部图像到原文本图像的透视变换矩阵;
55、 按照透视变化矩阵将清晰的局部图像进行变换;
替换页 (细则第 2 6条) S6、 将变换后的局部图像替代整幅文本图像中对应的区域。 、 根据权利要求 2所述的提高文本图像清晰度的方法, 其特征在于:
所述步骤 S1 中, 拍摄整幅文本图像的方法包括: 调整相机离文本的距 离, 当要拍摄的文本恰好充满整个手机屏幕, 此时按下拍摄按钮, 得到初 始的文本图像;
所述步骤 S2 中, 调整相机的距离, 使相机离文本更近些; 当所要拍摄 的文本局部区域占整个文本面积的设定范围时, 按下拍摄按钮; 此时由于 相机距离文本较近, 所获得局部图像中的文字将更加清楚。 、 根据权利要求 2所述的提高文本图像清晰度的方法, 其特征在于:
所述步骤 S3中, 局部图像跟整幅文本图像进行特征匹配的方法包括: S31 , 确定感兴趣的特征关键点; S32 , 提取关键点周围区域的特征向 量描述子; S33 , 通过特征点的欧式距离来匹配各个特征向量描述子;
步骤 S33 中, 匹配策略釆用最近邻比例匹配: 对于二幅图像的特征点 匹配, 要查找与第一幅图像中某个特征点的对应匹配点, 则在第二幅图像 中找出与该特征点欧式距离最近的二个特征点, 如果最近点的距离 dnearst除 以第二近点的距离 ee 小于设定阔值, 则认为该最近点为匹配点, 否则不 接收。 、 根据权利要求 2所述的提高文本图像清晰度的方法, 其特征在于:
所述步骤 S4 中, 根据匹配的特征点对计算透视变换矩阵的方法 包括:
根据二幅图像的匹配上的特征点对, 计算二幅文本图像所在平面之间 的透视变化矩阵;
设定 src_points 为整幅文本图像中所在平面的匹配点坐标, 大小为 2xN, 其中, N表示点的数目; 设定 dst_points 为局部图像所在平面的匹配 点坐标, 大小为 2xN; 透视变化矩阵为 3 x 3的矩阵, 使得
Figure imgf000018_0002
其中( , ,1)为 dst_points—个点的坐标, ( , , 1)为 src_point—个点的 坐标;
输出的 3x3的透视变化矩阵 使得反投影错误总和最小, 即下式最小:
Figure imgf000018_0001
、 根据权利要求 2所述的提高文本图像清晰度的方法, 其特征在于:
所述步骤 S5中, 通过透视变换矩阵对局部图像进行变换的方法包括: 得到透视变化矩阵之后, 将局部图像的每个像素点按照透视变化矩阵 进行变换, 得到变换后的局部图像, 变化后的局部图像将和整幅文本图像 处于同一坐标系下。 、 根据权利要求 2所述的提高文本图像清晰度的方法, 其特征在于:
所述步骤 S6包括: 计算有效区域, 将变换后的局部图像按照有效区域 进行粘贴;
有效区域的计算方法为: 变化之前局部图像的四个顶点, 左上点, 右 上点, 左下点, 右下点; 这个四个点通过透视变化矩阵变换, 得到变换后 的位置坐标, 然后计算这四个变换后顶点的有效的内接矩形, 此内接矩形 代表要要粘贴的有效区域;
按照有效区域进行粘贴局部图像的方法为: 通过计算出来的粘贴区 域, 将要进行粘贴的区域中, 直接用局部图像像素替代原始文本图像的像 素。 、 一种提高文本图像清晰度的方法, 其特征在于, 所述方法包括如下步骤:
16
替换页 (细则第 26条) 步骤 110, 获取文本全图;
步骤 120, 将相机离的近些, 拍摄文本的局部区域, 得到待粘贴的清晰 局部图像;
步骤 130, 将局部图像与文本全图进行特征匹配;
步骤 140, 判断特征匹配是否成功; 判断标准: 匹配上的特征点对是否 达到设定值, 如低于设定值, 无法计算透视变化矩阵, 则判断为失败, 转 到步骤 170, 如特征匹配对的点数达到或超过设定值, 判断匹配成功, 转到 步骤 150;
步骤 150, 通过步骤 130得到的匹配上的特征点, 计算二幅图像之间的 透视变化矩阵, 并将局部图像依照透视变化矩阵进行变换;
步骤 160, 将变换后的局部图像替代原文本全图的相应区域;
步骤 170, 判断: 是否还有需要拍摄的其它局部区域; 如还有, 转到步 骤 120 , 拍摄文本的下一个区域, 如没有要拍摄的局部区域, 则转到步骤 180;
步骤 180, 结束。 、 根据权利要求 8所述的提高文本图像清晰度的方法, 其特征在于:
所述步骤 130 中, 局部图像跟初始文本图像进行特征匹配的方法包 括:
步骤 131 , 确定感兴趣的特征关键点; 步骤 132, 提取关键点周围区域 的特征向量描述子; 步骤 133 , 通过特征点的欧式距离来匹配各个特征向量 描述子;
步骤 133 中, 匹配策略釆用最近邻比例匹配: 对于二幅图像的特征点 匹配, 要查找与第一幅图像中某个特征点的对应匹配点, 则在第二幅图像 中找出与该特征点欧式距离最近的二个特征点, 如果最近点的距离 dnearst除 以第二近点的距离 ee 小于设定阔值, 则认为该最近点为匹配点, 否则不 接收。 、 根据权利要求 8所述的提高文本图像清晰度的方法, 其特征在于: 所述步骤 150中, 根据匹配的特征点对计算透视变换矩阵的方法 包括:
根据二幅图像的匹配上的特征点对, 计算二幅文本图像所在平面之间 的透视变化矩阵;
设定 src_points 为初始文本图像中所在平面的匹配点坐标, 大小为 2xN, 其中, N表示点的数目; 设定 dst_points 为局部图像所在平面的匹配 点坐标, 大小为 2xN;
透视变化矩阵为 3 x 3的矩阵, 使得
Figure imgf000020_0002
其中 ( , ,1)为 dst_points中一个点的坐标, , 1)为 src_point中一个 点的坐标;
输出的 3x3 的透视变化矩阵, 使得反投影错误总和最小, 即下式最 小:
Figure imgf000020_0001
、 根据权利要求 8所述的提高文本图像清晰度的方法, 其特征在于:
所述步骤 150 中, 通过透视变换矩阵对局部图像进行变换的方法包 括:
得到透视变化矩阵之后, 将局部图像的每个像素点按照透视变化矩阵 进行变换, 得到变换后的局部图像, 变化后的局部图像将和初始文本图像 处于同一坐标系下。 、 根据权利要求 8所述的提高文本图像清晰度的方法, 其特征在于:
所述步骤 160 包括: 计算有效区域, 将变换后的局部图像按照有效区 域进行粘贴;
有效区域的计算方法为: 变化之前局部图像的四个顶点, 左上点, 右
18
替换页 (细则第 26条) 上点, 左下点, 右下点; 这个四个点通过透视变化矩阵变换, 得到变换后 的位置坐标, 然后计算这四个变换后顶点的有效的内接矩形, 此内接矩形 代表要要粘贴的有效区域;
按照有效区域进行粘贴局部图像的方法为: 通过计算出来的粘贴区 域, 将要进行粘贴的区域中, 直接用局部图像像素替代原始文本图像的像 素。 、 一种提高文本图像清晰度的系统, 其特征在于, 所述系统包括:
摄像单元, 用以拍摄整幅文本图像, 同时用于拍摄该文本的各个局部 区域;
特征点匹配单元, 用以提取局部区域图像以及原整幅图像的特征点, 进行匹配, 得到局部图像与原文本图像的对应匹配特征点;
透视变换矩阵计算单元, 用以根据特征点对, 计算局部图像到原文本 图像的透视变换矩阵;
局部图像变换单元, 用以按照透视变化矩阵将清晰的局部图像进行变 换;
整合单元, 用以将变换后的局部图像替代整幅文本图像中对应的区 域。 、 根据权利要求 13所述的提高文本图像清晰度的系统, 其特征在于: 所述特征点匹配单元将局部图像跟整幅文本图像进行特征匹配的方法 包括:
步骤 131 , 确定感兴趣的特征关键点; 步骤 132, 提取关键点周围区域 的特征向量描述子; 步骤 133 , 通过特征点的欧式距离来匹配各个特征向量 描述子;
匹配策略釆用最近邻比例匹配: 对于二幅图像的特征点匹配, 要查找 与第一幅图像中某个特征点的对应匹配点, 则在第二幅图像中找出与该特 征点欧式距离最近的二个特征点, 如果最近点的距离 ^除以第二近点的 距离 e。《rf小于设定阔值, 则认为该最近点为匹配点, 否则不接收; 所述透视变换矩阵计算单元根据匹配的特征点对计算透视变换矩阵 的方法为: 根据二幅图像的匹配上的特征点对, 计算二幅文本图像所在平 面之间的透视变化矩阵;设定 src_points 为整幅文本图像中所在平面的匹配 点坐标, 大小为 2xN, 其中, N表示点的数目; 设定 dst_points 为局部图像 所在平面的匹配点坐标, 大小为 2xN; 透视变化矩阵为 3 x 3的矩阵, 使得
Figure imgf000022_0002
其中(W,,1)为 dst_points中一个点的坐标, 为 src_point中一个 点的坐标; 输出的 3x3 的透视变化矩阵, 使得反投影错误总和最小, 即下 式最小:
Figure imgf000022_0001
所述局部图像变换单元通过透视变换矩阵对局部图像进行变换的方法 为: 得到透视变化矩阵之后, 将局部图像的每个像素点按照透视变化矩阵 进行变换, 得到变换后的局部图像, 变化后的局部图像将和整幅文本图像 处于同一坐标系下;
所述整合单元包括: 有效区域计算单元, 用以将变换后的局部图像按 照有效区域进行粘贴的粘贴单元;
所述有效区域计算单元的计算方法为: 变化之前局部图像的四个顶 点, 左上点, 右上点, 左下点, 右下点; 这个四个点通过透视变化矩阵变 换, 得到变换后的位置坐标, 然后计算这四个变换后顶点的有效的内接矩 形, 此内接矩形代表要要粘贴的有效区域;
所述粘贴单元按照有效区域进行粘贴局部图像的方法为: 通过计算出 来的粘贴区域, 将要进行粘贴的区域中, 直接用局部图像像素替代原始文 本图像的像素。
20
替换页 (细则第 26条)
PCT/CN2011/077904 2010-11-25 2011-08-02 提高文本图像清晰度的方法及系统 WO2012068902A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010558948.0 2010-11-25
CN2010105589480A CN102013094B (zh) 2010-11-25 2010-11-25 提高文本图像清晰度的方法及系统

Publications (1)

Publication Number Publication Date
WO2012068902A1 true WO2012068902A1 (zh) 2012-05-31

Family

ID=43843259

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/077904 WO2012068902A1 (zh) 2010-11-25 2011-08-02 提高文本图像清晰度的方法及系统

Country Status (2)

Country Link
CN (1) CN102013094B (zh)
WO (1) WO2012068902A1 (zh)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102013094B (zh) * 2010-11-25 2013-01-02 上海合合信息科技发展有限公司 提高文本图像清晰度的方法及系统
CN102012629B (zh) * 2010-11-25 2012-07-04 上海合合信息科技发展有限公司 用于文本图像拼接的拍摄方法
WO2015123791A1 (en) 2014-02-18 2015-08-27 Empire Technology Development Llc Composite image generation to remove obscuring objects
CN105096354A (zh) * 2014-05-05 2015-11-25 腾讯科技(深圳)有限公司 一种图像处理的方法和装置
CN104735467B (zh) * 2015-03-31 2019-03-15 北京奇艺世纪科技有限公司 视频画中画广告生成方法及装置
CN106778730B (zh) * 2016-12-29 2020-07-07 深圳爱拼信息科技有限公司 一种用于快速生成ocr训练样本的自适应方法及系统
CN107682623B (zh) * 2017-09-11 2020-06-02 北京小米移动软件有限公司 拍照方法及装置
CN109559343B (zh) * 2017-09-27 2021-04-30 北京京东尚科信息技术有限公司 用于容器的图像处理方法和装置
CN108182661A (zh) * 2017-12-29 2018-06-19 百维雅(东莞)网络技术有限公司 一种全景图像展示方法
CN108647351B (zh) * 2018-05-16 2021-05-04 Oppo广东移动通信有限公司 文本图像的处理方法、装置、存储介质及终端
CN108776953A (zh) * 2018-06-22 2018-11-09 理光软件研究所(北京)有限公司 提高航空摄影具体位置分辨率的方法以及系统
WO2020037615A1 (zh) * 2018-08-23 2020-02-27 深圳市大疆创新科技有限公司 云台系统及其图像处理方法、无人机
JP7049983B2 (ja) * 2018-12-26 2022-04-07 株式会社日立製作所 物体認識装置および物体認識方法
CN110210400B (zh) * 2019-06-03 2020-11-17 上海眼控科技股份有限公司 一种表格文件检测方法及设备
CN111402367B (zh) * 2020-03-27 2023-09-26 维沃移动通信有限公司 一种图像处理方法和电子设备
WO2023097494A1 (zh) * 2021-11-30 2023-06-08 深圳市大疆创新科技有限公司 全景图像拍摄方法、装置、无人机、系统及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6147709A (en) * 1997-04-07 2000-11-14 Interactive Pictures Corporation Method and apparatus for inserting a high resolution image into a low resolution interactive image to produce a realistic immersive experience
CN1979335A (zh) * 2005-12-08 2007-06-13 索尼株式会社 照相机系统、照相机控制装置、全景图像形成方法
US20100208123A1 (en) * 2009-02-13 2010-08-19 Fujitsu Limited Photographing device, photographing method, and portable terminal apparatus
CN102013094A (zh) * 2010-11-25 2011-04-13 上海合合信息科技发展有限公司 提高文本图像清晰度的方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7106914B2 (en) * 2003-02-27 2006-09-12 Microsoft Corporation Bayesian image super resolution
US20060215935A1 (en) * 2004-04-02 2006-09-28 The Boeing Company System and architecture for automatic image registration
CN101674478B (zh) * 2009-10-19 2012-09-19 浙江大学 基于压缩域的视频超分辨率方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6147709A (en) * 1997-04-07 2000-11-14 Interactive Pictures Corporation Method and apparatus for inserting a high resolution image into a low resolution interactive image to produce a realistic immersive experience
CN1979335A (zh) * 2005-12-08 2007-06-13 索尼株式会社 照相机系统、照相机控制装置、全景图像形成方法
US20100208123A1 (en) * 2009-02-13 2010-08-19 Fujitsu Limited Photographing device, photographing method, and portable terminal apparatus
CN102013094A (zh) * 2010-11-25 2011-04-13 上海合合信息科技发展有限公司 提高文本图像清晰度的方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIN WU ET AL.: "Fast and effective method for video mosaic", COMPUTER ENGINEERING AND APPLICATIONS, vol. 45, no. 24, August 2009 (2009-08-01), pages 173 - 175 *

Also Published As

Publication number Publication date
CN102013094A (zh) 2011-04-13
CN102013094B (zh) 2013-01-02

Similar Documents

Publication Publication Date Title
WO2012068902A1 (zh) 提高文本图像清晰度的方法及系统
CN110827200B (zh) 一种图像超分重建方法、图像超分重建装置及移动终端
US9905031B2 (en) Method and related apparatus for capturing and processing image data
US8189960B2 (en) Image processing apparatus, image processing method, program and recording medium
JP5346082B2 (ja) 画像処理装置
CN113508416B (zh) 图像融合处理模块
WO2018176925A1 (zh) Hdr图像的生成方法及装置
WO2012058902A1 (zh) 全景图合成方法及装置
JP4010754B2 (ja) 画像処理装置と画像処理方法及びコンピュータ読み取り可能な記録媒体
RU2631765C1 (ru) Способ и система исправления перспективных искажений в изображениях, занимающих двухстраничный разворот
Joze et al. Imagepairs: Realistic super resolution dataset via beam splitter camera rig
WO2014183385A1 (zh) 一种终端及其实现图像处理的方法
CN102074001A (zh) 一种文本图像的拼接方法及系统
WO2012075817A1 (zh) 一种文本图像的切边方法
CN112261387B (zh) 用于多摄像头模组的图像融合方法及装置、存储介质、移动终端
Liang et al. Camera-based document image mosaicing
US11334961B2 (en) Multi-scale warping circuit for image fusion architecture
WO2022160857A1 (zh) 图像处理方法及装置、计算机可读存储介质和电子设备
US20230343119A1 (en) Captured document image enhancement
CN111083359B (zh) 图像处理方法及其装置、电子设备和计算机可读存储介质
JP4145014B2 (ja) 画像処理装置
JP2009146006A (ja) 画像処理装置および画像処理方法
TWI620147B (zh) 用於合成人物的影像合成方法
US11798146B2 (en) Image fusion architecture
KR102135961B1 (ko) 영상 처리 장치 및 영상 처리 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11843084

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11843084

Country of ref document: EP

Kind code of ref document: A1