CN106097260B - Structure-preserving augmented reality identification hiding method based on hollow identification - Google Patents

Structure-preserving augmented reality identification hiding method based on hollow identification Download PDF

Info

Publication number
CN106097260B
CN106097260B CN201610382424.8A CN201610382424A CN106097260B CN 106097260 B CN106097260 B CN 106097260B CN 201610382424 A CN201610382424 A CN 201610382424A CN 106097260 B CN106097260 B CN 106097260B
Authority
CN
China
Prior art keywords
repaired
logo
image
area
repair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610382424.8A
Other languages
Chinese (zh)
Other versions
CN106097260A (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201610382424.8A priority Critical patent/CN106097260B/en
Publication of CN106097260A publication Critical patent/CN106097260A/en
Application granted granted Critical
Publication of CN106097260B publication Critical patent/CN106097260B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种基于镂空标识的保结构增强现实标识隐藏方法,包括:从摄像机设备中获取待隐藏标识视频帧;根据标识的二维位置,计算摄像机相对于该标识的三维位置和朝向;将镂空标识的镂空区域掩模投影到标识所在的平面上,从而确定视频画面中的待修复掩模;根据待修复掩模,自动检测与待修复区域相邻的背景结构信息,获得背景结构特征;根据背景结构特征对检测到的背景结构进行修复,得到结构修复图像和结构待修复掩模;根据结构修复图像和结构待修复掩模,利用已有的图像修复算法进行非结构标识的修复隐藏,获得最终的修复效果图像。本发明的镂空标识减少移除标识后需要修复的面积,并且在标识隐藏时能够保持较强的结构性,提高标识隐藏的效率和效果。

A method for hiding a structure-preserving augmented reality logo based on a hollow logo, comprising: obtaining a video frame of a logo to be hidden from a camera device; calculating the three-dimensional position and orientation of the camera relative to the logo according to the two-dimensional position of the logo; projecting a hollow area mask of the hollow logo onto the plane where the logo is located, thereby determining the mask to be repaired in the video picture; automatically detecting background structure information adjacent to the area to be repaired according to the mask to be repaired, and obtaining background structure features; repairing the detected background structure according to the background structure features to obtain a structure repair image and a structure mask to be repaired; repairing and hiding a non-structural logo according to the structure repair image and the structure mask to be repaired using an existing image repair algorithm, and obtaining a final repair effect image. The hollow logo of the present invention reduces the area that needs to be repaired after removing the logo, and can maintain a strong structurality when the logo is hidden, thereby improving the efficiency and effect of logo hiding.

Description

一种基于镂空标识的保结构增强现实标识隐藏方法A structure-preserving augmented reality logo hiding method based on hollow logo

技术领域technical field

本发明涉及一种基于增强现实标识的隐藏方法,特别是一种基于镂空标识的保结构增强现实标识隐藏方法。The invention relates to a hiding method based on an augmented reality sign, in particular to a structure-preserving augmented reality sign hiding method based on a hollowed-out sign.

背景技术Background technique

增强现实是一种由虚拟现实为基础发展起来的新技术,利用计算机系统提供的虚拟信息增强用户对现实世界的视觉感知,同时利用相关计算机技术借助定标的标识把虚拟模型实时渲染到真实场景的视频画面中。为了保证渲染的虚拟模型与真实场景之间的融合一致性,需要利用标识的位置和摄像机定标方法计算摄像机的内外参数。Augmented reality is a new technology developed on the basis of virtual reality. It uses the virtual information provided by the computer system to enhance the user's visual perception of the real world. At the same time, it uses related computer technology to render the virtual model to the real scene in real time with the aid of calibration marks. in the video screen. In order to ensure the fusion consistency between the rendered virtual model and the real scene, it is necessary to use the marked position and the camera calibration method to calculate the internal and external parameters of the camera.

考虑到制作成本、易用性和稳定性,标识成为了增强现实中最为重要和通用的相机定标辅助工具。用户根据相关的定标图案在纸质上制作标识,并将该标识放置到摄像机拍摄的视频画面中,即可检测到摄像机相对该标识的内外参数。基于镂空标识的相机定标方法不依赖于环境的特征信息,不受场景纹理的限制和部分遮挡的干扰,能够实时、稳定地定标摄像机,已获得了的广泛认同和使用。Considering the production cost, ease of use and stability, the logo has become the most important and general camera calibration aid in augmented reality. The user makes a mark on the paper according to the relevant calibration pattern, and places the mark in the video screen shot by the camera, so that the internal and external parameters of the camera relative to the mark can be detected. The camera calibration method based on the hollow mark does not depend on the feature information of the environment, is not limited by the scene texture and partially occluded, and can calibrate the camera in real time and stably, and has been widely recognized and used.

目前,增强现实中的镂空标识依然要求将打印的标识整个放置于真实环境中,标识的放置遮挡了部分真实场景,影响了增强现实画面的真实感和美观性,极大地限制了该技术在各领域的应用。为避免标识的出现对增强现实真实感的影响,现在一般有两种方法处理增强现实中的标识问题。一种是利用虚拟模型渲染到标识上,遮盖住标记区域,但这仅适用于虚拟模型在标识体积比较大的情形。另一种方法是在放置标识之前预先采集真实场景背景视频帧,用以修补放置标识后产生的标识遮挡区域。这种方法增加了用户的交互操作,降低了增强现实系统的实用性。At present, hollowed-out logos in augmented reality still require the entire printed logo to be placed in a real environment, and the placement of the logo blocks part of the real scene, affecting the realism and aesthetics of the augmented reality screen, which greatly limits the application of this technology in various fields. field applications. In order to avoid the impact of the appearance of logos on the realism of augmented reality, there are generally two methods to deal with the logo problem in augmented reality. One is to use the virtual model to render on the sign to cover the sign area, but this is only applicable to the situation where the virtual model is relatively large in sign volume. Another method is to pre-collect the real scene background video frame before placing the sign, so as to repair the sign occlusion area generated after the sign is placed. This approach increases user interaction and reduces the practicality of augmented reality systems.

目前,增强现实中标识的隐藏,主要是利用图像修复技术重建图像或视频中损失部分,利用视频中未被标识遮挡的图像内容,来修复被标识遮挡的区域,从而达到隐藏标识的目的。基于块的图像修复方法,根据待修复区域,沿着边界设定待修复区域子块,根据子块的置信度,在已知图像的信息中查找与该子待修复块最佳匹配的子块,进行覆盖修复。然而,传统的模板类和编码类标识在视频画面中的遮挡区域通常比较大,利用最近比较好的图像修复方法进行标识的隐藏时,一般无法保证具有结构背景信息的一致性,导致标识隐藏结果出现修复痕迹和缝隙等失真现象。At present, the hiding of logos in augmented reality mainly uses image inpainting technology to reconstruct the lost parts of images or videos, and uses the image content in the video that is not blocked by logos to repair the areas covered by logos, so as to achieve the purpose of hiding logos. The block-based image repair method, according to the area to be repaired, set the sub-block of the area to be repaired along the boundary, and according to the confidence of the sub-block, find the sub-block that best matches the sub-block to be repaired in the information of the known image , to perform coverage repair. However, the occlusion area of the traditional template class and coding class logo in the video screen is usually relatively large. When using the recent better image restoration method to hide the logo, it is generally impossible to guarantee the consistency of the structural background information, resulting in the hidden result of the logo. Distortions such as repair marks and gaps appear.

发明内容Contents of the invention

为避免现有的增强现实标识隐藏方法需要大面积图像修复,且无法保证背景结构的一致性问题,本发明设计了一种基于镂空标识的保结构增强现实标识隐藏方法。该方法充分利用镂空标识遮挡面积小的优势,从标识内部的非遮挡区域中提取背景结构信息,采用先修复结构再修复其他区域的方法隐藏标识。具体步骤如下:In order to avoid the problem that the existing augmented reality logo hiding method requires large-area image restoration and cannot guarantee the consistency of the background structure, the present invention designs a structure-preserving augmented reality logo hiding method based on hollowed-out logos. This method makes full use of the advantage of the small occlusion area of the hollowed-out logo, extracts the background structure information from the non-occlusion area inside the logo, and uses the method of first repairing the structure and then repairing other areas to hide the logo. Specific steps are as follows:

1)、从摄像机设备中获取待隐藏标识视频帧I;1), obtain the video frame I to be hidden from the camera equipment;

