参考文章https://blog.csdn.net/dancewine/article/details/80999306将surround360在Ubuntu16.04上安装完成。
我只有12个bin,且没有Unpacker.bin文件,在后续的使用过程中,我无法进行step1的程序,不过这并不影响step2render的进行。
下载官方的sample data https://github.com/facebook/Surround360 http://surround360.hacktv.xyz/sample/sample_dataset.zip
解压后,打开如图所示
运行
cd Surround360/surround360_render/scripts
python run_all.py
弹出窗口
图中各项的具体参数概念参看https://blog.csdn.net/smallflyingpig/article/details/79451890
step1 unpack 不进行
step2 render
对于render过程,Data Directory不太重要,我设定为sample_dataset/vid/000000
Destination Directory设定为一个新建文件夹,我设定为sample_dataset/output
在output文件夹中,新建一个‘rgb’文件夹,再在其中新建cam0-16共17个文件夹
将sample_dataset/vid/000000/isp_out中的cam0-16,分别移动到output/rgb/cam0-16,并命名为000000.png
然后,
运行结果:
python /home/dancewine3/Surround360/surround360_render/scripts/run_all.py --data_dir /home/dancewine3/Downloads/sample_dataset/vid/000000 --start_frame 0 --quality 6k --cubemap_height 0 --steps_render --enable_pole_removal --enable_top --verbose --dest_dir /home/dancewine3/Downloads/sample_dataset/output --frame_count 0 --cubemap_format video --enable_bottom --cubemap_width 0
Checking required files...
** RENDER ** [Step 1 of 1]
python /home/dancewine3/Surround360/surround360_render/scripts/batch_process_video.py --flow_alg pixflow_low --root_dir "/home/dancewine3/Downloads/sample_dataset/output" --surround360_render_dir "/home/dancewine3/Surround360/surround360_render" --quality 6k --start_frame 0 --end_frame 0 --cubemap_width 0 --cubemap_height 0 --cubemap_format video --rig_json_file "/home/dancewine3/Downloads/sample_dataset/output/config/camera_rig.json" --enable_top --enable_bottom --enable_pole_removal --verbose
----------- [Render] processing frame 0 of 0
/home/dancewine3/Surround360/surround360_render/bin/TestRenderStereoPanorama --logbuflevel -1 --log_dir "/home/dancewine3/Downloads/sample_dataset/output/logs" --stderrthreshold 0 --v 1 --rig_json_file "/home/dancewine3/Downloads/sample_dataset/output/config/camera_rig.json" --imgs_dir "/home/dancewine3/Downloads/sample_dataset/output/rgb" --frame_number 000000 --output_data_dir "/home/dancewine3/Downloads/sample_dataset/output" --prev_frame_data_dir "NONE" --output_cubemap_path "/home/dancewine3/Downloads/sample_dataset/output/cube_frames/cube_000000.png" --output_equirect_path "/home/dancewine3/Downloads/sample_dataset/output/eqr_frames/eqr_000000.png" --cubemap_format video --side_flow_alg pixflow_low --polar_flow_alg pixflow_low --poleremoval_flow_alg pixflow_low --cubemap_width 0 --cubemap_height 0 --eqr_width 6300 --eqr_height 3072 --final_eqr_width 6144 --final_eqr_height 6144 --interpupilary_dist 6.4 --zero_parallax_dist 10000 --sharpening 0.25 --enable_top --enable_bottom --enable_pole_removal --bottom_pole_masks_dir "/home/dancewine3/Downloads/sample_dataset/output/pole_masks"
I0717 02:22:50.464702 39029 TestRenderStereoPanorama.cpp:745] Bottom cameras enabled. Preparing bottom projections in a thread
I0717 02:22:50.469239 39029 TestRenderStereoPanorama.cpp:773] Projecting camera images to spherical
I0717 02:22:50.469421 39029 TestRenderStereoPanorama.cpp:144] Projecting side camera images to spherical coordinates
I0717 02:22:50.469480 39029 RigDescription.cpp:86] loadSideCameraImages spawning threads
I0717 02:22:50.469553 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam1/000000.png
I0717 02:22:50.469808 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam2/000000.png
I0717 02:22:50.469866 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam3/000000.png
I0717 02:22:50.469915 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam4/000000.png
I0717 02:22:50.469964 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam5/000000.png
I0717 02:22:50.470032 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam6/000000.png
I0717 02:22:50.473908 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam7/000000.png
I0717 02:22:50.474089 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam8/000000.png
I0717 02:22:50.474153 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam9/000000.png
I0717 02:22:50.474251 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam10/000000.png
I0717 02:22:50.474299 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam11/000000.png
I0717 02:22:50.474391 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam12/000000.png
I0717 02:22:50.474442 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam13/000000.png
I0717 02:22:50.474488 39029 RigDescription.cpp:96] imagePath = /home/dancewine3/Downloads/sample_dataset/output/rgb/cam14/000000.png
I0717 02:22:50.769131 39030 TestRenderStereoPanorama.cpp:570] Using pole removal masks
I0717 02:23:25.346887 39029 TestRenderStereoPanorama.cpp:149] Time to load images from file: 34.8774 sec
I0717 02:24:23.544747 39029 TestRenderStereoPanorama.cpp:780] Rendering stereo panorama
I0717 02:24:25.910908 39030 PoleRemoval.cpp:88] Doing optical flow to merge bottom camera images
I0717 02:26:15.012815 39030 PoleRemoval.cpp:124] Serializing bottom-secondary flow and images
I0717 02:26:20.526051 39030 PoleRemoval.cpp:130] Warping secondary bottom camera to align with primary bottom camera
I0717 02:26:21.094202 39030 PoleRemoval.cpp:155] Combining the primary bottom image and the secondary warped image
I0717 02:27:30.113489 39110 TestRenderStereoPanorama.cpp:450] Serializing fisheye flow result
I0717 02:27:38.073362 39111 TestRenderStereoPanorama.cpp:450] Serializing fisheye flow result
I0717 02:27:38.670034 39113 TestRenderStereoPanorama.cpp:450] Serializing fisheye flow result
I0717 02:27:44.362987 39112 TestRenderStereoPanorama.cpp:450] Serializing fisheye flow result
I0717 02:27:55.398896 39029 TestRenderStereoPanorama.cpp:891] Flattening from 4 channels to 3 channels
I0717 02:27:55.541311 39029 TestRenderStereoPanorama.cpp:903] Sharpening
I0717 02:28:04.759186 39029 TestRenderStereoPanorama.cpp:942] Resizing before final equirect stack (for proper video size)
I0717 02:28:05.128592 39029 TestRenderStereoPanorama.cpp:959] Creating stereo equirectangular image
I0717 02:28:06.613696 39029 TestRenderStereoPanorama.cpp:964] --- Runtime breakdown (sec) ---
I0717 02:28:06.613890 39029 TestRenderStereoPanorama.cpp:965] Total: 316.151
I0717 02:28:06.636068 39029 TestRenderStereoPanorama.cpp:966] Spherical projection: 93.0755
I0717 02:28:06.656116 39029 TestRenderStereoPanorama.cpp:967] Side optical flow: 107.039
I0717 02:28:06.656149 39029 TestRenderStereoPanorama.cpp:968] Novel view panorama: 8.99811
I0717 02:28:06.656160 39029 TestRenderStereoPanorama.cpp:969] Flow top+bottom with sides: 94.24
I0717 02:28:06.656170 39029 TestRenderStereoPanorama.cpp:970] Sharpen: 9.21788
I0717 02:28:06.656179 39029 TestRenderStereoPanorama.cpp:971] Equirect -> Cubemap: 0
Render total runtime: 316.962409973 sec
Average runtime: 316.962409973 sec/frame
RENDER runtime: 0:05:17.644130
TOTAL runtime: 0:05:17.893836
运行时间比较长,我的surround360没有安装加速部分,或许加了加速部分会好一点。