OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

Cannot use the reconstruction.html to open the .json file

Open Juuustin opened this issue 4 years ago • 8 comments

Hi,

I am using python3 , so I use python -m http.server instead of python -m SimpleHTTPServer.

When I open the Viewer, and browse the .json file nothing happens. it seems that I cannot open the .json from the viewer.

I am running under Ubuntu 16.04, and I havn't created the documentation by cd doc make livehtml successfully.

**python3 -m sphinx -b html -d build/doctrees source build/html Running Sphinx v2.4.0 loading pickled environment... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 0 source files that are out of date updating environment: 0 added, 1 changed, 0 removed reading sources... [100%] api
WARNING: autodoc: failed to import module 'dataset' from module 'opensfm'; the following exception was raised: No module named 'opensfm' WARNING: autodoc: failed to import module 'types' from module 'opensfm'; the following exception was raised: No module named 'opensfm' WARNING: autodoc: failed to import module 'features' from module 'opensfm'; the following exception was raised: No module named 'opensfm' WARNING: autodoc: failed to import module 'matching' from module 'opensfm'; the following exception was raised: No module named 'opensfm' WARNING: autodoc: failed to import module 'reconstruction' from module 'opensfm'; the following exception was raised: No module named 'opensfm' WARNING: autodoc: failed to import module 'config' from module 'opensfm'; the following exception was raised: No module named 'opensfm' looking for now-outdated files... none found pickling environment... done checking consistency... /home/objloc/OBJLOC/OpenSfM/doc/source/dense.rst: WARNING: document isn't included in any toctree /home/objloc/OBJLOC/OpenSfM/doc/source/merging_notes.rst: WARNING: document isn't included in any toctree done preparing documents... done /home/objloc/OBJLOC/OpenSfM/doc/source/_templates/layout.html:16: RemovedInSphinx30Warning: To modify script_files in the theme is deprecated. Please insert a

The HTML pages are in build/html.

Build finished. The HTML pages are in build/html. sphinx-autobuild -b html -p 8001 -d build/doctrees source build/html make: sphinx-autobuild: Command not found Makefile:57: recipe for target 'livehtml' failed make: *** [livehtml] Error 127 **

Is there any suggestion or another available viewer to see the result?

Thank you very much!

Juuustin avatar Apr 10 '20 09:04 Juuustin

Try to open reconstruction.meshed.json instead of reconstruction.json. Other option: Install Meshlab. Once it is installed you can visualize the .ply file available in undistorted-->depthmaps--> merged.ply . After installation of meshlab, just type meshlab on cmd and a viewer will be available to you.

vinayver198 avatar Apr 14 '20 06:04 vinayver198

@Juuustin, for the documentation, the error you pasted says that it can not find sphinx-autobuild. Maybe that is missing on your system.

For the viewer, browsing http://localhost:8000/viewer/reconstruction.html#file=/data/berlin/reconstruction.meshed.json should load the reconstruction. If it does not, please share the details that can help us find the problem.

paulinus avatar Apr 14 '20 10:04 paulinus

Try to open reconstruction.meshed.json instead of reconstruction.json. Other option: Install Meshlab. Once it is installed you can visualize the .ply file available in undistorted-->depthmaps--> merged.ply . After installation of meshlab, just type meshlab on cmd and a viewer will be available to you.

Hi, thank you for helping me, and now I can open both reconstruction.json and reconstruction.mesh.json, and they look similar after I open them.

Another problem is that the image in the top left corner is black. When I click the camera, the image is empty, I assume it should be the view from that camera pose. Do you have any idea to view the different capture for different camera pose?

Juuustin avatar Apr 14 '20 13:04 Juuustin

hello @paulinus , @Juuustin When I run python3 -m http.server, I cann't open the viewer in browser. There are the following problems:

Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... 127.0.0.1 - - [18/Jul/2021 21:14:54] code 404, message File not found 127.0.0.1 - - [18/Jul/2021 21:14:54] "GET /viewer/reconstruction.html HTTP/1.1" 404 - 127.0.0.1 - - [18/Jul/2021 21:14:55] code 404, message File not found 127.0.0.1 - - [18/Jul/2021 21:14:55] "GET /viewer/reconstruction.html HTTP/1.1" 404 - 127.0.0.1 - - [18/Jul/2021 21:14:55] code 404, message File not found 127.0.0.1 - - [18/Jul/2021 21:14:55] "GET /viewer/reconstruction.html HTTP/1.1" 404 - 127.0.0.1 - - [18/Jul/2021 21:14:55] code 404, message File not found 127.0.0.1 - - [18/Jul/2021 21:14:55] "GET /viewer/reconstruction.html HTTP/1.1" 404 -

The browser display:

Error response Error code: 404

Message: File not found.

Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.

Is there any suggestion for this problem? Thanks your reply!

ShougangShen avatar Jul 18 '21 13:07 ShougangShen

Same problem here, can't visualise Berlin example in browser:

10.8.0.2 - - [29/Jul/2021 04:14:09] code 404, message File not found 10.8.0.2 - - [29/Jul/2021 04:14:09] "GET /viewer/reconstruction.html HTTP/1.1" 404 -

Because reconstruction.html does not exist in fact. Building did not generate any errors.

dinisov avatar Jul 29 '21 04:07 dinisov

@ShougangShen @dinisov I also met this issue. But when I check the viewer/README.md, I found their web viewer launch steps has changed. (documentation does not update) I follow the steps in README.md, and everything is ok now.

The following is the content in README.md

# OpenSfM viewer

## Workflow

### Setup
1. `./node_modules.sh`
    - Download npm dependencies from unpkg

### Serve a dataset
1. `python3 server.py -d <path/to/my/dataset>`
    - Serve the reconstruction for a dataset
2. Browse to `http://localhost:8080`
3. Select the reconstruction file

### Load datasets manually
Note that images will not be loaded for this case.
1. `python3 server.py`
    - Serve the reconstruction for a dataset
2. Browse to `http://localhost:8080`
3. Pick or drop the reconstruction files

ot32em avatar Aug 09 '21 03:08 ot32em

Try to open reconstruction.meshed.json instead of reconstruction.json. Other option: Install Meshlab. Once it is installed you can visualize the .ply file available in undistorted-->depthmaps--> merged.ply . After installation of meshlab, just type meshlab on cmd and a viewer will be available to you.

Hi, thank you for helping me, and now I can open both reconstruction.json and reconstruction.mesh.json, and they look similar after I open them.

Another problem is that the image in the top left corner is black. When I click the camera, the image is empty, I assume it should be the view from that camera pose. Do you have any idea to view the different capture for different camera pose?

Hello, I am facing the same problem. The region in the top left corner is blank. It should be the image captured by the camera I select. Please let me know if this issue has been resolved. Thank you.

Srts1710 avatar Nov 27 '21 08:11 Srts1710

@paulinus same problem here

edgarriba avatar Sep 06 '22 10:09 edgarriba