2)、根据标识的二维位置,计算摄像机相对于该标识的三维位置和朝向,即相机参数;2) According to the two-dimensional position of the mark, calculate the three-dimensional position and orientation of the camera relative to the mark, that is, the camera parameters;

3)、将镂空标识的镂空区域掩模投影到标识所在的平面上,从而确定视频画面中的待修复掩模Ma;3), projecting the hollow area mask of the hollow mark onto the plane where the mark is located, thereby determining the mask Ma to be repaired in the video picture;

4)、根据待修复掩模Ma,自动检测与待修复区域相邻的背景结构信息,获得背景结构特征S;4), according to the mask Ma to be repaired, automatically detect the background structure information adjacent to the area to be repaired, and obtain the background structure feature S;

5)、根据背景结构特征S对检测到的背景结构进行修复,得到结构修复图像Is和结构待修复掩模Ms;5), according to the background structure feature S, the detected background structure is repaired, and the structure repair image Is and the structure mask Ms to be repaired are obtained;

6)、根据结构修复图像Is和结构待修复掩模Ms,利用已有的图像修复算法进行非结构标识的修复隐藏,获得最终的修复效果图像Ie。6) According to the structure repaired image Is and the structure to be repaired mask Ms, use the existing image repair algorithm to repair and hide the non-structural mark, and obtain the final repair effect image Ie.

