GithubHelp home page GithubHelp logo

haiyangxu / osm-bundler Goto Github PK

View Code? Open in Web Editor NEW
57.0 57.0 12.0 1.66 MB

A Python routine for running Structure From Motion pipeline with Bundler and dense reconstruction with PMVS(CMVS) to reconstruct 3D geometry from a set of photos.

Home Page: haiyangxu.github.com/osm-bundler

Python 100.00%

osm-bundler's Introduction

osm-bundler's People

Contributors

haiyangxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

osm-bundler's Issues

CMVS is not working

Hello HaiyangXu,
I am having an issue while running cmvs. Bundler and pmvs are working fine but when I run cmvs on same data it gives me error "Error. Normalized cuts produced an empty cluster: 1 -> 0 1".
It has processed 14 images before giving this error and when I opened the image # 15 in visualize folder it was weirdly stretched. It's not using all images I provided as input to bundler as well. I am using 61 images for this experiment.

Here is my log file..

attiq@attiq-Y70:~/Test-bundler-pmvs-cmvs/osm-bundler-master$ python RunCMVS.py --bundlerOutputPath="/home/attiq/Test-bundler-pmvs-cmvs/osm-bundler-master/outputzain/osm-bundler-CNus1B/" --ClusterToCompute ="50".
Working directory created: /home/attiq/Test-bundler-pmvs-cmvs/osm-bundler-master/outputzain/osm-bundler-CNus1B/

Performing Bundler2PMVS conversion...
Running Bundle2PMVS to generate geometry and converted camera file
[ReadBundleFile] Bundle version: 0.300
[ReadBundleFile] Reading 61 images and 1504 points...
[GetJPEGDimensions] File IMG_3303.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3306.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3292.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3309.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3298.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3276.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3304.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3305.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3310.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3293.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3307.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3308.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3313.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3297.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3296.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3290.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3291.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3301.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3287.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3294.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3279.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3312.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3314.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3285.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3280.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3286.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3278.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3316.jpg: ( 1200 , 800 )
[GetJPEGDimensions] File IMG_3277.jpg: ( 1200 , 800 )

@@ Conversion complete, execute "sh pmvs/prep_pmvs.sh" to finalize
@@ (you will first need to edit prep_pmvs.sh to specify your bundler path,
@@ so that the script knows where to find your
@@ RadialUndistort and Bundle2Vis binaries)
Running RadialUndistort to undistort input images
[ReadBundleFile] Bundle version: 0.300
[ReadBundleFile] Reading 61 images and 1504 points...
Undistorting image IMG_3303.jpg
Undistorting image IMG_3306.jpg
Undistorting image IMG_3292.jpg
Undistorting image IMG_3309.jpg
Undistorting image IMG_3298.jpg
Undistorting image IMG_3276.jpg
Undistorting image IMG_3304.jpg
Undistorting image IMG_3305.jpg
Undistorting image IMG_3310.jpg
Undistorting image IMG_3293.jpg
Undistorting image IMG_3307.jpg
Undistorting image IMG_3308.jpg
Undistorting image IMG_3313.jpg
Undistorting image IMG_3297.jpg
Undistorting image IMG_3296.jpg
Undistorting image IMG_3290.jpg
Undistorting image IMG_3291.jpg
Undistorting image IMG_3301.jpg
Undistorting image IMG_3287.jpg
Undistorting image IMG_3294.jpg
Undistorting image IMG_3279.jpg
Undistorting image IMG_3312.jpg
Undistorting image IMG_3314.jpg
Undistorting image IMG_3285.jpg
Undistorting image IMG_3280.jpg
Undistorting image IMG_3286.jpg
Undistorting image IMG_3278.jpg
Undistorting image IMG_3316.jpg
Undistorting image IMG_3277.jpg
[WriteBundleFile] Writing 29 images and 1504 points...
Running Bundle2Vis to generate vis.dat
[ReadBundleFile] Bundle version: 0.300
[ReadBundleFile] Reading 29 images and 1504 points...
Num visible: 3926
Num cameras: 29
Move files in the correct directory
Finished!
Reading bundle...29 cameras -- 1504 points in bundle file


29 cameras -- 1504 points
Reading images: *****************************
Set widths/heights...done 0 secs
done 0 secs
slimNeighborsSetLinks...done 0 secs
mergeSFM...***********resetPoints...done
Rep counts: 1504 -> 116 0 secs
setScoreThresholds...done 0 secs
sRemoveImages... ***************
Kept: 1 2 3 4 10 11 13 14 15 16 19 20 21 22 23 24 25 26 27 28

Removed: 0 5 6 7 8 9 12 17 18
sRemoveImages: 29 -> 20 0 secs
slimNeighborsSetLinks...done 0 secs

Normalized-Cut...
Cut value: 0.270722, Balance:

Normalized-Cut...
Cut value: 0.000000, Balance:

Normalized-Cut...
Cut value: 0.916172, Balance:

Normalized-Cut...
Cut value: 1.184583, Balance:

Normalized-Cut...
Cut value: 1.093959, Balance:

Normalized-Cut...
Cut value: 1.272861, Balance:

Normalized-Cut...
Cut value: 1.006260, Balance:

Normalized-Cut...
Cut value: 2.000000, Balance:

Normalized-Cut...
Cut value: 1.509244, Balance:

Normalized-Cut...
Cut value: 1.359000, Balance:

Normalized-Cut...
Cut value: 1.732044, Balance:

Normalized-Cut...
Cut value: 2.000000, Balance:

Normalized-Cut...
Cut value: 2.000000, Balance:

Normalized-Cut...
Cut value: 2.000000, Balance:

Normalized-Cut...
Cut value: 1.350179, Balance:

Normalized-Cut...
Cut value: 2.000000, Balance:
Error. Normalized cuts produced an empty cluster: 1 -> 0 1

Thanks,
Atiq

TypeError: memoryview: a bytes-like object is required, not 'str'

Currently i am facing this issue when i run the osm-bundler, initially it was fine but now this issue surface after the command was run.

Processing photo '1.jpg':
Copy of the photo has been scaled down to 900x1200
Extracting features with the SIFT method from VLFeat library...
Traceback (most recent call last):
File "RunBundler.py", line 12, in
manager_osm.preparePhotos()
File "C:\Users\Desktop\osm-bundler2\osm-bundlerWin64\osmbundler_init_.py", line 162, in preparePhotos
self.preparePhoto(photoInfo)
File "C:\Users\Desktop\osm-bundler2\osm-bundlerWin64\osmbundler_init
.py", line 272, in preparePhoto
self.extractFeatures(photo)
File "C:\Users\Desktop\osm-bundler2\osm-bundlerWin64\osmbundler_init
.py", line 350, in extractFeatures
self.featureExtractor.extract(photo, self.photoDict[photo])
File "C:\Users\Desktop\osm-bundler2\osm-bundlerWin64\osmbundler\features\siftvlfeat.py", line 23, in extract
loweGzipFile.write("%s 128\n" % numFeatures)
File "C:\Users\AppData\Local\Continuum\anaconda3\lib\gzip.py", line 260, in write
data = memoryview(data)
TypeError: memoryview: a bytes-like object is required, not 'str'

Crashes with traceback to "no such file or directory".

System specs:

OS: Xubuntu 14.04
Desktop: XFCE 4.10
Package: osm-bunlder (whatever version is found here!)

Description of problem:
On executing the RunBundler.py module using the following syntax:

python RunBundler.py --photos="/home/username/archives/projects.photogammetry/buckle"

...the following output and error messages are given:

---- Error messages begin ----
Cannot create output directory at 
Working directory created: 
BundlerMatching executable path: /media/WD1001_vol-03/programs/osm-bundler-master/software/bundler/KeyMatchFull
Sift executable path: /media/WD1001_vol-03/programs/osm-bundler-master/software/vlfeat/sift

Processing photo 'IMG_7205.JPG':
    Copy of the photo has been scaled down to 1200x900
Traceback (most recent call last):
  File "RunBundler.py", line 9, in <module>
    manager.preparePhotos()
  File "/media/WD1001_vol-03/programs/osm-bundler-master/osmbundler/__init__.py", line 167, in preparePhotos
    self._preparePhoto(photoInfo)
  File "/media/WD1001_vol-03/programs/osm-bundler-master/osmbundler/__init__.py", line 277, in _preparePhoto
    self.extractFeatures(photo)
  File "/media/WD1001_vol-03/programs/osm-bundler-master/osmbundler/__init__.py", line 343, in extractFeatures
    os.chdir(self.workDir)
OSError: [Errno 2] No such file or directory: ''

---- Error messages end ----

Things I have tried:
The library "libANN_char.so" was copied to "/usr/bin", its file permissions set for a normal user, and a path to "/usr/lib" was added to the end of the local ~/.bashrc file as follows:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/

Questions:
1.) Why are these errors happening?
2.) Is there any way to work arround these errors or fix them?

No such file or directory: 'list.rd.txt'

Hi Haiyang,

i encounter another error as below

Performing Bundler2PMVS conversion...
Error opening file list.txt for reading
Error opening file pmvs/bundle.rd.out for reading
Num cameras: 0
Running Bundle2PMVS to generate geometry and converted camera file
Running RadialUndistort to undistort input images
Running Bundle2Vis to generate vis.dat
Traceback (most recent call last):
File "RunPMVS.py", line 10, in
manager.doBundle2PMVS()
File "c:\Users\villa\Desktop\osm-bundler\osm-bundlerWin64\osmpmvs_init_.py", line 86, in doBundle2PMVS
undistortTextFile = open("list.rd.txt", "r")
IOError: [Errno 2] No such file or directory: 'list.rd.txt'

Any idea how to solve it?

Many thanks in advance

FileNotFoundError: [Errno 2]

I'm getting error when running script. I'm using Yosemite 10.10.5. PLEASE HELP!!

image = Image.open('/Users/julianjamison/Desktop/images_code.jpg')
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/PIL/Image.py", line 2410, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/Users/julianjamison/Desktop/images_code.jpg'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.