The invention discloses a method for quickly generating a multi view stereo display screen image by using a template. The F.A and f1.a of each sub pixel are calculated respectively, and the index template of F.A is set up. At the same time, the weight ratio is calculated for each pair of left and right sub pixels. Each row of pixels is arranged in an oblique direction, which results in the dislocation of the map, and at the same time, the same color sub pixels of the two images are generated at the junction of each of the 2 gratings, namely, the proportion of mixed states from the two images. The value of P.r, P.g, P.b three sub pixels as the final color value, fill in the color buffer to display the region to get the final 3D. The invention does not need to be calculated between about two sub pixels index and their weight ratio distribution, the two parameters can be directly from the template image data corresponding to the X, the location of Y points in the conversion, to greatly simplify the computation of the objective.
【技术实现步骤摘要】
:本专利技术属于立体图像生成领域,特别涉及一种利用模板快速对多视角立体显示屏图像生成办法。
技术介绍
:目前一般多视角立体播放器和播放设备趋于使用低功耗硬件GPU平台,而这类低功耗GPU的计算性能不够高。在执行立体图像生成算法时候,要获得每个子像素的值,一般需要计算两个子像素所属图像的index,然后根据混合加权权重把两个子像素值进行混合得到最后的子像素值。每个子像素值来自两个相邻的加权子像素,每次需要计算两个相邻子像素的index的计算量很大,需要耗费很多GPU的计算资源。图1表示为Vn视角视差图的像素,横向每3个分量(R、G、B子像素)代表一个整像素,图2表示为Vn+1视角视差图,横向每3个分量(R、G、B子像素)代表一个整像素。根据斜光栅3D屏幕的光栅特性,每个光栅可能覆盖在两个子像素的中间,所以需要计算加权值,这样就需要知道由index为n或者n+1的图像组成最后需要得到的图像所对应的子像素,再进行加权计算。计算公式为:Div.r=fmod((sw*pitch+3.0*x-3.0*y*cot+offset),pitch)/pitchf.r=Div.r*countf1.r=(fa.r+1)%countP.r=Pfr*Wr+Pf1.r*(1-Wr)Div.g=fmod((sw*pitch+3.0*x-3.0*y*cot+1.0+offset),pitch)/pitchf.g=Div.g ...
【技术保护点】
一种利用模板快速对多视角立体显示屏图像生成办法,其步骤为:(1)分别计算每一个子像素的f.a和f1.a,建立存放f.a的index的模板;同时为每一对左右子像素计算权重比,建立存放Wn的模板,模板中的每一个元素都在0‑255范围内;(2)读取index模板,得到f.a的值,f1.a的值为:f1.a=(f.a+1)%count其中,count为原图个数,a=r/g/b;(3)读取Wn模板,得到权重Wn(f.a)的值,Wn(f1.a)的值为:Wn(f1.a)=1.0–Wn(f.a);其中,n=r/g/b,a=r/g/b;(4)每一行像素排列由于斜向光栅,导致排图有错位,在每2条光栅交界处就产生两幅图像的同一个颜色子像素共同填充,即来自两幅图像的按比例混合态;排图结果为:P(x,y).r=Wr×C(f.r).r+(1.0–Wr)×C(f1.r).r,其中,P.r代表排图中红色分量的像素结果,Wr为Wn模板中对应的红色分量权重值,C(f.r).r代表需要排图的原图像的红色分量像素值,C(f1.r).r代表需要排图的另一幅原图像的红色分量像素值;P(x,y).g=Wg×C(f.g).g+(1.0 ...
【技术特征摘要】
1.一种利用模板快速对多视角立体显示屏图像生成办法,其步骤为:
(1)分别计算每一个子像素的f.a和f1.a,建立存放f.a的index的模板;同
时为每一对左右子像素计算权重比,建立存放Wn的模板,模板中的每一个元
素都在0-255范围内;
(2)读取index模板,得到f.a的值,f1.a的值为:
f1.a=(f.a+1)%count
其中,count为原图个数,a=r/g/b;
(3)读取Wn模板,得到权重Wn(f.a)的值,Wn(f1.a)的值为:
Wn(f1.a)=1.0–Wn(f.a);
其中,n=r/g/b,a=r/g/b;
(4)每一行像素排列由于斜向光栅,导致排图有错位,在每2条光栅交
界处就产生两幅图像的同一个颜色子像素共同填充,即来自两幅图像的按比
例混合态;排图结果为:
P(x,y).r=Wr×C(f.r).r+(1.0–Wr)×C(f1.r).r,
其中,P.r代表排图中红色分量的像素结果,Wr为...
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。