传统的纹理合成方法使用高维向量树来加速目标纹理块的搜索效率,存在占用内存量大、执行效率低、无法在GPU上并行执行等缺点.为了实现图像块的快速近似邻域查找,提出一种并行优化纹理合成方法.该方法分为初始化和迭代优化2个阶段,初始化阶段从样本纹理中随机抽取样本纹理块填充目标图像,迭代阶段交替采用并行的随机查找算法和并行的纹理块传播算法迭代精化目标纹理.随机查找算法根据最相似纹理块出现在前一目标纹理块周围的概率与它到前一目标纹理块的距离成反比的特点,使随机采样纹理块的概率分布与最相似目标纹理块出现的概率相匹配,达到加速纹理合成的目标.采用CUDA实现了文中方法,实验结果表明,其执行效率比已有的纹理合成算法快50~100倍,可应用于交互式纹理合成和超大尺寸纹理合成.
Traditional texture synthesis techniques use high dimensional vector trees to accelerate image patch matching.They are very deficient,cost a large of memory,and cannot be executed in parallel on GPU.To improve the efficiency of the image patch matching,this paper proposes a random parallel optimized texture synthesis algorithm.This algorithm consists of two steps: initialization step and iterative optimization step.Initialization step samples image patches randomly from the input image and pastes them to the target image.Optimization step applies a parallel random search and a parallel texture patch propagation to iteratively refine synthesis results.According to the property that the distribution probability of appropriate nearest texture patches is inverse to the distance between the last matched patch and the sample patch,we accelerate the texture patch matching by sampling target image patches with the probability distribution.We have implemented our algorithm using CUDA,and it offers substantial performance improvements over the previous state of the art algorithms(50~100X),which enables its use in interactive texture synthesis and texture synthesis for super-size textures.