Stereoscopy
從 gugod 的OSDC / RubyConf TW 2010 複習得知了 3D Bookmarklet 這玩意兒,趕緊拿自己的網站來試試:

程式碼裏頭,有關 anaglyph 的部分如下:
e.style.color='rgba(255,0,0,0.5)'+imp;
e.style.textShadow=d+'px 0 0 rgba(0,255,192,0.5)'+imp;
如果能採用 Half Color Anaglyph 或是 Optimized Anaglyph 公式的話,然後是對整個畫面處理(包含 img, css 裏的 background image/color, color)等處理,那就更完美了 :)
Reference: (for gugod)
我從 Dan 那學到一件事:善用 Google Alerts 來幫你找資料。於是我訂了一個針對關鍵字“autostereoscopy“的 alert,每幾天就會收到一個 digest alert,裏頭就 news, blog 裏頭,有提到 autostereoscopy 這個關鍵字的,從中節選幾篇出來,寄到我的 gmail。有點像是把 Google Alerts 當成另一種 RSS Feed 來看待。
今天收到了的 alert 頭,news 部分如下:

幾乎都和 Nintendo 3DS 有關 = = 大廠的一個動作,果然媒體的反應就是不一樣呀~
The following is the code I got from Andres Hernandez [cybereality] for separating a .mpo file into 2 relative .jpeg files (left and right). The key point is to find the second jpeg’s header “FFD8FFE1” and this is my first time to touch jpeg’s header format. Kinda interesting.
According to Andres’s idea, we all hope everyone could keep sharing any informative stuff to help others’ work or research. And eventually, we could benefit from others’ great achievement :)
The interesting is, we, as artists and engineers, do really can convert 2D images into autostereoscopic ones, as long as having skilled rotoscoper with patience and cooperative computer graphics geek. What we did is just as normal as everyone could thought of:
- define our targeting quality and appearance first and clearly
- pick up candidate wedding photos with remarks of importance and focus points
- for each photo, circle out spatial layout according to aesthetics and logistics. furthermore, having well-designed depth gradient is the most important to achieve nice quality result
- rotoscoping, the most time-consuming but artistic process
- 3d image warping, or so called depth image based rendering is used to generate the desired multiple novel views
- finally, (auto)stereoscopic device related content generating
Does a pure computer graphics researcher need to know and even involve in those stuff to this extreme? Yes! Because…
3D business is not born yet. It is like an expected new born baby. I say new technology regarding 3D is necessary for 3D business. It is said “Necessity is a mother of invention”.

3D technology is a sort of a “Mother of 3D business”. Then who is a “Father” of expected new born baby named “3D business”?
It is “Business model” who would become a “Father”.
Only when “Technology” meets “Business model”, new business will be born.





While you are learning something, the best and mnemonic way to be aware of the details and possible utility behind is try to use different viewpoints on it, try to explain one thing in different languages or images, or even convince someone else the idea. And luckily, you have this “something” all along your life…
The below is just a normal view (the left view) of a cloning project of another autostereoscopic video clip. 
前幾天拿到 Fujifilm Finepix Real 3D W1 的機器,工作期間要把玩它的時間有限,下班後要過的宅男生活滿檔,但這玩意兒著實重要而且有趣,不用力玩的話,會對不起 John 的。

3D 照片拍攝後,會存出一個 .MPO 的檔來,上網研究了一下,在 MTBS3D 上得知 .MPO 其實就只是兩張 .JPEG 直接黏起來,所以你只要有辦法找出黏接點,然後就可以把整個 file stream 分成兩個新檔,自然就會得出左右眼各一張圖了。Wikipedia 上有稍稍提到 JPEG 的檔頭,這樣就足夠了,直接掃過整個 .MPO 檔,找出 FFD8FFE1 就行了。這作法雖然有一定的機率(不知道多小就是了),會找錯,不過大部分情況下 ok,就先將就著點兒用,不然還得去用別人寫的程式的話,要整合進自己寫的程式裏頭來自動化的話,就有點麻煩~
第一個檔頭:

搜尋 FFD8FFE1:

啊哈,找到第二個檔題的位置了:

這張是左眼看到的:

這張是右眼看到的:

兩張擺在一起看的話:

還看不太出來有什麼問題,但其實兩張鏡頭拍下來的兩張照片,在顏色上(曝光)與視差上(Disparity)都有一定程度上的缺失。
先用比較暴力的方式,直接看一下他們之間的 Difference (by ImageMagick):

兩張顏色上的差異,還是不容易在這種模式下看出,但是 disparity 卻有明顯的問題。仔細看一下那後頭的兩瓶茶裏王的蓋子的部分,會看到兩張圖的差異,不僅僅是水平上的 disparity,連垂直方向也有 disparity (keystone!!!)。
透過這樣兩張幾乎(理論上)平行的鏡頭拍攝出來的照片,最大的問題點有如下幾個:
- 顏色有差異(曝光的情況不一所致)。
- 垂直方向有視差(vertical disparity or keystone)。
所有的物體都只能凸出來,無法凹進去。
接著再來看看它號稱可以同步拍攝影片的部分,它會把影片存成一個 .avi 的檔案。這就有趣了,我沒有印象 .AVI 有支援 stereo 的! 使用 transcode 的 tcprobe 與比較猛的 mencoder 快速檢閱一下

原來只是放了兩個 video channels 呀~

這是一張使用了八個鏡頭,每個鏡頭經過算圖產生出來的結果。

不管是要帶眼鏡的雙眼立體,或是不需要帶眼鏡的裸眼立體電視,製作過程中,讓人第一時間就覺得頭很痛的,就屬算圖了。拿一般製作動畫的流程來看:Layout -> Animation -> Lighting -> (Effects) -> Rendering -> Compositing -> Editing,整個過程中,只要其中之一覺得有修改的必要,就可能往前退到任何一個部門,然後就有很高的機率要重新算圖。雙眼的話,很高的機率是重算兩眼,如果是裸眼立體的話,運氣好的話,就是 5 個 view,運氣不好的話,就是 12 個 view,這是一個很直接的負擔,不管對製作的 artists/TDs 或是運算的機器而言。
Dreamworks 透過 main cam 亦即是 left cam 的設計,來使得一些情況下,只需要重算 right cam 就行了。那如果是 8 cams 的情況呢? 我在想的是,有沒有可能犧牲掉一些 high frequency information 精確度的前提下(ex, specular, reflection, caustics, sss),然後使用內插的方式來湊出 n views 呢?
3Dfier is a directshow filter that transforms normal video file to 3D in realtime. 3Dfier filer works with popular media players and support various video format as long as the files were played using direcshow. Here you can download demo versions for evaluation purpose. This demo version runs for around 10 minutes and support single mode only. We are happy to work with 3D display makers to customize a filter that works for the specifc display. Anaglyph is not the best way you can view 3D with 3Dfier filter but it is most easily available. 3Dfier works perfectly with side-by-side 3D Displays such as iZ3D monitor. We can also make it work with multi-view 3D Displays. Contact us for more information and partnership opportunity.