该基于镂空标识的保结构标识隐藏与现有的传统增强现实标识的隐藏比较,其改进在于镂空的标识减少对真实背景环境的遮挡,能够根据镂空信息和标识周围的信息提取被标识遮挡的背景结构信息,在标识隐藏时能够保持背景结构的一致性,从而改善标识隐藏的效果。进一步,所述的步骤(4)中自动检测与待修复区域相邻的背景结构信息主要包括以下步骤:The structure-preserving logo hiding based on the hollowed-out logo is compared with the existing traditional augmented reality logo. The improvement is that the hollowed-out logo reduces the occlusion of the real background environment, and the background blocked by the logo can be extracted according to the hollowed-out information and the information around the logo. Structural information can maintain the consistency of the background structure when the logo is hidden, thereby improving the effect of logo hiding. Further, the automatic detection of the background structure information adjacent to the region to be repaired in the step (4) mainly includes the following steps:

(4.1)对待修复掩模Ma,利用沿着边界进行小范围像素的扩大,a取3个像素,去除标识成像过程中产生的阴影干扰,得到扩大修复掩模Md;(4.1) To treat the repair mask Ma, use Expand a small range of pixels along the boundary, take 3 pixels in a, remove the shadow interference generated during the imaging process of the logo, and obtain the enlarged repair mask Md;

(4.2)对视频帧图像I,进行双边滤波处理,得到去噪后图像In,其中,颜色参数和空间参数均取10;(4.2) Carry out bilateral filter processing to video frame image I, obtain image In after denoising, wherein, color parameter and space parameter all take 10;

(4.3)对去噪图像应用Sobel算子计算梯度,得到梯度图像Ig;(4.3) apply the Sobel operator to the denoising image to calculate the gradient, and obtain the gradient image Ig;

(4.4)根据梯度图像Ig,利用4邻域判断得到待修复区域的边界,再根据公式选出梯度大小局部极大的边界像素作为潜在结构特征点{Fi};(4.4) According to the gradient image Ig, use 4 neighbors to judge the boundary of the area to be repaired, and then according to the formula Select the boundary pixels whose gradient size is locally maximal as potential structural feature points {F i };

(4.5)根据颜色张量场方法,利用Sobel梯度构建一个光滑的切向方向场,得到切向场图像If;(4.5) According to the color tensor field method, a smooth tangential direction field is constructed using the Sobel gradient to obtain the tangential field image If;

(4.6)从潜在结构特征点出发,利用龙格库塔积分法沿着方向场跟踪出一条长度为30的流线,计算这条流线所处位置的梯度大小之和当Gi≥25时,Fi才是真正揭示背景结构的特征点;(4.6) Starting from the potential structural feature points, use the Runge-Kutta integral method to track a streamline with a length of 30 along the direction field, and calculate the sum of the gradients at the position of the streamline When G i ≥ 25, F i is the feature point that really reveals the background structure;

(4.7)利用结构特征点匹配法和Hermite曲线的结构重构法计算背景结构曲线,得到背景结构特征S,实线表示背景结构曲线,虚线表示通过曲线拟合得到的相应的待修复路径。(4.7) Calculate the background structure curve using the structure feature point matching method and the Hermite curve structure reconstruction method to obtain the background structure feature S. The solid line represents the background structure curve, and the dotted line represents the corresponding path to be repaired through curve fitting.

进一步,所述的步骤(5)中的待修复路径中的结构曲线的修复主要包括以下步骤:Further, the repair of the structural curve in the path to be repaired in the described step (5) mainly includes the following steps:

(5.1)以a为边长,沿着背景结构曲线采集没有被标识遮挡的纹理小方块,建立纹理块数据源{Sj};(5.1) Take a as the side length, collect texture small squares that are not blocked by the logo along the background structure curve, and establish the texture block data source {S j };

