-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathBUILD.txt
87 lines (79 loc) · 4.08 KB
/
BUILD.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Instructions to build and run the orsa_homography and orsa_fundamental demos.
# BUILD
This project relies on CMake[1] system to build and test the code.
## LINUX/MAC:
```
$ cd .../orsa
$ mkdir Build
$ cd Build
$ cmake -D CMAKE_BUILD_TYPE:string=Release ../src
$ make
$ make test
```
If you target to use an IDE to compile the code:
```
$ cmake -G "CodeBlocks - Unix Makefiles" ../src
```
## WINDOWS:
Launch cmake-gui.exe
Fill the blank path.
"Where is the source code :" (where the general CMakeLists.txt is).
=> orsa/src
"Where to build the binaries:" (where build project and object files will be).
=> orsa/build
Press Configure. (Select your IDE. ie, Visual Studio 10 Win64)
Press Generate.
Go to the orsa/build path.
Launch the Visual Studio solution and compile in release mode.
[1] CMake is a the cross-platform, open-source build system.
CMake is a family of tools designed to build, test and package software.
CMake is used to control the software compilation process using simple
platform and compiler independent configuration files.
CMake generates native makefiles and workspaces that can be used in the
compiler environment of your choice.
http://cmake.org
# USAGE
Go to the build folder. The executables are in the "demo" subfolder.
```
Usage: ./demo/demo_orsa_homography [options] imgInA imgInB allMatches.txt orsaMatches.txt [imgInliers imgOutliers [imgMosaic [imgMosaicA imgMosaicB]]
Usage: ./demo/demo_orsa_fundamental [options] imgInA imgInB [-p|--prec precision] [-s|--sift siftRatio] [-r|--read] allMatches.txt orsaMatches.txt [imgInliers imgOutliers] [imgEpipolar]
- imgInA, imgInB: the two input image (JPG or PNG format)
- allMatches.txt: output (input if option -r) text file of format "x1 y1 x2 y2"
- orsaMatches.txt: output, but only with inliers.
- imgInliers (optional): output image showing inliers
- imgOutliers (optional): output image showing outliers and their error
- imgEpipolar (optional): output image with small epipolar lines
- imgOutliers (optional): output image showing outliers and their error
- imgMosaic (optional): output mosaic image
- imgMosaicA,imgMosaicB (optional): registered images
- -p,--prec precision: max precision (in pixels) of registration (0=arbitrary)
- -s,--sift siftRatio: SIFT distance ratio of descriptors (default: 0.6)
- -r,--read: Read file of matches allMatches.txt, do not compute SIFT points
- -c, --cut=ARG cut region of imagInA: wxh+x+y = rect [x,x+w] x [y,y+h]
- -b, --beta=ARG Beta iteration adjustment parameter (use RANSAC) (default:0.95)
```
Usage of '-b' option disables the ORSA algorithm and performs the regular
RANSAC that maximizes the number of inliers. beta must be within (0,1],
normally close to 1 (beta=1 means no dynamic iteration adjustment). The inlier
threshold should then be input with option '-p' (1 pixel if not input).
# EXAMPLE
Example data are in folder 'data'.
## Try homography estimation
demo_orsa_homography ramparts1.jpg ramparts2.jpg all.txt in.txt in.jpg out.jpg mosaic.jpg
- It should find around 153 inliers among 157 unique matches.
Example of last output lines after a run:
nfa=-670.869 inliers=153 precision=1.57186 im2 (iter=469,sample=142,107,84,124)
Before refinement: RMSE/max error: 0.759469/1.57186
After refinement: RMSE/max error: 0.63038/1.54558
H=[ 1.09237 -0.109262 -162.469; 0.166702 1.048 47.7264; 0.0002101 -3.14086e-05 1 ]
-- Render Mosaic --
- Compare visually the output image mosaic.jpg and reference ramparts12.jpg
## Try fundamental matrix estimation
demo_orsa_fundamental carcassonne1.jpg carcassonne2.jpg all.txt in.txt in.png out.png epi.png
- It should find around 310 inliers among 330 unique matches.
Example of last output lines after a run:
nfa=-647.739 inliers=310 precision=0.902245 im2 (iter=305,sample=147,247,281,116,190,225,60)
Before refinement: RMSE/max error: 0.359732/0.902245
After refinement: RMSE/max error: 0.329296/1.06231
F=[ -8.35895e-10 7.99943e-08 -2.09236e-05; -1.09042e-07 4.38371e-09 0.00136945; 4.07673e-05 -0.00135958 0.0216263 ]
- Compare visually the output images in.png, out.png, and epi.png with the stored PNG images in folder 'data'.