[37] | 1 | /* |
---|
| 2 | |
---|
| 3 | Brian Curless |
---|
| 4 | |
---|
| 5 | Computer Graphics Laboratory |
---|
| 6 | Stanford University |
---|
| 7 | |
---|
| 8 | --------------------------------------------------------------------- |
---|
| 9 | |
---|
| 10 | Copyright (1997) The Board of Trustees of the Leland Stanford Junior |
---|
| 11 | University. Except for commercial resale, lease, license or other |
---|
| 12 | commercial transactions, permission is hereby given to use, copy, |
---|
| 13 | modify this software for academic purposes only. No part of this |
---|
| 14 | software or any derivatives thereof may be used in the production of |
---|
| 15 | computer models for resale or for use in a commercial |
---|
| 16 | product. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND |
---|
| 17 | CONCERNING THIS SOFTWARE. No support is implied or provided. |
---|
| 18 | |
---|
| 19 | */ |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | #include "Linear.h" |
---|
| 23 | #include "defines.h" |
---|
| 24 | #include "OccGrid.h" |
---|
| 25 | #include "OccGridRLE.h" |
---|
| 26 | #include "OccGridNormRLE.h" |
---|
| 27 | #include "DepthMap.h" |
---|
| 28 | |
---|
| 29 | int SuperQuiet = FALSE; |
---|
| 30 | int Quiet = FALSE; |
---|
| 31 | int Verbose = FALSE; |
---|
| 32 | int Warn = FALSE; |
---|
| 33 | int MeshResolution = 1; |
---|
| 34 | int UseTails = FALSE; |
---|
| 35 | int TailsOnly = FALSE; |
---|
| 36 | int FillGaps = FALSE; |
---|
| 37 | int FillBackground = FALSE; |
---|
| 38 | int DoSilhouette = FALSE; |
---|
| 39 | int ShowNormals = FALSE; |
---|
| 40 | int ShowConfSlice = FALSE; |
---|
| 41 | int ShowValueWeight = FALSE; |
---|
| 42 | |
---|
| 43 | int OneLineAtATime = FALSE; |
---|
| 44 | |
---|
| 45 | float LASER_LINE_DIR_X = 1; |
---|
| 46 | float LASER_LINE_DIR_Y = 0; |
---|
| 47 | float LASER_LINE_DIR_Z = 0; |
---|
| 48 | |
---|
| 49 | float LASER_LINE_AT_T0_X = 0; |
---|
| 50 | float LASER_LINE_AT_T0_Y = 0.15920981547868; |
---|
| 51 | float LASER_LINE_AT_T0_Z = 1.22793387875641; |
---|
| 52 | |
---|
| 53 | int UsePerspectiveDir = 0; |
---|
| 54 | Vec3f PerspectiveCOP(0,0,0); |
---|
| 55 | Vec3f PerspectiveDir(0,0,-1); |
---|
| 56 | |
---|
| 57 | int MaxStepsToEdge; |
---|
| 58 | float EdgeLength; |
---|
| 59 | float MinViewDot = 0.15; |
---|
| 60 | float MaxEdgeLength = 0.003; |
---|
| 61 | uchar MinColor = 0; |
---|
| 62 | int UseEdgeLength = 0; |
---|
| 63 | float EdgeExtensionAngle = 45; |
---|
| 64 | int EdgeExtensionSamples = 3; |
---|
| 65 | float ConfidenceExponent = 2.0; |
---|
| 66 | float EdgeConfExponent = 1; |
---|
| 67 | unsigned char MinWeight = 0; |
---|
| 68 | int EdgeConfSteps = 8; |
---|
| 69 | unsigned char MinEdgeConfidence = 10; |
---|
| 70 | unsigned char ConfidenceBias = 1; |
---|
| 71 | float MinVertexConfidence = 10/255.0; |
---|
| 72 | float OccupancyRampWidth = 0.002; |
---|
| 73 | float WeightPos1 = OccupancyRampWidth/2 + 0.002; |
---|
| 74 | float WeightPos2 = WeightPos1 - 0.0005; |
---|
| 75 | float WeightPos3 = -OccupancyRampWidth/2; |
---|
| 76 | float WeightPos4 = WeightPos3 - 0.0005; |
---|
| 77 | float WeightPos5 = WeightPos4 - 0.0005; |
---|
| 78 | |
---|
| 79 | OccGrid *theGrid; |
---|
| 80 | OccGridRLE *backRLEGrid; |
---|
| 81 | OccGridRLE *frontRLEGrid; |
---|
| 82 | OccGridNormRLE *backRLEGridNorm; |
---|
| 83 | OccGridNormRLE *frontRLEGridNorm; |
---|
| 84 | DepthMap *theDepthMap; |
---|
| 85 | |
---|
| 86 | float D1, D2, M_VALUE, B_VALUE; |
---|
| 87 | float C1, C2, C3, C4, C5; |
---|
| 88 | float M_WEIGHT_1, M_WEIGHT_2, B_WEIGHT_1, B_WEIGHT_2; |
---|
| 89 | float MAX_STRETCH; |
---|
| 90 | float MAX_DEPTH_DIFFERENCE; |
---|
| 91 | |
---|
| 92 | float MergeTime = 0; |
---|
| 93 | float TesselationTime = 0; |
---|
| 94 | float ResampleRangeTime = 0; |
---|