(5.2)从待修复路径两端出发,将{Sj}中最匹配的纹理块与当前修复子区域T内的已知像素计算argminj SSD(T,Sj)获得最佳匹配块,再覆盖到待修复区域相应的位置上;(5.2) Starting from both ends of the path to be repaired, calculate argmin j SSD(T,S j ) from the most matching texture block in {S j } and the known pixels in the current repair sub-region T to obtain the best matching block, and then Overlay to the corresponding position of the area to be repaired;

(5.3)将上述待修复区域块标记为已修复区域,返回到步骤(5.1),对尚未修复的结构线进行修复,直至所有结构线区域得到修复。(5.3) Mark the above-mentioned area block to be repaired as the repaired area, return to step (5.1), and repair the structural lines that have not been repaired until all the structural line areas are repaired.

进一步,所述的步骤(6)中对非结构区域的修复主要包括以下步骤:Further, the repairing of the non-structural area in the step (6) mainly includes the following steps:

(6.1)根据结构修复之后的图像,沿着待修复区域的边界标定一系列的9*9矩形像素块,同时标定块的序号;(6.1) Mark a series of 9*9 rectangular pixel blocks along the boundary of the area to be repaired according to the image after structural repair, and mark the serial number of the block at the same time;

(6.2)根据块的序号顺序,与已知图像中的块进行匹配,匹配程度最高的填充到该区域,标记为已修复区域,重复此步骤,直至所有被标记的序号块被修复;(6.2) According to the serial number sequence of the block, match with the blocks in the known image, fill the area with the highest matching degree, mark it as the repaired area, repeat this step until all marked serial number blocks are repaired;

(6.3)更新待修复区域的边界,返回到步骤(6.1),对重新标记的边界序号进行修复,直到所有区域的得到修复。(6.3) Update the boundary of the area to be repaired, return to step (6.1), and repair the remarked boundary serial number until all areas are repaired.

本发明的技术构思是:基于传统标识的增强现实在标识隐藏时,无法保证背景结构的一致性,使得标识隐藏后产生一些结构信息的失真等现象。相对于传统标识,镂空标识的优势在于标识内部若干个背景可见的镂空区域往往能够提供一定的背景结构特征信息。镂空标识的镂空区域对背景结构的检测具有较好的可见性,在标识隐藏时可以保结构的标识隐藏,获得比较好的视觉效果。The technical idea of the present invention is: the augmented reality based on the traditional logo cannot guarantee the consistency of the background structure when the logo is hidden, so that some structural information will be distorted after the logo is hidden. Compared with the traditional logo, the advantage of the hollow logo is that several hollow areas with visible background inside the logo can often provide certain background structural feature information. The hollowed-out area of the hollowed-out logo has better visibility to the detection of the background structure. When the logo is hidden, the logo of the structure can be kept hidden, and a better visual effect can be obtained.

本发明的优点在于:镂空的标识减少了对背景环境的遮挡,能减少图像修复的面积,降低标识隐藏的误差;标识镂空区域的可见性能够为背景结构的检测提供更多的特征信息;基于镂空标识的增强现实进行标识隐藏时,能够较好的保持背景的结构信息;基于镂空标识的增强现实相对于传统标识的隐藏,速度更快,效果更好。The invention has the advantages that: the hollowed-out logo reduces the occlusion of the background environment, reduces the area of image restoration, and reduces the error of logo hiding; the visibility of the hollowed-out area of the logo can provide more feature information for the detection of the background structure; based on When the augmented reality of the hollowed-out logo hides the logo, it can better maintain the structural information of the background; the augmented reality based on the hollowed-out logo is faster and more effective than traditional logo hiding.

附图说明Description of drawings

图1为本发明的流程图Fig. 1 is a flowchart of the present invention

图2为背景结构检测流程图Figure 2 is a flow chart of background structure detection

具体实施方式Detailed ways

参照附图,进一步说明本发明:With reference to accompanying drawing, further illustrate the present invention:

一种基于镂空标识的保结构增强现实标识隐藏方法,包括以下步骤:A method for hiding a structure-preserving augmented reality logo based on a hollowed-out logo, comprising the following steps:

1)、从摄像机设备中获取待隐藏标识视频帧I;1), obtain the video frame I to be hidden from the camera equipment;

2)、根据标识的二维位置,计算摄像机相对于该标识的三维位置和朝向,即相机参数;2) According to the two-dimensional position of the mark, calculate the three-dimensional position and orientation of the camera relative to the mark, that is, the camera parameters;

3)、将镂空标识的镂空区域掩模投影到标识所在的平面上,从而确定视频画面中的待修复掩模Ma;3), projecting the hollow area mask of the hollow mark onto the plane where the mark is located, thereby determining the mask Ma to be repaired in the video picture;

