00001 /* 00002 * Software License Agreement (BSD License) 00003 * 00004 * Copyright (c) 2011, Willow Garage, Inc. 00005 * All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 00011 * * Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * * Redistributions in binary form must reproduce the above 00014 * copyright notice, this list of conditions and the following 00015 * disclaimer in the documentation and/or other materials provided 00016 * with the distribution. 00017 * * Neither the name of Willow Garage, Inc. nor the names of its 00018 * contributors may be used to endorse or promote products derived 00019 * from this software without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00022 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00023 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00024 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00025 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00026 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00027 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00028 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00029 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00030 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00031 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00032 * POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 * Author: Julius Kammerl (julius@kammerl.de) 00035 */ 00036 00037 #ifndef OCTREE_COMPRESSION_PROFILES_H 00038 #define OCTREE_COMPRESSION_PROFILES_H 00039 00040 namespace pcl 00041 { 00042 namespace io 00043 { 00044 00045 enum compression_Profiles_e 00046 { 00047 LOW_RES_ONLINE_COMPRESSION_WITHOUT_COLOR, 00048 LOW_RES_ONLINE_COMPRESSION_WITH_COLOR, 00049 00050 MED_RES_ONLINE_COMPRESSION_WITHOUT_COLOR, 00051 MED_RES_ONLINE_COMPRESSION_WITH_COLOR, 00052 00053 HIGH_RES_ONLINE_COMPRESSION_WITHOUT_COLOR, 00054 HIGH_RES_ONLINE_COMPRESSION_WITH_COLOR, 00055 00056 LOW_RES_OFFLINE_COMPRESSION_WITHOUT_COLOR, 00057 LOW_RES_OFFLINE_COMPRESSION_WITH_COLOR, 00058 00059 MED_RES_OFFLINE_COMPRESSION_WITHOUT_COLOR, 00060 MED_RES_OFFLINE_COMPRESSION_WITH_COLOR, 00061 00062 HIGH_RES_OFFLINE_COMPRESSION_WITHOUT_COLOR, 00063 HIGH_RES_OFFLINE_COMPRESSION_WITH_COLOR, 00064 00065 COMPRESSION_PROFILE_COUNT, 00066 MANUAL_CONFIGURATION 00067 }; 00068 00069 // compression configuration profile 00070 struct configurationProfile_t 00071 { 00072 double pointResolution; 00073 const double octreeResolution; 00074 bool doVoxelGridDownSampling; 00075 unsigned int iFrameRate; 00076 const unsigned char colorBitResolution; 00077 bool doColorEncoding; 00078 }; 00079 00080 // predefined configuration parameters 00081 const struct configurationProfile_t compressionProfiles_[COMPRESSION_PROFILE_COUNT] = { 00082 { 00083 // PROFILE: LOW_RES_ONLINE_COMPRESSION_WITHOUT_COLOR 00084 0.01, /* pointResolution = */ 00085 0.01, /* octreeResolution = */ 00086 true, /* doVoxelGridDownDownSampling = */ 00087 50, /* iFrameRate = */ 00088 4, /* colorBitResolution = */ 00089 false /* doColorEncoding = */ 00090 }, { 00091 // PROFILE: LOW_RES_ONLINE_COMPRESSION_WITH_COLOR 00092 0.01, /* pointResolution = */ 00093 0.01, /* octreeResolution = */ 00094 true, /* doVoxelGridDownDownSampling = */ 00095 50, /* iFrameRate = */ 00096 4, /* colorBitResolution = */ 00097 true /* doColorEncoding = */ 00098 }, { 00099 // PROFILE: MED_RES_ONLINE_COMPRESSION_WITHOUT_COLOR 00100 0.005, /* pointResolution = */ 00101 0.01, /* octreeResolution = */ 00102 false, /* doVoxelGridDownDownSampling = */ 00103 40, /* iFrameRate = */ 00104 5, /* colorBitResolution = */ 00105 false /* doColorEncoding = */ 00106 }, { 00107 // PROFILE: MED_RES_ONLINE_COMPRESSION_WITH_COLOR 00108 0.005, /* pointResolution = */ 00109 0.01, /* octreeResolution = */ 00110 false, /* doVoxelGridDownDownSampling = */ 00111 40, /* iFrameRate = */ 00112 5, /* colorBitResolution = */ 00113 true /* doColorEncoding = */ 00114 }, { 00115 // PROFILE: HIGH_RES_ONLINE_COMPRESSION_WITHOUT_COLOR 00116 0.0001, /* pointResolution = */ 00117 0.01, /* octreeResolution = */ 00118 false, /* doVoxelGridDownDownSampling = */ 00119 30, /* iFrameRate = */ 00120 7, /* colorBitResolution = */ 00121 false /* doColorEncoding = */ 00122 }, { 00123 // PROFILE: HIGH_RES_ONLINE_COMPRESSION_WITH_COLOR 00124 0.0001, /* pointResolution = */ 00125 0.01, /* octreeResolution = */ 00126 false, /* doVoxelGridDownDownSampling = */ 00127 30, /* iFrameRate = */ 00128 7, /* colorBitResolution = */ 00129 true /* doColorEncoding = */ 00130 }, { 00131 // PROFILE: LOW_RES_OFFLINE_COMPRESSION_WITHOUT_COLOR 00132 0.01, /* pointResolution = */ 00133 0.01, /* octreeResolution = */ 00134 true, /* doVoxelGridDownDownSampling = */ 00135 100, /* iFrameRate = */ 00136 4, /* colorBitResolution = */ 00137 false /* doColorEncoding = */ 00138 }, { 00139 // PROFILE: LOW_RES_OFFLINE_COMPRESSION_WITH_COLOR 00140 0.01, /* pointResolution = */ 00141 0.01, /* octreeResolution = */ 00142 true, /* doVoxelGridDownDownSampling = */ 00143 100, /* iFrameRate = */ 00144 4, /* colorBitResolution = */ 00145 true /* doColorEncoding = */ 00146 }, { 00147 // PROFILE: MED_RES_OFFLINE_COMPRESSION_WITHOUT_COLOR 00148 0.005, /* pointResolution = */ 00149 0.005, /* octreeResolution = */ 00150 true, /* doVoxelGridDownDownSampling = */ 00151 100, /* iFrameRate = */ 00152 5, /* colorBitResolution = */ 00153 false /* doColorEncoding = */ 00154 }, { 00155 // PROFILE: MED_RES_OFFLINE_COMPRESSION_WITH_COLOR 00156 0.005, /* pointResolution = */ 00157 0.01, /* octreeResolution = */ 00158 false, /* doVoxelGridDownDownSampling = */ 00159 100, /* iFrameRate = */ 00160 5, /* colorBitResolution = */ 00161 true /* doColorEncoding = */ 00162 }, { 00163 // PROFILE: HIGH_RES_OFFLINE_COMPRESSION_WITHOUT_COLOR 00164 0.0001, /* pointResolution = */ 00165 0.0001, /* octreeResolution = */ 00166 true, /* doVoxelGridDownDownSampling = */ 00167 100, /* iFrameRate = */ 00168 8, /* colorBitResolution = */ 00169 false /* doColorEncoding = */ 00170 }, { 00171 // PROFILE: HIGH_RES_OFFLINE_COMPRESSION_WITH_COLOR 00172 0.0001, /* pointResolution = */ 00173 0.01, /* octreeResolution = */ 00174 false, /* doVoxelGridDownDownSampling = */ 00175 100, /* iFrameRate = */ 00176 8, /* colorBitResolution = */ 00177 true /* doColorEncoding = */ 00178 }}; 00179 00180 } 00181 } 00182 00183 00184 #endif 00185