Lines Matching refs:args
73 Args args; member in App
118 Args args; in main() local
122 args.camera_id = 0; in main()
123 args.src_is_camera = true; in main()
127 args = Args::read(argc, argv); in main()
131 App app(args); in main()
172 Args args; in read() local
175 if (string(argv[i]) == "--make_gray") args.make_gray = (string(argv[++i]) == "true"); in read()
176 else if (string(argv[i]) == "--resize_src") args.resize_src = (string(argv[++i]) == "true"); in read()
177 else if (string(argv[i]) == "--width") args.width = atoi(argv[++i]); in read()
178 else if (string(argv[i]) == "--height") args.height = atoi(argv[++i]); in read()
181 args.hit_threshold = atof(argv[++i]); in read()
182 args.hit_threshold_auto = false; in read()
184 else if (string(argv[i]) == "--scale") args.scale = atof(argv[++i]); in read()
185 else if (string(argv[i]) == "--nlevels") args.nlevels = atoi(argv[++i]); in read()
186 else if (string(argv[i]) == "--win_width") args.win_width = atoi(argv[++i]); in read()
187 else if (string(argv[i]) == "--win_stride_width") args.win_stride_width = atoi(argv[++i]); in read()
188 else if (string(argv[i]) == "--win_stride_height") args.win_stride_height = atoi(argv[++i]); in read()
189 else if (string(argv[i]) == "--gr_threshold") args.gr_threshold = atoi(argv[++i]); in read()
190 … else if (string(argv[i]) == "--gamma_correct") args.gamma_corr = (string(argv[++i]) == "true"); in read()
191 … else if (string(argv[i]) == "--write_video") args.write_video = (string(argv[++i]) == "true"); in read()
192 else if (string(argv[i]) == "--dst_video") args.dst_video = argv[++i]; in read()
193 else if (string(argv[i]) == "--dst_video_fps") args.dst_video_fps = atof(argv[++i]); in read()
195 else if (string(argv[i]) == "--video") { args.src = argv[++i]; args.src_is_video = true; } in read()
196 …else if (string(argv[i]) == "--camera") { args.camera_id = atoi(argv[++i]); args.src_is_camera = t… in read()
197 else if (args.src.empty()) args.src = argv[i]; in read()
200 return args; in read()
208 args = s; in App()
220 make_gray = args.make_gray; in App()
221 scale = args.scale; in App()
222 gr_threshold = args.gr_threshold; in App()
223 nlevels = args.nlevels; in App()
225 if (args.hit_threshold_auto) in App()
226 args.hit_threshold = args.win_width == 48 ? 1.4 : 0.; in App()
227 hit_threshold = args.hit_threshold; in App()
229 gamma_corr = args.gamma_corr; in App()
231 if (args.win_width != 64 && args.win_width != 48) in App()
232 args.win_width = 64; in App()
235 if (args.resize_src) in App()
236 cout << "Resized source: (" << args.width << ", " << args.height << ")\n"; in App()
239 cout << "Win width: " << args.win_width << endl; in App()
240 cout << "Win stride: (" << args.win_stride_width << ", " << args.win_stride_height << ")\n"; in App()
252 Size win_size(args.win_width, args.win_width * 2); //(64, 128) or (48, 96) in run()
253 Size win_stride(args.win_stride_width, args.win_stride_height); in run()
269 if (args.src_is_video) in run()
271 vc.open(args.src.c_str()); in run()
273 throw runtime_error(string("can't open video file: " + args.src)); in run()
276 else if (args.src_is_camera) in run()
278 vc.open(args.camera_id); in run()
282 msg << "can't open camera: " << args.camera_id; in run()
289 frame = imread(args.src); in run()
291 throw runtime_error(string("can't open image file: " + args.src)); in run()
308 if (args.resize_src) resize(img_aux, img, Size(args.width, args.height)); in run()
349 if (args.src_is_video || args.src_is_camera) vc >> frame; in run()
353 if (args.write_video) in run()
357 … video_writer.open(args.dst_video, VideoWriter::fourcc('x','v','i','d'), args.dst_video_fps, in run()