4)、根据待修复掩模Ma,自动检测与待修复区域相邻的背景结构信息,获得背景结构特征S;4), according to the mask Ma to be repaired, automatically detect the background structure information adjacent to the area to be repaired, and obtain the background structure feature S;

5)、根据背景结构特征S对检测到的背景结构进行修复,得到结构修复图像Is和结构待修复掩模Ms;5), according to the background structure feature S, the detected background structure is repaired, and the structure repair image Is and the structure mask Ms to be repaired are obtained;

6)、根据结构修复图像Is和结构待修复掩模Ms,利用已有的图像修复算法进行非结构标识的修复隐藏,获得最终的修复效果图像Ie。6) According to the structure repaired image Is and the structure to be repaired mask Ms, use the existing image repair algorithm to repair and hide the non-structural mark, and obtain the final repair effect image Ie.

该基于镂空标识的保结构标识隐藏与现有的传统增强现实标识的隐藏比较,其改进在于镂空的标识减少对真实背景环境的遮挡,能够根据镂空信息和标识周围的信息提取被标识遮挡的背景结构信息,在标识隐藏时能够保持背景结构的一致性,从而改善标识隐藏的效果。进一步,所述的步骤(4)中自动检测与待修复区域相邻的背景结构信息主要包括以下步骤:The structure-preserving logo hiding based on the hollowed-out logo is compared with the existing traditional augmented reality logo. The improvement is that the hollowed-out logo reduces the occlusion of the real background environment, and the background blocked by the logo can be extracted according to the hollowed-out information and the information around the logo. Structural information can maintain the consistency of the background structure when the logo is hidden, thereby improving the effect of logo hiding. Further, the automatic detection of the background structure information adjacent to the region to be repaired in the step (4) mainly includes the following steps:

(4.1)对待修复掩模Ma,利用沿着边界进行小范围像素的扩大,a取3个像素,去除标识成像过程中产生的阴影干扰,得到扩大修复掩模Md;(4.1) To treat the repair mask Ma, use Expand a small range of pixels along the boundary, take 3 pixels in a, remove the shadow interference generated during the imaging process of the logo, and obtain the enlarged repair mask Md;

(4.2)对视频帧图像I,进行双边滤波处理,得到去噪后图像In,其中,颜色参数和空间参数均取10;(4.2) Carry out bilateral filter processing to video frame image I, obtain image In after denoising, wherein, color parameter and space parameter all take 10;

(4.3)对去噪图像应用Sobel算子计算梯度,得到梯度图像Ig;(4.3) apply the Sobel operator to the denoising image to calculate the gradient, and obtain the gradient image Ig;

(4.4)根据梯度图像Ig,利用4邻域判断得到待修复区域的边界,再根据公式选出梯度大小局部极大的边界像素作为潜在结构特征点{Fi};(4.4) According to the gradient image Ig, use 4 neighbors to judge the boundary of the area to be repaired, and then according to the formula Select the boundary pixels whose gradient size is locally maximal as potential structural feature points {F i };

(4.5)根据颜色张量场方法,利用Sobel梯度构建一个光滑的切向方向场,得到切向场图像If;(4.5) According to the color tensor field method, a smooth tangential direction field is constructed using the Sobel gradient to obtain the tangential field image If;

(4.6)从潜在结构特征点出发,利用龙格库塔积分法沿着方向场跟踪出一条长度为30的流线,计算这条流线所处位置的梯度大小之和当Gi≥25时,Fi才是真正揭示背景结构的特征点;(4.6) Starting from the potential structural feature points, use the Runge-Kutta integral method to track a streamline with a length of 30 along the direction field, and calculate the sum of the gradients at the position of the streamline When G i ≥ 25, F i is the feature point that really reveals the background structure;

(4.7)利用结构特征点匹配法和Hermite曲线的结构重构法计算背景结构曲线,得到背景结构特征S,实线表示背景结构曲线,虚线表示通过曲线拟合得到的相应的待修复路径。(4.7) Calculate the background structure curve using the structure feature point matching method and the Hermite curve structure reconstruction method to obtain the background structure feature S. The solid line represents the background structure curve, and the dotted line represents the corresponding path to be repaired through curve fitting.

进一步,所述的步骤(5)中的待修复路径中的结构曲线的修复主要包括以下步骤:Further, the repair of the structural curve in the path to be repaired in the described step (5) mainly includes the following steps:

