私は最近、この論文に基づいてランダムドットステレオグラムを生成するためのPython(2.7)コードをいくつか完成させました。出力はかなり良好ですが、深度マップに滑らかな勾配がある場合でも、出力ステレオグラムにはこれらの滑らかな勾配がなく、深度のレベルが変化していることに気付きました。これは、画像を生成するときに選択したDPIによるものだと思います。DPIを増やすことで深度の詳細を増やすことができますが、収束点に到達するのが難しくなるため、これは実用的ではなくなります。
ここに2つの例があります。最初は75DPIで、2番目は175DPIです。75 DPI画像では、奥行きの明確な「三角形」が見られます。175 DPI画像では、これらはあまり目立たないが、画像の下部にあるガイダンスドットはさらに離れているため、3D画像を表示するのはより困難です。
I'm looking to modify my current code to anti-alias the 3D image in order to smooth out the gradients even with a lower DPI. I have tried using SSAA on the depth map and pattern and generating the stereogram, then reducing the image size again with an antialiasing filter. However this seems to just contain the stereogram to the left of the image. For example, if I make the image 4 times bigger, the stereogram is limited to the left hand quarter of the image. The rest is just random noise and cannot be viewed. How would I go about antialiasing the image hidden in the stereogram? My code is almost the same as the algorithm described in the paper, so an antialiasing algorithm based on that would be perfect.
The solution for the problem I was having, with the stereogram being contained to the left of the image, was caused by not extending the same
array to reflect the larger depth map. This caused everything beyond the original length of the depth map to be randomly generated noise.
After solving this problem, a second problem arose, in that the 3D image was distorted by the anti-aliasing, causing more gradient issues than it was solving. My solution for this was to increase the DPI setting in the code. For example, if I increased the size of the depth map by 4x, the stereogram must be generated with a DPI 4 times greater (300, rather than 75). When scaled down again, this produced excellent results.
この画像は2xSSAAを使用しており、グラデーションは質問の175DPI画像と同等ですが、収束点がはるかに簡単です。
この画像は4xSSAAを使用しており、ジャギーはほとんど見えません。ここでのノイズはさらにぼやけ、画像の一般的な色はかなり灰色になります。この影響は、ノイズを事前に生成し、同じAA係数でスケールアップすることで回避できることがわかりました。これは次の画像で示されています。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加