[37] | 1 | % * This code was used in the following articles:
|
---|
| 2 | % * [1] Learning 3-D Scene Structure from a Single Still Image,
|
---|
| 3 | % * Ashutosh Saxena, Min Sun, Andrew Y. Ng,
|
---|
| 4 | % * In ICCV workshop on 3D Representation for Recognition (3dRR-07), 2007.
|
---|
| 5 | % * (best paper)
|
---|
| 6 | % * [2] 3-D Reconstruction from Sparse Views using Monocular Vision,
|
---|
| 7 | % * Ashutosh Saxena, Min Sun, Andrew Y. Ng,
|
---|
| 8 | % * In ICCV workshop on Virtual Representations and Modeling
|
---|
| 9 | % * of Large-scale environments (VRML), 2007.
|
---|
| 10 | % * [3] 3-D Depth Reconstruction from a Single Still Image,
|
---|
| 11 | % * Ashutosh Saxena, Sung H. Chung, Andrew Y. Ng.
|
---|
| 12 | % * International Journal of Computer Vision (IJCV), Aug 2007.
|
---|
| 13 | % * [6] Learning Depth from Single Monocular Images,
|
---|
| 14 | % * Ashutosh Saxena, Sung H. Chung, Andrew Y. Ng.
|
---|
| 15 | % * In Neural Information Processing Systems (NIPS) 18, 2005.
|
---|
| 16 | % *
|
---|
| 17 | % * These articles are available at:
|
---|
| 18 | % * http://make3d.stanford.edu/publications
|
---|
| 19 | % *
|
---|
| 20 | % * We request that you cite the papers [1], [3] and [6] in any of
|
---|
| 21 | % * your reports that uses this code.
|
---|
| 22 | % * Further, if you use the code in image3dstiching/ (multiple image version),
|
---|
| 23 | % * then please cite [2].
|
---|
| 24 | % *
|
---|
| 25 | % * If you use the code in third_party/, then PLEASE CITE and follow the
|
---|
| 26 | % * LICENSE OF THE CORRESPONDING THIRD PARTY CODE.
|
---|
| 27 | % *
|
---|
| 28 | % * Finally, this code is for non-commercial use only. For further
|
---|
| 29 | % * information and to obtain a copy of the license, see
|
---|
| 30 | % *
|
---|
| 31 | % * http://make3d.stanford.edu/publications/code
|
---|
| 32 | % *
|
---|
| 33 | % * Also, the software distributed under the License is distributed on an
|
---|
| 34 | % * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
---|
| 35 | % * express or implied. See the License for the specific language governing
|
---|
| 36 | % * permissions and limitations under the License.
|
---|
| 37 | % *
|
---|
| 38 | % */
|
---|
| 39 | % This script initialize all the parameter |
---|
| 40 | % category include: |
---|
| 41 | % 1) GPS parameter |
---|
| 42 | % 2) camera parameter |
---|
| 43 | % 3) mono-info parameter |
---|
| 44 | % 4) Specified folder |
---|
| 45 | % 5) Features and Matching Parameter |
---|
| 46 | % 6) Optimization parameter |
---|
| 47 | |
---|
| 48 | % 1. GPS parameter |
---|
| 49 | % foun from http://en.wikipedia.org/wiki/Earth_radius |
---|
| 50 | defaultPara.ellip_equatorial_radius = 6378.137e3;%6378.135e3; % in meters |
---|
| 51 | defaultPara.ellip_polar_radius = 6356.75231e3;%6356.750e3;% in meters |
---|
| 52 | |
---|
| 53 | % 2. camera parameter |
---|
| 54 | % Default camera intrinsic parameters (image pixel coordinate) from kyles' data |
---|
| 55 | % assuming camera is horizontal pose (1704 by 2272) |
---|
| 56 | defaultPara.fy = 2400.2091651084; |
---|
| 57 | defaultPara.fx = 2407.3312729885838; |
---|
| 58 | defaultPara.Ox = 1110.7122391785729;%1704/2; |
---|
| 59 | defaultPara.Oy = 833.72104535435108;%2272/2; |
---|
| 60 | defaultPara.InrinsicK1 = [ [defaultPara.fx 0 defaultPara.Ox];... |
---|
| 61 | [0 -defaultPara.fy defaultPara.Oy];... |
---|
| 62 | [0 0 1]]; |
---|
| 63 | defaultPara.InrinsicK2 = defaultPara.InrinsicK1; |
---|
| 64 | defaultPara.R = eye(3); |
---|
| 65 | defaultPara.T = zeros(3,1); |
---|
| 66 | defaultPara.Scale = 1; |
---|
| 67 | |
---|
| 68 | % 3. mono-info parameter |
---|
| 69 | defaultPara.ParaFolder = '/afs/cs/group/reconstruction3d/scratch/Para/'; |
---|
| 70 | defaultPara.taskName = ''; |
---|
| 71 | defaultPara.Flag = Flag; |
---|
| 72 | defaultPara.Flag.DisplayFlag = 0; |
---|
| 73 | defaultPara.Flag.IntermediateStorage = 0; |
---|
| 74 | defaultPara.Flag.FeaturesOnly = 0; |
---|
| 75 | defaultPara.Flag.NormalizeFlag = 1; |
---|
| 76 | defaultPara.Flag.BeforeInferenceStorage = 1; |
---|
| 77 | defaultPara.Flag.NonInference = 0; |
---|
| 78 | defaultPara.Flag.AfterInferenceStorage = 1; |
---|
| 79 | defaultPara.Flag.FeatureStorage = 0; |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | % 4. Specified folder |
---|
| 84 | defaultPara.Fdir = Fdir; |
---|
| 85 | defaultPara.ScratchFolder = [Fdir '/data/']; |
---|
| 86 | %defaultPara.ScratchFolder = '/afs/cs/group/reconstruction3d/scratch/temp'; |
---|
| 87 | %defaultPara.OutPutFolder = '/afs/cs/group/reconstruction3d/scratch/3DmodelMultipleImage/'; |
---|
| 88 | defaultPara.OutPutFolder = [Fdir '/Wrl/'];%defaultPara.ScratchFolder; |
---|
| 89 | |
---|
| 90 | % 5. Features and Matching Parameter |
---|
| 91 | defaultPara.Type = '_RConS'; |
---|
| 92 | |
---|
| 93 | % 6. Optimization parameter |
---|
| 94 | defaultPara.TriLeastSquare = 1; |
---|
| 95 | defaultPara.opt = sdpsettings('solver','sedumi','cachesolvers',1,'removeequalities',2,'verbose',0); |
---|
| 96 | |
---|
| 97 | % 7. Rendering Parameter |
---|
| 98 | defaultPara.Wrlname = 'Multi'; |
---|
| 99 | defaultPara.RenderFlag = true; |
---|
| 100 | |
---|
| 101 | % surf and matching parameter |
---|
| 102 | defaultPara.AbsThre = 0.2; |
---|
| 103 | defaultPara.RatioThre = 0.6; |
---|
| 104 | defaultPara.VertVar = 0.25;% in percentage |
---|
| 105 | defaultPara.MaxRatio = 300; %Min changed |
---|
| 106 | defaultPara.MinimumNumMatches = 50; |
---|
| 107 | defaultPara.ReProjErrorThre = 1; |
---|
| 108 | defaultPara.NegativeDepthTolerence = 0.5; |
---|
| 109 | defaultPara.surf.SparseThre = 30000; |
---|
| 110 | defaultPara.surf.DenseThre = 15000; |
---|
| 111 | defaultPara.OccluDistThre = 10; % occlusion bigger than defaultPara.OccluDistThre then triangulate |
---|
| 112 | defaultPara.radius2imageSizeRatio = 100; % used by CalMatchDensityWeights.m |
---|
| 113 | |
---|
| 114 | % Ransac |
---|
| 115 | defaultPara.MAXEnsembleSamples = 10000; |
---|
| 116 | |
---|
| 117 | % Model parameter |
---|
| 118 | defaultPara.InitialDepth = 'RawDepth'; |
---|
| 119 | defaultPara.FarestDist = 1e3; % Do not model structure lkm away from the camera |
---|
| 120 | defaultPara.Closestdist = 1; % Do not model structure 1m away from the camera |
---|
| 121 | |
---|
| 122 | % other |
---|
| 123 | %defaultPara.FlagFirstPair = 1; |
---|
| 124 | defaultPara.LastImgFlag = 0; |
---|
| 125 | |
---|
| 126 | % Refinement Thre |
---|
| 127 | defaultPara.CoeffMThre = 0.8; |
---|
| 128 | defaultPara.ResidualThre = 5; |
---|
| 129 | defaultPara.coeffratioThre = 0.8; |
---|
| 130 | defaultPara.PostFixStrAfter = 'PairNew'; |
---|
| 131 | defaultPara.MaxUniqueRatio = 50; |
---|
| 132 | defaultPara.OcclusionRatioThre = 1.1; |
---|