(5.1)以a为边长,沿着背景结构曲线采集没有被标识遮挡的纹理小方块,建立纹理块数据源{Sj};(5.1) Take a as the side length, collect texture small squares that are not blocked by the logo along the background structure curve, and establish the texture block data source {S j };

(5.2)从待修复路径两端出发,将{Sj}中最匹配的纹理块与当前修复子区域T内的已知像素计算arg minj SSD(T,Sj)获得最佳匹配块,再覆盖到待修复区域相应的位置上;(5.2) Starting from both ends of the path to be repaired, calculate arg min j SSD(T,S j ) from the most matching texture block in {S j } and the known pixels in the current repair sub-region T to obtain the best matching block, Then cover the corresponding position of the area to be repaired;

(5.3)将上述待修复区域块标记为已修复区域,返回到步骤(5.1),对尚未修复的结构线进行修复,直至所有结构线区域得到修复。(5.3) Mark the above-mentioned area block to be repaired as the repaired area, return to step (5.1), and repair the structural lines that have not been repaired until all the structural line areas are repaired.

进一步,所述的步骤(6)中对非结构区域的修复主要包括以下步骤:Further, the repairing of the non-structural area in the step (6) mainly includes the following steps:

(6.1)根据结构修复之后的图像,沿着待修复区域的边界标定一系列的9*9矩形像素块,同时标定块的序号;(6.1) Mark a series of 9*9 rectangular pixel blocks along the boundary of the area to be repaired according to the image after structural repair, and mark the serial number of the block at the same time;

(6.2)根据块的序号顺序,与已知图像中的块进行匹配,匹配程度最高的填充到该区域,标记为已修复区域,重复此步骤,直至所有被标记的序号块被修复;(6.2) According to the serial number sequence of the block, match with the blocks in the known image, fill the area with the highest matching degree, mark it as the repaired area, repeat this step until all marked serial number blocks are repaired;

(6.3)更新待修复区域的边界,返回到步骤(6.1),对重新标记的边界序号进行修复,直到所有区域的得到修复。(6.3) Update the boundary of the area to be repaired, return to step (6.1), and repair the remarked boundary serial number until all areas are repaired.

目前,在增强现实领域,基于传统标识的相机定标方法已经日渐成熟,其定标的稳定性和计算效率都得到了学术界和工业界的广泛认可。本发明针对这类方法中标识的放置对增强画面的真实感和美观性的不足,提出了一种基于镂空标识的保结构增强现实标识隐藏方法,为视频中实时的隐藏标识,获得较好的视觉效果提供了技术基础。At present, in the field of augmented reality, camera calibration methods based on traditional logos have become increasingly mature, and their calibration stability and computational efficiency have been widely recognized by academia and industry. Aiming at the lack of realism and aesthetics of enhanced pictures by the placement of logos in such methods, the present invention proposes a structure-preserving augmented reality logo hiding method based on hollowed-out logos, which can hide logos in real time in videos and obtain better images. Visual effects provide the technical foundation.

本说明书实施例所述的内容仅仅是对发明构思的实现形式的列举,本发明的保护范围不应当被视为仅限于实施例所陈述的具体形式,本发明的保护范围也及于本领域技术人员根据本发明构思所能够想到的等同技术手段。The content described in the embodiments of this specification is only an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms stated in the embodiments. Equivalent technical means that a person can think of based on the concept of the present invention.

Claims (1)

