00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifdef HAVE_CONFIG_H
00039 #include "config.h"
00040 #endif
00041
00042 #include <stdio.h>
00043 #include <stdlib.h>
00044 #include <string.h>
00045
00046 #include "getopt.h"
00047
00048 #include "LaneDetectorOpt.h"
00049
00050 const char *LaneDetectorParserInfo_purpose = "";
00051
00052 const char *LaneDetectorParserInfo_usage = "Usage: LaneDetector [OPTIONS]...";
00053
00054 const char *LaneDetectorParserInfo_help[] = {
00055 " -h, --help Print help and exit",
00056 " -V, --version Print version and exit",
00057 " --ipmWidth=INT width of IPM image to use",
00058 " --ipmHeight=INT height of IPM image to use",
00059 " --ipmTop=INT Top point in original image of region to make \n IPM for",
00060 " --ipmLeft=INT Left point in original image of region to make \n IPM for",
00061 " --ipmRight=INT Right point in original image region to make \n IPM for",
00062 " --ipmBottom=INT Bottom point in original image region to make \n IPM for",
00063 " --ipmInterpolation=INT The method to use for IPM interpolation",
00064 " --lineWidth=DOUBLE width of line to detect in mm (in the world)",
00065 " --lineHeight=DOUBLE height of line to detect in mm (in the world)",
00066 " --kernelWidth=INT widht of kernel to use for filtering",
00067 " --kernelHeight=INT Height of kernel to use for filtering",
00068 " --lowerQuantile=DOUBLE lower quantile to use for thresholding the \n filtered image",
00069 " --localMaxima=INT whether to return local maxima or just the \n maximum",
00070 " --groupingType=INT type of grouping to use (default 0: HV lines)",
00071 " --binarize=DOUBLE whether to binarize the thresholded image or \n use the raw values",
00072 " --detectionThreshold=DOUBLE\n threshold for line scores to declare as line",
00073 " --smoothScores=INT whether to smooth scores of lines detected or \n not",
00074 " --rMin=DOUBLE rMin for Hough transform (in pixels)",
00075 " --rMax=DOUBLE rMax for Hough transform (in pixels)",
00076 " --rStep=DOUBLE rStep for Hough transform (in pixels)",
00077 " --thetaMin=DOUBLE thetaMin for Hough transform (in degrees)",
00078 " --thetaMax=DOUBLE thetaMax for Hough transform (in degrees)",
00079 " --thetaStep=DOUBLE thetaStep for Hough transform (in degrees)",
00080 " --ipmVpPortion=DOUBLE Portion of IPM image height to add to \n y-coordinate of VP",
00081 " --getEndPoints=INT Get the endpoints of the line",
00082 " --group=INT group nearby lines or not (default 1: group)",
00083 " --groupThreshold=DOUBLE Threshold for grouping nearby lines (default \n 10)",
00084 " --ransac=INT use RANSAC (1) or not (0)",
00085 " --ransacLineNumSamples=INT\n Number of samples to use for RANSAC",
00086 " --ransacLineNumIterations=INT\n Number of iterations to use for RANSAC",
00087 " --ransacLineNumGoodFit=INT\n Number of close points to consider a good line \n fit",
00088 " --ransacLineThreshold=DOUBLE\n Threshold to consider a point close",
00089 " --ransacLineScoreThreshold=DOUBLE\n Threshold for detected line scores",
00090 " --ransacLineBinarize=INT Whether to binarize image for RANSAC or not",
00091 " --ransacLineWindow=INT Half width to use for ransac window",
00092 " --ransacSplineNumSamples=INT\n Number of samples to use for RANSAC",
00093 " --ransacSplineNumIterations=INT\n Number of iterations to use for RANSAC",
00094 " --ransacSplineNumGoodFit=INT\n Number of close points to consider a good line \n fit",
00095 " --ransacSplineThreshold=DOUBLE\n Threshold to consider a point close",
00096 " --ransacSplineScoreThreshold=DOUBLE\n Threshold for detected line scores",
00097 " --ransacSplineBinarize=INT\n Whether to binarize image for RANSAC or not",
00098 " --ransacSplineWindow=INT Half width to use for ransac window",
00099 " --ransacSplineDegree=INT Degree of spline to use",
00100 " --ransacSpline=INT Whether to use splines",
00101 " --ransacLine=INT Whether to use lines",
00102 " --ransacSplineStep=FLOAT Step to use when pixelzing spline in ransac",
00103 " --overlapThreshold=FLOAT Overlap threshold to use for grouping of \n bounding boxes",
00104 " --localizeAngleThreshold=FLOAT\n Angle threshold used for localization (cosine, \n 1: most restrictive, 0: most liberal)",
00105 " --localizeNumLinePixels=INT\n Number of pixels to go in normal direction for \n localization",
00106 " --extendAngleThreshold=FLOAT\n Angle threshold used for extending (cosine, 1: \n most restrictive, 0: most liberal)",
00107 " --extendMeanDirAngleThreshold=FLOAT\n Angle threshold from mean direction used for \n extending (cosine, 1: most restrictive, 0: \n most liberal)",
00108 " --extendLinePixelsTangent=INT\n Number of pixels to go in tangent direction for \n extending",
00109 " --extendLinePixelsNormal=INT\n Number of pixels to go in tangent direction for \n extending",
00110 " --extendContThreshold=FLOAT\n Threhsold used for stopping the extending \n process (higher -> less extending)",
00111 " --extendDeviationThreshold=INT\n Stop extending when number of deviating points \n exceeds this threshold",
00112 " --extendRectTop=INT Top point for extension bounding box",
00113 " --extendRectBottom=INT Bottom point for extension bounding box",
00114 " --extendIPMAngleThreshold=FLOAT\n Angle threshold used for extending (cosine, 1: \n most restrictive, 0: most liberal)",
00115 " --extendIPMMeanDirAngleThreshold=FLOAT\n Angle threshold from mean direction used for \n extending (cosine, 1: most restrictive, 0: \n most liberal)",
00116 " --extendIPMLinePixelsTangent=INT\n Number of pixels to go in tangent direction for \n extending",
00117 " --extendIPMLinePixelsNormal=INT\n Number of pixels to go in tangent direction for \n extending",
00118 " --extendIPMContThreshold=FLOAT\n Threhsold used for stopping the extending \n process (higher -> less extending)",
00119 " --extendIPMDeviationThreshold=INT\n Stop extending when number of deviating points \n exceeds this threshold",
00120 " --extendIPMRectTop=INT Top point for extension bounding box",
00121 " --extendIPMRectBottom=INT Bottom point for extension bounding box",
00122 " --splineScoreJitter=INT Number of pixels to go around the spline to \n compute score",
00123 " --splineScoreLengthRatio=FLOAT\n Ratio of spline length to use",
00124 " --splineScoreAngleRatio=FLOAT\n Ratio of spline angle to use",
00125 " --splineScoreStep=FLOAT Step to use for spline score computation",
00126 " --splineTrackingNumAbsentFrames=INT\n number of frames the track is allowed to be \n absent before deleting it",
00127 " --splineTrackingNumSeenFrames=INT\n number of frames before considering the track \n good",
00128 " --mergeSplineThetaThreshold=FLOAT\n Angle threshold for merging splines (radians)",
00129 " --mergeSplineRThreshold=FLOAT\n R threshold (distance from origin) for merginn \n splines",
00130 " --mergeSplineMeanThetaThreshold=FLOAT\n Mean Angle threshold for merging splines \n (radians)",
00131 " --mergeSplineMeanRThreshold=FLOAT\n Mean R threshold (distance from origin) for \n merginn splines",
00132 " --mergeSplineCentroidThreshold=FLOAT\n Distance threshold between spline cetroids for \n merging",
00133 " --lineTrackingNumAbsentFrames=INT\n number of frames the track is allowed to be \n absent before deleting it",
00134 " --lineTrackingNumSeenFrames=INT\n number of frames before considering the track \n good",
00135 " --mergeLineThetaThreshold=FLOAT\n Angle threshold for merging lines (radians)",
00136 " --mergeLineRThreshold=FLOAT\n R threshold (distance from origin) for merging \n lines",
00137 " --numStrips=INT Number of horizontal strips to divide the image \n to",
00138 " --checkSplines=INT Whtethet to check splines or not",
00139 " --checkSplinesCurvenessThreshold=FLOAT\n Curveness Threshold for checking splines",
00140 " --checkSplinesLengthThreshold=FLOAT\n Length Threshold for checking splines",
00141 " --checkSplinesThetaDiffThreshold=FLOAT\n ThetaDiff Threshold for checking splines",
00142 " --checkSplinesThetaThreshold=FLOAT\n ThetaThreshold Threshold for checking splines",
00143 " --checkIPMSplines=INT Whtethet to check IPM splines or not",
00144 " --checkIPMSplinesCurvenessThreshold=FLOAT\n Curveness Threshold for checking splines",
00145 " --checkIPMSplinesLengthThreshold=FLOAT\n Length Threshold for checking splines",
00146 " --checkIPMSplinesThetaDiffThreshold=FLOAT\n ThetaDiff Threshold for checking splines",
00147 " --checkIPMSplinesThetaThreshold=FLOAT\n ThetaThreshold Threshold for checking splines",
00148 " --finalSplineScoreThreshold=FLOAT\n Final Threshold for declaring a valid spline",
00149 " --useGroundPlane=INT Use groudn plane or not when sending to map",
00150 " --checkColor=INT Whether to check colors or not",
00151 " --checkColorWindow=INT Size of window to use",
00152 " --checkColorNumBins=INT Number of bins to use",
00153 " --checkColorNumYellowMin=FLOAT\n Min ratio of yellow points",
00154 " --checkColorRGMin=FLOAT Min RG diff",
00155 " --checkColorRGMax=FLOAT Max RG diff",
00156 " --checkColorGBMin=FLOAT Min GB diff",
00157 " --checkColorRBMin=FLOAT Min RB diff",
00158 " --checkColorRBFThreshold=FLOAT\n RBF Threshold",
00159 " --checkColorRBF=INT Whether to use RBF or not",
00160 " --ipmWindowClear=INT Whether to clear part of the IPM image",
00161 " --ipmWindowLeft=INT Left corrdinate of window to keep in IPM",
00162 " --ipmWindowRight=INT Left corrdinate of window to keep in IPM",
00163 " --checkLaneWidth=INT Whether to check lane width or not",
00164 " --checkLaneWidthMean=FLOAT\n Mean of lane width to look for",
00165 " --checkLaneWidthStd=FLOAT Std deviation of lane width to look for",
00166 0
00167 };
00168
00169 static
00170 void clear_given (struct LaneDetectorParserInfo *args_info);
00171 static
00172 void clear_args (struct LaneDetectorParserInfo *args_info);
00173
00174 static int
00175 LaneDetectorParser_internal (int argc, char * const *argv, struct LaneDetectorParserInfo *args_info, int override, int initialize, int check_required, const char *additional_error);
00176
00177 static int
00178 LaneDetectorParser_required2 (struct LaneDetectorParserInfo *args_info, const char *prog_name, const char *additional_error);
00179 struct line_list
00180 {
00181 char * string_arg;
00182 struct line_list * next;
00183 };
00184
00185 static struct line_list *cmd_line_list = 0;
00186 static struct line_list *cmd_line_list_tmp = 0;
00187
00188 static void
00189 free_cmd_list(void)
00190 {
00191
00192 if (cmd_line_list)
00193 {
00194 while (cmd_line_list) {
00195 cmd_line_list_tmp = cmd_line_list;
00196 cmd_line_list = cmd_line_list->next;
00197 free (cmd_line_list_tmp->string_arg);
00198 free (cmd_line_list_tmp);
00199 }
00200 }
00201 }
00202
00203
00204 static char *
00205 gengetopt_strdup (const char *s);
00206
00207 static
00208 void clear_given (struct LaneDetectorParserInfo *args_info)
00209 {
00210 args_info->help_given = 0 ;
00211 args_info->version_given = 0 ;
00212 args_info->ipmWidth_given = 0 ;
00213 args_info->ipmHeight_given = 0 ;
00214 args_info->ipmTop_given = 0 ;
00215 args_info->ipmLeft_given = 0 ;
00216 args_info->ipmRight_given = 0 ;
00217 args_info->ipmBottom_given = 0 ;
00218 args_info->ipmInterpolation_given = 0 ;
00219 args_info->lineWidth_given = 0 ;
00220 args_info->lineHeight_given = 0 ;
00221 args_info->kernelWidth_given = 0 ;
00222 args_info->kernelHeight_given = 0 ;
00223 args_info->lowerQuantile_given = 0 ;
00224 args_info->localMaxima_given = 0 ;
00225 args_info->groupingType_given = 0 ;
00226 args_info->binarize_given = 0 ;
00227 args_info->detectionThreshold_given = 0 ;
00228 args_info->smoothScores_given = 0 ;
00229 args_info->rMin_given = 0 ;
00230 args_info->rMax_given = 0 ;
00231 args_info->rStep_given = 0 ;
00232 args_info->thetaMin_given = 0 ;
00233 args_info->thetaMax_given = 0 ;
00234 args_info->thetaStep_given = 0 ;
00235 args_info->ipmVpPortion_given = 0 ;
00236 args_info->getEndPoints_given = 0 ;
00237 args_info->group_given = 0 ;
00238 args_info->groupThreshold_given = 0 ;
00239 args_info->ransac_given = 0 ;
00240 args_info->ransacLineNumSamples_given = 0 ;
00241 args_info->ransacLineNumIterations_given = 0 ;
00242 args_info->ransacLineNumGoodFit_given = 0 ;
00243 args_info->ransacLineThreshold_given = 0 ;
00244 args_info->ransacLineScoreThreshold_given = 0 ;
00245 args_info->ransacLineBinarize_given = 0 ;
00246 args_info->ransacLineWindow_given = 0 ;
00247 args_info->ransacSplineNumSamples_given = 0 ;
00248 args_info->ransacSplineNumIterations_given = 0 ;
00249 args_info->ransacSplineNumGoodFit_given = 0 ;
00250 args_info->ransacSplineThreshold_given = 0 ;
00251 args_info->ransacSplineScoreThreshold_given = 0 ;
00252 args_info->ransacSplineBinarize_given = 0 ;
00253 args_info->ransacSplineWindow_given = 0 ;
00254 args_info->ransacSplineDegree_given = 0 ;
00255 args_info->ransacSpline_given = 0 ;
00256 args_info->ransacLine_given = 0 ;
00257 args_info->ransacSplineStep_given = 0 ;
00258 args_info->overlapThreshold_given = 0 ;
00259 args_info->localizeAngleThreshold_given = 0 ;
00260 args_info->localizeNumLinePixels_given = 0 ;
00261 args_info->extendAngleThreshold_given = 0 ;
00262 args_info->extendMeanDirAngleThreshold_given = 0 ;
00263 args_info->extendLinePixelsTangent_given = 0 ;
00264 args_info->extendLinePixelsNormal_given = 0 ;
00265 args_info->extendContThreshold_given = 0 ;
00266 args_info->extendDeviationThreshold_given = 0 ;
00267 args_info->extendRectTop_given = 0 ;
00268 args_info->extendRectBottom_given = 0 ;
00269 args_info->extendIPMAngleThreshold_given = 0 ;
00270 args_info->extendIPMMeanDirAngleThreshold_given = 0 ;
00271 args_info->extendIPMLinePixelsTangent_given = 0 ;
00272 args_info->extendIPMLinePixelsNormal_given = 0 ;
00273 args_info->extendIPMContThreshold_given = 0 ;
00274 args_info->extendIPMDeviationThreshold_given = 0 ;
00275 args_info->extendIPMRectTop_given = 0 ;
00276 args_info->extendIPMRectBottom_given = 0 ;
00277 args_info->splineScoreJitter_given = 0 ;
00278 args_info->splineScoreLengthRatio_given = 0 ;
00279 args_info->splineScoreAngleRatio_given = 0 ;
00280 args_info->splineScoreStep_given = 0 ;
00281 args_info->splineTrackingNumAbsentFrames_given = 0 ;
00282 args_info->splineTrackingNumSeenFrames_given = 0 ;
00283 args_info->mergeSplineThetaThreshold_given = 0 ;
00284 args_info->mergeSplineRThreshold_given = 0 ;
00285 args_info->mergeSplineMeanThetaThreshold_given = 0 ;
00286 args_info->mergeSplineMeanRThreshold_given = 0 ;
00287 args_info->mergeSplineCentroidThreshold_given = 0 ;
00288 args_info->lineTrackingNumAbsentFrames_given = 0 ;
00289 args_info->lineTrackingNumSeenFrames_given = 0 ;
00290 args_info->mergeLineThetaThreshold_given = 0 ;
00291 args_info->mergeLineRThreshold_given = 0 ;
00292 args_info->numStrips_given = 0 ;
00293 args_info->checkSplines_given = 0 ;
00294 args_info->checkSplinesCurvenessThreshold_given = 0 ;
00295 args_info->checkSplinesLengthThreshold_given = 0 ;
00296 args_info->checkSplinesThetaDiffThreshold_given = 0 ;
00297 args_info->checkSplinesThetaThreshold_given = 0 ;
00298 args_info->checkIPMSplines_given = 0 ;
00299 args_info->checkIPMSplinesCurvenessThreshold_given = 0 ;
00300 args_info->checkIPMSplinesLengthThreshold_given = 0 ;
00301 args_info->checkIPMSplinesThetaDiffThreshold_given = 0 ;
00302 args_info->checkIPMSplinesThetaThreshold_given = 0 ;
00303 args_info->finalSplineScoreThreshold_given = 0 ;
00304 args_info->useGroundPlane_given = 0 ;
00305 args_info->checkColor_given = 0 ;
00306 args_info->checkColorWindow_given = 0 ;
00307 args_info->checkColorNumBins_given = 0 ;
00308 args_info->checkColorNumYellowMin_given = 0 ;
00309 args_info->checkColorRGMin_given = 0 ;
00310 args_info->checkColorRGMax_given = 0 ;
00311 args_info->checkColorGBMin_given = 0 ;
00312 args_info->checkColorRBMin_given = 0 ;
00313 args_info->checkColorRBFThreshold_given = 0 ;
00314 args_info->checkColorRBF_given = 0 ;
00315 args_info->ipmWindowClear_given = 0 ;
00316 args_info->ipmWindowLeft_given = 0 ;
00317 args_info->ipmWindowRight_given = 0 ;
00318 args_info->checkLaneWidth_given = 0 ;
00319 args_info->checkLaneWidthMean_given = 0 ;
00320 args_info->checkLaneWidthStd_given = 0 ;
00321 }
00322
00323 static
00324 void clear_args (struct LaneDetectorParserInfo *args_info)
00325 {
00326 args_info->ipmWidth_orig = NULL;
00327 args_info->ipmHeight_orig = NULL;
00328 args_info->ipmTop_orig = NULL;
00329 args_info->ipmLeft_orig = NULL;
00330 args_info->ipmRight_orig = NULL;
00331 args_info->ipmBottom_orig = NULL;
00332 args_info->ipmInterpolation_orig = NULL;
00333 args_info->lineWidth_orig = NULL;
00334 args_info->lineHeight_orig = NULL;
00335 args_info->kernelWidth_orig = NULL;
00336 args_info->kernelHeight_orig = NULL;
00337 args_info->lowerQuantile_orig = NULL;
00338 args_info->localMaxima_orig = NULL;
00339 args_info->groupingType_orig = NULL;
00340 args_info->binarize_orig = NULL;
00341 args_info->detectionThreshold_orig = NULL;
00342 args_info->smoothScores_orig = NULL;
00343 args_info->rMin_orig = NULL;
00344 args_info->rMax_orig = NULL;
00345 args_info->rStep_orig = NULL;
00346 args_info->thetaMin_orig = NULL;
00347 args_info->thetaMax_orig = NULL;
00348 args_info->thetaStep_orig = NULL;
00349 args_info->ipmVpPortion_orig = NULL;
00350 args_info->getEndPoints_orig = NULL;
00351 args_info->group_orig = NULL;
00352 args_info->groupThreshold_orig = NULL;
00353 args_info->ransac_orig = NULL;
00354 args_info->ransacLineNumSamples_orig = NULL;
00355 args_info->ransacLineNumIterations_orig = NULL;
00356 args_info->ransacLineNumGoodFit_orig = NULL;
00357 args_info->ransacLineThreshold_orig = NULL;
00358 args_info->ransacLineScoreThreshold_orig = NULL;
00359 args_info->ransacLineBinarize_orig = NULL;
00360 args_info->ransacLineWindow_orig = NULL;
00361 args_info->ransacSplineNumSamples_orig = NULL;
00362 args_info->ransacSplineNumIterations_orig = NULL;
00363 args_info->ransacSplineNumGoodFit_orig = NULL;
00364 args_info->ransacSplineThreshold_orig = NULL;
00365 args_info->ransacSplineScoreThreshold_orig = NULL;
00366 args_info->ransacSplineBinarize_orig = NULL;
00367 args_info->ransacSplineWindow_orig = NULL;
00368 args_info->ransacSplineDegree_orig = NULL;
00369 args_info->ransacSpline_orig = NULL;
00370 args_info->ransacLine_orig = NULL;
00371 args_info->ransacSplineStep_orig = NULL;
00372 args_info->overlapThreshold_orig = NULL;
00373 args_info->localizeAngleThreshold_orig = NULL;
00374 args_info->localizeNumLinePixels_orig = NULL;
00375 args_info->extendAngleThreshold_orig = NULL;
00376 args_info->extendMeanDirAngleThreshold_orig = NULL;
00377 args_info->extendLinePixelsTangent_orig = NULL;
00378 args_info->extendLinePixelsNormal_orig = NULL;
00379 args_info->extendContThreshold_orig = NULL;
00380 args_info->extendDeviationThreshold_orig = NULL;
00381 args_info->extendRectTop_orig = NULL;
00382 args_info->extendRectBottom_orig = NULL;
00383 args_info->extendIPMAngleThreshold_orig = NULL;
00384 args_info->extendIPMMeanDirAngleThreshold_orig = NULL;
00385 args_info->extendIPMLinePixelsTangent_orig = NULL;
00386 args_info->extendIPMLinePixelsNormal_orig = NULL;
00387 args_info->extendIPMContThreshold_orig = NULL;
00388 args_info->extendIPMDeviationThreshold_orig = NULL;
00389 args_info->extendIPMRectTop_orig = NULL;
00390 args_info->extendIPMRectBottom_orig = NULL;
00391 args_info->splineScoreJitter_orig = NULL;
00392 args_info->splineScoreLengthRatio_orig = NULL;
00393 args_info->splineScoreAngleRatio_orig = NULL;
00394 args_info->splineScoreStep_orig = NULL;
00395 args_info->splineTrackingNumAbsentFrames_orig = NULL;
00396 args_info->splineTrackingNumSeenFrames_orig = NULL;
00397 args_info->mergeSplineThetaThreshold_orig = NULL;
00398 args_info->mergeSplineRThreshold_orig = NULL;
00399 args_info->mergeSplineMeanThetaThreshold_orig = NULL;
00400 args_info->mergeSplineMeanRThreshold_orig = NULL;
00401 args_info->mergeSplineCentroidThreshold_orig = NULL;
00402 args_info->lineTrackingNumAbsentFrames_orig = NULL;
00403 args_info->lineTrackingNumSeenFrames_orig = NULL;
00404 args_info->mergeLineThetaThreshold_orig = NULL;
00405 args_info->mergeLineRThreshold_orig = NULL;
00406 args_info->numStrips_orig = NULL;
00407 args_info->checkSplines_orig = NULL;
00408 args_info->checkSplinesCurvenessThreshold_orig = NULL;
00409 args_info->checkSplinesLengthThreshold_orig = NULL;
00410 args_info->checkSplinesThetaDiffThreshold_orig = NULL;
00411 args_info->checkSplinesThetaThreshold_orig = NULL;
00412 args_info->checkIPMSplines_orig = NULL;
00413 args_info->checkIPMSplinesCurvenessThreshold_orig = NULL;
00414 args_info->checkIPMSplinesLengthThreshold_orig = NULL;
00415 args_info->checkIPMSplinesThetaDiffThreshold_orig = NULL;
00416 args_info->checkIPMSplinesThetaThreshold_orig = NULL;
00417 args_info->finalSplineScoreThreshold_orig = NULL;
00418 args_info->useGroundPlane_orig = NULL;
00419 args_info->checkColor_orig = NULL;
00420 args_info->checkColorWindow_orig = NULL;
00421 args_info->checkColorNumBins_orig = NULL;
00422 args_info->checkColorNumYellowMin_orig = NULL;
00423 args_info->checkColorRGMin_orig = NULL;
00424 args_info->checkColorRGMax_orig = NULL;
00425 args_info->checkColorGBMin_orig = NULL;
00426 args_info->checkColorRBMin_orig = NULL;
00427 args_info->checkColorRBFThreshold_orig = NULL;
00428 args_info->checkColorRBF_orig = NULL;
00429 args_info->ipmWindowClear_orig = NULL;
00430 args_info->ipmWindowLeft_orig = NULL;
00431 args_info->ipmWindowRight_orig = NULL;
00432 args_info->checkLaneWidth_orig = NULL;
00433 args_info->checkLaneWidthMean_orig = NULL;
00434 args_info->checkLaneWidthStd_orig = NULL;
00435
00436 }
00437
00438 static
00439 void init_args_info(struct LaneDetectorParserInfo *args_info)
00440 {
00441 args_info->help_help = LaneDetectorParserInfo_help[0] ;
00442 args_info->version_help = LaneDetectorParserInfo_help[1] ;
00443 args_info->ipmWidth_help = LaneDetectorParserInfo_help[2] ;
00444 args_info->ipmHeight_help = LaneDetectorParserInfo_help[3] ;
00445 args_info->ipmTop_help = LaneDetectorParserInfo_help[4] ;
00446 args_info->ipmLeft_help = LaneDetectorParserInfo_help[5] ;
00447 args_info->ipmRight_help = LaneDetectorParserInfo_help[6] ;
00448 args_info->ipmBottom_help = LaneDetectorParserInfo_help[7] ;
00449 args_info->ipmInterpolation_help = LaneDetectorParserInfo_help[8] ;
00450 args_info->lineWidth_help = LaneDetectorParserInfo_help[9] ;
00451 args_info->lineHeight_help = LaneDetectorParserInfo_help[10] ;
00452 args_info->kernelWidth_help = LaneDetectorParserInfo_help[11] ;
00453 args_info->kernelHeight_help = LaneDetectorParserInfo_help[12] ;
00454 args_info->lowerQuantile_help = LaneDetectorParserInfo_help[13] ;
00455 args_info->localMaxima_help = LaneDetectorParserInfo_help[14] ;
00456 args_info->groupingType_help = LaneDetectorParserInfo_help[15] ;
00457 args_info->binarize_help = LaneDetectorParserInfo_help[16] ;
00458 args_info->detectionThreshold_help = LaneDetectorParserInfo_help[17] ;
00459 args_info->smoothScores_help = LaneDetectorParserInfo_help[18] ;
00460 args_info->rMin_help = LaneDetectorParserInfo_help[19] ;
00461 args_info->rMax_help = LaneDetectorParserInfo_help[20] ;
00462 args_info->rStep_help = LaneDetectorParserInfo_help[21] ;
00463 args_info->thetaMin_help = LaneDetectorParserInfo_help[22] ;
00464 args_info->thetaMax_help = LaneDetectorParserInfo_help[23] ;
00465 args_info->thetaStep_help = LaneDetectorParserInfo_help[24] ;
00466 args_info->ipmVpPortion_help = LaneDetectorParserInfo_help[25] ;
00467 args_info->getEndPoints_help = LaneDetectorParserInfo_help[26] ;
00468 args_info->group_help = LaneDetectorParserInfo_help[27] ;
00469 args_info->groupThreshold_help = LaneDetectorParserInfo_help[28] ;
00470 args_info->ransac_help = LaneDetectorParserInfo_help[29] ;
00471 args_info->ransacLineNumSamples_help = LaneDetectorParserInfo_help[30] ;
00472 args_info->ransacLineNumIterations_help = LaneDetectorParserInfo_help[31] ;
00473 args_info->ransacLineNumGoodFit_help = LaneDetectorParserInfo_help[32] ;
00474 args_info->ransacLineThreshold_help = LaneDetectorParserInfo_help[33] ;
00475 args_info->ransacLineScoreThreshold_help = LaneDetectorParserInfo_help[34] ;
00476 args_info->ransacLineBinarize_help = LaneDetectorParserInfo_help[35] ;
00477 args_info->ransacLineWindow_help = LaneDetectorParserInfo_help[36] ;
00478 args_info->ransacSplineNumSamples_help = LaneDetectorParserInfo_help[37] ;
00479 args_info->ransacSplineNumIterations_help = LaneDetectorParserInfo_help[38] ;
00480 args_info->ransacSplineNumGoodFit_help = LaneDetectorParserInfo_help[39] ;
00481 args_info->ransacSplineThreshold_help = LaneDetectorParserInfo_help[40] ;
00482 args_info->ransacSplineScoreThreshold_help = LaneDetectorParserInfo_help[41] ;
00483 args_info->ransacSplineBinarize_help = LaneDetectorParserInfo_help[42] ;
00484 args_info->ransacSplineWindow_help = LaneDetectorParserInfo_help[43] ;
00485 args_info->ransacSplineDegree_help = LaneDetectorParserInfo_help[44] ;
00486 args_info->ransacSpline_help = LaneDetectorParserInfo_help[45] ;
00487 args_info->ransacLine_help = LaneDetectorParserInfo_help[46] ;
00488 args_info->ransacSplineStep_help = LaneDetectorParserInfo_help[47] ;
00489 args_info->overlapThreshold_help = LaneDetectorParserInfo_help[48] ;
00490 args_info->localizeAngleThreshold_help = LaneDetectorParserInfo_help[49] ;
00491 args_info->localizeNumLinePixels_help = LaneDetectorParserInfo_help[50] ;
00492 args_info->extendAngleThreshold_help = LaneDetectorParserInfo_help[51] ;
00493 args_info->extendMeanDirAngleThreshold_help = LaneDetectorParserInfo_help[52] ;
00494 args_info->extendLinePixelsTangent_help = LaneDetectorParserInfo_help[53] ;
00495 args_info->extendLinePixelsNormal_help = LaneDetectorParserInfo_help[54] ;
00496 args_info->extendContThreshold_help = LaneDetectorParserInfo_help[55] ;
00497 args_info->extendDeviationThreshold_help = LaneDetectorParserInfo_help[56] ;
00498 args_info->extendRectTop_help = LaneDetectorParserInfo_help[57] ;
00499 args_info->extendRectBottom_help = LaneDetectorParserInfo_help[58] ;
00500 args_info->extendIPMAngleThreshold_help = LaneDetectorParserInfo_help[59] ;
00501 args_info->extendIPMMeanDirAngleThreshold_help = LaneDetectorParserInfo_help[60] ;
00502 args_info->extendIPMLinePixelsTangent_help = LaneDetectorParserInfo_help[61] ;
00503 args_info->extendIPMLinePixelsNormal_help = LaneDetectorParserInfo_help[62] ;
00504 args_info->extendIPMContThreshold_help = LaneDetectorParserInfo_help[63] ;
00505 args_info->extendIPMDeviationThreshold_help = LaneDetectorParserInfo_help[64] ;
00506 args_info->extendIPMRectTop_help = LaneDetectorParserInfo_help[65] ;
00507 args_info->extendIPMRectBottom_help = LaneDetectorParserInfo_help[66] ;
00508 args_info->splineScoreJitter_help = LaneDetectorParserInfo_help[67] ;
00509 args_info->splineScoreLengthRatio_help = LaneDetectorParserInfo_help[68] ;
00510 args_info->splineScoreAngleRatio_help = LaneDetectorParserInfo_help[69] ;
00511 args_info->splineScoreStep_help = LaneDetectorParserInfo_help[70] ;
00512 args_info->splineTrackingNumAbsentFrames_help = LaneDetectorParserInfo_help[71] ;
00513 args_info->splineTrackingNumSeenFrames_help = LaneDetectorParserInfo_help[72] ;
00514 args_info->mergeSplineThetaThreshold_help = LaneDetectorParserInfo_help[73] ;
00515 args_info->mergeSplineRThreshold_help = LaneDetectorParserInfo_help[74] ;
00516 args_info->mergeSplineMeanThetaThreshold_help = LaneDetectorParserInfo_help[75] ;
00517 args_info->mergeSplineMeanRThreshold_help = LaneDetectorParserInfo_help[76] ;
00518 args_info->mergeSplineCentroidThreshold_help = LaneDetectorParserInfo_help[77] ;
00519 args_info->lineTrackingNumAbsentFrames_help = LaneDetectorParserInfo_help[78] ;
00520 args_info->lineTrackingNumSeenFrames_help = LaneDetectorParserInfo_help[79] ;
00521 args_info->mergeLineThetaThreshold_help = LaneDetectorParserInfo_help[80] ;
00522 args_info->mergeLineRThreshold_help = LaneDetectorParserInfo_help[81] ;
00523 args_info->numStrips_help = LaneDetectorParserInfo_help[82] ;
00524 args_info->checkSplines_help = LaneDetectorParserInfo_help[83] ;
00525 args_info->checkSplinesCurvenessThreshold_help = LaneDetectorParserInfo_help[84] ;
00526 args_info->checkSplinesLengthThreshold_help = LaneDetectorParserInfo_help[85] ;
00527 args_info->checkSplinesThetaDiffThreshold_help = LaneDetectorParserInfo_help[86] ;
00528 args_info->checkSplinesThetaThreshold_help = LaneDetectorParserInfo_help[87] ;
00529 args_info->checkIPMSplines_help = LaneDetectorParserInfo_help[88] ;
00530 args_info->checkIPMSplinesCurvenessThreshold_help = LaneDetectorParserInfo_help[89] ;
00531 args_info->checkIPMSplinesLengthThreshold_help = LaneDetectorParserInfo_help[90] ;
00532 args_info->checkIPMSplinesThetaDiffThreshold_help = LaneDetectorParserInfo_help[91] ;
00533 args_info->checkIPMSplinesThetaThreshold_help = LaneDetectorParserInfo_help[92] ;
00534 args_info->finalSplineScoreThreshold_help = LaneDetectorParserInfo_help[93] ;
00535 args_info->useGroundPlane_help = LaneDetectorParserInfo_help[94] ;
00536 args_info->checkColor_help = LaneDetectorParserInfo_help[95] ;
00537 args_info->checkColorWindow_help = LaneDetectorParserInfo_help[96] ;
00538 args_info->checkColorNumBins_help = LaneDetectorParserInfo_help[97] ;
00539 args_info->checkColorNumYellowMin_help = LaneDetectorParserInfo_help[98] ;
00540 args_info->checkColorRGMin_help = LaneDetectorParserInfo_help[99] ;
00541 args_info->checkColorRGMax_help = LaneDetectorParserInfo_help[100] ;
00542 args_info->checkColorGBMin_help = LaneDetectorParserInfo_help[101] ;
00543 args_info->checkColorRBMin_help = LaneDetectorParserInfo_help[102] ;
00544 args_info->checkColorRBFThreshold_help = LaneDetectorParserInfo_help[103] ;
00545 args_info->checkColorRBF_help = LaneDetectorParserInfo_help[104] ;
00546 args_info->ipmWindowClear_help = LaneDetectorParserInfo_help[105] ;
00547 args_info->ipmWindowLeft_help = LaneDetectorParserInfo_help[106] ;
00548 args_info->ipmWindowRight_help = LaneDetectorParserInfo_help[107] ;
00549 args_info->checkLaneWidth_help = LaneDetectorParserInfo_help[108] ;
00550 args_info->checkLaneWidthMean_help = LaneDetectorParserInfo_help[109] ;
00551 args_info->checkLaneWidthStd_help = LaneDetectorParserInfo_help[110] ;
00552
00553 }
00554
00555 void
00556 LaneDetectorParser_print_version (void)
00557 {
00558 printf ("%s %s\n", LANEDETECTORPARSER_PACKAGE, LANEDETECTORPARSER_VERSION);
00559 }
00560
00561 void
00562 LaneDetectorParser_print_help (void)
00563 {
00564 int i = 0;
00565 LaneDetectorParser_print_version ();
00566
00567 if (strlen(LaneDetectorParserInfo_purpose) > 0)
00568 printf("\n%s\n", LaneDetectorParserInfo_purpose);
00569
00570 printf("\n%s\n\n", LaneDetectorParserInfo_usage);
00571 while (LaneDetectorParserInfo_help[i])
00572 printf("%s\n", LaneDetectorParserInfo_help[i++]);
00573 }
00574
00575 void
00576 LaneDetectorParser_init (struct LaneDetectorParserInfo *args_info)
00577 {
00578 clear_given (args_info);
00579 clear_args (args_info);
00580 init_args_info (args_info);
00581 }
00582
00583 static void
00584 LaneDetectorParser_release (struct LaneDetectorParserInfo *args_info)
00585 {
00586
00587 if (args_info->ipmWidth_orig)
00588 {
00589 free (args_info->ipmWidth_orig);
00590 args_info->ipmWidth_orig = 0;
00591 }
00592 if (args_info->ipmHeight_orig)
00593 {
00594 free (args_info->ipmHeight_orig);
00595 args_info->ipmHeight_orig = 0;
00596 }
00597 if (args_info->ipmTop_orig)
00598 {
00599 free (args_info->ipmTop_orig);
00600 args_info->ipmTop_orig = 0;
00601 }
00602 if (args_info->ipmLeft_orig)
00603 {
00604 free (args_info->ipmLeft_orig);
00605 args_info->ipmLeft_orig = 0;
00606 }
00607 if (args_info->ipmRight_orig)
00608 {
00609 free (args_info->ipmRight_orig);
00610 args_info->ipmRight_orig = 0;
00611 }
00612 if (args_info->ipmBottom_orig)
00613 {
00614 free (args_info->ipmBottom_orig);
00615 args_info->ipmBottom_orig = 0;
00616 }
00617 if (args_info->ipmInterpolation_orig)
00618 {
00619 free (args_info->ipmInterpolation_orig);
00620 args_info->ipmInterpolation_orig = 0;
00621 }
00622 if (args_info->lineWidth_orig)
00623 {
00624 free (args_info->lineWidth_orig);
00625 args_info->lineWidth_orig = 0;
00626 }
00627 if (args_info->lineHeight_orig)
00628 {
00629 free (args_info->lineHeight_orig);
00630 args_info->lineHeight_orig = 0;
00631 }
00632 if (args_info->kernelWidth_orig)
00633 {
00634 free (args_info->kernelWidth_orig);
00635 args_info->kernelWidth_orig = 0;
00636 }
00637 if (args_info->kernelHeight_orig)
00638 {
00639 free (args_info->kernelHeight_orig);
00640 args_info->kernelHeight_orig = 0;
00641 }
00642 if (args_info->lowerQuantile_orig)
00643 {
00644 free (args_info->lowerQuantile_orig);
00645 args_info->lowerQuantile_orig = 0;
00646 }
00647 if (args_info->localMaxima_orig)
00648 {
00649 free (args_info->localMaxima_orig);
00650 args_info->localMaxima_orig = 0;
00651 }
00652 if (args_info->groupingType_orig)
00653 {
00654 free (args_info->groupingType_orig);
00655 args_info->groupingType_orig = 0;
00656 }
00657 if (args_info->binarize_orig)
00658 {
00659 free (args_info->binarize_orig);
00660 args_info->binarize_orig = 0;
00661 }
00662 if (args_info->detectionThreshold_orig)
00663 {
00664 free (args_info->detectionThreshold_orig);
00665 args_info->detectionThreshold_orig = 0;
00666 }
00667 if (args_info->smoothScores_orig)
00668 {
00669 free (args_info->smoothScores_orig);
00670 args_info->smoothScores_orig = 0;
00671 }
00672 if (args_info->rMin_orig)
00673 {
00674 free (args_info->rMin_orig);
00675 args_info->rMin_orig = 0;
00676 }
00677 if (args_info->rMax_orig)
00678 {
00679 free (args_info->rMax_orig);
00680 args_info->rMax_orig = 0;
00681 }
00682 if (args_info->rStep_orig)
00683 {
00684 free (args_info->rStep_orig);
00685 args_info->rStep_orig = 0;
00686 }
00687 if (args_info->thetaMin_orig)
00688 {
00689 free (args_info->thetaMin_orig);
00690 args_info->thetaMin_orig = 0;
00691 }
00692 if (args_info->thetaMax_orig)
00693 {
00694 free (args_info->thetaMax_orig);
00695 args_info->thetaMax_orig = 0;
00696 }
00697 if (args_info->thetaStep_orig)
00698 {
00699 free (args_info->thetaStep_orig);
00700 args_info->thetaStep_orig = 0;
00701 }
00702 if (args_info->ipmVpPortion_orig)
00703 {
00704 free (args_info->ipmVpPortion_orig);
00705 args_info->ipmVpPortion_orig = 0;
00706 }
00707 if (args_info->getEndPoints_orig)
00708 {
00709 free (args_info->getEndPoints_orig);
00710 args_info->getEndPoints_orig = 0;
00711 }
00712 if (args_info->group_orig)
00713 {
00714 free (args_info->group_orig);
00715 args_info->group_orig = 0;
00716 }
00717 if (args_info->groupThreshold_orig)
00718 {
00719 free (args_info->groupThreshold_orig);
00720 args_info->groupThreshold_orig = 0;
00721 }
00722 if (args_info->ransac_orig)
00723 {
00724 free (args_info->ransac_orig);
00725 args_info->ransac_orig = 0;
00726 }
00727 if (args_info->ransacLineNumSamples_orig)
00728 {
00729 free (args_info->ransacLineNumSamples_orig);
00730 args_info->ransacLineNumSamples_orig = 0;
00731 }
00732 if (args_info->ransacLineNumIterations_orig)
00733 {
00734 free (args_info->ransacLineNumIterations_orig);
00735 args_info->ransacLineNumIterations_orig = 0;
00736 }
00737 if (args_info->ransacLineNumGoodFit_orig)
00738 {
00739 free (args_info->ransacLineNumGoodFit_orig);
00740 args_info->ransacLineNumGoodFit_orig = 0;
00741 }
00742 if (args_info->ransacLineThreshold_orig)
00743 {
00744 free (args_info->ransacLineThreshold_orig);
00745 args_info->ransacLineThreshold_orig = 0;
00746 }
00747 if (args_info->ransacLineScoreThreshold_orig)
00748 {
00749 free (args_info->ransacLineScoreThreshold_orig);
00750 args_info->ransacLineScoreThreshold_orig = 0;
00751 }
00752 if (args_info->ransacLineBinarize_orig)
00753 {
00754 free (args_info->ransacLineBinarize_orig);
00755 args_info->ransacLineBinarize_orig = 0;
00756 }
00757 if (args_info->ransacLineWindow_orig)
00758 {
00759 free (args_info->ransacLineWindow_orig);
00760 args_info->ransacLineWindow_orig = 0;
00761 }
00762 if (args_info->ransacSplineNumSamples_orig)
00763 {
00764 free (args_info->ransacSplineNumSamples_orig);
00765 args_info->ransacSplineNumSamples_orig = 0;
00766 }
00767 if (args_info->ransacSplineNumIterations_orig)
00768 {
00769 free (args_info->ransacSplineNumIterations_orig);
00770 args_info->ransacSplineNumIterations_orig = 0;
00771 }
00772 if (args_info->ransacSplineNumGoodFit_orig)
00773 {
00774 free (args_info->ransacSplineNumGoodFit_orig);
00775 args_info->ransacSplineNumGoodFit_orig = 0;
00776 }
00777 if (args_info->ransacSplineThreshold_orig)
00778 {
00779 free (args_info->ransacSplineThreshold_orig);
00780 args_info->ransacSplineThreshold_orig = 0;
00781 }
00782 if (args_info->ransacSplineScoreThreshold_orig)
00783 {
00784 free (args_info->ransacSplineScoreThreshold_orig);
00785 args_info->ransacSplineScoreThreshold_orig = 0;
00786 }
00787 if (args_info->ransacSplineBinarize_orig)
00788 {
00789 free (args_info->ransacSplineBinarize_orig);
00790 args_info->ransacSplineBinarize_orig = 0;
00791 }
00792 if (args_info->ransacSplineWindow_orig)
00793 {
00794 free (args_info->ransacSplineWindow_orig);
00795 args_info->ransacSplineWindow_orig = 0;
00796 }
00797 if (args_info->ransacSplineDegree_orig)
00798 {
00799 free (args_info->ransacSplineDegree_orig);
00800 args_info->ransacSplineDegree_orig = 0;
00801 }
00802 if (args_info->ransacSpline_orig)
00803 {
00804 free (args_info->ransacSpline_orig);
00805 args_info->ransacSpline_orig = 0;
00806 }
00807 if (args_info->ransacLine_orig)
00808 {
00809 free (args_info->ransacLine_orig);
00810 args_info->ransacLine_orig = 0;
00811 }
00812 if (args_info->ransacSplineStep_orig)
00813 {
00814 free (args_info->ransacSplineStep_orig);
00815 args_info->ransacSplineStep_orig = 0;
00816 }
00817 if (args_info->overlapThreshold_orig)
00818 {
00819 free (args_info->overlapThreshold_orig);
00820 args_info->overlapThreshold_orig = 0;
00821 }
00822 if (args_info->localizeAngleThreshold_orig)
00823 {
00824 free (args_info->localizeAngleThreshold_orig);
00825 args_info->localizeAngleThreshold_orig = 0;
00826 }
00827 if (args_info->localizeNumLinePixels_orig)
00828 {
00829 free (args_info->localizeNumLinePixels_orig);
00830 args_info->localizeNumLinePixels_orig = 0;
00831 }
00832 if (args_info->extendAngleThreshold_orig)
00833 {
00834 free (args_info->extendAngleThreshold_orig);
00835 args_info->extendAngleThreshold_orig = 0;
00836 }
00837 if (args_info->extendMeanDirAngleThreshold_orig)
00838 {
00839 free (args_info->extendMeanDirAngleThreshold_orig);
00840 args_info->extendMeanDirAngleThreshold_orig = 0;
00841 }
00842 if (args_info->extendLinePixelsTangent_orig)
00843 {
00844 free (args_info->extendLinePixelsTangent_orig);
00845 args_info->extendLinePixelsTangent_orig = 0;
00846 }
00847 if (args_info->extendLinePixelsNormal_orig)
00848 {
00849 free (args_info->extendLinePixelsNormal_orig);
00850 args_info->extendLinePixelsNormal_orig = 0;
00851 }
00852 if (args_info->extendContThreshold_orig)
00853 {
00854 free (args_info->extendContThreshold_orig);
00855 args_info->extendContThreshold_orig = 0;
00856 }
00857 if (args_info->extendDeviationThreshold_orig)
00858 {
00859 free (args_info->extendDeviationThreshold_orig);
00860 args_info->extendDeviationThreshold_orig = 0;
00861 }
00862 if (args_info->extendRectTop_orig)
00863 {
00864 free (args_info->extendRectTop_orig);
00865 args_info->extendRectTop_orig = 0;
00866 }
00867 if (args_info->extendRectBottom_orig)
00868 {
00869 free (args_info->extendRectBottom_orig);
00870 args_info->extendRectBottom_orig = 0;
00871 }
00872 if (args_info->extendIPMAngleThreshold_orig)
00873 {
00874 free (args_info->extendIPMAngleThreshold_orig);
00875 args_info->extendIPMAngleThreshold_orig = 0;
00876 }
00877 if (args_info->extendIPMMeanDirAngleThreshold_orig)
00878 {
00879 free (args_info->extendIPMMeanDirAngleThreshold_orig);
00880 args_info->extendIPMMeanDirAngleThreshold_orig = 0;
00881 }
00882 if (args_info->extendIPMLinePixelsTangent_orig)
00883 {
00884 free (args_info->extendIPMLinePixelsTangent_orig);
00885 args_info->extendIPMLinePixelsTangent_orig = 0;
00886 }
00887 if (args_info->extendIPMLinePixelsNormal_orig)
00888 {
00889 free (args_info->extendIPMLinePixelsNormal_orig);
00890 args_info->extendIPMLinePixelsNormal_orig = 0;
00891 }
00892 if (args_info->extendIPMContThreshold_orig)
00893 {
00894 free (args_info->extendIPMContThreshold_orig);
00895 args_info->extendIPMContThreshold_orig = 0;
00896 }
00897 if (args_info->extendIPMDeviationThreshold_orig)
00898 {
00899 free (args_info->extendIPMDeviationThreshold_orig);
00900 args_info->extendIPMDeviationThreshold_orig = 0;
00901 }
00902 if (args_info->extendIPMRectTop_orig)
00903 {
00904 free (args_info->extendIPMRectTop_orig);
00905 args_info->extendIPMRectTop_orig = 0;
00906 }
00907 if (args_info->extendIPMRectBottom_orig)
00908 {
00909 free (args_info->extendIPMRectBottom_orig);
00910 args_info->extendIPMRectBottom_orig = 0;
00911 }
00912 if (args_info->splineScoreJitter_orig)
00913 {
00914 free (args_info->splineScoreJitter_orig);
00915 args_info->splineScoreJitter_orig = 0;
00916 }
00917 if (args_info->splineScoreLengthRatio_orig)
00918 {
00919 free (args_info->splineScoreLengthRatio_orig);
00920 args_info->splineScoreLengthRatio_orig = 0;
00921 }
00922 if (args_info->splineScoreAngleRatio_orig)
00923 {
00924 free (args_info->splineScoreAngleRatio_orig);
00925 args_info->splineScoreAngleRatio_orig = 0;
00926 }
00927 if (args_info->splineScoreStep_orig)
00928 {
00929 free (args_info->splineScoreStep_orig);
00930 args_info->splineScoreStep_orig = 0;
00931 }
00932 if (args_info->splineTrackingNumAbsentFrames_orig)
00933 {
00934 free (args_info->splineTrackingNumAbsentFrames_orig);
00935 args_info->splineTrackingNumAbsentFrames_orig = 0;
00936 }
00937 if (args_info->splineTrackingNumSeenFrames_orig)
00938 {
00939 free (args_info->splineTrackingNumSeenFrames_orig);
00940 args_info->splineTrackingNumSeenFrames_orig = 0;
00941 }
00942 if (args_info->mergeSplineThetaThreshold_orig)
00943 {
00944 free (args_info->mergeSplineThetaThreshold_orig);
00945 args_info->mergeSplineThetaThreshold_orig = 0;
00946 }
00947 if (args_info->mergeSplineRThreshold_orig)
00948 {
00949 free (args_info->mergeSplineRThreshold_orig);
00950 args_info->mergeSplineRThreshold_orig = 0;
00951 }
00952 if (args_info->mergeSplineMeanThetaThreshold_orig)
00953 {
00954 free (args_info->mergeSplineMeanThetaThreshold_orig);
00955 args_info->mergeSplineMeanThetaThreshold_orig = 0;
00956 }
00957 if (args_info->mergeSplineMeanRThreshold_orig)
00958 {
00959 free (args_info->mergeSplineMeanRThreshold_orig);
00960 args_info->mergeSplineMeanRThreshold_orig = 0;
00961 }
00962 if (args_info->mergeSplineCentroidThreshold_orig)
00963 {
00964 free (args_info->mergeSplineCentroidThreshold_orig);
00965 args_info->mergeSplineCentroidThreshold_orig = 0;
00966 }
00967 if (args_info->lineTrackingNumAbsentFrames_orig)
00968 {
00969 free (args_info->lineTrackingNumAbsentFrames_orig);
00970 args_info->lineTrackingNumAbsentFrames_orig = 0;
00971 }
00972 if (args_info->lineTrackingNumSeenFrames_orig)
00973 {
00974 free (args_info->lineTrackingNumSeenFrames_orig);
00975 args_info->lineTrackingNumSeenFrames_orig = 0;
00976 }
00977 if (args_info->mergeLineThetaThreshold_orig)
00978 {
00979 free (args_info->mergeLineThetaThreshold_orig);
00980 args_info->mergeLineThetaThreshold_orig = 0;
00981 }
00982 if (args_info->mergeLineRThreshold_orig)
00983 {
00984 free (args_info->mergeLineRThreshold_orig);
00985 args_info->mergeLineRThreshold_orig = 0;
00986 }
00987 if (args_info->numStrips_orig)
00988 {
00989 free (args_info->numStrips_orig);
00990 args_info->numStrips_orig = 0;
00991 }
00992 if (args_info->checkSplines_orig)
00993 {
00994 free (args_info->checkSplines_orig);
00995 args_info->checkSplines_orig = 0;
00996 }
00997 if (args_info->checkSplinesCurvenessThreshold_orig)
00998 {
00999 free (args_info->checkSplinesCurvenessThreshold_orig);
01000 args_info->checkSplinesCurvenessThreshold_orig = 0;
01001 }
01002 if (args_info->checkSplinesLengthThreshold_orig)
01003 {
01004 free (args_info->checkSplinesLengthThreshold_orig);
01005 args_info->checkSplinesLengthThreshold_orig = 0;
01006 }
01007 if (args_info->checkSplinesThetaDiffThreshold_orig)
01008 {
01009 free (args_info->checkSplinesThetaDiffThreshold_orig);
01010 args_info->checkSplinesThetaDiffThreshold_orig = 0;
01011 }
01012 if (args_info->checkSplinesThetaThreshold_orig)
01013 {
01014 free (args_info->checkSplinesThetaThreshold_orig);
01015 args_info->checkSplinesThetaThreshold_orig = 0;
01016 }
01017 if (args_info->checkIPMSplines_orig)
01018 {
01019 free (args_info->checkIPMSplines_orig);
01020 args_info->checkIPMSplines_orig = 0;
01021 }
01022 if (args_info->checkIPMSplinesCurvenessThreshold_orig)
01023 {
01024 free (args_info->checkIPMSplinesCurvenessThreshold_orig);
01025 args_info->checkIPMSplinesCurvenessThreshold_orig = 0;
01026 }
01027 if (args_info->checkIPMSplinesLengthThreshold_orig)
01028 {
01029 free (args_info->checkIPMSplinesLengthThreshold_orig);
01030 args_info->checkIPMSplinesLengthThreshold_orig = 0;
01031 }
01032 if (args_info->checkIPMSplinesThetaDiffThreshold_orig)
01033 {
01034 free (args_info->checkIPMSplinesThetaDiffThreshold_orig);
01035 args_info->checkIPMSplinesThetaDiffThreshold_orig = 0;
01036 }
01037 if (args_info->checkIPMSplinesThetaThreshold_orig)
01038 {
01039 free (args_info->checkIPMSplinesThetaThreshold_orig);
01040 args_info->checkIPMSplinesThetaThreshold_orig = 0;
01041 }
01042 if (args_info->finalSplineScoreThreshold_orig)
01043 {
01044 free (args_info->finalSplineScoreThreshold_orig);
01045 args_info->finalSplineScoreThreshold_orig = 0;
01046 }
01047 if (args_info->useGroundPlane_orig)
01048 {
01049 free (args_info->useGroundPlane_orig);
01050 args_info->useGroundPlane_orig = 0;
01051 }
01052 if (args_info->checkColor_orig)
01053 {
01054 free (args_info->checkColor_orig);
01055 args_info->checkColor_orig = 0;
01056 }
01057 if (args_info->checkColorWindow_orig)
01058 {
01059 free (args_info->checkColorWindow_orig);
01060 args_info->checkColorWindow_orig = 0;
01061 }
01062 if (args_info->checkColorNumBins_orig)
01063 {
01064 free (args_info->checkColorNumBins_orig);
01065 args_info->checkColorNumBins_orig = 0;
01066 }
01067 if (args_info->checkColorNumYellowMin_orig)
01068 {
01069 free (args_info->checkColorNumYellowMin_orig);
01070 args_info->checkColorNumYellowMin_orig = 0;
01071 }
01072 if (args_info->checkColorRGMin_orig)
01073 {
01074 free (args_info->checkColorRGMin_orig);
01075 args_info->checkColorRGMin_orig = 0;
01076 }
01077 if (args_info->checkColorRGMax_orig)
01078 {
01079 free (args_info->checkColorRGMax_orig);
01080 args_info->checkColorRGMax_orig = 0;
01081 }
01082 if (args_info->checkColorGBMin_orig)
01083 {
01084 free (args_info->checkColorGBMin_orig);
01085 args_info->checkColorGBMin_orig = 0;
01086 }
01087 if (args_info->checkColorRBMin_orig)
01088 {
01089 free (args_info->checkColorRBMin_orig);
01090 args_info->checkColorRBMin_orig = 0;
01091 }
01092 if (args_info->checkColorRBFThreshold_orig)
01093 {
01094 free (args_info->checkColorRBFThreshold_orig);
01095 args_info->checkColorRBFThreshold_orig = 0;
01096 }
01097 if (args_info->checkColorRBF_orig)
01098 {
01099 free (args_info->checkColorRBF_orig);
01100 args_info->checkColorRBF_orig = 0;
01101 }
01102 if (args_info->ipmWindowClear_orig)
01103 {
01104 free (args_info->ipmWindowClear_orig);
01105 args_info->ipmWindowClear_orig = 0;
01106 }
01107 if (args_info->ipmWindowLeft_orig)
01108 {
01109 free (args_info->ipmWindowLeft_orig);
01110 args_info->ipmWindowLeft_orig = 0;
01111 }
01112 if (args_info->ipmWindowRight_orig)
01113 {
01114 free (args_info->ipmWindowRight_orig);
01115 args_info->ipmWindowRight_orig = 0;
01116 }
01117 if (args_info->checkLaneWidth_orig)
01118 {
01119 free (args_info->checkLaneWidth_orig);
01120 args_info->checkLaneWidth_orig = 0;
01121 }
01122 if (args_info->checkLaneWidthMean_orig)
01123 {
01124 free (args_info->checkLaneWidthMean_orig);
01125 args_info->checkLaneWidthMean_orig = 0;
01126 }
01127 if (args_info->checkLaneWidthStd_orig)
01128 {
01129 free (args_info->checkLaneWidthStd_orig);
01130 args_info->checkLaneWidthStd_orig = 0;
01131 }
01132
01133 clear_given (args_info);
01134 }
01135
01136 int
01137 LaneDetectorParser_file_save(const char *filename, struct LaneDetectorParserInfo *args_info)
01138 {
01139 FILE *outfile;
01140 int i = 0;
01141
01142 outfile = fopen(filename, "w");
01143
01144 if (!outfile)
01145 {
01146 fprintf (stderr, "%s: cannot open file for writing: %s\n", LANEDETECTORPARSER_PACKAGE, filename);
01147 return EXIT_FAILURE;
01148 }
01149
01150 if (args_info->help_given) {
01151 fprintf(outfile, "%s\n", "help");
01152 }
01153 if (args_info->version_given) {
01154 fprintf(outfile, "%s\n", "version");
01155 }
01156 if (args_info->ipmWidth_given) {
01157 if (args_info->ipmWidth_orig) {
01158 fprintf(outfile, "%s=\"%s\"\n", "ipmWidth", args_info->ipmWidth_orig);
01159 } else {
01160 fprintf(outfile, "%s\n", "ipmWidth");
01161 }
01162 }
01163 if (args_info->ipmHeight_given) {
01164 if (args_info->ipmHeight_orig) {
01165 fprintf(outfile, "%s=\"%s\"\n", "ipmHeight", args_info->ipmHeight_orig);
01166 } else {
01167 fprintf(outfile, "%s\n", "ipmHeight");
01168 }
01169 }
01170 if (args_info->ipmTop_given) {
01171 if (args_info->ipmTop_orig) {
01172 fprintf(outfile, "%s=\"%s\"\n", "ipmTop", args_info->ipmTop_orig);
01173 } else {
01174 fprintf(outfile, "%s\n", "ipmTop");
01175 }
01176 }
01177 if (args_info->ipmLeft_given) {
01178 if (args_info->ipmLeft_orig) {
01179 fprintf(outfile, "%s=\"%s\"\n", "ipmLeft", args_info->ipmLeft_orig);
01180 } else {
01181 fprintf(outfile, "%s\n", "ipmLeft");
01182 }
01183 }
01184 if (args_info->ipmRight_given) {
01185 if (args_info->ipmRight_orig) {
01186 fprintf(outfile, "%s=\"%s\"\n", "ipmRight", args_info->ipmRight_orig);
01187 } else {
01188 fprintf(outfile, "%s\n", "ipmRight");
01189 }
01190 }
01191 if (args_info->ipmBottom_given) {
01192 if (args_info->ipmBottom_orig) {
01193 fprintf(outfile, "%s=\"%s\"\n", "ipmBottom", args_info->ipmBottom_orig);
01194 } else {
01195 fprintf(outfile, "%s\n", "ipmBottom");
01196 }
01197 }
01198 if (args_info->ipmInterpolation_given) {
01199 if (args_info->ipmInterpolation_orig) {
01200 fprintf(outfile, "%s=\"%s\"\n", "ipmInterpolation", args_info->ipmInterpolation_orig);
01201 } else {
01202 fprintf(outfile, "%s\n", "ipmInterpolation");
01203 }
01204 }
01205 if (args_info->lineWidth_given) {
01206 if (args_info->lineWidth_orig) {
01207 fprintf(outfile, "%s=\"%s\"\n", "lineWidth", args_info->lineWidth_orig);
01208 } else {
01209 fprintf(outfile, "%s\n", "lineWidth");
01210 }
01211 }
01212 if (args_info->lineHeight_given) {
01213 if (args_info->lineHeight_orig) {
01214 fprintf(outfile, "%s=\"%s\"\n", "lineHeight", args_info->lineHeight_orig);
01215 } else {
01216 fprintf(outfile, "%s\n", "lineHeight");
01217 }
01218 }
01219 if (args_info->kernelWidth_given) {
01220 if (args_info->kernelWidth_orig) {
01221 fprintf(outfile, "%s=\"%s\"\n", "kernelWidth", args_info->kernelWidth_orig);
01222 } else {
01223 fprintf(outfile, "%s\n", "kernelWidth");
01224 }
01225 }
01226 if (args_info->kernelHeight_given) {
01227 if (args_info->kernelHeight_orig) {
01228 fprintf(outfile, "%s=\"%s\"\n", "kernelHeight", args_info->kernelHeight_orig);
01229 } else {
01230 fprintf(outfile, "%s\n", "kernelHeight");
01231 }
01232 }
01233 if (args_info->lowerQuantile_given) {
01234 if (args_info->lowerQuantile_orig) {
01235 fprintf(outfile, "%s=\"%s\"\n", "lowerQuantile", args_info->lowerQuantile_orig);
01236 } else {
01237 fprintf(outfile, "%s\n", "lowerQuantile");
01238 }
01239 }
01240 if (args_info->localMaxima_given) {
01241 if (args_info->localMaxima_orig) {
01242 fprintf(outfile, "%s=\"%s\"\n", "localMaxima", args_info->localMaxima_orig);
01243 } else {
01244 fprintf(outfile, "%s\n", "localMaxima");
01245 }
01246 }
01247 if (args_info->groupingType_given) {
01248 if (args_info->groupingType_orig) {
01249 fprintf(outfile, "%s=\"%s\"\n", "groupingType", args_info->groupingType_orig);
01250 } else {
01251 fprintf(outfile, "%s\n", "groupingType");
01252 }
01253 }
01254 if (args_info->binarize_given) {
01255 if (args_info->binarize_orig) {
01256 fprintf(outfile, "%s=\"%s\"\n", "binarize", args_info->binarize_orig);
01257 } else {
01258 fprintf(outfile, "%s\n", "binarize");
01259 }
01260 }
01261 if (args_info->detectionThreshold_given) {
01262 if (args_info->detectionThreshold_orig) {
01263 fprintf(outfile, "%s=\"%s\"\n", "detectionThreshold", args_info->detectionThreshold_orig);
01264 } else {
01265 fprintf(outfile, "%s\n", "detectionThreshold");
01266 }
01267 }
01268 if (args_info->smoothScores_given) {
01269 if (args_info->smoothScores_orig) {
01270 fprintf(outfile, "%s=\"%s\"\n", "smoothScores", args_info->smoothScores_orig);
01271 } else {
01272 fprintf(outfile, "%s\n", "smoothScores");
01273 }
01274 }
01275 if (args_info->rMin_given) {
01276 if (args_info->rMin_orig) {
01277 fprintf(outfile, "%s=\"%s\"\n", "rMin", args_info->rMin_orig);
01278 } else {
01279 fprintf(outfile, "%s\n", "rMin");
01280 }
01281 }
01282 if (args_info->rMax_given) {
01283 if (args_info->rMax_orig) {
01284 fprintf(outfile, "%s=\"%s\"\n", "rMax", args_info->rMax_orig);
01285 } else {
01286 fprintf(outfile, "%s\n", "rMax");
01287 }
01288 }
01289 if (args_info->rStep_given) {
01290 if (args_info->rStep_orig) {
01291 fprintf(outfile, "%s=\"%s\"\n", "rStep", args_info->rStep_orig);
01292 } else {
01293 fprintf(outfile, "%s\n", "rStep");
01294 }
01295 }
01296 if (args_info->thetaMin_given) {
01297 if (args_info->thetaMin_orig) {
01298 fprintf(outfile, "%s=\"%s\"\n", "thetaMin", args_info->thetaMin_orig);
01299 } else {
01300 fprintf(outfile, "%s\n", "thetaMin");
01301 }
01302 }
01303 if (args_info->thetaMax_given) {
01304 if (args_info->thetaMax_orig) {
01305 fprintf(outfile, "%s=\"%s\"\n", "thetaMax", args_info->thetaMax_orig);
01306 } else {
01307 fprintf(outfile, "%s\n", "thetaMax");
01308 }
01309 }
01310 if (args_info->thetaStep_given) {
01311 if (args_info->thetaStep_orig) {
01312 fprintf(outfile, "%s=\"%s\"\n", "thetaStep", args_info->thetaStep_orig);
01313 } else {
01314 fprintf(outfile, "%s\n", "thetaStep");
01315 }
01316 }
01317 if (args_info->ipmVpPortion_given) {
01318 if (args_info->ipmVpPortion_orig) {
01319 fprintf(outfile, "%s=\"%s\"\n", "ipmVpPortion", args_info->ipmVpPortion_orig);
01320 } else {
01321 fprintf(outfile, "%s\n", "ipmVpPortion");
01322 }
01323 }
01324 if (args_info->getEndPoints_given) {
01325 if (args_info->getEndPoints_orig) {
01326 fprintf(outfile, "%s=\"%s\"\n", "getEndPoints", args_info->getEndPoints_orig);
01327 } else {
01328 fprintf(outfile, "%s\n", "getEndPoints");
01329 }
01330 }
01331 if (args_info->group_given) {
01332 if (args_info->group_orig) {
01333 fprintf(outfile, "%s=\"%s\"\n", "group", args_info->group_orig);
01334 } else {
01335 fprintf(outfile, "%s\n", "group");
01336 }
01337 }
01338 if (args_info->groupThreshold_given) {
01339 if (args_info->groupThreshold_orig) {
01340 fprintf(outfile, "%s=\"%s\"\n", "groupThreshold", args_info->groupThreshold_orig);
01341 } else {
01342 fprintf(outfile, "%s\n", "groupThreshold");
01343 }
01344 }
01345 if (args_info->ransac_given) {
01346 if (args_info->ransac_orig) {
01347 fprintf(outfile, "%s=\"%s\"\n", "ransac", args_info->ransac_orig);
01348 } else {
01349 fprintf(outfile, "%s\n", "ransac");
01350 }
01351 }
01352 if (args_info->ransacLineNumSamples_given) {
01353 if (args_info->ransacLineNumSamples_orig) {
01354 fprintf(outfile, "%s=\"%s\"\n", "ransacLineNumSamples", args_info->ransacLineNumSamples_orig);
01355 } else {
01356 fprintf(outfile, "%s\n", "ransacLineNumSamples");
01357 }
01358 }
01359 if (args_info->ransacLineNumIterations_given) {
01360 if (args_info->ransacLineNumIterations_orig) {
01361 fprintf(outfile, "%s=\"%s\"\n", "ransacLineNumIterations", args_info->ransacLineNumIterations_orig);
01362 } else {
01363 fprintf(outfile, "%s\n", "ransacLineNumIterations");
01364 }
01365 }
01366 if (args_info->ransacLineNumGoodFit_given) {
01367 if (args_info->ransacLineNumGoodFit_orig) {
01368 fprintf(outfile, "%s=\"%s\"\n", "ransacLineNumGoodFit", args_info->ransacLineNumGoodFit_orig);
01369 } else {
01370 fprintf(outfile, "%s\n", "ransacLineNumGoodFit");
01371 }
01372 }
01373 if (args_info->ransacLineThreshold_given) {
01374 if (args_info->ransacLineThreshold_orig) {
01375 fprintf(outfile, "%s=\"%s\"\n", "ransacLineThreshold", args_info->ransacLineThreshold_orig);
01376 } else {
01377 fprintf(outfile, "%s\n", "ransacLineThreshold");
01378 }
01379 }
01380 if (args_info->ransacLineScoreThreshold_given) {
01381 if (args_info->ransacLineScoreThreshold_orig) {
01382 fprintf(outfile, "%s=\"%s\"\n", "ransacLineScoreThreshold", args_info->ransacLineScoreThreshold_orig);
01383 } else {
01384 fprintf(outfile, "%s\n", "ransacLineScoreThreshold");
01385 }
01386 }
01387 if (args_info->ransacLineBinarize_given) {
01388 if (args_info->ransacLineBinarize_orig) {
01389 fprintf(outfile, "%s=\"%s\"\n", "ransacLineBinarize", args_info->ransacLineBinarize_orig);
01390 } else {
01391 fprintf(outfile, "%s\n", "ransacLineBinarize");
01392 }
01393 }
01394 if (args_info->ransacLineWindow_given) {
01395 if (args_info->ransacLineWindow_orig) {
01396 fprintf(outfile, "%s=\"%s\"\n", "ransacLineWindow", args_info->ransacLineWindow_orig);
01397 } else {
01398 fprintf(outfile, "%s\n", "ransacLineWindow");
01399 }
01400 }
01401 if (args_info->ransacSplineNumSamples_given) {
01402 if (args_info->ransacSplineNumSamples_orig) {
01403 fprintf(outfile, "%s=\"%s\"\n", "ransacSplineNumSamples", args_info->ransacSplineNumSamples_orig);
01404 } else {
01405 fprintf(outfile, "%s\n", "ransacSplineNumSamples");
01406 }
01407 }
01408 if (args_info->ransacSplineNumIterations_given) {
01409 if (args_info->ransacSplineNumIterations_orig) {
01410 fprintf(outfile, "%s=\"%s\"\n", "ransacSplineNumIterations", args_info->ransacSplineNumIterations_orig);
01411 } else {
01412 fprintf(outfile, "%s\n", "ransacSplineNumIterations");
01413 }
01414 }
01415 if (args_info->ransacSplineNumGoodFit_given) {
01416 if (args_info->ransacSplineNumGoodFit_orig) {
01417 fprintf(outfile, "%s=\"%s\"\n", "ransacSplineNumGoodFit", args_info->ransacSplineNumGoodFit_orig);
01418 } else {
01419 fprintf(outfile, "%s\n", "ransacSplineNumGoodFit");
01420 }
01421 }
01422 if (args_info->ransacSplineThreshold_given) {
01423 if (args_info->ransacSplineThreshold_orig) {
01424 fprintf(outfile, "%s=\"%s\"\n", "ransacSplineThreshold", args_info->ransacSplineThreshold_orig);
01425 } else {
01426 fprintf(outfile, "%s\n", "ransacSplineThreshold");
01427 }
01428 }
01429 if (args_info->ransacSplineScoreThreshold_given) {
01430 if (args_info->ransacSplineScoreThreshold_orig) {
01431 fprintf(outfile, "%s=\"%s\"\n", "ransacSplineScoreThreshold", args_info->ransacSplineScoreThreshold_orig);
01432 } else {
01433 fprintf(outfile, "%s\n", "ransacSplineScoreThreshold");
01434 }
01435 }
01436 if (args_info->ransacSplineBinarize_given) {
01437 if (args_info->ransacSplineBinarize_orig) {
01438 fprintf(outfile, "%s=\"%s\"\n", "ransacSplineBinarize", args_info->ransacSplineBinarize_orig);
01439 } else {
01440 fprintf(outfile, "%s\n", "ransacSplineBinarize");
01441 }
01442 }
01443 if (args_info->ransacSplineWindow_given) {
01444 if (args_info->ransacSplineWindow_orig) {
01445 fprintf(outfile, "%s=\"%s\"\n", "ransacSplineWindow", args_info->ransacSplineWindow_orig);
01446 } else {
01447 fprintf(outfile, "%s\n", "ransacSplineWindow");
01448 }
01449 }
01450 if (args_info->ransacSplineDegree_given) {
01451 if (args_info->ransacSplineDegree_orig) {
01452 fprintf(outfile, "%s=\"%s\"\n", "ransacSplineDegree", args_info->ransacSplineDegree_orig);
01453 } else {
01454 fprintf(outfile, "%s\n", "ransacSplineDegree");
01455 }
01456 }
01457 if (args_info->ransacSpline_given) {
01458 if (args_info->ransacSpline_orig) {
01459 fprintf(outfile, "%s=\"%s\"\n", "ransacSpline", args_info->ransacSpline_orig);
01460 } else {
01461 fprintf(outfile, "%s\n", "ransacSpline");
01462 }
01463 }
01464 if (args_info->ransacLine_given) {
01465 if (args_info->ransacLine_orig) {
01466 fprintf(outfile, "%s=\"%s\"\n", "ransacLine", args_info->ransacLine_orig);
01467 } else {
01468 fprintf(outfile, "%s\n", "ransacLine");
01469 }
01470 }
01471 if (args_info->ransacSplineStep_given) {
01472 if (args_info->ransacSplineStep_orig) {
01473 fprintf(outfile, "%s=\"%s\"\n", "ransacSplineStep", args_info->ransacSplineStep_orig);
01474 } else {
01475 fprintf(outfile, "%s\n", "ransacSplineStep");
01476 }
01477 }
01478 if (args_info->overlapThreshold_given) {
01479 if (args_info->overlapThreshold_orig) {
01480 fprintf(outfile, "%s=\"%s\"\n", "overlapThreshold", args_info->overlapThreshold_orig);
01481 } else {
01482 fprintf(outfile, "%s\n", "overlapThreshold");
01483 }
01484 }
01485 if (args_info->localizeAngleThreshold_given) {
01486 if (args_info->localizeAngleThreshold_orig) {
01487 fprintf(outfile, "%s=\"%s\"\n", "localizeAngleThreshold", args_info->localizeAngleThreshold_orig);
01488 } else {
01489 fprintf(outfile, "%s\n", "localizeAngleThreshold");
01490 }
01491 }
01492 if (args_info->localizeNumLinePixels_given) {
01493 if (args_info->localizeNumLinePixels_orig) {
01494 fprintf(outfile, "%s=\"%s\"\n", "localizeNumLinePixels", args_info->localizeNumLinePixels_orig);
01495 } else {
01496 fprintf(outfile, "%s\n", "localizeNumLinePixels");
01497 }
01498 }
01499 if (args_info->extendAngleThreshold_given) {
01500 if (args_info->extendAngleThreshold_orig) {
01501 fprintf(outfile, "%s=\"%s\"\n", "extendAngleThreshold", args_info->extendAngleThreshold_orig);
01502 } else {
01503 fprintf(outfile, "%s\n", "extendAngleThreshold");
01504 }
01505 }
01506 if (args_info->extendMeanDirAngleThreshold_given) {
01507 if (args_info->extendMeanDirAngleThreshold_orig) {
01508 fprintf(outfile, "%s=\"%s\"\n", "extendMeanDirAngleThreshold", args_info->extendMeanDirAngleThreshold_orig);
01509 } else {
01510 fprintf(outfile, "%s\n", "extendMeanDirAngleThreshold");
01511 }
01512 }
01513 if (args_info->extendLinePixelsTangent_given) {
01514 if (args_info->extendLinePixelsTangent_orig) {
01515 fprintf(outfile, "%s=\"%s\"\n", "extendLinePixelsTangent", args_info->extendLinePixelsTangent_orig);
01516 } else {
01517 fprintf(outfile, "%s\n", "extendLinePixelsTangent");
01518 }
01519 }
01520 if (args_info->extendLinePixelsNormal_given) {
01521 if (args_info->extendLinePixelsNormal_orig) {
01522 fprintf(outfile, "%s=\"%s\"\n", "extendLinePixelsNormal", args_info->extendLinePixelsNormal_orig);
01523 } else {
01524 fprintf(outfile, "%s\n", "extendLinePixelsNormal");
01525 }
01526 }
01527 if (args_info->extendContThreshold_given) {
01528 if (args_info->extendContThreshold_orig) {
01529 fprintf(outfile, "%s=\"%s\"\n", "extendContThreshold", args_info->extendContThreshold_orig);
01530 } else {
01531 fprintf(outfile, "%s\n", "extendContThreshold");
01532 }
01533 }
01534 if (args_info->extendDeviationThreshold_given) {
01535 if (args_info->extendDeviationThreshold_orig) {
01536 fprintf(outfile, "%s=\"%s\"\n", "extendDeviationThreshold", args_info->extendDeviationThreshold_orig);
01537 } else {
01538 fprintf(outfile, "%s\n", "extendDeviationThreshold");
01539 }
01540 }
01541 if (args_info->extendRectTop_given) {
01542 if (args_info->extendRectTop_orig) {
01543 fprintf(outfile, "%s=\"%s\"\n", "extendRectTop", args_info->extendRectTop_orig);
01544 } else {
01545 fprintf(outfile, "%s\n", "extendRectTop");
01546 }
01547 }
01548 if (args_info->extendRectBottom_given) {
01549 if (args_info->extendRectBottom_orig) {
01550 fprintf(outfile, "%s=\"%s\"\n", "extendRectBottom", args_info->extendRectBottom_orig);
01551 } else {
01552 fprintf(outfile, "%s\n", "extendRectBottom");
01553 }
01554 }
01555 if (args_info->extendIPMAngleThreshold_given) {
01556 if (args_info->extendIPMAngleThreshold_orig) {
01557 fprintf(outfile, "%s=\"%s\"\n", "extendIPMAngleThreshold", args_info->extendIPMAngleThreshold_orig);
01558 } else {
01559 fprintf(outfile, "%s\n", "extendIPMAngleThreshold");
01560 }
01561 }
01562 if (args_info->extendIPMMeanDirAngleThreshold_given) {
01563 if (args_info->extendIPMMeanDirAngleThreshold_orig) {
01564 fprintf(outfile, "%s=\"%s\"\n", "extendIPMMeanDirAngleThreshold", args_info->extendIPMMeanDirAngleThreshold_orig);
01565 } else {
01566 fprintf(outfile, "%s\n", "extendIPMMeanDirAngleThreshold");
01567 }
01568 }
01569 if (args_info->extendIPMLinePixelsTangent_given) {
01570 if (args_info->extendIPMLinePixelsTangent_orig) {
01571 fprintf(outfile, "%s=\"%s\"\n", "extendIPMLinePixelsTangent", args_info->extendIPMLinePixelsTangent_orig);
01572 } else {
01573 fprintf(outfile, "%s\n", "extendIPMLinePixelsTangent");
01574 }
01575 }
01576 if (args_info->extendIPMLinePixelsNormal_given) {
01577 if (args_info->extendIPMLinePixelsNormal_orig) {
01578 fprintf(outfile, "%s=\"%s\"\n", "extendIPMLinePixelsNormal", args_info->extendIPMLinePixelsNormal_orig);
01579 } else {
01580 fprintf(outfile, "%s\n", "extendIPMLinePixelsNormal");
01581 }
01582 }
01583 if (args_info->extendIPMContThreshold_given) {
01584 if (args_info->extendIPMContThreshold_orig) {
01585 fprintf(outfile, "%s=\"%s\"\n", "extendIPMContThreshold", args_info->extendIPMContThreshold_orig);
01586 } else {
01587 fprintf(outfile, "%s\n", "extendIPMContThreshold");
01588 }
01589 }
01590 if (args_info->extendIPMDeviationThreshold_given) {
01591 if (args_info->extendIPMDeviationThreshold_orig) {
01592 fprintf(outfile, "%s=\"%s\"\n", "extendIPMDeviationThreshold", args_info->extendIPMDeviationThreshold_orig);
01593 } else {
01594 fprintf(outfile, "%s\n", "extendIPMDeviationThreshold");
01595 }
01596 }
01597 if (args_info->extendIPMRectTop_given) {
01598 if (args_info->extendIPMRectTop_orig) {
01599 fprintf(outfile, "%s=\"%s\"\n", "extendIPMRectTop", args_info->extendIPMRectTop_orig);
01600 } else {
01601 fprintf(outfile, "%s\n", "extendIPMRectTop");
01602 }
01603 }
01604 if (args_info->extendIPMRectBottom_given) {
01605 if (args_info->extendIPMRectBottom_orig) {
01606 fprintf(outfile, "%s=\"%s\"\n", "extendIPMRectBottom", args_info->extendIPMRectBottom_orig);
01607 } else {
01608 fprintf(outfile, "%s\n", "extendIPMRectBottom");
01609 }
01610 }
01611 if (args_info->splineScoreJitter_given) {
01612 if (args_info->splineScoreJitter_orig) {
01613 fprintf(outfile, "%s=\"%s\"\n", "splineScoreJitter", args_info->splineScoreJitter_orig);
01614 } else {
01615 fprintf(outfile, "%s\n", "splineScoreJitter");
01616 }
01617 }
01618 if (args_info->splineScoreLengthRatio_given) {
01619 if (args_info->splineScoreLengthRatio_orig) {
01620 fprintf(outfile, "%s=\"%s\"\n", "splineScoreLengthRatio", args_info->splineScoreLengthRatio_orig);
01621 } else {
01622 fprintf(outfile, "%s\n", "splineScoreLengthRatio");
01623 }
01624 }
01625 if (args_info->splineScoreAngleRatio_given) {
01626 if (args_info->splineScoreAngleRatio_orig) {
01627 fprintf(outfile, "%s=\"%s\"\n", "splineScoreAngleRatio", args_info->splineScoreAngleRatio_orig);
01628 } else {
01629 fprintf(outfile, "%s\n", "splineScoreAngleRatio");
01630 }
01631 }
01632 if (args_info->splineScoreStep_given) {
01633 if (args_info->splineScoreStep_orig) {
01634 fprintf(outfile, "%s=\"%s\"\n", "splineScoreStep", args_info->splineScoreStep_orig);
01635 } else {
01636 fprintf(outfile, "%s\n", "splineScoreStep");
01637 }
01638 }
01639 if (args_info->splineTrackingNumAbsentFrames_given) {
01640 if (args_info->splineTrackingNumAbsentFrames_orig) {
01641 fprintf(outfile, "%s=\"%s\"\n", "splineTrackingNumAbsentFrames", args_info->splineTrackingNumAbsentFrames_orig);
01642 } else {
01643 fprintf(outfile, "%s\n", "splineTrackingNumAbsentFrames");
01644 }
01645 }
01646 if (args_info->splineTrackingNumSeenFrames_given) {
01647 if (args_info->splineTrackingNumSeenFrames_orig) {
01648 fprintf(outfile, "%s=\"%s\"\n", "splineTrackingNumSeenFrames", args_info->splineTrackingNumSeenFrames_orig);
01649 } else {
01650 fprintf(outfile, "%s\n", "splineTrackingNumSeenFrames");
01651 }
01652 }
01653 if (args_info->mergeSplineThetaThreshold_given) {
01654 if (args_info->mergeSplineThetaThreshold_orig) {
01655 fprintf(outfile, "%s=\"%s\"\n", "mergeSplineThetaThreshold", args_info->mergeSplineThetaThreshold_orig);
01656 } else {
01657 fprintf(outfile, "%s\n", "mergeSplineThetaThreshold");
01658 }
01659 }
01660 if (args_info->mergeSplineRThreshold_given) {
01661 if (args_info->mergeSplineRThreshold_orig) {
01662 fprintf(outfile, "%s=\"%s\"\n", "mergeSplineRThreshold", args_info->mergeSplineRThreshold_orig);
01663 } else {
01664 fprintf(outfile, "%s\n", "mergeSplineRThreshold");
01665 }
01666 }
01667 if (args_info->mergeSplineMeanThetaThreshold_given) {
01668 if (args_info->mergeSplineMeanThetaThreshold_orig) {
01669 fprintf(outfile, "%s=\"%s\"\n", "mergeSplineMeanThetaThreshold", args_info->mergeSplineMeanThetaThreshold_orig);
01670 } else {
01671 fprintf(outfile, "%s\n", "mergeSplineMeanThetaThreshold");
01672 }
01673 }
01674 if (args_info->mergeSplineMeanRThreshold_given) {
01675 if (args_info->mergeSplineMeanRThreshold_orig) {
01676 fprintf(outfile, "%s=\"%s\"\n", "mergeSplineMeanRThreshold", args_info->mergeSplineMeanRThreshold_orig);
01677 } else {
01678 fprintf(outfile, "%s\n", "mergeSplineMeanRThreshold");
01679 }
01680 }
01681 if (args_info->mergeSplineCentroidThreshold_given) {
01682 if (args_info->mergeSplineCentroidThreshold_orig) {
01683 fprintf(outfile, "%s=\"%s\"\n", "mergeSplineCentroidThreshold", args_info->mergeSplineCentroidThreshold_orig);
01684 } else {
01685 fprintf(outfile, "%s\n", "mergeSplineCentroidThreshold");
01686 }
01687 }
01688 if (args_info->lineTrackingNumAbsentFrames_given) {
01689 if (args_info->lineTrackingNumAbsentFrames_orig) {
01690 fprintf(outfile, "%s=\"%s\"\n", "lineTrackingNumAbsentFrames", args_info->lineTrackingNumAbsentFrames_orig);
01691 } else {
01692 fprintf(outfile, "%s\n", "lineTrackingNumAbsentFrames");
01693 }
01694 }
01695 if (args_info->lineTrackingNumSeenFrames_given) {
01696 if (args_info->lineTrackingNumSeenFrames_orig) {
01697 fprintf(outfile, "%s=\"%s\"\n", "lineTrackingNumSeenFrames", args_info->lineTrackingNumSeenFrames_orig);
01698 } else {
01699 fprintf(outfile, "%s\n", "lineTrackingNumSeenFrames");
01700 }
01701 }
01702 if (args_info->mergeLineThetaThreshold_given) {
01703 if (args_info->mergeLineThetaThreshold_orig) {
01704 fprintf(outfile, "%s=\"%s\"\n", "mergeLineThetaThreshold", args_info->mergeLineThetaThreshold_orig);
01705 } else {
01706 fprintf(outfile, "%s\n", "mergeLineThetaThreshold");
01707 }
01708 }
01709 if (args_info->mergeLineRThreshold_given) {
01710 if (args_info->mergeLineRThreshold_orig) {
01711 fprintf(outfile, "%s=\"%s\"\n", "mergeLineRThreshold", args_info->mergeLineRThreshold_orig);
01712 } else {
01713 fprintf(outfile, "%s\n", "mergeLineRThreshold");
01714 }
01715 }
01716 if (args_info->numStrips_given) {
01717 if (args_info->numStrips_orig) {
01718 fprintf(outfile, "%s=\"%s\"\n", "numStrips", args_info->numStrips_orig);
01719 } else {
01720 fprintf(outfile, "%s\n", "numStrips");
01721 }
01722 }
01723 if (args_info->checkSplines_given) {
01724 if (args_info->checkSplines_orig) {
01725 fprintf(outfile, "%s=\"%s\"\n", "checkSplines", args_info->checkSplines_orig);
01726 } else {
01727 fprintf(outfile, "%s\n", "checkSplines");
01728 }
01729 }
01730 if (args_info->checkSplinesCurvenessThreshold_given) {
01731 if (args_info->checkSplinesCurvenessThreshold_orig) {
01732 fprintf(outfile, "%s=\"%s\"\n", "checkSplinesCurvenessThreshold", args_info->checkSplinesCurvenessThreshold_orig);
01733 } else {
01734 fprintf(outfile, "%s\n", "checkSplinesCurvenessThreshold");
01735 }
01736 }
01737 if (args_info->checkSplinesLengthThreshold_given) {
01738 if (args_info->checkSplinesLengthThreshold_orig) {
01739 fprintf(outfile, "%s=\"%s\"\n", "checkSplinesLengthThreshold", args_info->checkSplinesLengthThreshold_orig);
01740 } else {
01741 fprintf(outfile, "%s\n", "checkSplinesLengthThreshold");
01742 }
01743 }
01744 if (args_info->checkSplinesThetaDiffThreshold_given) {
01745 if (args_info->checkSplinesThetaDiffThreshold_orig) {
01746 fprintf(outfile, "%s=\"%s\"\n", "checkSplinesThetaDiffThreshold", args_info->checkSplinesThetaDiffThreshold_orig);
01747 } else {
01748 fprintf(outfile, "%s\n", "checkSplinesThetaDiffThreshold");
01749 }
01750 }
01751 if (args_info->checkSplinesThetaThreshold_given) {
01752 if (args_info->checkSplinesThetaThreshold_orig) {
01753 fprintf(outfile, "%s=\"%s\"\n", "checkSplinesThetaThreshold", args_info->checkSplinesThetaThreshold_orig);
01754 } else {
01755 fprintf(outfile, "%s\n", "checkSplinesThetaThreshold");
01756 }
01757 }
01758 if (args_info->checkIPMSplines_given) {
01759 if (args_info->checkIPMSplines_orig) {
01760 fprintf(outfile, "%s=\"%s\"\n", "checkIPMSplines", args_info->checkIPMSplines_orig);
01761 } else {
01762 fprintf(outfile, "%s\n", "checkIPMSplines");
01763 }
01764 }
01765 if (args_info->checkIPMSplinesCurvenessThreshold_given) {
01766 if (args_info->checkIPMSplinesCurvenessThreshold_orig) {
01767 fprintf(outfile, "%s=\"%s\"\n", "checkIPMSplinesCurvenessThreshold", args_info->checkIPMSplinesCurvenessThreshold_orig);
01768 } else {
01769 fprintf(outfile, "%s\n", "checkIPMSplinesCurvenessThreshold");
01770 }
01771 }
01772 if (args_info->checkIPMSplinesLengthThreshold_given) {
01773 if (args_info->checkIPMSplinesLengthThreshold_orig) {
01774 fprintf(outfile, "%s=\"%s\"\n", "checkIPMSplinesLengthThreshold", args_info->checkIPMSplinesLengthThreshold_orig);
01775 } else {
01776 fprintf(outfile, "%s\n", "checkIPMSplinesLengthThreshold");
01777 }
01778 }
01779 if (args_info->checkIPMSplinesThetaDiffThreshold_given) {
01780 if (args_info->checkIPMSplinesThetaDiffThreshold_orig) {
01781 fprintf(outfile, "%s=\"%s\"\n", "checkIPMSplinesThetaDiffThreshold", args_info->checkIPMSplinesThetaDiffThreshold_orig);
01782 } else {
01783 fprintf(outfile, "%s\n", "checkIPMSplinesThetaDiffThreshold");
01784 }
01785 }
01786 if (args_info->checkIPMSplinesThetaThreshold_given) {
01787 if (args_info->checkIPMSplinesThetaThreshold_orig) {
01788 fprintf(outfile, "%s=\"%s\"\n", "checkIPMSplinesThetaThreshold", args_info->checkIPMSplinesThetaThreshold_orig);
01789 } else {
01790 fprintf(outfile, "%s\n", "checkIPMSplinesThetaThreshold");
01791 }
01792 }
01793 if (args_info->finalSplineScoreThreshold_given) {
01794 if (args_info->finalSplineScoreThreshold_orig) {
01795 fprintf(outfile, "%s=\"%s\"\n", "finalSplineScoreThreshold", args_info->finalSplineScoreThreshold_orig);
01796 } else {
01797 fprintf(outfile, "%s\n", "finalSplineScoreThreshold");
01798 }
01799 }
01800 if (args_info->useGroundPlane_given) {
01801 if (args_info->useGroundPlane_orig) {
01802 fprintf(outfile, "%s=\"%s\"\n", "useGroundPlane", args_info->useGroundPlane_orig);
01803 } else {
01804 fprintf(outfile, "%s\n", "useGroundPlane");
01805 }
01806 }
01807 if (args_info->checkColor_given) {
01808 if (args_info->checkColor_orig) {
01809 fprintf(outfile, "%s=\"%s\"\n", "checkColor", args_info->checkColor_orig);
01810 } else {
01811 fprintf(outfile, "%s\n", "checkColor");
01812 }
01813 }
01814 if (args_info->checkColorWindow_given) {
01815 if (args_info->checkColorWindow_orig) {
01816 fprintf(outfile, "%s=\"%s\"\n", "checkColorWindow", args_info->checkColorWindow_orig);
01817 } else {
01818 fprintf(outfile, "%s\n", "checkColorWindow");
01819 }
01820 }
01821 if (args_info->checkColorNumBins_given) {
01822 if (args_info->checkColorNumBins_orig) {
01823 fprintf(outfile, "%s=\"%s\"\n", "checkColorNumBins", args_info->checkColorNumBins_orig);
01824 } else {
01825 fprintf(outfile, "%s\n", "checkColorNumBins");
01826 }
01827 }
01828 if (args_info->checkColorNumYellowMin_given) {
01829 if (args_info->checkColorNumYellowMin_orig) {
01830 fprintf(outfile, "%s=\"%s\"\n", "checkColorNumYellowMin", args_info->checkColorNumYellowMin_orig);
01831 } else {
01832 fprintf(outfile, "%s\n", "checkColorNumYellowMin");
01833 }
01834 }
01835 if (args_info->checkColorRGMin_given) {
01836 if (args_info->checkColorRGMin_orig) {
01837 fprintf(outfile, "%s=\"%s\"\n", "checkColorRGMin", args_info->checkColorRGMin_orig);
01838 } else {
01839 fprintf(outfile, "%s\n", "checkColorRGMin");
01840 }
01841 }
01842 if (args_info->checkColorRGMax_given) {
01843 if (args_info->checkColorRGMax_orig) {
01844 fprintf(outfile, "%s=\"%s\"\n", "checkColorRGMax", args_info->checkColorRGMax_orig);
01845 } else {
01846 fprintf(outfile, "%s\n", "checkColorRGMax");
01847 }
01848 }
01849 if (args_info->checkColorGBMin_given) {
01850 if (args_info->checkColorGBMin_orig) {
01851 fprintf(outfile, "%s=\"%s\"\n", "checkColorGBMin", args_info->checkColorGBMin_orig);
01852 } else {
01853 fprintf(outfile, "%s\n", "checkColorGBMin");
01854 }
01855 }
01856 if (args_info->checkColorRBMin_given) {
01857 if (args_info->checkColorRBMin_orig) {
01858 fprintf(outfile, "%s=\"%s\"\n", "checkColorRBMin", args_info->checkColorRBMin_orig);
01859 } else {
01860 fprintf(outfile, "%s\n", "checkColorRBMin");
01861 }
01862 }
01863 if (args_info->checkColorRBFThreshold_given) {
01864 if (args_info->checkColorRBFThreshold_orig) {
01865 fprintf(outfile, "%s=\"%s\"\n", "checkColorRBFThreshold", args_info->checkColorRBFThreshold_orig);
01866 } else {
01867 fprintf(outfile, "%s\n", "checkColorRBFThreshold");
01868 }
01869 }
01870 if (args_info->checkColorRBF_given) {
01871 if (args_info->checkColorRBF_orig) {
01872 fprintf(outfile, "%s=\"%s\"\n", "checkColorRBF", args_info->checkColorRBF_orig);
01873 } else {
01874 fprintf(outfile, "%s\n", "checkColorRBF");
01875 }
01876 }
01877 if (args_info->ipmWindowClear_given) {
01878 if (args_info->ipmWindowClear_orig) {
01879 fprintf(outfile, "%s=\"%s\"\n", "ipmWindowClear", args_info->ipmWindowClear_orig);
01880 } else {
01881 fprintf(outfile, "%s\n", "ipmWindowClear");
01882 }
01883 }
01884 if (args_info->ipmWindowLeft_given) {
01885 if (args_info->ipmWindowLeft_orig) {
01886 fprintf(outfile, "%s=\"%s\"\n", "ipmWindowLeft", args_info->ipmWindowLeft_orig);
01887 } else {
01888 fprintf(outfile, "%s\n", "ipmWindowLeft");
01889 }
01890 }
01891 if (args_info->ipmWindowRight_given) {
01892 if (args_info->ipmWindowRight_orig) {
01893 fprintf(outfile, "%s=\"%s\"\n", "ipmWindowRight", args_info->ipmWindowRight_orig);
01894 } else {
01895 fprintf(outfile, "%s\n", "ipmWindowRight");
01896 }
01897 }
01898 if (args_info->checkLaneWidth_given) {
01899 if (args_info->checkLaneWidth_orig) {
01900 fprintf(outfile, "%s=\"%s\"\n", "checkLaneWidth", args_info->checkLaneWidth_orig);
01901 } else {
01902 fprintf(outfile, "%s\n", "checkLaneWidth");
01903 }
01904 }
01905 if (args_info->checkLaneWidthMean_given) {
01906 if (args_info->checkLaneWidthMean_orig) {
01907 fprintf(outfile, "%s=\"%s\"\n", "checkLaneWidthMean", args_info->checkLaneWidthMean_orig);
01908 } else {
01909 fprintf(outfile, "%s\n", "checkLaneWidthMean");
01910 }
01911 }
01912 if (args_info->checkLaneWidthStd_given) {
01913 if (args_info->checkLaneWidthStd_orig) {
01914 fprintf(outfile, "%s=\"%s\"\n", "checkLaneWidthStd", args_info->checkLaneWidthStd_orig);
01915 } else {
01916 fprintf(outfile, "%s\n", "checkLaneWidthStd");
01917 }
01918 }
01919
01920 fclose (outfile);
01921
01922 i = EXIT_SUCCESS;
01923 return i;
01924 }
01925
01926 void
01927 LaneDetectorParser_free (struct LaneDetectorParserInfo *args_info)
01928 {
01929 LaneDetectorParser_release (args_info);
01930 }
01931
01932
01933
01934
01935 char *
01936 gengetopt_strdup (const char *s)
01937 {
01938 char *result = NULL;
01939 if (!s)
01940 return result;
01941
01942 result = (char*)malloc(strlen(s) + 1);
01943 if (result == (char*)0)
01944 return (char*)0;
01945 strcpy(result, s);
01946 return result;
01947 }
01948
01949 int
01950 LaneDetectorParser (int argc, char * const *argv, struct LaneDetectorParserInfo *args_info)
01951 {
01952 return LaneDetectorParser2 (argc, argv, args_info, 0, 1, 1);
01953 }
01954
01955 int
01956 LaneDetectorParser2 (int argc, char * const *argv, struct LaneDetectorParserInfo *args_info, int override, int initialize, int check_required)
01957 {
01958 int result;
01959
01960 result = LaneDetectorParser_internal (argc, argv, args_info, override, initialize, check_required, NULL);
01961
01962 if (result == EXIT_FAILURE)
01963 {
01964 LaneDetectorParser_free (args_info);
01965 exit (EXIT_FAILURE);
01966 }
01967
01968 return result;
01969 }
01970
01971 int
01972 LaneDetectorParser_required (struct LaneDetectorParserInfo *args_info, const char *prog_name)
01973 {
01974 int result = EXIT_SUCCESS;
01975
01976 if (LaneDetectorParser_required2(args_info, prog_name, NULL) > 0)
01977 result = EXIT_FAILURE;
01978
01979 if (result == EXIT_FAILURE)
01980 {
01981 LaneDetectorParser_free (args_info);
01982 exit (EXIT_FAILURE);
01983 }
01984
01985 return result;
01986 }
01987
01988 int
01989 LaneDetectorParser_required2 (struct LaneDetectorParserInfo *args_info, const char *prog_name, const char *additional_error)
01990 {
01991 int error = 0;
01992
01993
01994 if (! args_info->ipmWidth_given)
01995 {
01996 fprintf (stderr, "%s: '--ipmWidth' option required%s\n", prog_name, (additional_error ? additional_error : ""));
01997 error = 1;
01998 }
01999
02000 if (! args_info->ipmHeight_given)
02001 {
02002 fprintf (stderr, "%s: '--ipmHeight' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02003 error = 1;
02004 }
02005
02006 if (! args_info->ipmTop_given)
02007 {
02008 fprintf (stderr, "%s: '--ipmTop' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02009 error = 1;
02010 }
02011
02012 if (! args_info->ipmLeft_given)
02013 {
02014 fprintf (stderr, "%s: '--ipmLeft' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02015 error = 1;
02016 }
02017
02018 if (! args_info->ipmRight_given)
02019 {
02020 fprintf (stderr, "%s: '--ipmRight' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02021 error = 1;
02022 }
02023
02024 if (! args_info->ipmBottom_given)
02025 {
02026 fprintf (stderr, "%s: '--ipmBottom' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02027 error = 1;
02028 }
02029
02030 if (! args_info->ipmInterpolation_given)
02031 {
02032 fprintf (stderr, "%s: '--ipmInterpolation' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02033 error = 1;
02034 }
02035
02036 if (! args_info->lineWidth_given)
02037 {
02038 fprintf (stderr, "%s: '--lineWidth' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02039 error = 1;
02040 }
02041
02042 if (! args_info->lineHeight_given)
02043 {
02044 fprintf (stderr, "%s: '--lineHeight' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02045 error = 1;
02046 }
02047
02048 if (! args_info->kernelWidth_given)
02049 {
02050 fprintf (stderr, "%s: '--kernelWidth' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02051 error = 1;
02052 }
02053
02054 if (! args_info->kernelHeight_given)
02055 {
02056 fprintf (stderr, "%s: '--kernelHeight' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02057 error = 1;
02058 }
02059
02060 if (! args_info->lowerQuantile_given)
02061 {
02062 fprintf (stderr, "%s: '--lowerQuantile' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02063 error = 1;
02064 }
02065
02066 if (! args_info->localMaxima_given)
02067 {
02068 fprintf (stderr, "%s: '--localMaxima' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02069 error = 1;
02070 }
02071
02072 if (! args_info->groupingType_given)
02073 {
02074 fprintf (stderr, "%s: '--groupingType' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02075 error = 1;
02076 }
02077
02078 if (! args_info->binarize_given)
02079 {
02080 fprintf (stderr, "%s: '--binarize' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02081 error = 1;
02082 }
02083
02084 if (! args_info->detectionThreshold_given)
02085 {
02086 fprintf (stderr, "%s: '--detectionThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02087 error = 1;
02088 }
02089
02090 if (! args_info->smoothScores_given)
02091 {
02092 fprintf (stderr, "%s: '--smoothScores' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02093 error = 1;
02094 }
02095
02096 if (! args_info->rMin_given)
02097 {
02098 fprintf (stderr, "%s: '--rMin' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02099 error = 1;
02100 }
02101
02102 if (! args_info->rMax_given)
02103 {
02104 fprintf (stderr, "%s: '--rMax' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02105 error = 1;
02106 }
02107
02108 if (! args_info->rStep_given)
02109 {
02110 fprintf (stderr, "%s: '--rStep' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02111 error = 1;
02112 }
02113
02114 if (! args_info->thetaMin_given)
02115 {
02116 fprintf (stderr, "%s: '--thetaMin' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02117 error = 1;
02118 }
02119
02120 if (! args_info->thetaMax_given)
02121 {
02122 fprintf (stderr, "%s: '--thetaMax' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02123 error = 1;
02124 }
02125
02126 if (! args_info->thetaStep_given)
02127 {
02128 fprintf (stderr, "%s: '--thetaStep' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02129 error = 1;
02130 }
02131
02132 if (! args_info->ipmVpPortion_given)
02133 {
02134 fprintf (stderr, "%s: '--ipmVpPortion' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02135 error = 1;
02136 }
02137
02138 if (! args_info->getEndPoints_given)
02139 {
02140 fprintf (stderr, "%s: '--getEndPoints' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02141 error = 1;
02142 }
02143
02144 if (! args_info->group_given)
02145 {
02146 fprintf (stderr, "%s: '--group' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02147 error = 1;
02148 }
02149
02150 if (! args_info->groupThreshold_given)
02151 {
02152 fprintf (stderr, "%s: '--groupThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02153 error = 1;
02154 }
02155
02156 if (! args_info->ransac_given)
02157 {
02158 fprintf (stderr, "%s: '--ransac' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02159 error = 1;
02160 }
02161
02162 if (! args_info->ransacLineNumSamples_given)
02163 {
02164 fprintf (stderr, "%s: '--ransacLineNumSamples' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02165 error = 1;
02166 }
02167
02168 if (! args_info->ransacLineNumIterations_given)
02169 {
02170 fprintf (stderr, "%s: '--ransacLineNumIterations' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02171 error = 1;
02172 }
02173
02174 if (! args_info->ransacLineNumGoodFit_given)
02175 {
02176 fprintf (stderr, "%s: '--ransacLineNumGoodFit' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02177 error = 1;
02178 }
02179
02180 if (! args_info->ransacLineThreshold_given)
02181 {
02182 fprintf (stderr, "%s: '--ransacLineThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02183 error = 1;
02184 }
02185
02186 if (! args_info->ransacLineScoreThreshold_given)
02187 {
02188 fprintf (stderr, "%s: '--ransacLineScoreThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02189 error = 1;
02190 }
02191
02192 if (! args_info->ransacLineBinarize_given)
02193 {
02194 fprintf (stderr, "%s: '--ransacLineBinarize' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02195 error = 1;
02196 }
02197
02198 if (! args_info->ransacLineWindow_given)
02199 {
02200 fprintf (stderr, "%s: '--ransacLineWindow' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02201 error = 1;
02202 }
02203
02204 if (! args_info->ransacSplineNumSamples_given)
02205 {
02206 fprintf (stderr, "%s: '--ransacSplineNumSamples' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02207 error = 1;
02208 }
02209
02210 if (! args_info->ransacSplineNumIterations_given)
02211 {
02212 fprintf (stderr, "%s: '--ransacSplineNumIterations' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02213 error = 1;
02214 }
02215
02216 if (! args_info->ransacSplineNumGoodFit_given)
02217 {
02218 fprintf (stderr, "%s: '--ransacSplineNumGoodFit' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02219 error = 1;
02220 }
02221
02222 if (! args_info->ransacSplineThreshold_given)
02223 {
02224 fprintf (stderr, "%s: '--ransacSplineThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02225 error = 1;
02226 }
02227
02228 if (! args_info->ransacSplineScoreThreshold_given)
02229 {
02230 fprintf (stderr, "%s: '--ransacSplineScoreThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02231 error = 1;
02232 }
02233
02234 if (! args_info->ransacSplineBinarize_given)
02235 {
02236 fprintf (stderr, "%s: '--ransacSplineBinarize' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02237 error = 1;
02238 }
02239
02240 if (! args_info->ransacSplineWindow_given)
02241 {
02242 fprintf (stderr, "%s: '--ransacSplineWindow' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02243 error = 1;
02244 }
02245
02246 if (! args_info->ransacSplineDegree_given)
02247 {
02248 fprintf (stderr, "%s: '--ransacSplineDegree' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02249 error = 1;
02250 }
02251
02252 if (! args_info->ransacSpline_given)
02253 {
02254 fprintf (stderr, "%s: '--ransacSpline' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02255 error = 1;
02256 }
02257
02258 if (! args_info->ransacLine_given)
02259 {
02260 fprintf (stderr, "%s: '--ransacLine' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02261 error = 1;
02262 }
02263
02264 if (! args_info->ransacSplineStep_given)
02265 {
02266 fprintf (stderr, "%s: '--ransacSplineStep' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02267 error = 1;
02268 }
02269
02270 if (! args_info->overlapThreshold_given)
02271 {
02272 fprintf (stderr, "%s: '--overlapThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02273 error = 1;
02274 }
02275
02276 if (! args_info->localizeAngleThreshold_given)
02277 {
02278 fprintf (stderr, "%s: '--localizeAngleThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02279 error = 1;
02280 }
02281
02282 if (! args_info->localizeNumLinePixels_given)
02283 {
02284 fprintf (stderr, "%s: '--localizeNumLinePixels' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02285 error = 1;
02286 }
02287
02288 if (! args_info->extendAngleThreshold_given)
02289 {
02290 fprintf (stderr, "%s: '--extendAngleThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02291 error = 1;
02292 }
02293
02294 if (! args_info->extendMeanDirAngleThreshold_given)
02295 {
02296 fprintf (stderr, "%s: '--extendMeanDirAngleThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02297 error = 1;
02298 }
02299
02300 if (! args_info->extendLinePixelsTangent_given)
02301 {
02302 fprintf (stderr, "%s: '--extendLinePixelsTangent' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02303 error = 1;
02304 }
02305
02306 if (! args_info->extendLinePixelsNormal_given)
02307 {
02308 fprintf (stderr, "%s: '--extendLinePixelsNormal' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02309 error = 1;
02310 }
02311
02312 if (! args_info->extendContThreshold_given)
02313 {
02314 fprintf (stderr, "%s: '--extendContThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02315 error = 1;
02316 }
02317
02318 if (! args_info->extendDeviationThreshold_given)
02319 {
02320 fprintf (stderr, "%s: '--extendDeviationThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02321 error = 1;
02322 }
02323
02324 if (! args_info->extendRectTop_given)
02325 {
02326 fprintf (stderr, "%s: '--extendRectTop' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02327 error = 1;
02328 }
02329
02330 if (! args_info->extendRectBottom_given)
02331 {
02332 fprintf (stderr, "%s: '--extendRectBottom' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02333 error = 1;
02334 }
02335
02336 if (! args_info->extendIPMAngleThreshold_given)
02337 {
02338 fprintf (stderr, "%s: '--extendIPMAngleThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02339 error = 1;
02340 }
02341
02342 if (! args_info->extendIPMMeanDirAngleThreshold_given)
02343 {
02344 fprintf (stderr, "%s: '--extendIPMMeanDirAngleThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02345 error = 1;
02346 }
02347
02348 if (! args_info->extendIPMLinePixelsTangent_given)
02349 {
02350 fprintf (stderr, "%s: '--extendIPMLinePixelsTangent' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02351 error = 1;
02352 }
02353
02354 if (! args_info->extendIPMLinePixelsNormal_given)
02355 {
02356 fprintf (stderr, "%s: '--extendIPMLinePixelsNormal' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02357 error = 1;
02358 }
02359
02360 if (! args_info->extendIPMContThreshold_given)
02361 {
02362 fprintf (stderr, "%s: '--extendIPMContThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02363 error = 1;
02364 }
02365
02366 if (! args_info->extendIPMDeviationThreshold_given)
02367 {
02368 fprintf (stderr, "%s: '--extendIPMDeviationThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02369 error = 1;
02370 }
02371
02372 if (! args_info->extendIPMRectTop_given)
02373 {
02374 fprintf (stderr, "%s: '--extendIPMRectTop' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02375 error = 1;
02376 }
02377
02378 if (! args_info->extendIPMRectBottom_given)
02379 {
02380 fprintf (stderr, "%s: '--extendIPMRectBottom' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02381 error = 1;
02382 }
02383
02384 if (! args_info->splineScoreJitter_given)
02385 {
02386 fprintf (stderr, "%s: '--splineScoreJitter' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02387 error = 1;
02388 }
02389
02390 if (! args_info->splineScoreLengthRatio_given)
02391 {
02392 fprintf (stderr, "%s: '--splineScoreLengthRatio' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02393 error = 1;
02394 }
02395
02396 if (! args_info->splineScoreAngleRatio_given)
02397 {
02398 fprintf (stderr, "%s: '--splineScoreAngleRatio' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02399 error = 1;
02400 }
02401
02402 if (! args_info->splineScoreStep_given)
02403 {
02404 fprintf (stderr, "%s: '--splineScoreStep' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02405 error = 1;
02406 }
02407
02408 if (! args_info->splineTrackingNumAbsentFrames_given)
02409 {
02410 fprintf (stderr, "%s: '--splineTrackingNumAbsentFrames' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02411 error = 1;
02412 }
02413
02414 if (! args_info->splineTrackingNumSeenFrames_given)
02415 {
02416 fprintf (stderr, "%s: '--splineTrackingNumSeenFrames' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02417 error = 1;
02418 }
02419
02420 if (! args_info->mergeSplineThetaThreshold_given)
02421 {
02422 fprintf (stderr, "%s: '--mergeSplineThetaThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02423 error = 1;
02424 }
02425
02426 if (! args_info->mergeSplineRThreshold_given)
02427 {
02428 fprintf (stderr, "%s: '--mergeSplineRThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02429 error = 1;
02430 }
02431
02432 if (! args_info->mergeSplineMeanThetaThreshold_given)
02433 {
02434 fprintf (stderr, "%s: '--mergeSplineMeanThetaThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02435 error = 1;
02436 }
02437
02438 if (! args_info->mergeSplineMeanRThreshold_given)
02439 {
02440 fprintf (stderr, "%s: '--mergeSplineMeanRThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02441 error = 1;
02442 }
02443
02444 if (! args_info->mergeSplineCentroidThreshold_given)
02445 {
02446 fprintf (stderr, "%s: '--mergeSplineCentroidThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02447 error = 1;
02448 }
02449
02450 if (! args_info->lineTrackingNumAbsentFrames_given)
02451 {
02452 fprintf (stderr, "%s: '--lineTrackingNumAbsentFrames' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02453 error = 1;
02454 }
02455
02456 if (! args_info->lineTrackingNumSeenFrames_given)
02457 {
02458 fprintf (stderr, "%s: '--lineTrackingNumSeenFrames' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02459 error = 1;
02460 }
02461
02462 if (! args_info->mergeLineThetaThreshold_given)
02463 {
02464 fprintf (stderr, "%s: '--mergeLineThetaThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02465 error = 1;
02466 }
02467
02468 if (! args_info->mergeLineRThreshold_given)
02469 {
02470 fprintf (stderr, "%s: '--mergeLineRThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02471 error = 1;
02472 }
02473
02474 if (! args_info->numStrips_given)
02475 {
02476 fprintf (stderr, "%s: '--numStrips' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02477 error = 1;
02478 }
02479
02480 if (! args_info->checkSplines_given)
02481 {
02482 fprintf (stderr, "%s: '--checkSplines' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02483 error = 1;
02484 }
02485
02486 if (! args_info->checkSplinesCurvenessThreshold_given)
02487 {
02488 fprintf (stderr, "%s: '--checkSplinesCurvenessThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02489 error = 1;
02490 }
02491
02492 if (! args_info->checkSplinesLengthThreshold_given)
02493 {
02494 fprintf (stderr, "%s: '--checkSplinesLengthThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02495 error = 1;
02496 }
02497
02498 if (! args_info->checkSplinesThetaDiffThreshold_given)
02499 {
02500 fprintf (stderr, "%s: '--checkSplinesThetaDiffThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02501 error = 1;
02502 }
02503
02504 if (! args_info->checkSplinesThetaThreshold_given)
02505 {
02506 fprintf (stderr, "%s: '--checkSplinesThetaThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02507 error = 1;
02508 }
02509
02510 if (! args_info->checkIPMSplines_given)
02511 {
02512 fprintf (stderr, "%s: '--checkIPMSplines' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02513 error = 1;
02514 }
02515
02516 if (! args_info->checkIPMSplinesCurvenessThreshold_given)
02517 {
02518 fprintf (stderr, "%s: '--checkIPMSplinesCurvenessThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02519 error = 1;
02520 }
02521
02522 if (! args_info->checkIPMSplinesLengthThreshold_given)
02523 {
02524 fprintf (stderr, "%s: '--checkIPMSplinesLengthThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02525 error = 1;
02526 }
02527
02528 if (! args_info->checkIPMSplinesThetaDiffThreshold_given)
02529 {
02530 fprintf (stderr, "%s: '--checkIPMSplinesThetaDiffThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02531 error = 1;
02532 }
02533
02534 if (! args_info->checkIPMSplinesThetaThreshold_given)
02535 {
02536 fprintf (stderr, "%s: '--checkIPMSplinesThetaThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02537 error = 1;
02538 }
02539
02540 if (! args_info->finalSplineScoreThreshold_given)
02541 {
02542 fprintf (stderr, "%s: '--finalSplineScoreThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02543 error = 1;
02544 }
02545
02546 if (! args_info->useGroundPlane_given)
02547 {
02548 fprintf (stderr, "%s: '--useGroundPlane' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02549 error = 1;
02550 }
02551
02552 if (! args_info->checkColor_given)
02553 {
02554 fprintf (stderr, "%s: '--checkColor' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02555 error = 1;
02556 }
02557
02558 if (! args_info->checkColorWindow_given)
02559 {
02560 fprintf (stderr, "%s: '--checkColorWindow' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02561 error = 1;
02562 }
02563
02564 if (! args_info->checkColorNumBins_given)
02565 {
02566 fprintf (stderr, "%s: '--checkColorNumBins' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02567 error = 1;
02568 }
02569
02570 if (! args_info->checkColorNumYellowMin_given)
02571 {
02572 fprintf (stderr, "%s: '--checkColorNumYellowMin' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02573 error = 1;
02574 }
02575
02576 if (! args_info->checkColorRGMin_given)
02577 {
02578 fprintf (stderr, "%s: '--checkColorRGMin' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02579 error = 1;
02580 }
02581
02582 if (! args_info->checkColorRGMax_given)
02583 {
02584 fprintf (stderr, "%s: '--checkColorRGMax' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02585 error = 1;
02586 }
02587
02588 if (! args_info->checkColorGBMin_given)
02589 {
02590 fprintf (stderr, "%s: '--checkColorGBMin' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02591 error = 1;
02592 }
02593
02594 if (! args_info->checkColorRBMin_given)
02595 {
02596 fprintf (stderr, "%s: '--checkColorRBMin' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02597 error = 1;
02598 }
02599
02600 if (! args_info->checkColorRBFThreshold_given)
02601 {
02602 fprintf (stderr, "%s: '--checkColorRBFThreshold' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02603 error = 1;
02604 }
02605
02606 if (! args_info->checkColorRBF_given)
02607 {
02608 fprintf (stderr, "%s: '--checkColorRBF' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02609 error = 1;
02610 }
02611
02612 if (! args_info->ipmWindowClear_given)
02613 {
02614 fprintf (stderr, "%s: '--ipmWindowClear' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02615 error = 1;
02616 }
02617
02618 if (! args_info->ipmWindowLeft_given)
02619 {
02620 fprintf (stderr, "%s: '--ipmWindowLeft' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02621 error = 1;
02622 }
02623
02624 if (! args_info->ipmWindowRight_given)
02625 {
02626 fprintf (stderr, "%s: '--ipmWindowRight' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02627 error = 1;
02628 }
02629
02630 if (! args_info->checkLaneWidth_given)
02631 {
02632 fprintf (stderr, "%s: '--checkLaneWidth' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02633 error = 1;
02634 }
02635
02636 if (! args_info->checkLaneWidthMean_given)
02637 {
02638 fprintf (stderr, "%s: '--checkLaneWidthMean' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02639 error = 1;
02640 }
02641
02642 if (! args_info->checkLaneWidthStd_given)
02643 {
02644 fprintf (stderr, "%s: '--checkLaneWidthStd' option required%s\n", prog_name, (additional_error ? additional_error : ""));
02645 error = 1;
02646 }
02647
02648
02649
02650
02651 return error;
02652 }
02653
02654 int
02655 LaneDetectorParser_internal (int argc, char * const *argv, struct LaneDetectorParserInfo *args_info, int override, int initialize, int check_required, const char *additional_error)
02656 {
02657 int c;
02658
02659 int error = 0;
02660 struct LaneDetectorParserInfo local_args_info;
02661
02662 if (initialize)
02663 LaneDetectorParser_init (args_info);
02664
02665 LaneDetectorParser_init (&local_args_info);
02666
02667 optarg = 0;
02668 optind = 0;
02669 opterr = 1;
02670 optopt = '?';
02671
02672 while (1)
02673 {
02674 int option_index = 0;
02675 char *stop_char;
02676
02677 static struct option long_options[] = {
02678 { "help", 0, NULL, 'h' },
02679 { "version", 0, NULL, 'V' },
02680 { "ipmWidth", 1, NULL, 0 },
02681 { "ipmHeight", 1, NULL, 0 },
02682 { "ipmTop", 1, NULL, 0 },
02683 { "ipmLeft", 1, NULL, 0 },
02684 { "ipmRight", 1, NULL, 0 },
02685 { "ipmBottom", 1, NULL, 0 },
02686 { "ipmInterpolation", 1, NULL, 0 },
02687 { "lineWidth", 1, NULL, 0 },
02688 { "lineHeight", 1, NULL, 0 },
02689 { "kernelWidth", 1, NULL, 0 },
02690 { "kernelHeight", 1, NULL, 0 },
02691 { "lowerQuantile", 1, NULL, 0 },
02692 { "localMaxima", 1, NULL, 0 },
02693 { "groupingType", 1, NULL, 0 },
02694 { "binarize", 1, NULL, 0 },
02695 { "detectionThreshold", 1, NULL, 0 },
02696 { "smoothScores", 1, NULL, 0 },
02697 { "rMin", 1, NULL, 0 },
02698 { "rMax", 1, NULL, 0 },
02699 { "rStep", 1, NULL, 0 },
02700 { "thetaMin", 1, NULL, 0 },
02701 { "thetaMax", 1, NULL, 0 },
02702 { "thetaStep", 1, NULL, 0 },
02703 { "ipmVpPortion", 1, NULL, 0 },
02704 { "getEndPoints", 1, NULL, 0 },
02705 { "group", 1, NULL, 0 },
02706 { "groupThreshold", 1, NULL, 0 },
02707 { "ransac", 1, NULL, 0 },
02708 { "ransacLineNumSamples", 1, NULL, 0 },
02709 { "ransacLineNumIterations", 1, NULL, 0 },
02710 { "ransacLineNumGoodFit", 1, NULL, 0 },
02711 { "ransacLineThreshold", 1, NULL, 0 },
02712 { "ransacLineScoreThreshold", 1, NULL, 0 },
02713 { "ransacLineBinarize", 1, NULL, 0 },
02714 { "ransacLineWindow", 1, NULL, 0 },
02715 { "ransacSplineNumSamples", 1, NULL, 0 },
02716 { "ransacSplineNumIterations", 1, NULL, 0 },
02717 { "ransacSplineNumGoodFit", 1, NULL, 0 },
02718 { "ransacSplineThreshold", 1, NULL, 0 },
02719 { "ransacSplineScoreThreshold", 1, NULL, 0 },
02720 { "ransacSplineBinarize", 1, NULL, 0 },
02721 { "ransacSplineWindow", 1, NULL, 0 },
02722 { "ransacSplineDegree", 1, NULL, 0 },
02723 { "ransacSpline", 1, NULL, 0 },
02724 { "ransacLine", 1, NULL, 0 },
02725 { "ransacSplineStep", 1, NULL, 0 },
02726 { "overlapThreshold", 1, NULL, 0 },
02727 { "localizeAngleThreshold", 1, NULL, 0 },
02728 { "localizeNumLinePixels", 1, NULL, 0 },
02729 { "extendAngleThreshold", 1, NULL, 0 },
02730 { "extendMeanDirAngleThreshold", 1, NULL, 0 },
02731 { "extendLinePixelsTangent", 1, NULL, 0 },
02732 { "extendLinePixelsNormal", 1, NULL, 0 },
02733 { "extendContThreshold", 1, NULL, 0 },
02734 { "extendDeviationThreshold", 1, NULL, 0 },
02735 { "extendRectTop", 1, NULL, 0 },
02736 { "extendRectBottom", 1, NULL, 0 },
02737 { "extendIPMAngleThreshold", 1, NULL, 0 },
02738 { "extendIPMMeanDirAngleThreshold", 1, NULL, 0 },
02739 { "extendIPMLinePixelsTangent", 1, NULL, 0 },
02740 { "extendIPMLinePixelsNormal", 1, NULL, 0 },
02741 { "extendIPMContThreshold", 1, NULL, 0 },
02742 { "extendIPMDeviationThreshold", 1, NULL, 0 },
02743 { "extendIPMRectTop", 1, NULL, 0 },
02744 { "extendIPMRectBottom", 1, NULL, 0 },
02745 { "splineScoreJitter", 1, NULL, 0 },
02746 { "splineScoreLengthRatio", 1, NULL, 0 },
02747 { "splineScoreAngleRatio", 1, NULL, 0 },
02748 { "splineScoreStep", 1, NULL, 0 },
02749 { "splineTrackingNumAbsentFrames", 1, NULL, 0 },
02750 { "splineTrackingNumSeenFrames", 1, NULL, 0 },
02751 { "mergeSplineThetaThreshold", 1, NULL, 0 },
02752 { "mergeSplineRThreshold", 1, NULL, 0 },
02753 { "mergeSplineMeanThetaThreshold", 1, NULL, 0 },
02754 { "mergeSplineMeanRThreshold", 1, NULL, 0 },
02755 { "mergeSplineCentroidThreshold", 1, NULL, 0 },
02756 { "lineTrackingNumAbsentFrames", 1, NULL, 0 },
02757 { "lineTrackingNumSeenFrames", 1, NULL, 0 },
02758 { "mergeLineThetaThreshold", 1, NULL, 0 },
02759 { "mergeLineRThreshold", 1, NULL, 0 },
02760 { "numStrips", 1, NULL, 0 },
02761 { "checkSplines", 1, NULL, 0 },
02762 { "checkSplinesCurvenessThreshold", 1, NULL, 0 },
02763 { "checkSplinesLengthThreshold", 1, NULL, 0 },
02764 { "checkSplinesThetaDiffThreshold", 1, NULL, 0 },
02765 { "checkSplinesThetaThreshold", 1, NULL, 0 },
02766 { "checkIPMSplines", 1, NULL, 0 },
02767 { "checkIPMSplinesCurvenessThreshold", 1, NULL, 0 },
02768 { "checkIPMSplinesLengthThreshold", 1, NULL, 0 },
02769 { "checkIPMSplinesThetaDiffThreshold", 1, NULL, 0 },
02770 { "checkIPMSplinesThetaThreshold", 1, NULL, 0 },
02771 { "finalSplineScoreThreshold", 1, NULL, 0 },
02772 { "useGroundPlane", 1, NULL, 0 },
02773 { "checkColor", 1, NULL, 0 },
02774 { "checkColorWindow", 1, NULL, 0 },
02775 { "checkColorNumBins", 1, NULL, 0 },
02776 { "checkColorNumYellowMin", 1, NULL, 0 },
02777 { "checkColorRGMin", 1, NULL, 0 },
02778 { "checkColorRGMax", 1, NULL, 0 },
02779 { "checkColorGBMin", 1, NULL, 0 },
02780 { "checkColorRBMin", 1, NULL, 0 },
02781 { "checkColorRBFThreshold", 1, NULL, 0 },
02782 { "checkColorRBF", 1, NULL, 0 },
02783 { "ipmWindowClear", 1, NULL, 0 },
02784 { "ipmWindowLeft", 1, NULL, 0 },
02785 { "ipmWindowRight", 1, NULL, 0 },
02786 { "checkLaneWidth", 1, NULL, 0 },
02787 { "checkLaneWidthMean", 1, NULL, 0 },
02788 { "checkLaneWidthStd", 1, NULL, 0 },
02789 { NULL, 0, NULL, 0 }
02790 };
02791
02792 stop_char = 0;
02793 c = getopt_long (argc, argv, "hV", long_options, &option_index);
02794
02795 if (c == -1) break;
02796
02797 switch (c)
02798 {
02799 case 'h':
02800 LaneDetectorParser_print_help ();
02801 LaneDetectorParser_free (&local_args_info);
02802 exit (EXIT_SUCCESS);
02803
02804 case 'V':
02805 LaneDetectorParser_print_version ();
02806 LaneDetectorParser_free (&local_args_info);
02807 exit (EXIT_SUCCESS);
02808
02809
02810 case 0:
02811
02812 if (strcmp (long_options[option_index].name, "ipmWidth") == 0)
02813 {
02814 if (local_args_info.ipmWidth_given)
02815 {
02816 fprintf (stderr, "%s: `--ipmWidth' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
02817 goto failure;
02818 }
02819 if (args_info->ipmWidth_given && ! override)
02820 continue;
02821 local_args_info.ipmWidth_given = 1;
02822 args_info->ipmWidth_given = 1;
02823 args_info->ipmWidth_arg = strtol (optarg, &stop_char, 0);
02824 if (!(stop_char && *stop_char == '\0')) {
02825 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
02826 goto failure;
02827 }
02828 if (args_info->ipmWidth_orig)
02829 free (args_info->ipmWidth_orig);
02830 args_info->ipmWidth_orig = gengetopt_strdup (optarg);
02831 }
02832
02833 else if (strcmp (long_options[option_index].name, "ipmHeight") == 0)
02834 {
02835 if (local_args_info.ipmHeight_given)
02836 {
02837 fprintf (stderr, "%s: `--ipmHeight' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
02838 goto failure;
02839 }
02840 if (args_info->ipmHeight_given && ! override)
02841 continue;
02842 local_args_info.ipmHeight_given = 1;
02843 args_info->ipmHeight_given = 1;
02844 args_info->ipmHeight_arg = strtol (optarg, &stop_char, 0);
02845 if (!(stop_char && *stop_char == '\0')) {
02846 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
02847 goto failure;
02848 }
02849 if (args_info->ipmHeight_orig)
02850 free (args_info->ipmHeight_orig);
02851 args_info->ipmHeight_orig = gengetopt_strdup (optarg);
02852 }
02853
02854 else if (strcmp (long_options[option_index].name, "ipmTop") == 0)
02855 {
02856 if (local_args_info.ipmTop_given)
02857 {
02858 fprintf (stderr, "%s: `--ipmTop' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
02859 goto failure;
02860 }
02861 if (args_info->ipmTop_given && ! override)
02862 continue;
02863 local_args_info.ipmTop_given = 1;
02864 args_info->ipmTop_given = 1;
02865 args_info->ipmTop_arg = strtol (optarg, &stop_char, 0);
02866 if (!(stop_char && *stop_char == '\0')) {
02867 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
02868 goto failure;
02869 }
02870 if (args_info->ipmTop_orig)
02871 free (args_info->ipmTop_orig);
02872 args_info->ipmTop_orig = gengetopt_strdup (optarg);
02873 }
02874
02875 else if (strcmp (long_options[option_index].name, "ipmLeft") == 0)
02876 {
02877 if (local_args_info.ipmLeft_given)
02878 {
02879 fprintf (stderr, "%s: `--ipmLeft' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
02880 goto failure;
02881 }
02882 if (args_info->ipmLeft_given && ! override)
02883 continue;
02884 local_args_info.ipmLeft_given = 1;
02885 args_info->ipmLeft_given = 1;
02886 args_info->ipmLeft_arg = strtol (optarg, &stop_char, 0);
02887 if (!(stop_char && *stop_char == '\0')) {
02888 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
02889 goto failure;
02890 }
02891 if (args_info->ipmLeft_orig)
02892 free (args_info->ipmLeft_orig);
02893 args_info->ipmLeft_orig = gengetopt_strdup (optarg);
02894 }
02895
02896 else if (strcmp (long_options[option_index].name, "ipmRight") == 0)
02897 {
02898 if (local_args_info.ipmRight_given)
02899 {
02900 fprintf (stderr, "%s: `--ipmRight' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
02901 goto failure;
02902 }
02903 if (args_info->ipmRight_given && ! override)
02904 continue;
02905 local_args_info.ipmRight_given = 1;
02906 args_info->ipmRight_given = 1;
02907 args_info->ipmRight_arg = strtol (optarg, &stop_char, 0);
02908 if (!(stop_char && *stop_char == '\0')) {
02909 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
02910 goto failure;
02911 }
02912 if (args_info->ipmRight_orig)
02913 free (args_info->ipmRight_orig);
02914 args_info->ipmRight_orig = gengetopt_strdup (optarg);
02915 }
02916
02917 else if (strcmp (long_options[option_index].name, "ipmBottom") == 0)
02918 {
02919 if (local_args_info.ipmBottom_given)
02920 {
02921 fprintf (stderr, "%s: `--ipmBottom' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
02922 goto failure;
02923 }
02924 if (args_info->ipmBottom_given && ! override)
02925 continue;
02926 local_args_info.ipmBottom_given = 1;
02927 args_info->ipmBottom_given = 1;
02928 args_info->ipmBottom_arg = strtol (optarg, &stop_char, 0);
02929 if (!(stop_char && *stop_char == '\0')) {
02930 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
02931 goto failure;
02932 }
02933 if (args_info->ipmBottom_orig)
02934 free (args_info->ipmBottom_orig);
02935 args_info->ipmBottom_orig = gengetopt_strdup (optarg);
02936 }
02937
02938 else if (strcmp (long_options[option_index].name, "ipmInterpolation") == 0)
02939 {
02940 if (local_args_info.ipmInterpolation_given)
02941 {
02942 fprintf (stderr, "%s: `--ipmInterpolation' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
02943 goto failure;
02944 }
02945 if (args_info->ipmInterpolation_given && ! override)
02946 continue;
02947 local_args_info.ipmInterpolation_given = 1;
02948 args_info->ipmInterpolation_given = 1;
02949 args_info->ipmInterpolation_arg = strtol (optarg, &stop_char, 0);
02950 if (!(stop_char && *stop_char == '\0')) {
02951 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
02952 goto failure;
02953 }
02954 if (args_info->ipmInterpolation_orig)
02955 free (args_info->ipmInterpolation_orig);
02956 args_info->ipmInterpolation_orig = gengetopt_strdup (optarg);
02957 }
02958
02959 else if (strcmp (long_options[option_index].name, "lineWidth") == 0)
02960 {
02961 if (local_args_info.lineWidth_given)
02962 {
02963 fprintf (stderr, "%s: `--lineWidth' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
02964 goto failure;
02965 }
02966 if (args_info->lineWidth_given && ! override)
02967 continue;
02968 local_args_info.lineWidth_given = 1;
02969 args_info->lineWidth_given = 1;
02970 args_info->lineWidth_arg = strtod (optarg, &stop_char);
02971 if (!(stop_char && *stop_char == '\0')) {
02972 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
02973 goto failure;
02974 }
02975 if (args_info->lineWidth_orig)
02976 free (args_info->lineWidth_orig);
02977 args_info->lineWidth_orig = gengetopt_strdup (optarg);
02978 }
02979
02980 else if (strcmp (long_options[option_index].name, "lineHeight") == 0)
02981 {
02982 if (local_args_info.lineHeight_given)
02983 {
02984 fprintf (stderr, "%s: `--lineHeight' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
02985 goto failure;
02986 }
02987 if (args_info->lineHeight_given && ! override)
02988 continue;
02989 local_args_info.lineHeight_given = 1;
02990 args_info->lineHeight_given = 1;
02991 args_info->lineHeight_arg = strtod (optarg, &stop_char);
02992 if (!(stop_char && *stop_char == '\0')) {
02993 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
02994 goto failure;
02995 }
02996 if (args_info->lineHeight_orig)
02997 free (args_info->lineHeight_orig);
02998 args_info->lineHeight_orig = gengetopt_strdup (optarg);
02999 }
03000
03001 else if (strcmp (long_options[option_index].name, "kernelWidth") == 0)
03002 {
03003 if (local_args_info.kernelWidth_given)
03004 {
03005 fprintf (stderr, "%s: `--kernelWidth' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03006 goto failure;
03007 }
03008 if (args_info->kernelWidth_given && ! override)
03009 continue;
03010 local_args_info.kernelWidth_given = 1;
03011 args_info->kernelWidth_given = 1;
03012 args_info->kernelWidth_arg = strtol (optarg, &stop_char, 0);
03013 if (!(stop_char && *stop_char == '\0')) {
03014 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03015 goto failure;
03016 }
03017 if (args_info->kernelWidth_orig)
03018 free (args_info->kernelWidth_orig);
03019 args_info->kernelWidth_orig = gengetopt_strdup (optarg);
03020 }
03021
03022 else if (strcmp (long_options[option_index].name, "kernelHeight") == 0)
03023 {
03024 if (local_args_info.kernelHeight_given)
03025 {
03026 fprintf (stderr, "%s: `--kernelHeight' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03027 goto failure;
03028 }
03029 if (args_info->kernelHeight_given && ! override)
03030 continue;
03031 local_args_info.kernelHeight_given = 1;
03032 args_info->kernelHeight_given = 1;
03033 args_info->kernelHeight_arg = strtol (optarg, &stop_char, 0);
03034 if (!(stop_char && *stop_char == '\0')) {
03035 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03036 goto failure;
03037 }
03038 if (args_info->kernelHeight_orig)
03039 free (args_info->kernelHeight_orig);
03040 args_info->kernelHeight_orig = gengetopt_strdup (optarg);
03041 }
03042
03043 else if (strcmp (long_options[option_index].name, "lowerQuantile") == 0)
03044 {
03045 if (local_args_info.lowerQuantile_given)
03046 {
03047 fprintf (stderr, "%s: `--lowerQuantile' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03048 goto failure;
03049 }
03050 if (args_info->lowerQuantile_given && ! override)
03051 continue;
03052 local_args_info.lowerQuantile_given = 1;
03053 args_info->lowerQuantile_given = 1;
03054 args_info->lowerQuantile_arg = strtod (optarg, &stop_char);
03055 if (!(stop_char && *stop_char == '\0')) {
03056 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03057 goto failure;
03058 }
03059 if (args_info->lowerQuantile_orig)
03060 free (args_info->lowerQuantile_orig);
03061 args_info->lowerQuantile_orig = gengetopt_strdup (optarg);
03062 }
03063
03064 else if (strcmp (long_options[option_index].name, "localMaxima") == 0)
03065 {
03066 if (local_args_info.localMaxima_given)
03067 {
03068 fprintf (stderr, "%s: `--localMaxima' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03069 goto failure;
03070 }
03071 if (args_info->localMaxima_given && ! override)
03072 continue;
03073 local_args_info.localMaxima_given = 1;
03074 args_info->localMaxima_given = 1;
03075 args_info->localMaxima_arg = strtol (optarg, &stop_char, 0);
03076 if (!(stop_char && *stop_char == '\0')) {
03077 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03078 goto failure;
03079 }
03080 if (args_info->localMaxima_orig)
03081 free (args_info->localMaxima_orig);
03082 args_info->localMaxima_orig = gengetopt_strdup (optarg);
03083 }
03084
03085 else if (strcmp (long_options[option_index].name, "groupingType") == 0)
03086 {
03087 if (local_args_info.groupingType_given)
03088 {
03089 fprintf (stderr, "%s: `--groupingType' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03090 goto failure;
03091 }
03092 if (args_info->groupingType_given && ! override)
03093 continue;
03094 local_args_info.groupingType_given = 1;
03095 args_info->groupingType_given = 1;
03096 args_info->groupingType_arg = strtol (optarg, &stop_char, 0);
03097 if (!(stop_char && *stop_char == '\0')) {
03098 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03099 goto failure;
03100 }
03101 if (args_info->groupingType_orig)
03102 free (args_info->groupingType_orig);
03103 args_info->groupingType_orig = gengetopt_strdup (optarg);
03104 }
03105
03106 else if (strcmp (long_options[option_index].name, "binarize") == 0)
03107 {
03108 if (local_args_info.binarize_given)
03109 {
03110 fprintf (stderr, "%s: `--binarize' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03111 goto failure;
03112 }
03113 if (args_info->binarize_given && ! override)
03114 continue;
03115 local_args_info.binarize_given = 1;
03116 args_info->binarize_given = 1;
03117 args_info->binarize_arg = strtod (optarg, &stop_char);
03118 if (!(stop_char && *stop_char == '\0')) {
03119 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03120 goto failure;
03121 }
03122 if (args_info->binarize_orig)
03123 free (args_info->binarize_orig);
03124 args_info->binarize_orig = gengetopt_strdup (optarg);
03125 }
03126
03127 else if (strcmp (long_options[option_index].name, "detectionThreshold") == 0)
03128 {
03129 if (local_args_info.detectionThreshold_given)
03130 {
03131 fprintf (stderr, "%s: `--detectionThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03132 goto failure;
03133 }
03134 if (args_info->detectionThreshold_given && ! override)
03135 continue;
03136 local_args_info.detectionThreshold_given = 1;
03137 args_info->detectionThreshold_given = 1;
03138 args_info->detectionThreshold_arg = strtod (optarg, &stop_char);
03139 if (!(stop_char && *stop_char == '\0')) {
03140 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03141 goto failure;
03142 }
03143 if (args_info->detectionThreshold_orig)
03144 free (args_info->detectionThreshold_orig);
03145 args_info->detectionThreshold_orig = gengetopt_strdup (optarg);
03146 }
03147
03148 else if (strcmp (long_options[option_index].name, "smoothScores") == 0)
03149 {
03150 if (local_args_info.smoothScores_given)
03151 {
03152 fprintf (stderr, "%s: `--smoothScores' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03153 goto failure;
03154 }
03155 if (args_info->smoothScores_given && ! override)
03156 continue;
03157 local_args_info.smoothScores_given = 1;
03158 args_info->smoothScores_given = 1;
03159 args_info->smoothScores_arg = strtol (optarg, &stop_char, 0);
03160 if (!(stop_char && *stop_char == '\0')) {
03161 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03162 goto failure;
03163 }
03164 if (args_info->smoothScores_orig)
03165 free (args_info->smoothScores_orig);
03166 args_info->smoothScores_orig = gengetopt_strdup (optarg);
03167 }
03168
03169 else if (strcmp (long_options[option_index].name, "rMin") == 0)
03170 {
03171 if (local_args_info.rMin_given)
03172 {
03173 fprintf (stderr, "%s: `--rMin' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03174 goto failure;
03175 }
03176 if (args_info->rMin_given && ! override)
03177 continue;
03178 local_args_info.rMin_given = 1;
03179 args_info->rMin_given = 1;
03180 args_info->rMin_arg = strtod (optarg, &stop_char);
03181 if (!(stop_char && *stop_char == '\0')) {
03182 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03183 goto failure;
03184 }
03185 if (args_info->rMin_orig)
03186 free (args_info->rMin_orig);
03187 args_info->rMin_orig = gengetopt_strdup (optarg);
03188 }
03189
03190 else if (strcmp (long_options[option_index].name, "rMax") == 0)
03191 {
03192 if (local_args_info.rMax_given)
03193 {
03194 fprintf (stderr, "%s: `--rMax' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03195 goto failure;
03196 }
03197 if (args_info->rMax_given && ! override)
03198 continue;
03199 local_args_info.rMax_given = 1;
03200 args_info->rMax_given = 1;
03201 args_info->rMax_arg = strtod (optarg, &stop_char);
03202 if (!(stop_char && *stop_char == '\0')) {
03203 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03204 goto failure;
03205 }
03206 if (args_info->rMax_orig)
03207 free (args_info->rMax_orig);
03208 args_info->rMax_orig = gengetopt_strdup (optarg);
03209 }
03210
03211 else if (strcmp (long_options[option_index].name, "rStep") == 0)
03212 {
03213 if (local_args_info.rStep_given)
03214 {
03215 fprintf (stderr, "%s: `--rStep' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03216 goto failure;
03217 }
03218 if (args_info->rStep_given && ! override)
03219 continue;
03220 local_args_info.rStep_given = 1;
03221 args_info->rStep_given = 1;
03222 args_info->rStep_arg = strtod (optarg, &stop_char);
03223 if (!(stop_char && *stop_char == '\0')) {
03224 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03225 goto failure;
03226 }
03227 if (args_info->rStep_orig)
03228 free (args_info->rStep_orig);
03229 args_info->rStep_orig = gengetopt_strdup (optarg);
03230 }
03231
03232 else if (strcmp (long_options[option_index].name, "thetaMin") == 0)
03233 {
03234 if (local_args_info.thetaMin_given)
03235 {
03236 fprintf (stderr, "%s: `--thetaMin' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03237 goto failure;
03238 }
03239 if (args_info->thetaMin_given && ! override)
03240 continue;
03241 local_args_info.thetaMin_given = 1;
03242 args_info->thetaMin_given = 1;
03243 args_info->thetaMin_arg = strtod (optarg, &stop_char);
03244 if (!(stop_char && *stop_char == '\0')) {
03245 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03246 goto failure;
03247 }
03248 if (args_info->thetaMin_orig)
03249 free (args_info->thetaMin_orig);
03250 args_info->thetaMin_orig = gengetopt_strdup (optarg);
03251 }
03252
03253 else if (strcmp (long_options[option_index].name, "thetaMax") == 0)
03254 {
03255 if (local_args_info.thetaMax_given)
03256 {
03257 fprintf (stderr, "%s: `--thetaMax' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03258 goto failure;
03259 }
03260 if (args_info->thetaMax_given && ! override)
03261 continue;
03262 local_args_info.thetaMax_given = 1;
03263 args_info->thetaMax_given = 1;
03264 args_info->thetaMax_arg = strtod (optarg, &stop_char);
03265 if (!(stop_char && *stop_char == '\0')) {
03266 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03267 goto failure;
03268 }
03269 if (args_info->thetaMax_orig)
03270 free (args_info->thetaMax_orig);
03271 args_info->thetaMax_orig = gengetopt_strdup (optarg);
03272 }
03273
03274 else if (strcmp (long_options[option_index].name, "thetaStep") == 0)
03275 {
03276 if (local_args_info.thetaStep_given)
03277 {
03278 fprintf (stderr, "%s: `--thetaStep' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03279 goto failure;
03280 }
03281 if (args_info->thetaStep_given && ! override)
03282 continue;
03283 local_args_info.thetaStep_given = 1;
03284 args_info->thetaStep_given = 1;
03285 args_info->thetaStep_arg = strtod (optarg, &stop_char);
03286 if (!(stop_char && *stop_char == '\0')) {
03287 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03288 goto failure;
03289 }
03290 if (args_info->thetaStep_orig)
03291 free (args_info->thetaStep_orig);
03292 args_info->thetaStep_orig = gengetopt_strdup (optarg);
03293 }
03294
03295 else if (strcmp (long_options[option_index].name, "ipmVpPortion") == 0)
03296 {
03297 if (local_args_info.ipmVpPortion_given)
03298 {
03299 fprintf (stderr, "%s: `--ipmVpPortion' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03300 goto failure;
03301 }
03302 if (args_info->ipmVpPortion_given && ! override)
03303 continue;
03304 local_args_info.ipmVpPortion_given = 1;
03305 args_info->ipmVpPortion_given = 1;
03306 args_info->ipmVpPortion_arg = strtod (optarg, &stop_char);
03307 if (!(stop_char && *stop_char == '\0')) {
03308 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03309 goto failure;
03310 }
03311 if (args_info->ipmVpPortion_orig)
03312 free (args_info->ipmVpPortion_orig);
03313 args_info->ipmVpPortion_orig = gengetopt_strdup (optarg);
03314 }
03315
03316 else if (strcmp (long_options[option_index].name, "getEndPoints") == 0)
03317 {
03318 if (local_args_info.getEndPoints_given)
03319 {
03320 fprintf (stderr, "%s: `--getEndPoints' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03321 goto failure;
03322 }
03323 if (args_info->getEndPoints_given && ! override)
03324 continue;
03325 local_args_info.getEndPoints_given = 1;
03326 args_info->getEndPoints_given = 1;
03327 args_info->getEndPoints_arg = strtol (optarg, &stop_char, 0);
03328 if (!(stop_char && *stop_char == '\0')) {
03329 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03330 goto failure;
03331 }
03332 if (args_info->getEndPoints_orig)
03333 free (args_info->getEndPoints_orig);
03334 args_info->getEndPoints_orig = gengetopt_strdup (optarg);
03335 }
03336
03337 else if (strcmp (long_options[option_index].name, "group") == 0)
03338 {
03339 if (local_args_info.group_given)
03340 {
03341 fprintf (stderr, "%s: `--group' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03342 goto failure;
03343 }
03344 if (args_info->group_given && ! override)
03345 continue;
03346 local_args_info.group_given = 1;
03347 args_info->group_given = 1;
03348 args_info->group_arg = strtol (optarg, &stop_char, 0);
03349 if (!(stop_char && *stop_char == '\0')) {
03350 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03351 goto failure;
03352 }
03353 if (args_info->group_orig)
03354 free (args_info->group_orig);
03355 args_info->group_orig = gengetopt_strdup (optarg);
03356 }
03357
03358 else if (strcmp (long_options[option_index].name, "groupThreshold") == 0)
03359 {
03360 if (local_args_info.groupThreshold_given)
03361 {
03362 fprintf (stderr, "%s: `--groupThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03363 goto failure;
03364 }
03365 if (args_info->groupThreshold_given && ! override)
03366 continue;
03367 local_args_info.groupThreshold_given = 1;
03368 args_info->groupThreshold_given = 1;
03369 args_info->groupThreshold_arg = strtod (optarg, &stop_char);
03370 if (!(stop_char && *stop_char == '\0')) {
03371 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03372 goto failure;
03373 }
03374 if (args_info->groupThreshold_orig)
03375 free (args_info->groupThreshold_orig);
03376 args_info->groupThreshold_orig = gengetopt_strdup (optarg);
03377 }
03378
03379 else if (strcmp (long_options[option_index].name, "ransac") == 0)
03380 {
03381 if (local_args_info.ransac_given)
03382 {
03383 fprintf (stderr, "%s: `--ransac' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03384 goto failure;
03385 }
03386 if (args_info->ransac_given && ! override)
03387 continue;
03388 local_args_info.ransac_given = 1;
03389 args_info->ransac_given = 1;
03390 args_info->ransac_arg = strtol (optarg, &stop_char, 0);
03391 if (!(stop_char && *stop_char == '\0')) {
03392 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03393 goto failure;
03394 }
03395 if (args_info->ransac_orig)
03396 free (args_info->ransac_orig);
03397 args_info->ransac_orig = gengetopt_strdup (optarg);
03398 }
03399
03400 else if (strcmp (long_options[option_index].name, "ransacLineNumSamples") == 0)
03401 {
03402 if (local_args_info.ransacLineNumSamples_given)
03403 {
03404 fprintf (stderr, "%s: `--ransacLineNumSamples' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03405 goto failure;
03406 }
03407 if (args_info->ransacLineNumSamples_given && ! override)
03408 continue;
03409 local_args_info.ransacLineNumSamples_given = 1;
03410 args_info->ransacLineNumSamples_given = 1;
03411 args_info->ransacLineNumSamples_arg = strtol (optarg, &stop_char, 0);
03412 if (!(stop_char && *stop_char == '\0')) {
03413 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03414 goto failure;
03415 }
03416 if (args_info->ransacLineNumSamples_orig)
03417 free (args_info->ransacLineNumSamples_orig);
03418 args_info->ransacLineNumSamples_orig = gengetopt_strdup (optarg);
03419 }
03420
03421 else if (strcmp (long_options[option_index].name, "ransacLineNumIterations") == 0)
03422 {
03423 if (local_args_info.ransacLineNumIterations_given)
03424 {
03425 fprintf (stderr, "%s: `--ransacLineNumIterations' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03426 goto failure;
03427 }
03428 if (args_info->ransacLineNumIterations_given && ! override)
03429 continue;
03430 local_args_info.ransacLineNumIterations_given = 1;
03431 args_info->ransacLineNumIterations_given = 1;
03432 args_info->ransacLineNumIterations_arg = strtol (optarg, &stop_char, 0);
03433 if (!(stop_char && *stop_char == '\0')) {
03434 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03435 goto failure;
03436 }
03437 if (args_info->ransacLineNumIterations_orig)
03438 free (args_info->ransacLineNumIterations_orig);
03439 args_info->ransacLineNumIterations_orig = gengetopt_strdup (optarg);
03440 }
03441
03442 else if (strcmp (long_options[option_index].name, "ransacLineNumGoodFit") == 0)
03443 {
03444 if (local_args_info.ransacLineNumGoodFit_given)
03445 {
03446 fprintf (stderr, "%s: `--ransacLineNumGoodFit' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03447 goto failure;
03448 }
03449 if (args_info->ransacLineNumGoodFit_given && ! override)
03450 continue;
03451 local_args_info.ransacLineNumGoodFit_given = 1;
03452 args_info->ransacLineNumGoodFit_given = 1;
03453 args_info->ransacLineNumGoodFit_arg = strtol (optarg, &stop_char, 0);
03454 if (!(stop_char && *stop_char == '\0')) {
03455 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03456 goto failure;
03457 }
03458 if (args_info->ransacLineNumGoodFit_orig)
03459 free (args_info->ransacLineNumGoodFit_orig);
03460 args_info->ransacLineNumGoodFit_orig = gengetopt_strdup (optarg);
03461 }
03462
03463 else if (strcmp (long_options[option_index].name, "ransacLineThreshold") == 0)
03464 {
03465 if (local_args_info.ransacLineThreshold_given)
03466 {
03467 fprintf (stderr, "%s: `--ransacLineThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03468 goto failure;
03469 }
03470 if (args_info->ransacLineThreshold_given && ! override)
03471 continue;
03472 local_args_info.ransacLineThreshold_given = 1;
03473 args_info->ransacLineThreshold_given = 1;
03474 args_info->ransacLineThreshold_arg = strtod (optarg, &stop_char);
03475 if (!(stop_char && *stop_char == '\0')) {
03476 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03477 goto failure;
03478 }
03479 if (args_info->ransacLineThreshold_orig)
03480 free (args_info->ransacLineThreshold_orig);
03481 args_info->ransacLineThreshold_orig = gengetopt_strdup (optarg);
03482 }
03483
03484 else if (strcmp (long_options[option_index].name, "ransacLineScoreThreshold") == 0)
03485 {
03486 if (local_args_info.ransacLineScoreThreshold_given)
03487 {
03488 fprintf (stderr, "%s: `--ransacLineScoreThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03489 goto failure;
03490 }
03491 if (args_info->ransacLineScoreThreshold_given && ! override)
03492 continue;
03493 local_args_info.ransacLineScoreThreshold_given = 1;
03494 args_info->ransacLineScoreThreshold_given = 1;
03495 args_info->ransacLineScoreThreshold_arg = strtod (optarg, &stop_char);
03496 if (!(stop_char && *stop_char == '\0')) {
03497 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03498 goto failure;
03499 }
03500 if (args_info->ransacLineScoreThreshold_orig)
03501 free (args_info->ransacLineScoreThreshold_orig);
03502 args_info->ransacLineScoreThreshold_orig = gengetopt_strdup (optarg);
03503 }
03504
03505 else if (strcmp (long_options[option_index].name, "ransacLineBinarize") == 0)
03506 {
03507 if (local_args_info.ransacLineBinarize_given)
03508 {
03509 fprintf (stderr, "%s: `--ransacLineBinarize' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03510 goto failure;
03511 }
03512 if (args_info->ransacLineBinarize_given && ! override)
03513 continue;
03514 local_args_info.ransacLineBinarize_given = 1;
03515 args_info->ransacLineBinarize_given = 1;
03516 args_info->ransacLineBinarize_arg = strtol (optarg, &stop_char, 0);
03517 if (!(stop_char && *stop_char == '\0')) {
03518 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03519 goto failure;
03520 }
03521 if (args_info->ransacLineBinarize_orig)
03522 free (args_info->ransacLineBinarize_orig);
03523 args_info->ransacLineBinarize_orig = gengetopt_strdup (optarg);
03524 }
03525
03526 else if (strcmp (long_options[option_index].name, "ransacLineWindow") == 0)
03527 {
03528 if (local_args_info.ransacLineWindow_given)
03529 {
03530 fprintf (stderr, "%s: `--ransacLineWindow' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03531 goto failure;
03532 }
03533 if (args_info->ransacLineWindow_given && ! override)
03534 continue;
03535 local_args_info.ransacLineWindow_given = 1;
03536 args_info->ransacLineWindow_given = 1;
03537 args_info->ransacLineWindow_arg = strtol (optarg, &stop_char, 0);
03538 if (!(stop_char && *stop_char == '\0')) {
03539 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03540 goto failure;
03541 }
03542 if (args_info->ransacLineWindow_orig)
03543 free (args_info->ransacLineWindow_orig);
03544 args_info->ransacLineWindow_orig = gengetopt_strdup (optarg);
03545 }
03546
03547 else if (strcmp (long_options[option_index].name, "ransacSplineNumSamples") == 0)
03548 {
03549 if (local_args_info.ransacSplineNumSamples_given)
03550 {
03551 fprintf (stderr, "%s: `--ransacSplineNumSamples' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03552 goto failure;
03553 }
03554 if (args_info->ransacSplineNumSamples_given && ! override)
03555 continue;
03556 local_args_info.ransacSplineNumSamples_given = 1;
03557 args_info->ransacSplineNumSamples_given = 1;
03558 args_info->ransacSplineNumSamples_arg = strtol (optarg, &stop_char, 0);
03559 if (!(stop_char && *stop_char == '\0')) {
03560 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03561 goto failure;
03562 }
03563 if (args_info->ransacSplineNumSamples_orig)
03564 free (args_info->ransacSplineNumSamples_orig);
03565 args_info->ransacSplineNumSamples_orig = gengetopt_strdup (optarg);
03566 }
03567
03568 else if (strcmp (long_options[option_index].name, "ransacSplineNumIterations") == 0)
03569 {
03570 if (local_args_info.ransacSplineNumIterations_given)
03571 {
03572 fprintf (stderr, "%s: `--ransacSplineNumIterations' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03573 goto failure;
03574 }
03575 if (args_info->ransacSplineNumIterations_given && ! override)
03576 continue;
03577 local_args_info.ransacSplineNumIterations_given = 1;
03578 args_info->ransacSplineNumIterations_given = 1;
03579 args_info->ransacSplineNumIterations_arg = strtol (optarg, &stop_char, 0);
03580 if (!(stop_char && *stop_char == '\0')) {
03581 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03582 goto failure;
03583 }
03584 if (args_info->ransacSplineNumIterations_orig)
03585 free (args_info->ransacSplineNumIterations_orig);
03586 args_info->ransacSplineNumIterations_orig = gengetopt_strdup (optarg);
03587 }
03588
03589 else if (strcmp (long_options[option_index].name, "ransacSplineNumGoodFit") == 0)
03590 {
03591 if (local_args_info.ransacSplineNumGoodFit_given)
03592 {
03593 fprintf (stderr, "%s: `--ransacSplineNumGoodFit' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03594 goto failure;
03595 }
03596 if (args_info->ransacSplineNumGoodFit_given && ! override)
03597 continue;
03598 local_args_info.ransacSplineNumGoodFit_given = 1;
03599 args_info->ransacSplineNumGoodFit_given = 1;
03600 args_info->ransacSplineNumGoodFit_arg = strtol (optarg, &stop_char, 0);
03601 if (!(stop_char && *stop_char == '\0')) {
03602 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03603 goto failure;
03604 }
03605 if (args_info->ransacSplineNumGoodFit_orig)
03606 free (args_info->ransacSplineNumGoodFit_orig);
03607 args_info->ransacSplineNumGoodFit_orig = gengetopt_strdup (optarg);
03608 }
03609
03610 else if (strcmp (long_options[option_index].name, "ransacSplineThreshold") == 0)
03611 {
03612 if (local_args_info.ransacSplineThreshold_given)
03613 {
03614 fprintf (stderr, "%s: `--ransacSplineThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03615 goto failure;
03616 }
03617 if (args_info->ransacSplineThreshold_given && ! override)
03618 continue;
03619 local_args_info.ransacSplineThreshold_given = 1;
03620 args_info->ransacSplineThreshold_given = 1;
03621 args_info->ransacSplineThreshold_arg = strtod (optarg, &stop_char);
03622 if (!(stop_char && *stop_char == '\0')) {
03623 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03624 goto failure;
03625 }
03626 if (args_info->ransacSplineThreshold_orig)
03627 free (args_info->ransacSplineThreshold_orig);
03628 args_info->ransacSplineThreshold_orig = gengetopt_strdup (optarg);
03629 }
03630
03631 else if (strcmp (long_options[option_index].name, "ransacSplineScoreThreshold") == 0)
03632 {
03633 if (local_args_info.ransacSplineScoreThreshold_given)
03634 {
03635 fprintf (stderr, "%s: `--ransacSplineScoreThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03636 goto failure;
03637 }
03638 if (args_info->ransacSplineScoreThreshold_given && ! override)
03639 continue;
03640 local_args_info.ransacSplineScoreThreshold_given = 1;
03641 args_info->ransacSplineScoreThreshold_given = 1;
03642 args_info->ransacSplineScoreThreshold_arg = strtod (optarg, &stop_char);
03643 if (!(stop_char && *stop_char == '\0')) {
03644 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03645 goto failure;
03646 }
03647 if (args_info->ransacSplineScoreThreshold_orig)
03648 free (args_info->ransacSplineScoreThreshold_orig);
03649 args_info->ransacSplineScoreThreshold_orig = gengetopt_strdup (optarg);
03650 }
03651
03652 else if (strcmp (long_options[option_index].name, "ransacSplineBinarize") == 0)
03653 {
03654 if (local_args_info.ransacSplineBinarize_given)
03655 {
03656 fprintf (stderr, "%s: `--ransacSplineBinarize' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03657 goto failure;
03658 }
03659 if (args_info->ransacSplineBinarize_given && ! override)
03660 continue;
03661 local_args_info.ransacSplineBinarize_given = 1;
03662 args_info->ransacSplineBinarize_given = 1;
03663 args_info->ransacSplineBinarize_arg = strtol (optarg, &stop_char, 0);
03664 if (!(stop_char && *stop_char == '\0')) {
03665 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03666 goto failure;
03667 }
03668 if (args_info->ransacSplineBinarize_orig)
03669 free (args_info->ransacSplineBinarize_orig);
03670 args_info->ransacSplineBinarize_orig = gengetopt_strdup (optarg);
03671 }
03672
03673 else if (strcmp (long_options[option_index].name, "ransacSplineWindow") == 0)
03674 {
03675 if (local_args_info.ransacSplineWindow_given)
03676 {
03677 fprintf (stderr, "%s: `--ransacSplineWindow' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03678 goto failure;
03679 }
03680 if (args_info->ransacSplineWindow_given && ! override)
03681 continue;
03682 local_args_info.ransacSplineWindow_given = 1;
03683 args_info->ransacSplineWindow_given = 1;
03684 args_info->ransacSplineWindow_arg = strtol (optarg, &stop_char, 0);
03685 if (!(stop_char && *stop_char == '\0')) {
03686 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03687 goto failure;
03688 }
03689 if (args_info->ransacSplineWindow_orig)
03690 free (args_info->ransacSplineWindow_orig);
03691 args_info->ransacSplineWindow_orig = gengetopt_strdup (optarg);
03692 }
03693
03694 else if (strcmp (long_options[option_index].name, "ransacSplineDegree") == 0)
03695 {
03696 if (local_args_info.ransacSplineDegree_given)
03697 {
03698 fprintf (stderr, "%s: `--ransacSplineDegree' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03699 goto failure;
03700 }
03701 if (args_info->ransacSplineDegree_given && ! override)
03702 continue;
03703 local_args_info.ransacSplineDegree_given = 1;
03704 args_info->ransacSplineDegree_given = 1;
03705 args_info->ransacSplineDegree_arg = strtol (optarg, &stop_char, 0);
03706 if (!(stop_char && *stop_char == '\0')) {
03707 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03708 goto failure;
03709 }
03710 if (args_info->ransacSplineDegree_orig)
03711 free (args_info->ransacSplineDegree_orig);
03712 args_info->ransacSplineDegree_orig = gengetopt_strdup (optarg);
03713 }
03714
03715 else if (strcmp (long_options[option_index].name, "ransacSpline") == 0)
03716 {
03717 if (local_args_info.ransacSpline_given)
03718 {
03719 fprintf (stderr, "%s: `--ransacSpline' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03720 goto failure;
03721 }
03722 if (args_info->ransacSpline_given && ! override)
03723 continue;
03724 local_args_info.ransacSpline_given = 1;
03725 args_info->ransacSpline_given = 1;
03726 args_info->ransacSpline_arg = strtol (optarg, &stop_char, 0);
03727 if (!(stop_char && *stop_char == '\0')) {
03728 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03729 goto failure;
03730 }
03731 if (args_info->ransacSpline_orig)
03732 free (args_info->ransacSpline_orig);
03733 args_info->ransacSpline_orig = gengetopt_strdup (optarg);
03734 }
03735
03736 else if (strcmp (long_options[option_index].name, "ransacLine") == 0)
03737 {
03738 if (local_args_info.ransacLine_given)
03739 {
03740 fprintf (stderr, "%s: `--ransacLine' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03741 goto failure;
03742 }
03743 if (args_info->ransacLine_given && ! override)
03744 continue;
03745 local_args_info.ransacLine_given = 1;
03746 args_info->ransacLine_given = 1;
03747 args_info->ransacLine_arg = strtol (optarg, &stop_char, 0);
03748 if (!(stop_char && *stop_char == '\0')) {
03749 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03750 goto failure;
03751 }
03752 if (args_info->ransacLine_orig)
03753 free (args_info->ransacLine_orig);
03754 args_info->ransacLine_orig = gengetopt_strdup (optarg);
03755 }
03756
03757 else if (strcmp (long_options[option_index].name, "ransacSplineStep") == 0)
03758 {
03759 if (local_args_info.ransacSplineStep_given)
03760 {
03761 fprintf (stderr, "%s: `--ransacSplineStep' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03762 goto failure;
03763 }
03764 if (args_info->ransacSplineStep_given && ! override)
03765 continue;
03766 local_args_info.ransacSplineStep_given = 1;
03767 args_info->ransacSplineStep_given = 1;
03768 args_info->ransacSplineStep_arg = (float)strtod (optarg, &stop_char);
03769 if (!(stop_char && *stop_char == '\0')) {
03770 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03771 goto failure;
03772 }
03773 if (args_info->ransacSplineStep_orig)
03774 free (args_info->ransacSplineStep_orig);
03775 args_info->ransacSplineStep_orig = gengetopt_strdup (optarg);
03776 }
03777
03778 else if (strcmp (long_options[option_index].name, "overlapThreshold") == 0)
03779 {
03780 if (local_args_info.overlapThreshold_given)
03781 {
03782 fprintf (stderr, "%s: `--overlapThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03783 goto failure;
03784 }
03785 if (args_info->overlapThreshold_given && ! override)
03786 continue;
03787 local_args_info.overlapThreshold_given = 1;
03788 args_info->overlapThreshold_given = 1;
03789 args_info->overlapThreshold_arg = (float)strtod (optarg, &stop_char);
03790 if (!(stop_char && *stop_char == '\0')) {
03791 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03792 goto failure;
03793 }
03794 if (args_info->overlapThreshold_orig)
03795 free (args_info->overlapThreshold_orig);
03796 args_info->overlapThreshold_orig = gengetopt_strdup (optarg);
03797 }
03798
03799 else if (strcmp (long_options[option_index].name, "localizeAngleThreshold") == 0)
03800 {
03801 if (local_args_info.localizeAngleThreshold_given)
03802 {
03803 fprintf (stderr, "%s: `--localizeAngleThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03804 goto failure;
03805 }
03806 if (args_info->localizeAngleThreshold_given && ! override)
03807 continue;
03808 local_args_info.localizeAngleThreshold_given = 1;
03809 args_info->localizeAngleThreshold_given = 1;
03810 args_info->localizeAngleThreshold_arg = (float)strtod (optarg, &stop_char);
03811 if (!(stop_char && *stop_char == '\0')) {
03812 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03813 goto failure;
03814 }
03815 if (args_info->localizeAngleThreshold_orig)
03816 free (args_info->localizeAngleThreshold_orig);
03817 args_info->localizeAngleThreshold_orig = gengetopt_strdup (optarg);
03818 }
03819
03820 else if (strcmp (long_options[option_index].name, "localizeNumLinePixels") == 0)
03821 {
03822 if (local_args_info.localizeNumLinePixels_given)
03823 {
03824 fprintf (stderr, "%s: `--localizeNumLinePixels' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03825 goto failure;
03826 }
03827 if (args_info->localizeNumLinePixels_given && ! override)
03828 continue;
03829 local_args_info.localizeNumLinePixels_given = 1;
03830 args_info->localizeNumLinePixels_given = 1;
03831 args_info->localizeNumLinePixels_arg = strtol (optarg, &stop_char, 0);
03832 if (!(stop_char && *stop_char == '\0')) {
03833 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03834 goto failure;
03835 }
03836 if (args_info->localizeNumLinePixels_orig)
03837 free (args_info->localizeNumLinePixels_orig);
03838 args_info->localizeNumLinePixels_orig = gengetopt_strdup (optarg);
03839 }
03840
03841 else if (strcmp (long_options[option_index].name, "extendAngleThreshold") == 0)
03842 {
03843 if (local_args_info.extendAngleThreshold_given)
03844 {
03845 fprintf (stderr, "%s: `--extendAngleThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03846 goto failure;
03847 }
03848 if (args_info->extendAngleThreshold_given && ! override)
03849 continue;
03850 local_args_info.extendAngleThreshold_given = 1;
03851 args_info->extendAngleThreshold_given = 1;
03852 args_info->extendAngleThreshold_arg = (float)strtod (optarg, &stop_char);
03853 if (!(stop_char && *stop_char == '\0')) {
03854 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03855 goto failure;
03856 }
03857 if (args_info->extendAngleThreshold_orig)
03858 free (args_info->extendAngleThreshold_orig);
03859 args_info->extendAngleThreshold_orig = gengetopt_strdup (optarg);
03860 }
03861
03862 else if (strcmp (long_options[option_index].name, "extendMeanDirAngleThreshold") == 0)
03863 {
03864 if (local_args_info.extendMeanDirAngleThreshold_given)
03865 {
03866 fprintf (stderr, "%s: `--extendMeanDirAngleThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03867 goto failure;
03868 }
03869 if (args_info->extendMeanDirAngleThreshold_given && ! override)
03870 continue;
03871 local_args_info.extendMeanDirAngleThreshold_given = 1;
03872 args_info->extendMeanDirAngleThreshold_given = 1;
03873 args_info->extendMeanDirAngleThreshold_arg = (float)strtod (optarg, &stop_char);
03874 if (!(stop_char && *stop_char == '\0')) {
03875 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03876 goto failure;
03877 }
03878 if (args_info->extendMeanDirAngleThreshold_orig)
03879 free (args_info->extendMeanDirAngleThreshold_orig);
03880 args_info->extendMeanDirAngleThreshold_orig = gengetopt_strdup (optarg);
03881 }
03882
03883 else if (strcmp (long_options[option_index].name, "extendLinePixelsTangent") == 0)
03884 {
03885 if (local_args_info.extendLinePixelsTangent_given)
03886 {
03887 fprintf (stderr, "%s: `--extendLinePixelsTangent' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03888 goto failure;
03889 }
03890 if (args_info->extendLinePixelsTangent_given && ! override)
03891 continue;
03892 local_args_info.extendLinePixelsTangent_given = 1;
03893 args_info->extendLinePixelsTangent_given = 1;
03894 args_info->extendLinePixelsTangent_arg = strtol (optarg, &stop_char, 0);
03895 if (!(stop_char && *stop_char == '\0')) {
03896 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03897 goto failure;
03898 }
03899 if (args_info->extendLinePixelsTangent_orig)
03900 free (args_info->extendLinePixelsTangent_orig);
03901 args_info->extendLinePixelsTangent_orig = gengetopt_strdup (optarg);
03902 }
03903
03904 else if (strcmp (long_options[option_index].name, "extendLinePixelsNormal") == 0)
03905 {
03906 if (local_args_info.extendLinePixelsNormal_given)
03907 {
03908 fprintf (stderr, "%s: `--extendLinePixelsNormal' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03909 goto failure;
03910 }
03911 if (args_info->extendLinePixelsNormal_given && ! override)
03912 continue;
03913 local_args_info.extendLinePixelsNormal_given = 1;
03914 args_info->extendLinePixelsNormal_given = 1;
03915 args_info->extendLinePixelsNormal_arg = strtol (optarg, &stop_char, 0);
03916 if (!(stop_char && *stop_char == '\0')) {
03917 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03918 goto failure;
03919 }
03920 if (args_info->extendLinePixelsNormal_orig)
03921 free (args_info->extendLinePixelsNormal_orig);
03922 args_info->extendLinePixelsNormal_orig = gengetopt_strdup (optarg);
03923 }
03924
03925 else if (strcmp (long_options[option_index].name, "extendContThreshold") == 0)
03926 {
03927 if (local_args_info.extendContThreshold_given)
03928 {
03929 fprintf (stderr, "%s: `--extendContThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03930 goto failure;
03931 }
03932 if (args_info->extendContThreshold_given && ! override)
03933 continue;
03934 local_args_info.extendContThreshold_given = 1;
03935 args_info->extendContThreshold_given = 1;
03936 args_info->extendContThreshold_arg = (float)strtod (optarg, &stop_char);
03937 if (!(stop_char && *stop_char == '\0')) {
03938 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03939 goto failure;
03940 }
03941 if (args_info->extendContThreshold_orig)
03942 free (args_info->extendContThreshold_orig);
03943 args_info->extendContThreshold_orig = gengetopt_strdup (optarg);
03944 }
03945
03946 else if (strcmp (long_options[option_index].name, "extendDeviationThreshold") == 0)
03947 {
03948 if (local_args_info.extendDeviationThreshold_given)
03949 {
03950 fprintf (stderr, "%s: `--extendDeviationThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03951 goto failure;
03952 }
03953 if (args_info->extendDeviationThreshold_given && ! override)
03954 continue;
03955 local_args_info.extendDeviationThreshold_given = 1;
03956 args_info->extendDeviationThreshold_given = 1;
03957 args_info->extendDeviationThreshold_arg = strtol (optarg, &stop_char, 0);
03958 if (!(stop_char && *stop_char == '\0')) {
03959 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03960 goto failure;
03961 }
03962 if (args_info->extendDeviationThreshold_orig)
03963 free (args_info->extendDeviationThreshold_orig);
03964 args_info->extendDeviationThreshold_orig = gengetopt_strdup (optarg);
03965 }
03966
03967 else if (strcmp (long_options[option_index].name, "extendRectTop") == 0)
03968 {
03969 if (local_args_info.extendRectTop_given)
03970 {
03971 fprintf (stderr, "%s: `--extendRectTop' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03972 goto failure;
03973 }
03974 if (args_info->extendRectTop_given && ! override)
03975 continue;
03976 local_args_info.extendRectTop_given = 1;
03977 args_info->extendRectTop_given = 1;
03978 args_info->extendRectTop_arg = strtol (optarg, &stop_char, 0);
03979 if (!(stop_char && *stop_char == '\0')) {
03980 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
03981 goto failure;
03982 }
03983 if (args_info->extendRectTop_orig)
03984 free (args_info->extendRectTop_orig);
03985 args_info->extendRectTop_orig = gengetopt_strdup (optarg);
03986 }
03987
03988 else if (strcmp (long_options[option_index].name, "extendRectBottom") == 0)
03989 {
03990 if (local_args_info.extendRectBottom_given)
03991 {
03992 fprintf (stderr, "%s: `--extendRectBottom' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
03993 goto failure;
03994 }
03995 if (args_info->extendRectBottom_given && ! override)
03996 continue;
03997 local_args_info.extendRectBottom_given = 1;
03998 args_info->extendRectBottom_given = 1;
03999 args_info->extendRectBottom_arg = strtol (optarg, &stop_char, 0);
04000 if (!(stop_char && *stop_char == '\0')) {
04001 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04002 goto failure;
04003 }
04004 if (args_info->extendRectBottom_orig)
04005 free (args_info->extendRectBottom_orig);
04006 args_info->extendRectBottom_orig = gengetopt_strdup (optarg);
04007 }
04008
04009 else if (strcmp (long_options[option_index].name, "extendIPMAngleThreshold") == 0)
04010 {
04011 if (local_args_info.extendIPMAngleThreshold_given)
04012 {
04013 fprintf (stderr, "%s: `--extendIPMAngleThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04014 goto failure;
04015 }
04016 if (args_info->extendIPMAngleThreshold_given && ! override)
04017 continue;
04018 local_args_info.extendIPMAngleThreshold_given = 1;
04019 args_info->extendIPMAngleThreshold_given = 1;
04020 args_info->extendIPMAngleThreshold_arg = (float)strtod (optarg, &stop_char);
04021 if (!(stop_char && *stop_char == '\0')) {
04022 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04023 goto failure;
04024 }
04025 if (args_info->extendIPMAngleThreshold_orig)
04026 free (args_info->extendIPMAngleThreshold_orig);
04027 args_info->extendIPMAngleThreshold_orig = gengetopt_strdup (optarg);
04028 }
04029
04030 else if (strcmp (long_options[option_index].name, "extendIPMMeanDirAngleThreshold") == 0)
04031 {
04032 if (local_args_info.extendIPMMeanDirAngleThreshold_given)
04033 {
04034 fprintf (stderr, "%s: `--extendIPMMeanDirAngleThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04035 goto failure;
04036 }
04037 if (args_info->extendIPMMeanDirAngleThreshold_given && ! override)
04038 continue;
04039 local_args_info.extendIPMMeanDirAngleThreshold_given = 1;
04040 args_info->extendIPMMeanDirAngleThreshold_given = 1;
04041 args_info->extendIPMMeanDirAngleThreshold_arg = (float)strtod (optarg, &stop_char);
04042 if (!(stop_char && *stop_char == '\0')) {
04043 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04044 goto failure;
04045 }
04046 if (args_info->extendIPMMeanDirAngleThreshold_orig)
04047 free (args_info->extendIPMMeanDirAngleThreshold_orig);
04048 args_info->extendIPMMeanDirAngleThreshold_orig = gengetopt_strdup (optarg);
04049 }
04050
04051 else if (strcmp (long_options[option_index].name, "extendIPMLinePixelsTangent") == 0)
04052 {
04053 if (local_args_info.extendIPMLinePixelsTangent_given)
04054 {
04055 fprintf (stderr, "%s: `--extendIPMLinePixelsTangent' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04056 goto failure;
04057 }
04058 if (args_info->extendIPMLinePixelsTangent_given && ! override)
04059 continue;
04060 local_args_info.extendIPMLinePixelsTangent_given = 1;
04061 args_info->extendIPMLinePixelsTangent_given = 1;
04062 args_info->extendIPMLinePixelsTangent_arg = strtol (optarg, &stop_char, 0);
04063 if (!(stop_char && *stop_char == '\0')) {
04064 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04065 goto failure;
04066 }
04067 if (args_info->extendIPMLinePixelsTangent_orig)
04068 free (args_info->extendIPMLinePixelsTangent_orig);
04069 args_info->extendIPMLinePixelsTangent_orig = gengetopt_strdup (optarg);
04070 }
04071
04072 else if (strcmp (long_options[option_index].name, "extendIPMLinePixelsNormal") == 0)
04073 {
04074 if (local_args_info.extendIPMLinePixelsNormal_given)
04075 {
04076 fprintf (stderr, "%s: `--extendIPMLinePixelsNormal' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04077 goto failure;
04078 }
04079 if (args_info->extendIPMLinePixelsNormal_given && ! override)
04080 continue;
04081 local_args_info.extendIPMLinePixelsNormal_given = 1;
04082 args_info->extendIPMLinePixelsNormal_given = 1;
04083 args_info->extendIPMLinePixelsNormal_arg = strtol (optarg, &stop_char, 0);
04084 if (!(stop_char && *stop_char == '\0')) {
04085 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04086 goto failure;
04087 }
04088 if (args_info->extendIPMLinePixelsNormal_orig)
04089 free (args_info->extendIPMLinePixelsNormal_orig);
04090 args_info->extendIPMLinePixelsNormal_orig = gengetopt_strdup (optarg);
04091 }
04092
04093 else if (strcmp (long_options[option_index].name, "extendIPMContThreshold") == 0)
04094 {
04095 if (local_args_info.extendIPMContThreshold_given)
04096 {
04097 fprintf (stderr, "%s: `--extendIPMContThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04098 goto failure;
04099 }
04100 if (args_info->extendIPMContThreshold_given && ! override)
04101 continue;
04102 local_args_info.extendIPMContThreshold_given = 1;
04103 args_info->extendIPMContThreshold_given = 1;
04104 args_info->extendIPMContThreshold_arg = (float)strtod (optarg, &stop_char);
04105 if (!(stop_char && *stop_char == '\0')) {
04106 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04107 goto failure;
04108 }
04109 if (args_info->extendIPMContThreshold_orig)
04110 free (args_info->extendIPMContThreshold_orig);
04111 args_info->extendIPMContThreshold_orig = gengetopt_strdup (optarg);
04112 }
04113
04114 else if (strcmp (long_options[option_index].name, "extendIPMDeviationThreshold") == 0)
04115 {
04116 if (local_args_info.extendIPMDeviationThreshold_given)
04117 {
04118 fprintf (stderr, "%s: `--extendIPMDeviationThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04119 goto failure;
04120 }
04121 if (args_info->extendIPMDeviationThreshold_given && ! override)
04122 continue;
04123 local_args_info.extendIPMDeviationThreshold_given = 1;
04124 args_info->extendIPMDeviationThreshold_given = 1;
04125 args_info->extendIPMDeviationThreshold_arg = strtol (optarg, &stop_char, 0);
04126 if (!(stop_char && *stop_char == '\0')) {
04127 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04128 goto failure;
04129 }
04130 if (args_info->extendIPMDeviationThreshold_orig)
04131 free (args_info->extendIPMDeviationThreshold_orig);
04132 args_info->extendIPMDeviationThreshold_orig = gengetopt_strdup (optarg);
04133 }
04134
04135 else if (strcmp (long_options[option_index].name, "extendIPMRectTop") == 0)
04136 {
04137 if (local_args_info.extendIPMRectTop_given)
04138 {
04139 fprintf (stderr, "%s: `--extendIPMRectTop' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04140 goto failure;
04141 }
04142 if (args_info->extendIPMRectTop_given && ! override)
04143 continue;
04144 local_args_info.extendIPMRectTop_given = 1;
04145 args_info->extendIPMRectTop_given = 1;
04146 args_info->extendIPMRectTop_arg = strtol (optarg, &stop_char, 0);
04147 if (!(stop_char && *stop_char == '\0')) {
04148 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04149 goto failure;
04150 }
04151 if (args_info->extendIPMRectTop_orig)
04152 free (args_info->extendIPMRectTop_orig);
04153 args_info->extendIPMRectTop_orig = gengetopt_strdup (optarg);
04154 }
04155
04156 else if (strcmp (long_options[option_index].name, "extendIPMRectBottom") == 0)
04157 {
04158 if (local_args_info.extendIPMRectBottom_given)
04159 {
04160 fprintf (stderr, "%s: `--extendIPMRectBottom' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04161 goto failure;
04162 }
04163 if (args_info->extendIPMRectBottom_given && ! override)
04164 continue;
04165 local_args_info.extendIPMRectBottom_given = 1;
04166 args_info->extendIPMRectBottom_given = 1;
04167 args_info->extendIPMRectBottom_arg = strtol (optarg, &stop_char, 0);
04168 if (!(stop_char && *stop_char == '\0')) {
04169 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04170 goto failure;
04171 }
04172 if (args_info->extendIPMRectBottom_orig)
04173 free (args_info->extendIPMRectBottom_orig);
04174 args_info->extendIPMRectBottom_orig = gengetopt_strdup (optarg);
04175 }
04176
04177 else if (strcmp (long_options[option_index].name, "splineScoreJitter") == 0)
04178 {
04179 if (local_args_info.splineScoreJitter_given)
04180 {
04181 fprintf (stderr, "%s: `--splineScoreJitter' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04182 goto failure;
04183 }
04184 if (args_info->splineScoreJitter_given && ! override)
04185 continue;
04186 local_args_info.splineScoreJitter_given = 1;
04187 args_info->splineScoreJitter_given = 1;
04188 args_info->splineScoreJitter_arg = strtol (optarg, &stop_char, 0);
04189 if (!(stop_char && *stop_char == '\0')) {
04190 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04191 goto failure;
04192 }
04193 if (args_info->splineScoreJitter_orig)
04194 free (args_info->splineScoreJitter_orig);
04195 args_info->splineScoreJitter_orig = gengetopt_strdup (optarg);
04196 }
04197
04198 else if (strcmp (long_options[option_index].name, "splineScoreLengthRatio") == 0)
04199 {
04200 if (local_args_info.splineScoreLengthRatio_given)
04201 {
04202 fprintf (stderr, "%s: `--splineScoreLengthRatio' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04203 goto failure;
04204 }
04205 if (args_info->splineScoreLengthRatio_given && ! override)
04206 continue;
04207 local_args_info.splineScoreLengthRatio_given = 1;
04208 args_info->splineScoreLengthRatio_given = 1;
04209 args_info->splineScoreLengthRatio_arg = (float)strtod (optarg, &stop_char);
04210 if (!(stop_char && *stop_char == '\0')) {
04211 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04212 goto failure;
04213 }
04214 if (args_info->splineScoreLengthRatio_orig)
04215 free (args_info->splineScoreLengthRatio_orig);
04216 args_info->splineScoreLengthRatio_orig = gengetopt_strdup (optarg);
04217 }
04218
04219 else if (strcmp (long_options[option_index].name, "splineScoreAngleRatio") == 0)
04220 {
04221 if (local_args_info.splineScoreAngleRatio_given)
04222 {
04223 fprintf (stderr, "%s: `--splineScoreAngleRatio' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04224 goto failure;
04225 }
04226 if (args_info->splineScoreAngleRatio_given && ! override)
04227 continue;
04228 local_args_info.splineScoreAngleRatio_given = 1;
04229 args_info->splineScoreAngleRatio_given = 1;
04230 args_info->splineScoreAngleRatio_arg = (float)strtod (optarg, &stop_char);
04231 if (!(stop_char && *stop_char == '\0')) {
04232 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04233 goto failure;
04234 }
04235 if (args_info->splineScoreAngleRatio_orig)
04236 free (args_info->splineScoreAngleRatio_orig);
04237 args_info->splineScoreAngleRatio_orig = gengetopt_strdup (optarg);
04238 }
04239
04240 else if (strcmp (long_options[option_index].name, "splineScoreStep") == 0)
04241 {
04242 if (local_args_info.splineScoreStep_given)
04243 {
04244 fprintf (stderr, "%s: `--splineScoreStep' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04245 goto failure;
04246 }
04247 if (args_info->splineScoreStep_given && ! override)
04248 continue;
04249 local_args_info.splineScoreStep_given = 1;
04250 args_info->splineScoreStep_given = 1;
04251 args_info->splineScoreStep_arg = (float)strtod (optarg, &stop_char);
04252 if (!(stop_char && *stop_char == '\0')) {
04253 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04254 goto failure;
04255 }
04256 if (args_info->splineScoreStep_orig)
04257 free (args_info->splineScoreStep_orig);
04258 args_info->splineScoreStep_orig = gengetopt_strdup (optarg);
04259 }
04260
04261 else if (strcmp (long_options[option_index].name, "splineTrackingNumAbsentFrames") == 0)
04262 {
04263 if (local_args_info.splineTrackingNumAbsentFrames_given)
04264 {
04265 fprintf (stderr, "%s: `--splineTrackingNumAbsentFrames' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04266 goto failure;
04267 }
04268 if (args_info->splineTrackingNumAbsentFrames_given && ! override)
04269 continue;
04270 local_args_info.splineTrackingNumAbsentFrames_given = 1;
04271 args_info->splineTrackingNumAbsentFrames_given = 1;
04272 args_info->splineTrackingNumAbsentFrames_arg = strtol (optarg, &stop_char, 0);
04273 if (!(stop_char && *stop_char == '\0')) {
04274 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04275 goto failure;
04276 }
04277 if (args_info->splineTrackingNumAbsentFrames_orig)
04278 free (args_info->splineTrackingNumAbsentFrames_orig);
04279 args_info->splineTrackingNumAbsentFrames_orig = gengetopt_strdup (optarg);
04280 }
04281
04282 else if (strcmp (long_options[option_index].name, "splineTrackingNumSeenFrames") == 0)
04283 {
04284 if (local_args_info.splineTrackingNumSeenFrames_given)
04285 {
04286 fprintf (stderr, "%s: `--splineTrackingNumSeenFrames' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04287 goto failure;
04288 }
04289 if (args_info->splineTrackingNumSeenFrames_given && ! override)
04290 continue;
04291 local_args_info.splineTrackingNumSeenFrames_given = 1;
04292 args_info->splineTrackingNumSeenFrames_given = 1;
04293 args_info->splineTrackingNumSeenFrames_arg = strtol (optarg, &stop_char, 0);
04294 if (!(stop_char && *stop_char == '\0')) {
04295 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04296 goto failure;
04297 }
04298 if (args_info->splineTrackingNumSeenFrames_orig)
04299 free (args_info->splineTrackingNumSeenFrames_orig);
04300 args_info->splineTrackingNumSeenFrames_orig = gengetopt_strdup (optarg);
04301 }
04302
04303 else if (strcmp (long_options[option_index].name, "mergeSplineThetaThreshold") == 0)
04304 {
04305 if (local_args_info.mergeSplineThetaThreshold_given)
04306 {
04307 fprintf (stderr, "%s: `--mergeSplineThetaThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04308 goto failure;
04309 }
04310 if (args_info->mergeSplineThetaThreshold_given && ! override)
04311 continue;
04312 local_args_info.mergeSplineThetaThreshold_given = 1;
04313 args_info->mergeSplineThetaThreshold_given = 1;
04314 args_info->mergeSplineThetaThreshold_arg = (float)strtod (optarg, &stop_char);
04315 if (!(stop_char && *stop_char == '\0')) {
04316 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04317 goto failure;
04318 }
04319 if (args_info->mergeSplineThetaThreshold_orig)
04320 free (args_info->mergeSplineThetaThreshold_orig);
04321 args_info->mergeSplineThetaThreshold_orig = gengetopt_strdup (optarg);
04322 }
04323
04324 else if (strcmp (long_options[option_index].name, "mergeSplineRThreshold") == 0)
04325 {
04326 if (local_args_info.mergeSplineRThreshold_given)
04327 {
04328 fprintf (stderr, "%s: `--mergeSplineRThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04329 goto failure;
04330 }
04331 if (args_info->mergeSplineRThreshold_given && ! override)
04332 continue;
04333 local_args_info.mergeSplineRThreshold_given = 1;
04334 args_info->mergeSplineRThreshold_given = 1;
04335 args_info->mergeSplineRThreshold_arg = (float)strtod (optarg, &stop_char);
04336 if (!(stop_char && *stop_char == '\0')) {
04337 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04338 goto failure;
04339 }
04340 if (args_info->mergeSplineRThreshold_orig)
04341 free (args_info->mergeSplineRThreshold_orig);
04342 args_info->mergeSplineRThreshold_orig = gengetopt_strdup (optarg);
04343 }
04344
04345 else if (strcmp (long_options[option_index].name, "mergeSplineMeanThetaThreshold") == 0)
04346 {
04347 if (local_args_info.mergeSplineMeanThetaThreshold_given)
04348 {
04349 fprintf (stderr, "%s: `--mergeSplineMeanThetaThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04350 goto failure;
04351 }
04352 if (args_info->mergeSplineMeanThetaThreshold_given && ! override)
04353 continue;
04354 local_args_info.mergeSplineMeanThetaThreshold_given = 1;
04355 args_info->mergeSplineMeanThetaThreshold_given = 1;
04356 args_info->mergeSplineMeanThetaThreshold_arg = (float)strtod (optarg, &stop_char);
04357 if (!(stop_char && *stop_char == '\0')) {
04358 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04359 goto failure;
04360 }
04361 if (args_info->mergeSplineMeanThetaThreshold_orig)
04362 free (args_info->mergeSplineMeanThetaThreshold_orig);
04363 args_info->mergeSplineMeanThetaThreshold_orig = gengetopt_strdup (optarg);
04364 }
04365
04366 else if (strcmp (long_options[option_index].name, "mergeSplineMeanRThreshold") == 0)
04367 {
04368 if (local_args_info.mergeSplineMeanRThreshold_given)
04369 {
04370 fprintf (stderr, "%s: `--mergeSplineMeanRThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04371 goto failure;
04372 }
04373 if (args_info->mergeSplineMeanRThreshold_given && ! override)
04374 continue;
04375 local_args_info.mergeSplineMeanRThreshold_given = 1;
04376 args_info->mergeSplineMeanRThreshold_given = 1;
04377 args_info->mergeSplineMeanRThreshold_arg = (float)strtod (optarg, &stop_char);
04378 if (!(stop_char && *stop_char == '\0')) {
04379 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04380 goto failure;
04381 }
04382 if (args_info->mergeSplineMeanRThreshold_orig)
04383 free (args_info->mergeSplineMeanRThreshold_orig);
04384 args_info->mergeSplineMeanRThreshold_orig = gengetopt_strdup (optarg);
04385 }
04386
04387 else if (strcmp (long_options[option_index].name, "mergeSplineCentroidThreshold") == 0)
04388 {
04389 if (local_args_info.mergeSplineCentroidThreshold_given)
04390 {
04391 fprintf (stderr, "%s: `--mergeSplineCentroidThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04392 goto failure;
04393 }
04394 if (args_info->mergeSplineCentroidThreshold_given && ! override)
04395 continue;
04396 local_args_info.mergeSplineCentroidThreshold_given = 1;
04397 args_info->mergeSplineCentroidThreshold_given = 1;
04398 args_info->mergeSplineCentroidThreshold_arg = (float)strtod (optarg, &stop_char);
04399 if (!(stop_char && *stop_char == '\0')) {
04400 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04401 goto failure;
04402 }
04403 if (args_info->mergeSplineCentroidThreshold_orig)
04404 free (args_info->mergeSplineCentroidThreshold_orig);
04405 args_info->mergeSplineCentroidThreshold_orig = gengetopt_strdup (optarg);
04406 }
04407
04408 else if (strcmp (long_options[option_index].name, "lineTrackingNumAbsentFrames") == 0)
04409 {
04410 if (local_args_info.lineTrackingNumAbsentFrames_given)
04411 {
04412 fprintf (stderr, "%s: `--lineTrackingNumAbsentFrames' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04413 goto failure;
04414 }
04415 if (args_info->lineTrackingNumAbsentFrames_given && ! override)
04416 continue;
04417 local_args_info.lineTrackingNumAbsentFrames_given = 1;
04418 args_info->lineTrackingNumAbsentFrames_given = 1;
04419 args_info->lineTrackingNumAbsentFrames_arg = strtol (optarg, &stop_char, 0);
04420 if (!(stop_char && *stop_char == '\0')) {
04421 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04422 goto failure;
04423 }
04424 if (args_info->lineTrackingNumAbsentFrames_orig)
04425 free (args_info->lineTrackingNumAbsentFrames_orig);
04426 args_info->lineTrackingNumAbsentFrames_orig = gengetopt_strdup (optarg);
04427 }
04428
04429 else if (strcmp (long_options[option_index].name, "lineTrackingNumSeenFrames") == 0)
04430 {
04431 if (local_args_info.lineTrackingNumSeenFrames_given)
04432 {
04433 fprintf (stderr, "%s: `--lineTrackingNumSeenFrames' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04434 goto failure;
04435 }
04436 if (args_info->lineTrackingNumSeenFrames_given && ! override)
04437 continue;
04438 local_args_info.lineTrackingNumSeenFrames_given = 1;
04439 args_info->lineTrackingNumSeenFrames_given = 1;
04440 args_info->lineTrackingNumSeenFrames_arg = strtol (optarg, &stop_char, 0);
04441 if (!(stop_char && *stop_char == '\0')) {
04442 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04443 goto failure;
04444 }
04445 if (args_info->lineTrackingNumSeenFrames_orig)
04446 free (args_info->lineTrackingNumSeenFrames_orig);
04447 args_info->lineTrackingNumSeenFrames_orig = gengetopt_strdup (optarg);
04448 }
04449
04450 else if (strcmp (long_options[option_index].name, "mergeLineThetaThreshold") == 0)
04451 {
04452 if (local_args_info.mergeLineThetaThreshold_given)
04453 {
04454 fprintf (stderr, "%s: `--mergeLineThetaThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04455 goto failure;
04456 }
04457 if (args_info->mergeLineThetaThreshold_given && ! override)
04458 continue;
04459 local_args_info.mergeLineThetaThreshold_given = 1;
04460 args_info->mergeLineThetaThreshold_given = 1;
04461 args_info->mergeLineThetaThreshold_arg = (float)strtod (optarg, &stop_char);
04462 if (!(stop_char && *stop_char == '\0')) {
04463 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04464 goto failure;
04465 }
04466 if (args_info->mergeLineThetaThreshold_orig)
04467 free (args_info->mergeLineThetaThreshold_orig);
04468 args_info->mergeLineThetaThreshold_orig = gengetopt_strdup (optarg);
04469 }
04470
04471 else if (strcmp (long_options[option_index].name, "mergeLineRThreshold") == 0)
04472 {
04473 if (local_args_info.mergeLineRThreshold_given)
04474 {
04475 fprintf (stderr, "%s: `--mergeLineRThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04476 goto failure;
04477 }
04478 if (args_info->mergeLineRThreshold_given && ! override)
04479 continue;
04480 local_args_info.mergeLineRThreshold_given = 1;
04481 args_info->mergeLineRThreshold_given = 1;
04482 args_info->mergeLineRThreshold_arg = (float)strtod (optarg, &stop_char);
04483 if (!(stop_char && *stop_char == '\0')) {
04484 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04485 goto failure;
04486 }
04487 if (args_info->mergeLineRThreshold_orig)
04488 free (args_info->mergeLineRThreshold_orig);
04489 args_info->mergeLineRThreshold_orig = gengetopt_strdup (optarg);
04490 }
04491
04492 else if (strcmp (long_options[option_index].name, "numStrips") == 0)
04493 {
04494 if (local_args_info.numStrips_given)
04495 {
04496 fprintf (stderr, "%s: `--numStrips' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04497 goto failure;
04498 }
04499 if (args_info->numStrips_given && ! override)
04500 continue;
04501 local_args_info.numStrips_given = 1;
04502 args_info->numStrips_given = 1;
04503 args_info->numStrips_arg = strtol (optarg, &stop_char, 0);
04504 if (!(stop_char && *stop_char == '\0')) {
04505 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04506 goto failure;
04507 }
04508 if (args_info->numStrips_orig)
04509 free (args_info->numStrips_orig);
04510 args_info->numStrips_orig = gengetopt_strdup (optarg);
04511 }
04512
04513 else if (strcmp (long_options[option_index].name, "checkSplines") == 0)
04514 {
04515 if (local_args_info.checkSplines_given)
04516 {
04517 fprintf (stderr, "%s: `--checkSplines' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04518 goto failure;
04519 }
04520 if (args_info->checkSplines_given && ! override)
04521 continue;
04522 local_args_info.checkSplines_given = 1;
04523 args_info->checkSplines_given = 1;
04524 args_info->checkSplines_arg = strtol (optarg, &stop_char, 0);
04525 if (!(stop_char && *stop_char == '\0')) {
04526 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04527 goto failure;
04528 }
04529 if (args_info->checkSplines_orig)
04530 free (args_info->checkSplines_orig);
04531 args_info->checkSplines_orig = gengetopt_strdup (optarg);
04532 }
04533
04534 else if (strcmp (long_options[option_index].name, "checkSplinesCurvenessThreshold") == 0)
04535 {
04536 if (local_args_info.checkSplinesCurvenessThreshold_given)
04537 {
04538 fprintf (stderr, "%s: `--checkSplinesCurvenessThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04539 goto failure;
04540 }
04541 if (args_info->checkSplinesCurvenessThreshold_given && ! override)
04542 continue;
04543 local_args_info.checkSplinesCurvenessThreshold_given = 1;
04544 args_info->checkSplinesCurvenessThreshold_given = 1;
04545 args_info->checkSplinesCurvenessThreshold_arg = (float)strtod (optarg, &stop_char);
04546 if (!(stop_char && *stop_char == '\0')) {
04547 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04548 goto failure;
04549 }
04550 if (args_info->checkSplinesCurvenessThreshold_orig)
04551 free (args_info->checkSplinesCurvenessThreshold_orig);
04552 args_info->checkSplinesCurvenessThreshold_orig = gengetopt_strdup (optarg);
04553 }
04554
04555 else if (strcmp (long_options[option_index].name, "checkSplinesLengthThreshold") == 0)
04556 {
04557 if (local_args_info.checkSplinesLengthThreshold_given)
04558 {
04559 fprintf (stderr, "%s: `--checkSplinesLengthThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04560 goto failure;
04561 }
04562 if (args_info->checkSplinesLengthThreshold_given && ! override)
04563 continue;
04564 local_args_info.checkSplinesLengthThreshold_given = 1;
04565 args_info->checkSplinesLengthThreshold_given = 1;
04566 args_info->checkSplinesLengthThreshold_arg = (float)strtod (optarg, &stop_char);
04567 if (!(stop_char && *stop_char == '\0')) {
04568 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04569 goto failure;
04570 }
04571 if (args_info->checkSplinesLengthThreshold_orig)
04572 free (args_info->checkSplinesLengthThreshold_orig);
04573 args_info->checkSplinesLengthThreshold_orig = gengetopt_strdup (optarg);
04574 }
04575
04576 else if (strcmp (long_options[option_index].name, "checkSplinesThetaDiffThreshold") == 0)
04577 {
04578 if (local_args_info.checkSplinesThetaDiffThreshold_given)
04579 {
04580 fprintf (stderr, "%s: `--checkSplinesThetaDiffThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04581 goto failure;
04582 }
04583 if (args_info->checkSplinesThetaDiffThreshold_given && ! override)
04584 continue;
04585 local_args_info.checkSplinesThetaDiffThreshold_given = 1;
04586 args_info->checkSplinesThetaDiffThreshold_given = 1;
04587 args_info->checkSplinesThetaDiffThreshold_arg = (float)strtod (optarg, &stop_char);
04588 if (!(stop_char && *stop_char == '\0')) {
04589 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04590 goto failure;
04591 }
04592 if (args_info->checkSplinesThetaDiffThreshold_orig)
04593 free (args_info->checkSplinesThetaDiffThreshold_orig);
04594 args_info->checkSplinesThetaDiffThreshold_orig = gengetopt_strdup (optarg);
04595 }
04596
04597 else if (strcmp (long_options[option_index].name, "checkSplinesThetaThreshold") == 0)
04598 {
04599 if (local_args_info.checkSplinesThetaThreshold_given)
04600 {
04601 fprintf (stderr, "%s: `--checkSplinesThetaThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04602 goto failure;
04603 }
04604 if (args_info->checkSplinesThetaThreshold_given && ! override)
04605 continue;
04606 local_args_info.checkSplinesThetaThreshold_given = 1;
04607 args_info->checkSplinesThetaThreshold_given = 1;
04608 args_info->checkSplinesThetaThreshold_arg = (float)strtod (optarg, &stop_char);
04609 if (!(stop_char && *stop_char == '\0')) {
04610 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04611 goto failure;
04612 }
04613 if (args_info->checkSplinesThetaThreshold_orig)
04614 free (args_info->checkSplinesThetaThreshold_orig);
04615 args_info->checkSplinesThetaThreshold_orig = gengetopt_strdup (optarg);
04616 }
04617
04618 else if (strcmp (long_options[option_index].name, "checkIPMSplines") == 0)
04619 {
04620 if (local_args_info.checkIPMSplines_given)
04621 {
04622 fprintf (stderr, "%s: `--checkIPMSplines' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04623 goto failure;
04624 }
04625 if (args_info->checkIPMSplines_given && ! override)
04626 continue;
04627 local_args_info.checkIPMSplines_given = 1;
04628 args_info->checkIPMSplines_given = 1;
04629 args_info->checkIPMSplines_arg = strtol (optarg, &stop_char, 0);
04630 if (!(stop_char && *stop_char == '\0')) {
04631 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04632 goto failure;
04633 }
04634 if (args_info->checkIPMSplines_orig)
04635 free (args_info->checkIPMSplines_orig);
04636 args_info->checkIPMSplines_orig = gengetopt_strdup (optarg);
04637 }
04638
04639 else if (strcmp (long_options[option_index].name, "checkIPMSplinesCurvenessThreshold") == 0)
04640 {
04641 if (local_args_info.checkIPMSplinesCurvenessThreshold_given)
04642 {
04643 fprintf (stderr, "%s: `--checkIPMSplinesCurvenessThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04644 goto failure;
04645 }
04646 if (args_info->checkIPMSplinesCurvenessThreshold_given && ! override)
04647 continue;
04648 local_args_info.checkIPMSplinesCurvenessThreshold_given = 1;
04649 args_info->checkIPMSplinesCurvenessThreshold_given = 1;
04650 args_info->checkIPMSplinesCurvenessThreshold_arg = (float)strtod (optarg, &stop_char);
04651 if (!(stop_char && *stop_char == '\0')) {
04652 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04653 goto failure;
04654 }
04655 if (args_info->checkIPMSplinesCurvenessThreshold_orig)
04656 free (args_info->checkIPMSplinesCurvenessThreshold_orig);
04657 args_info->checkIPMSplinesCurvenessThreshold_orig = gengetopt_strdup (optarg);
04658 }
04659
04660 else if (strcmp (long_options[option_index].name, "checkIPMSplinesLengthThreshold") == 0)
04661 {
04662 if (local_args_info.checkIPMSplinesLengthThreshold_given)
04663 {
04664 fprintf (stderr, "%s: `--checkIPMSplinesLengthThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04665 goto failure;
04666 }
04667 if (args_info->checkIPMSplinesLengthThreshold_given && ! override)
04668 continue;
04669 local_args_info.checkIPMSplinesLengthThreshold_given = 1;
04670 args_info->checkIPMSplinesLengthThreshold_given = 1;
04671 args_info->checkIPMSplinesLengthThreshold_arg = (float)strtod (optarg, &stop_char);
04672 if (!(stop_char && *stop_char == '\0')) {
04673 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04674 goto failure;
04675 }
04676 if (args_info->checkIPMSplinesLengthThreshold_orig)
04677 free (args_info->checkIPMSplinesLengthThreshold_orig);
04678 args_info->checkIPMSplinesLengthThreshold_orig = gengetopt_strdup (optarg);
04679 }
04680
04681 else if (strcmp (long_options[option_index].name, "checkIPMSplinesThetaDiffThreshold") == 0)
04682 {
04683 if (local_args_info.checkIPMSplinesThetaDiffThreshold_given)
04684 {
04685 fprintf (stderr, "%s: `--checkIPMSplinesThetaDiffThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04686 goto failure;
04687 }
04688 if (args_info->checkIPMSplinesThetaDiffThreshold_given && ! override)
04689 continue;
04690 local_args_info.checkIPMSplinesThetaDiffThreshold_given = 1;
04691 args_info->checkIPMSplinesThetaDiffThreshold_given = 1;
04692 args_info->checkIPMSplinesThetaDiffThreshold_arg = (float)strtod (optarg, &stop_char);
04693 if (!(stop_char && *stop_char == '\0')) {
04694 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04695 goto failure;
04696 }
04697 if (args_info->checkIPMSplinesThetaDiffThreshold_orig)
04698 free (args_info->checkIPMSplinesThetaDiffThreshold_orig);
04699 args_info->checkIPMSplinesThetaDiffThreshold_orig = gengetopt_strdup (optarg);
04700 }
04701
04702 else if (strcmp (long_options[option_index].name, "checkIPMSplinesThetaThreshold") == 0)
04703 {
04704 if (local_args_info.checkIPMSplinesThetaThreshold_given)
04705 {
04706 fprintf (stderr, "%s: `--checkIPMSplinesThetaThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04707 goto failure;
04708 }
04709 if (args_info->checkIPMSplinesThetaThreshold_given && ! override)
04710 continue;
04711 local_args_info.checkIPMSplinesThetaThreshold_given = 1;
04712 args_info->checkIPMSplinesThetaThreshold_given = 1;
04713 args_info->checkIPMSplinesThetaThreshold_arg = (float)strtod (optarg, &stop_char);
04714 if (!(stop_char && *stop_char == '\0')) {
04715 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04716 goto failure;
04717 }
04718 if (args_info->checkIPMSplinesThetaThreshold_orig)
04719 free (args_info->checkIPMSplinesThetaThreshold_orig);
04720 args_info->checkIPMSplinesThetaThreshold_orig = gengetopt_strdup (optarg);
04721 }
04722
04723 else if (strcmp (long_options[option_index].name, "finalSplineScoreThreshold") == 0)
04724 {
04725 if (local_args_info.finalSplineScoreThreshold_given)
04726 {
04727 fprintf (stderr, "%s: `--finalSplineScoreThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04728 goto failure;
04729 }
04730 if (args_info->finalSplineScoreThreshold_given && ! override)
04731 continue;
04732 local_args_info.finalSplineScoreThreshold_given = 1;
04733 args_info->finalSplineScoreThreshold_given = 1;
04734 args_info->finalSplineScoreThreshold_arg = (float)strtod (optarg, &stop_char);
04735 if (!(stop_char && *stop_char == '\0')) {
04736 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04737 goto failure;
04738 }
04739 if (args_info->finalSplineScoreThreshold_orig)
04740 free (args_info->finalSplineScoreThreshold_orig);
04741 args_info->finalSplineScoreThreshold_orig = gengetopt_strdup (optarg);
04742 }
04743
04744 else if (strcmp (long_options[option_index].name, "useGroundPlane") == 0)
04745 {
04746 if (local_args_info.useGroundPlane_given)
04747 {
04748 fprintf (stderr, "%s: `--useGroundPlane' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04749 goto failure;
04750 }
04751 if (args_info->useGroundPlane_given && ! override)
04752 continue;
04753 local_args_info.useGroundPlane_given = 1;
04754 args_info->useGroundPlane_given = 1;
04755 args_info->useGroundPlane_arg = strtol (optarg, &stop_char, 0);
04756 if (!(stop_char && *stop_char == '\0')) {
04757 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04758 goto failure;
04759 }
04760 if (args_info->useGroundPlane_orig)
04761 free (args_info->useGroundPlane_orig);
04762 args_info->useGroundPlane_orig = gengetopt_strdup (optarg);
04763 }
04764
04765 else if (strcmp (long_options[option_index].name, "checkColor") == 0)
04766 {
04767 if (local_args_info.checkColor_given)
04768 {
04769 fprintf (stderr, "%s: `--checkColor' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04770 goto failure;
04771 }
04772 if (args_info->checkColor_given && ! override)
04773 continue;
04774 local_args_info.checkColor_given = 1;
04775 args_info->checkColor_given = 1;
04776 args_info->checkColor_arg = strtol (optarg, &stop_char, 0);
04777 if (!(stop_char && *stop_char == '\0')) {
04778 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04779 goto failure;
04780 }
04781 if (args_info->checkColor_orig)
04782 free (args_info->checkColor_orig);
04783 args_info->checkColor_orig = gengetopt_strdup (optarg);
04784 }
04785
04786 else if (strcmp (long_options[option_index].name, "checkColorWindow") == 0)
04787 {
04788 if (local_args_info.checkColorWindow_given)
04789 {
04790 fprintf (stderr, "%s: `--checkColorWindow' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04791 goto failure;
04792 }
04793 if (args_info->checkColorWindow_given && ! override)
04794 continue;
04795 local_args_info.checkColorWindow_given = 1;
04796 args_info->checkColorWindow_given = 1;
04797 args_info->checkColorWindow_arg = strtol (optarg, &stop_char, 0);
04798 if (!(stop_char && *stop_char == '\0')) {
04799 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04800 goto failure;
04801 }
04802 if (args_info->checkColorWindow_orig)
04803 free (args_info->checkColorWindow_orig);
04804 args_info->checkColorWindow_orig = gengetopt_strdup (optarg);
04805 }
04806
04807 else if (strcmp (long_options[option_index].name, "checkColorNumBins") == 0)
04808 {
04809 if (local_args_info.checkColorNumBins_given)
04810 {
04811 fprintf (stderr, "%s: `--checkColorNumBins' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04812 goto failure;
04813 }
04814 if (args_info->checkColorNumBins_given && ! override)
04815 continue;
04816 local_args_info.checkColorNumBins_given = 1;
04817 args_info->checkColorNumBins_given = 1;
04818 args_info->checkColorNumBins_arg = strtol (optarg, &stop_char, 0);
04819 if (!(stop_char && *stop_char == '\0')) {
04820 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04821 goto failure;
04822 }
04823 if (args_info->checkColorNumBins_orig)
04824 free (args_info->checkColorNumBins_orig);
04825 args_info->checkColorNumBins_orig = gengetopt_strdup (optarg);
04826 }
04827
04828 else if (strcmp (long_options[option_index].name, "checkColorNumYellowMin") == 0)
04829 {
04830 if (local_args_info.checkColorNumYellowMin_given)
04831 {
04832 fprintf (stderr, "%s: `--checkColorNumYellowMin' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04833 goto failure;
04834 }
04835 if (args_info->checkColorNumYellowMin_given && ! override)
04836 continue;
04837 local_args_info.checkColorNumYellowMin_given = 1;
04838 args_info->checkColorNumYellowMin_given = 1;
04839 args_info->checkColorNumYellowMin_arg = (float)strtod (optarg, &stop_char);
04840 if (!(stop_char && *stop_char == '\0')) {
04841 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04842 goto failure;
04843 }
04844 if (args_info->checkColorNumYellowMin_orig)
04845 free (args_info->checkColorNumYellowMin_orig);
04846 args_info->checkColorNumYellowMin_orig = gengetopt_strdup (optarg);
04847 }
04848
04849 else if (strcmp (long_options[option_index].name, "checkColorRGMin") == 0)
04850 {
04851 if (local_args_info.checkColorRGMin_given)
04852 {
04853 fprintf (stderr, "%s: `--checkColorRGMin' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04854 goto failure;
04855 }
04856 if (args_info->checkColorRGMin_given && ! override)
04857 continue;
04858 local_args_info.checkColorRGMin_given = 1;
04859 args_info->checkColorRGMin_given = 1;
04860 args_info->checkColorRGMin_arg = (float)strtod (optarg, &stop_char);
04861 if (!(stop_char && *stop_char == '\0')) {
04862 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04863 goto failure;
04864 }
04865 if (args_info->checkColorRGMin_orig)
04866 free (args_info->checkColorRGMin_orig);
04867 args_info->checkColorRGMin_orig = gengetopt_strdup (optarg);
04868 }
04869
04870 else if (strcmp (long_options[option_index].name, "checkColorRGMax") == 0)
04871 {
04872 if (local_args_info.checkColorRGMax_given)
04873 {
04874 fprintf (stderr, "%s: `--checkColorRGMax' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04875 goto failure;
04876 }
04877 if (args_info->checkColorRGMax_given && ! override)
04878 continue;
04879 local_args_info.checkColorRGMax_given = 1;
04880 args_info->checkColorRGMax_given = 1;
04881 args_info->checkColorRGMax_arg = (float)strtod (optarg, &stop_char);
04882 if (!(stop_char && *stop_char == '\0')) {
04883 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04884 goto failure;
04885 }
04886 if (args_info->checkColorRGMax_orig)
04887 free (args_info->checkColorRGMax_orig);
04888 args_info->checkColorRGMax_orig = gengetopt_strdup (optarg);
04889 }
04890
04891 else if (strcmp (long_options[option_index].name, "checkColorGBMin") == 0)
04892 {
04893 if (local_args_info.checkColorGBMin_given)
04894 {
04895 fprintf (stderr, "%s: `--checkColorGBMin' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04896 goto failure;
04897 }
04898 if (args_info->checkColorGBMin_given && ! override)
04899 continue;
04900 local_args_info.checkColorGBMin_given = 1;
04901 args_info->checkColorGBMin_given = 1;
04902 args_info->checkColorGBMin_arg = (float)strtod (optarg, &stop_char);
04903 if (!(stop_char && *stop_char == '\0')) {
04904 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04905 goto failure;
04906 }
04907 if (args_info->checkColorGBMin_orig)
04908 free (args_info->checkColorGBMin_orig);
04909 args_info->checkColorGBMin_orig = gengetopt_strdup (optarg);
04910 }
04911
04912 else if (strcmp (long_options[option_index].name, "checkColorRBMin") == 0)
04913 {
04914 if (local_args_info.checkColorRBMin_given)
04915 {
04916 fprintf (stderr, "%s: `--checkColorRBMin' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04917 goto failure;
04918 }
04919 if (args_info->checkColorRBMin_given && ! override)
04920 continue;
04921 local_args_info.checkColorRBMin_given = 1;
04922 args_info->checkColorRBMin_given = 1;
04923 args_info->checkColorRBMin_arg = (float)strtod (optarg, &stop_char);
04924 if (!(stop_char && *stop_char == '\0')) {
04925 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04926 goto failure;
04927 }
04928 if (args_info->checkColorRBMin_orig)
04929 free (args_info->checkColorRBMin_orig);
04930 args_info->checkColorRBMin_orig = gengetopt_strdup (optarg);
04931 }
04932
04933 else if (strcmp (long_options[option_index].name, "checkColorRBFThreshold") == 0)
04934 {
04935 if (local_args_info.checkColorRBFThreshold_given)
04936 {
04937 fprintf (stderr, "%s: `--checkColorRBFThreshold' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04938 goto failure;
04939 }
04940 if (args_info->checkColorRBFThreshold_given && ! override)
04941 continue;
04942 local_args_info.checkColorRBFThreshold_given = 1;
04943 args_info->checkColorRBFThreshold_given = 1;
04944 args_info->checkColorRBFThreshold_arg = (float)strtod (optarg, &stop_char);
04945 if (!(stop_char && *stop_char == '\0')) {
04946 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04947 goto failure;
04948 }
04949 if (args_info->checkColorRBFThreshold_orig)
04950 free (args_info->checkColorRBFThreshold_orig);
04951 args_info->checkColorRBFThreshold_orig = gengetopt_strdup (optarg);
04952 }
04953
04954 else if (strcmp (long_options[option_index].name, "checkColorRBF") == 0)
04955 {
04956 if (local_args_info.checkColorRBF_given)
04957 {
04958 fprintf (stderr, "%s: `--checkColorRBF' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04959 goto failure;
04960 }
04961 if (args_info->checkColorRBF_given && ! override)
04962 continue;
04963 local_args_info.checkColorRBF_given = 1;
04964 args_info->checkColorRBF_given = 1;
04965 args_info->checkColorRBF_arg = strtol (optarg, &stop_char, 0);
04966 if (!(stop_char && *stop_char == '\0')) {
04967 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04968 goto failure;
04969 }
04970 if (args_info->checkColorRBF_orig)
04971 free (args_info->checkColorRBF_orig);
04972 args_info->checkColorRBF_orig = gengetopt_strdup (optarg);
04973 }
04974
04975 else if (strcmp (long_options[option_index].name, "ipmWindowClear") == 0)
04976 {
04977 if (local_args_info.ipmWindowClear_given)
04978 {
04979 fprintf (stderr, "%s: `--ipmWindowClear' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
04980 goto failure;
04981 }
04982 if (args_info->ipmWindowClear_given && ! override)
04983 continue;
04984 local_args_info.ipmWindowClear_given = 1;
04985 args_info->ipmWindowClear_given = 1;
04986 args_info->ipmWindowClear_arg = strtol (optarg, &stop_char, 0);
04987 if (!(stop_char && *stop_char == '\0')) {
04988 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
04989 goto failure;
04990 }
04991 if (args_info->ipmWindowClear_orig)
04992 free (args_info->ipmWindowClear_orig);
04993 args_info->ipmWindowClear_orig = gengetopt_strdup (optarg);
04994 }
04995
04996 else if (strcmp (long_options[option_index].name, "ipmWindowLeft") == 0)
04997 {
04998 if (local_args_info.ipmWindowLeft_given)
04999 {
05000 fprintf (stderr, "%s: `--ipmWindowLeft' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
05001 goto failure;
05002 }
05003 if (args_info->ipmWindowLeft_given && ! override)
05004 continue;
05005 local_args_info.ipmWindowLeft_given = 1;
05006 args_info->ipmWindowLeft_given = 1;
05007 args_info->ipmWindowLeft_arg = strtol (optarg, &stop_char, 0);
05008 if (!(stop_char && *stop_char == '\0')) {
05009 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
05010 goto failure;
05011 }
05012 if (args_info->ipmWindowLeft_orig)
05013 free (args_info->ipmWindowLeft_orig);
05014 args_info->ipmWindowLeft_orig = gengetopt_strdup (optarg);
05015 }
05016
05017 else if (strcmp (long_options[option_index].name, "ipmWindowRight") == 0)
05018 {
05019 if (local_args_info.ipmWindowRight_given)
05020 {
05021 fprintf (stderr, "%s: `--ipmWindowRight' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
05022 goto failure;
05023 }
05024 if (args_info->ipmWindowRight_given && ! override)
05025 continue;
05026 local_args_info.ipmWindowRight_given = 1;
05027 args_info->ipmWindowRight_given = 1;
05028 args_info->ipmWindowRight_arg = strtol (optarg, &stop_char, 0);
05029 if (!(stop_char && *stop_char == '\0')) {
05030 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
05031 goto failure;
05032 }
05033 if (args_info->ipmWindowRight_orig)
05034 free (args_info->ipmWindowRight_orig);
05035 args_info->ipmWindowRight_orig = gengetopt_strdup (optarg);
05036 }
05037
05038 else if (strcmp (long_options[option_index].name, "checkLaneWidth") == 0)
05039 {
05040 if (local_args_info.checkLaneWidth_given)
05041 {
05042 fprintf (stderr, "%s: `--checkLaneWidth' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
05043 goto failure;
05044 }
05045 if (args_info->checkLaneWidth_given && ! override)
05046 continue;
05047 local_args_info.checkLaneWidth_given = 1;
05048 args_info->checkLaneWidth_given = 1;
05049 args_info->checkLaneWidth_arg = strtol (optarg, &stop_char, 0);
05050 if (!(stop_char && *stop_char == '\0')) {
05051 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
05052 goto failure;
05053 }
05054 if (args_info->checkLaneWidth_orig)
05055 free (args_info->checkLaneWidth_orig);
05056 args_info->checkLaneWidth_orig = gengetopt_strdup (optarg);
05057 }
05058
05059 else if (strcmp (long_options[option_index].name, "checkLaneWidthMean") == 0)
05060 {
05061 if (local_args_info.checkLaneWidthMean_given)
05062 {
05063 fprintf (stderr, "%s: `--checkLaneWidthMean' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
05064 goto failure;
05065 }
05066 if (args_info->checkLaneWidthMean_given && ! override)
05067 continue;
05068 local_args_info.checkLaneWidthMean_given = 1;
05069 args_info->checkLaneWidthMean_given = 1;
05070 args_info->checkLaneWidthMean_arg = (float)strtod (optarg, &stop_char);
05071 if (!(stop_char && *stop_char == '\0')) {
05072 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
05073 goto failure;
05074 }
05075 if (args_info->checkLaneWidthMean_orig)
05076 free (args_info->checkLaneWidthMean_orig);
05077 args_info->checkLaneWidthMean_orig = gengetopt_strdup (optarg);
05078 }
05079
05080 else if (strcmp (long_options[option_index].name, "checkLaneWidthStd") == 0)
05081 {
05082 if (local_args_info.checkLaneWidthStd_given)
05083 {
05084 fprintf (stderr, "%s: `--checkLaneWidthStd' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
05085 goto failure;
05086 }
05087 if (args_info->checkLaneWidthStd_given && ! override)
05088 continue;
05089 local_args_info.checkLaneWidthStd_given = 1;
05090 args_info->checkLaneWidthStd_given = 1;
05091 args_info->checkLaneWidthStd_arg = (float)strtod (optarg, &stop_char);
05092 if (!(stop_char && *stop_char == '\0')) {
05093 fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
05094 goto failure;
05095 }
05096 if (args_info->checkLaneWidthStd_orig)
05097 free (args_info->checkLaneWidthStd_orig);
05098 args_info->checkLaneWidthStd_orig = gengetopt_strdup (optarg);
05099 }
05100
05101 break;
05102 case '?':
05103
05104 goto failure;
05105
05106 default:
05107 fprintf (stderr, "%s: option unknown: %c%s\n", LANEDETECTORPARSER_PACKAGE, c, (additional_error ? additional_error : ""));
05108 abort ();
05109 }
05110 }
05111
05112
05113
05114 if (check_required)
05115 {
05116 error += LaneDetectorParser_required2 (args_info, argv[0], additional_error);
05117 }
05118
05119 LaneDetectorParser_release (&local_args_info);
05120
05121 if ( error )
05122 return (EXIT_FAILURE);
05123
05124 return 0;
05125
05126 failure:
05127
05128 LaneDetectorParser_release (&local_args_info);
05129 return (EXIT_FAILURE);
05130 }
05131
05132 #ifndef CONFIG_FILE_LINE_SIZE
05133 #define CONFIG_FILE_LINE_SIZE 2048
05134 #endif
05135 #define ADDITIONAL_ERROR " in configuration file "
05136
05137 #define CONFIG_FILE_LINE_BUFFER_SIZE (CONFIG_FILE_LINE_SIZE+3)
05138
05139
05140 char my1_argv[CONFIG_FILE_LINE_BUFFER_SIZE+1];
05141
05142 int
05143 LaneDetectorParser_configfile (char * const filename, struct
05144 LaneDetectorParserInfo *args_info, int override, int initialize, int
05145 check_required)
05146 {
05147 FILE* file;
05148 char linebuf[CONFIG_FILE_LINE_SIZE];
05149 int line_num = 0;
05150 int i, result, equal;
05151 char *fopt, *farg;
05152 char *str_index;
05153 size_t len, next_token;
05154 char delimiter;
05155 int my_argc = 0;
05156 char **my1_argv_arg;
05157 char *additional_error;
05158
05159
05160 cmd_line_list_tmp = (struct line_list *) malloc (sizeof (struct line_list));
05161 cmd_line_list_tmp->next = cmd_line_list;
05162 cmd_line_list = cmd_line_list_tmp;
05163 cmd_line_list->string_arg = gengetopt_strdup (LANEDETECTORPARSER_PACKAGE);
05164
05165 if ((file = fopen(filename, "r")) == NULL)
05166 {
05167 fprintf (stderr, "%s: Error opening configuration file '%s'\n",
05168 LANEDETECTORPARSER_PACKAGE, filename);
05169 result = EXIT_FAILURE;
05170 goto conf_failure;
05171 }
05172
05173 while ((fgets(linebuf, CONFIG_FILE_LINE_SIZE, file)) != NULL)
05174 {
05175 ++line_num;
05176 my1_argv[0] = '\0';
05177 len = strlen(linebuf);
05178 if (len > (CONFIG_FILE_LINE_BUFFER_SIZE-1))
05179 {
05180 fprintf (stderr, "%s:%s:%d: Line too long in configuration file\n",
05181 LANEDETECTORPARSER_PACKAGE, filename, line_num);
05182 result = EXIT_FAILURE;
05183 goto conf_failure;
05184 }
05185
05186
05187 next_token = strspn ( linebuf, " \t\r\n");
05188 str_index = linebuf + next_token;
05189
05190 if ( str_index[0] == '\0' || str_index[0] == '#')
05191 continue;
05192
05193 fopt = str_index;
05194
05195
05196 next_token = strcspn (fopt, " \t\r\n=");
05197
05198 if (fopt[next_token] == '\0')
05199 {
05200 farg = NULL;
05201 equal = 0;
05202 goto noarg;
05203 }
05204
05205
05206 equal = (fopt[next_token] == '=');
05207 fopt[next_token++] = '\0';
05208
05209
05210 next_token += strspn (fopt + next_token, " \t\r\n");
05211
05212 if ( !equal )
05213 if ((equal = (fopt[next_token] == '=')))
05214 {
05215 next_token++;
05216 next_token += strspn (fopt + next_token, " \t\r\n");
05217 }
05218 str_index += next_token;
05219
05220
05221 farg = str_index;
05222 if ( farg[0] == '\"' || farg[0] == '\'' )
05223 {
05224 str_index = strchr (++farg, str_index[0] );
05225 if (! str_index)
05226 {
05227 fprintf
05228 (stderr,
05229 "%s:%s:%d: unterminated string in configuration file\n",
05230 LANEDETECTORPARSER_PACKAGE, filename, line_num);
05231 result = EXIT_FAILURE;
05232 goto conf_failure;
05233 }
05234 }
05235 else
05236 {
05237 next_token = strcspn (farg, " \t\r\n#\'\"");
05238 str_index += next_token;
05239 }
05240
05241
05242 delimiter = *str_index, *str_index++ = '\0';
05243
05244
05245 if (delimiter != '\0' && delimiter != '#')
05246 {
05247 str_index += strspn(str_index, " \t\r\n");
05248 if (*str_index != '\0' && *str_index != '#')
05249 {
05250 fprintf
05251 (stderr,
05252 "%s:%s:%d: malformed string in configuration file\n",
05253 LANEDETECTORPARSER_PACKAGE, filename, line_num);
05254 result = EXIT_FAILURE;
05255 goto conf_failure;
05256 }
05257 }
05258
05259 noarg:
05260 ++my_argc;
05261 len = strlen(fopt);
05262
05263 strcat (my1_argv, len > 1 ? "--" : "-");
05264 strcat (my1_argv, fopt);
05265 if (len > 1 && ((farg &&*farg) || equal))
05266 strcat (my1_argv, "=");
05267 if (farg && *farg)
05268 strcat (my1_argv, farg);
05269
05270 cmd_line_list_tmp = (struct line_list *) malloc (sizeof (struct
05271 line_list));
05272 cmd_line_list_tmp->next = cmd_line_list;
05273 cmd_line_list = cmd_line_list_tmp;
05274 cmd_line_list->string_arg = gengetopt_strdup(my1_argv);
05275 }
05276
05277 ++my_argc;
05278 my1_argv_arg = (char **) malloc((my_argc+1) * sizeof(char *));
05279 cmd_line_list_tmp = cmd_line_list;
05280 for (i = my_argc - 1; i >= 0; --i) {
05281 my1_argv_arg[i] = cmd_line_list_tmp->string_arg;
05282 cmd_line_list_tmp = cmd_line_list_tmp->next;
05283 }
05284 my1_argv_arg[my_argc] = 0;
05285
05286 additional_error = (char *)malloc(strlen(filename) + strlen(ADDITIONAL_ERROR)
05287 + 1);
05288 strcpy (additional_error, ADDITIONAL_ERROR);
05289 strcat (additional_error, filename);
05290 result =
05291 LaneDetectorParser_internal (my_argc, my1_argv_arg, args_info, override,
05292 initialize, check_required, additional_error);
05293
05294 free (additional_error);
05295 free (my1_argv_arg);
05296
05297 conf_failure:
05298 if (file)
05299 fclose(file);
05300
05301 free_cmd_list();
05302 if (result == EXIT_FAILURE)
05303 {
05304 LaneDetectorParser_free (args_info);
05305 exit (EXIT_FAILURE);
05306 }
05307
05308 return result;
05309 }