如何使用 Matlab 创建偏振 3D 图像?
我想使用 Matlab 或 C# 创建偏振 3D 图像?。
有什么方法可以使用 Matlab 或 C# 从任何 2D 图像创建 3D 图像吗?
I want to create polarized 3D image using Matlab or C#?.
Is any way to create 3D image from any 2D image using Matlab or C#?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
偏振 3D 是在物理世界中通过物理投影仪照射到物理屏幕的同一点上创建的效果。它不是可以在计算机屏幕上的图像中创建的数字效果。您无法编写代码将图像渲染到普通计算机屏幕上,然后使用偏光眼镜观看 3D。
Polarized 3D is an effect created in the physical world with physical projectors shining onto the same spot of a physical screen. It's not a digital effect that you can create in an image on a computer screen. You cannot write code to render an image onto a normal computer screen then see 3D with the polarized glasses.
与偏光眼镜一起使用的立体图像是通过投影左眼和右眼图像来创建的,以便它们通过装有偏光滤光片的单独投影仪重叠。
红色和绿色有色眼镜也是如此(与旧款式浮雕图像)。
如果您只有一张 2D 图像,则在不参与手动图像处理的情况下无法从中创建 3D 图像。
Stereoscopic images for use with polarised glasses are created by projecting the left and right eye images so that they overlap through separate projectors which have a polarising filter fitted.
The same is true for the red and green tinted glasses (which are not the same as the old style anaglyph images).
If you only have one 2D image you cannot create a 3D image from it without getting involved in manual image processing.
构建您自己的偏振立体投影系统
偏振光学原理
偏振光
自 19 世纪末以来,我们知道,光可以用以下术语来描述:
的电磁波。其背后的理论是众所周知的
麦克斯韦方程组。因为这不仅仅是一篇关于电动力学的文章
要点:
是
电场矢量(也可以 使用磁场,但约定
是使用电场)确定极化。有两种
极化:
如果沿着传播方向观察,场矢量可能会循环经过:
圆偏振效应是通过延迟一个分量而产生的
四分之一波长的线偏振光。
另请参阅这篇维基百科文章
http://en.wikipedia.org/wiki/Polarization_(waves)
创建偏振光
维基百科有一篇关于细节的优秀文章
http://en.wikipedia.org/wiki/Polarizer
这是要点。
Linear Polarization
线偏振光可以通过多种方式获得:
来自具有宽偏振分布的光。
所有以统计方式发射的光(热辐射,
高压气体放电(照明电弧)具有这种特性。
可以使用滤光器过滤所需的偏振面。
以下过滤器是已知的:
一束光分成两个偏振分量,偏振
相互垂直。
对于不同的偏振有不同的折射率
飞机。光路再次分开。
它是各向异性结构。一些各向异性聚合物会吸收
只有平行偏振(或垂直偏振)的入射光
取决于材料)到拉伸方向。
根据激光器的构建方式,偏振平面将
随着时间的推移逐渐改变。
在光学
Circular Polarization
中,圆偏振是由通过线性偏振
光穿过一些各向异性材料,这会延迟其中之一
分量(电或磁)的四分之一波长。这
称为λ/4延迟器。
线性偏振与各向异性材料主偏振之间的角度
轴确定左转和右转偏振光之间的比率,结果:
应该指出的是,由于光路的可逆性
圆偏振光通过 λ/4 延迟片将
将其转变成相应一定偏振的线偏振光
飞机。该线偏振光可以再次被线性过滤
偏光镜。这就是圆偏振 3D 眼镜的工作原理。
的
偏振光和与屏幕
Scattering and Diffraction
交互典型的投影屏幕使用非常小的颗粒,通常是二氧化钛,
将光散射和衍射到各个方向。在散射过程中
光在粒子之间反射多次。当每次弹跳离开时
在大统计方案中偏振的光波孤子任何值得注意的
偏振消失。
因此普通的白色投影屏幕不适合偏振立体投影。
Metallic Reflection
构建偏振立体投影系统的关键是使用
保留入射光偏振的屏幕材料。
这是通过在比
光的波长。
DIY 立体投影系统
制作 DIY 银幕
您需要:
操作方法如下:
而不是分散它。让它彻底干燥。您可以重复步骤1
多次。
做一侧就足够了。所有进一步的步骤现在都在这个透明的丙烯酸底座上完成。
不要通过与水混合来制作铝粉浆!
充分搅拌,使其成为均匀的物质。
重复步骤 4,直到获得均匀铝金属漆面,且没有任何痕迹。
黑色部分闪闪发光。
视频投影
Single Projector Setup
大多数电影院都使用一台投影仪和 RealD Z 滤波器系统
以 144Hz 的交换速率交替显示左右图像,其中
Z 滤波器动态调制偏振。
从技术上讲,Z 滤波器只是一些大型液晶面板。 LC 具有
属性,根据电压旋转通过的光的偏振平面
应用于LC。因此,Z 滤波器可将光线旋转 +/-45°,并受控制
通过与左右图像交换同步的交流电压。 Z 滤波器之前
是一个线性偏振器,其后面是一个 λ/4 延迟器,与线性偏振器平行
偏光镜。 Z 滤波器将偏振平面旋转到仅
左转或右转偏振光离开系统,如果有立体
显示材料。
如果 Z 滤镜关闭,光线将变成 50% 左、50% 右
转向极化。
完全可以 DIY 重新创建该系统。然而,这将被描述
仍有待撰写的另一篇文章中。
Dual Projector Setup
使用两台投影仪是投影不同偏振图像的最简单方法。
这个想法很简单:每台投影机都配备了与
滤光器位于观看者眼镜的眼部滤光器中,使光线从“左侧”投射
投影仪将仅到达左眼,“右”投影仪的光到达
只有观看者的右眼。
Selecting the Projectors
归结为以下几点:您需要两台相同的投影仪,它们可以发出
非偏振光 - 即使用经典弧光灯的 DLP 投影仪 -
或所有基色的均匀线偏振光。
后一种情况更具吸引力,因为您不会“丢弃”光。但越安全
即,选择某种 DLP 类型。请注意,那些新型漂亮的 LED 投影仪通常会展示
一些不均匀的极化,这使得它们很难用于下一个不可能的用途
偏振立体视觉。
Making the Filter Slides
投影仪的滤光片可以由同一种 3D 眼镜制成
观众佩戴的。 RealD 的 3D 眼镜仅供一次性使用。
虽然电影院设置了回收箱,但如果你
把你在电影院拿到的眼镜归你自己用。事实上大多数电影院都会
可以将一些眼镜退回到回收箱中,这没有问题。
您可能会想将这些滤镜放在投影仪镜头后面。
然而,这是粗鲁的,并且会很快破坏这些过滤器。请记住,50%
灯的功率可能最终进入过滤器,从而使过滤器升温。
因此,您希望将光的功率分布到相当大的区域。
您需要:
事情是这样的:
中间有一个小写字母“L”或“R”(左眼或右眼)。
释放过滤器。
不要让它们成为二次方。重要的是你仍然知道内部的方向
眼镜框。
全部面向相同(即全部正面或全部背面)。
保持间隙尽可能小。
现在您已经有了左右偏光滤镜幻灯片。戴上同品牌的 3D 眼镜
并通过观察确定每个窗格最有效地阻挡光线的方向
通过过滤幻灯片。 重要提示:阻挡眼睛光线的滤光片平面
直接通过它观看将是稍后投影该特定眼睛的幻灯片。
原因是反射改变了手性,即左转和右转是
通过反射交换。
Setting up the Projection
水平对齐可能会略有偏移,但应尽可能做到最好。
显示立体素材,让每个投影仪都显示出自己眼睛的画面。
Build your own Polarized Stereoscopic Projection System
Principles of Polarization Optics
Polarized Light
Since the late 19th century we know, that light can be described in terms
of electromagnetic waves. The theory behind it are the well understood
Maxwell Equations. Since this is not an article about electrodynamics just
the essentials:
http://en.wikipedia.org/wiki/Electromagnetic_radiation
The electric field vector (one could also use the magnetic field, but convention
is to use the electric filed) determines the polaization. There are two kinds of
polarization:
If you look along the propagation the field vector may cycle through:
The effect of circular polarization is created by retarding one component
of linear polarized light by a quarter of a wavelength.
See also this Wikipedia article
http://en.wikipedia.org/wiki/Polarization_(waves)
Creating Polarized Light
Wikipedia has an excellent article on the details
http://en.wikipedia.org/wiki/Polarizer
Here's the essentials.
Linear Polarization
Linear polarized light can be obtained in various ways:
from light with a broad polarization distribution.
All light emitted in a statistical manner (thermic radiation,
high pressure gas discharge, lighting arcs) has this property.
One can filter the desired polarization plane using a filter.
The following filters are known:
a beam of light into two polarization components, polarized
perpendicular to each other.
have different indices of refraction for different polarization
planes. Again the light ways are split.
it an anisotropic structure. Some anisotropic polymers will absorb
only incoming light polarized parallel (or perpendicular, it
depends on the material) to the strechting direction.
Depending on how the laser is built, the polarization plane will
gradually change over time.
http://en.wikipedia.org/wiki/Linear_polarization
Circular Polarization
In optics, circular polarization is created by passing linear polarized
light through some anisotropic material, that will retard one of the
components (electric or magnetic) by a quarter of the wavelength. This
is called a λ/4 retarder.
The angle between linear polarization and the anisotropic material's major
axis determines ratio between left and right turning polarized light resulting:
It should be noted, that due to the reversibility of the light's way the
passing of circular polarized light through a λ/4 retarder will
turn it into linear polarized light of the corresponding certain polarization
plane. This linear polarized light can the be filtered again by linear
polarizers. This is, how circular polarization 3D glasses work.
http://en.wikipedia.org/wiki/Circular_polarization
Polarized Light and Interaction with the Screen
Scattering and Diffraction
The typical projection screen uses very small particles, usually they're TiO2,
to scatter and diffract the light into all directions. In the scattering process
the light bounces multiple times between the particles. While each bounce leaves
a light wave solition polarized in the grand statistical scheme any notable
polarization is lost.
Thus a normal white projection screen is unsuitable for polarized stereoscopic projection.
Metallic Reflection
The key for building a polarizing stereoscopic projection system is the use
of a screen material that retains the polaization of the incoming light.
This is achieved by employing metallic reflection on particles much larger than
the light's wavelengths.
A DIY Stereoscopic Projection System
Making a DIY Silver Screen
You'll need:
This is how you do it:
instead of scattering it. Let it dry thorougly. You may repeat step 1
multiple times.
Doing it one side suffices. All futher steps are now done on this clear acrylic base.
Don't make a aluminum power paste by mixing it with water!
stir thoroughly so that it is a homogenous mass.
Repeat step 4 until you've got an even aluminum metallic painted surface with no
black parts shining through.
Video Projection
Single Projector Setup
Most cinemas are using a single projector and the RealD Z-filter system to
alternating show left and right images at a swap rate of 144Hz, where the
Z-filter is dynamically modulating the polarization.
Technically the Z-filter is just some large Liquid Crystal Panel. LCs have the
property, to rotate the passing light's polarization plane, depending on a voltage
applied on the LC. The Z-filter thus rotates the light by +/-45°, controlled
by an AC voltage in sync with the left-right-image swap. Before the Z-filter
is a linear polarizer, behind it a λ/4 retarder, in parallel to the linear
polarizer. The Z-filter will rotate the polarization plane to that either only
left or right turning polarized light is leaving the system, if there's stereoscopic
material shown.
If the Z-filter is turned off, the light will be turned into 50% left and 50% right
turning polarization.
It is perfectly possible to recreate this system DIY. This however shall be described
in a separate article still to be written.
Dual Projector Setup
Using two projectors is the most easy way to project the distinct polarized images.
The idea is simple: Each projector is equiped with a polarizing filter matching the
filter in the viewer's glasses eye filters, so that light projected from the "left"
projector will reach only the left eyes, and the "right" projector's light reaches
only the viewer's right eyes.
Selecting the Projectors
It boils down to the following: You need two identical projectors which emit either
unpolarized light - that are DLP projectors using classical arc lamps -
or evenly linear polarized light for all base colours.
The later case is more appealing since you'll not "throw away" light. But the safer
is, choosing some DLP type. Note that those new nifty LED projectors usually exhibit
some uneven polarization, which makes them tricky to next impossible to use for
polarized stereoscopy.
Making the Filter Slides
The projector's filter slides can be made from the very same kind of 3D glasses
which are worn by the viewers. The 3D glasses of RealD are meant for single use.
Although cinemas setup boxes for recycling, there's no harm to the venues if you
put those glasses you got in the cinema to your own use. In fact most cinemas will
have no problem with giving you some of the glasses returned to the recycling boxes.
You may be tempted to just put those filters right behind the projectors lens.
This is however crude and will quickly destroy those filters. Remember that 50% of
the lights power may end up in the filters, heating them up.
So you want to distribute the light's power over a significant large area.
You'll need:
This is how it goes:
with a small letter 'L' or 'R' (left eye or right eye), right in the middle.
releasing the filters.
Don't make them quadratic. It's important that you still know the orientation within
the glasses' frame.
all facing the same (i.e. all front or all back).
Keep the gaps as small as possible.
You've now left and right polarizing filter slides. Put on 3D glasses of the same making
and determine the orientation in which each pane blocks the light most efficiently by looking
through the filter slide. Important: The filter plane that blocks the light on a eye
looking through it directly will be the slide for projection that particular eye later.
The reason for that is, that reflection changes chirality, i.e. left and right turning are
swapped by reflection.
Setting up the Projection
Horizontal alignment may be slightly shifted, but it should be done as good as possible, to.
Show the stereoscopic material, so that each projector display's its eyes picture.