1.一种基于镂空标识的保结构增强现实标识隐藏方法,包括以下步骤:1. A method for hiding structure-preserving augmented reality logos based on hollowed-out logos, comprising the following steps: 1)、从摄像机设备中获取待隐藏标识视频帧I;1), obtain the video frame I to be hidden from the camera equipment; 2)、根据标识的二维位置,计算摄像机相对于该标识的三维位置和朝向,即相机参数;2) According to the two-dimensional position of the mark, calculate the three-dimensional position and orientation of the camera relative to the mark, that is, the camera parameters; 3)、将镂空标识的镂空区域掩模投影到标识所在的平面上,从而确定视频画面中的待修复掩模Ma;3), projecting the hollow area mask of the hollow mark onto the plane where the mark is located, thereby determining the mask Ma to be repaired in the video picture; 4)、根据待修复掩模Ma,自动检测与待修复区域相邻的背景结构信息,获得背景结构特征S;4), according to the mask Ma to be repaired, automatically detect the background structure information adjacent to the area to be repaired, and obtain the background structure feature S; (4.1)对待修复掩模Ma,利用沿着边界进行小范围像素的扩大,a取3个像素,去除标识成像过程中产生的阴影干扰,得到扩大修复掩模Md;(4.1) To treat the repair mask Ma, use Expand a small range of pixels along the boundary, take 3 pixels in a, remove the shadow interference generated during the imaging process of the logo, and obtain the enlarged repair mask Md; (4.2)对视频帧图像I,进行双边滤波处理,得到去噪后图像In,其中,颜色参数和空间参数均取10;(4.2) Carry out bilateral filter processing to video frame image I, obtain image In after denoising, wherein, color parameter and space parameter all take 10; (4.3)对去噪图像应用Sobel算子计算梯度,得到梯度图像Ig;(4.3) apply the Sobel operator to the denoising image to calculate the gradient, and obtain the gradient image Ig; (4.4)根据梯度图像Ig,利用4邻域判断得到待修复区域的边界,再根据公式选出梯度大小局部极大的边界像素作为潜在结构特征点{Fi};(4.4) According to the gradient image Ig, use 4 neighbors to judge the boundary of the area to be repaired, and then according to the formula Select the boundary pixels whose gradient size is locally maximal as potential structural feature points {F i }; (4.5)根据颜色张量场方法,利用Sobel梯度构建一个光滑的切向方向场,得到切向场图像If;(4.5) According to the color tensor field method, a smooth tangential direction field is constructed using the Sobel gradient to obtain the tangential field image If; (4.6)从潜在结构特征点出发,利用龙格库塔积分法沿着方向场跟踪出一条长度为30的流线,计算这条流线所处位置的梯度大小之和当Gi≥25时,Fi才是真正揭示背景结构的特征点;(4.6) Starting from the potential structural feature points, use the Runge-Kutta integral method to track a streamline with a length of 30 along the direction field, and calculate the sum of the gradients at the position of the streamline When G i ≥ 25, F i is the feature point that really reveals the background structure; (4.7)利用结构特征点匹配法和Hermite曲线的结构重构法计算背景结构曲线,得到背景结构特征S,实线表示背景结构曲线,虚线表示通过曲线拟合得到的相应的待修复路径;(4.7) Utilize the structure feature point matching method and the structure reconstruction method of the Hermite curve to calculate the background structure curve to obtain the background structure feature S, the solid line represents the background structure curve, and the dotted line represents the corresponding path to be repaired obtained by curve fitting; 5)、根据背景结构特征S对检测到的背景结构进行修复,得到结构修复图像Is和结构待修复掩模Ms;5), according to the background structure feature S, the detected background structure is repaired, and the structure repair image Is and the structure mask Ms to be repaired are obtained; (5.1)以a为边长,沿着背景结构曲线采集没有被标识遮挡的纹理小方块,建立纹理块数据源{Sj};(5.1) Take a as the side length, collect texture small squares that are not blocked by the logo along the background structure curve, and establish the texture block data source {S j }; (5.2)从待修复路径两端出发,将{Sj}中最匹配的纹理块与当前待修复区域T内的已知像素计算argminjSSD(T,Sj)获得最佳匹配块,再覆盖到待修复区域相应的位置上;(5.2) Starting from both ends of the path to be repaired, calculate argmin j SSD(T,S j ) from the most matching texture block in {S j } and the known pixels in the current area T to be repaired to obtain the best matching block, and then Overlay to the corresponding position of the area to be repaired; (5.3)将上述待修复区域标记为已修复区域,返回到步骤(5.1),对尚未修复的待修复区域进行修复,直至所有待修复区域得到修复;(5.3) Mark the above-mentioned area to be repaired as the repaired area, return to step (5.1), and repair the unrepaired area to be repaired until all the areas to be repaired are repaired; 6)、根据结构修复图像Is和结构待修复掩模Ms,利用已有的图像修复算法进行非结构标识的修复隐藏,获得最终的修复效果图像Ie;6), according to the structure repair image Is and the structure to be repaired mask Ms, use the existing image repair algorithm to repair and hide the non-structural mark, and obtain the final repair effect image Ie; (6.1)根据结构修复之后的图像,沿着待修复区域的边界标定一系列的9*9矩形像素块,同时标定块的序号;(6.1) Mark a series of 9*9 rectangular pixel blocks along the boundary of the area to be repaired according to the image after structural repair, and mark the serial number of the block at the same time; (6.2)根据块的序号顺序,与已知图像中的块进行匹配,匹配程度最高的填充到该像素块,标记为已修复区域,重复此步骤,直至所有被标记的边界序号块被修复;(6.2) According to the serial number sequence of the block, match with the blocks in the known image, fill the pixel block with the highest matching degree, mark it as the repaired area, repeat this step until all marked boundary serial number blocks are repaired; (6.3)更新待修复区域的边界,返回到步骤(6.1),对重新标记的边界序号块进行修复,直到所有待修复区域的边界得到修复。(6.3) Update the boundary of the area to be repaired, return to step (6.1), and repair the remarked boundary sequence number block until all the boundaries of the area to be repaired are repaired.
CN201610382424.8A 2016-06-01 2016-06-01 Structure-preserving augmented reality identification hiding method based on hollow identification Active CN106097260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610382424.8A CN106097260B (en) 2016-06-01 2016-06-01 Structure-preserving augmented reality identification hiding method based on hollow identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610382424.8A CN106097260B (en) 2016-06-01 2016-06-01 Structure-preserving augmented reality identification hiding method based on hollow identification

Publications (2)

Publication Number Publication Date
CN106097260A CN106097260A (en) 2016-11-09
CN106097260B true CN106097260B (en) 2018-10-23

Family

ID=57447862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610382424.8A Active CN106097260B (en) 2016-06-01 2016-06-01 Structure-preserving augmented reality identification hiding method based on hollow identification

Country Status (1)

Country Link
CN (1) CN106097260B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491843B (en) * 2018-04-12 2022-11-18 腾讯科技(深圳)有限公司 Image processing method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122384A (en) * 2011-01-25 2011-07-13 机密科技公司 Method of making hidden patterns in plate making of printed matter
CN103295047A (en) * 2013-06-25 2013-09-11 谢婧 Image identifier capable of obtaining hidden information and manufacturing and reading method thereof
CN103473746A (en) * 2013-09-16 2013-12-25 浙江工业大学 Real-time removing method for augmented reality calibration plate
CN105321190A (en) * 2015-10-28 2016-02-10 上海大学 Moving object detection method based on structurally similar background modeling

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100542370B1 (en) * 2004-07-30 2006-01-11 한양대학교 산학협력단 Vision-based Augmented Reality System Using Invisible Markers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122384A (en) * 2011-01-25 2011-07-13 机密科技公司 Method of making hidden patterns in plate making of printed matter
CN103295047A (en) * 2013-06-25 2013-09-11 谢婧 Image identifier capable of obtaining hidden information and manufacturing and reading method thereof
CN103473746A (en) * 2013-09-16 2013-12-25 浙江工业大学 Real-time removing method for augmented reality calibration plate
CN105321190A (en) * 2015-10-28 2016-02-10 上海大学 Moving object detection method based on structurally similar background modeling

Also Published As

Publication number Publication date
CN106097260A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN109685913B (en) Augmented Reality Realization Method Based on Computer Vision Positioning
CN107507216B (en) Method and device for replacing local area in image and storage medium
CN107507217B (en) Method and device for making certificate photo and storage medium
CN110599388B (en) A Blind Robust Digital Watermark Embedding and Detection Method Based on Anchor Point Aid
CN104680496A (en) Kinect deep image remediation method based on colorful image segmentation
CN102800126A (en) Method for recovering real-time three-dimensional body posture based on multimodal fusion
CN104170371B (en) Realize the method and camera installation of self-service group photo
Kawai et al. Diminished reality for AR marker hiding based on image inpainting with reflection of luminance changes
CN102567987A (en) Method for detecting manual fuzzy operation trace in image synthesis tampering
CN107194866A (en) Reduce the image interfusion method of stitching image dislocation
CN112734914A (en) Image stereo reconstruction method and device for augmented reality vision
CN111815518A (en) Projection image splicing method and device, computer equipment, storage medium and system
CN111222432A (en) Face living body detection method, system, equipment and readable storage medium
JP2018147313A (en) Object posture estimation method, program and apparatus
CN106846271B (en) Method for removing reticulate pattern in identity card photo
CN103093426A (en) Method recovering texture and illumination of calibration plate sheltered area
JP2015171143A (en) Method and apparatus for camera calibration with color coded structure and computer readable storage medium
CN106097260B (en) Structure-preserving augmented reality identification hiding method based on hollow identification
CN103473746B (en) The real-time removing method of calibration plate in augmented reality
CN105740818B (en) A kind of artificial target's detection method applied to augmented reality
CN105657268A (en) Multi-viewpoint video splicing and fusion algorithm based on multiple resolutions
Tralic et al. JPEG image tampering detection using blocking artifacts
CN106056604B (en) Automatic hollowing method for augmented reality identification
WO2015140484A1 (en) A method, apparatus, system, and computer readable medium for enhancing differences between two images of a structure
JP2015212891A (en) Image processor and method for controlling image processor

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