Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
testImageFilter.cpp
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Test some functions from vpImageFilter class.
32  *
33  *****************************************************************************/
40 #include <iostream>
41 #include <visp3/core/vpImageFilter.h>
42 #include <visp3/core/vpImageConvert.h>
43 #include <visp3/core/vpIoTools.h>
44 #include <visp3/io/vpParseArgv.h>
45 #include <visp3/io/vpImageIo.h>
46 
47 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020408)
48 #include <opencv2/imgproc/imgproc.hpp>
49 #endif
50 
51 // List of allowed command line options
52 #define GETOPTARGS "cdi:p:h"
53 
54 namespace {
55  /*
56  Print the program options.
57 
58  \param name : Program name.
59  \param badparam : Bad parameter name.
60  \param ipath: Input image path.
61  */
62  void usage(const char *name, const char *badparam, std::string ipath) {
63  fprintf(stdout, "\n\
64  Test vpImageFilter class.\n\
65  \n\
66  SYNOPSIS\n\
67  %s [-i <input image path>] [-p <personal image path>]\n\
68  [-h]\n \
69  ", name);
70 
71  fprintf(stdout, "\n\
72  OPTIONS: Default\n\
73  -i <input image path> %s\n\
74  Set image input path.\n\
75  From this path read \"ViSP-images/Klimt/Klimt.pgm,\n\
76  .ppm, .jpeg and .png images.\n\
77  Setting the VISP_INPUT_IMAGE_PATH environment\n\
78  variable produces the same behaviour than using\n\
79  this option.\n\
80  \n\
81  -p <personal image path> \n\
82  Path to an image used to test image reading function.\n\
83  Example: -p /my_path_to/image.png\n\
84  \n\
85  -h\n\
86  Print the help.\n\n",
87  ipath.c_str());
88 
89  if (badparam)
90  fprintf(stdout, "\nERROR: Bad parameter [%s]\n", badparam);
91  }
92 
102  bool getOptions(int argc, const char **argv, std::string &ipath, std::string &ppath) {
103  const char *optarg_;
104  int c;
105  while ((c = vpParseArgv::parse(argc, argv, GETOPTARGS, &optarg_)) > 1) {
106 
107  switch (c) {
108  case 'i': ipath = optarg_; break;
109  case 'p': ppath = optarg_; break;
110  case 'h': usage(argv[0], NULL, ipath); return false; break;
111 
112  case 'c':
113  case 'd':
114  break;
115 
116  default:
117  usage(argv[0], optarg_, ipath); return false; break;
118  }
119  }
120 
121  if ((c == 1) || (c == -1)) {
122  // standalone param or error
123  usage(argv[0], NULL, ipath);
124  std::cerr << "ERROR: " << std::endl;
125  std::cerr << " Bad argument " << optarg_ << std::endl << std::endl;
126  return false;
127  }
128 
129  return true;
130  }
131 
132 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020408)
133  bool check_results(const cv::Mat &mat, const vpImage<double> &I, const unsigned int half_size_y, const unsigned int half_size_x) {
134  for (unsigned int i = half_size_y; i < I.getHeight()-half_size_y; i++) {
135  for (unsigned int j = half_size_x; j < I.getWidth()-half_size_x; j++) {
136  if (!vpMath::equal(mat.at<double>((int) i, (int)j), I[i][j], std::numeric_limits<double>::epsilon())) {
137  return false;
138  }
139  }
140  }
141 
142  return true;
143  }
144 #endif
145 }
146 
147 int main(int argc, const char *argv[]) {
148  try {
149  std::string env_ipath;
150  std::string opt_ipath;
151  std::string opt_ppath;
152  std::string ipath;
153  std::string filename;
154 
155  // Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH environment variable value
156  env_ipath = vpIoTools::getViSPImagesDataPath();
157 
158  // Set the default input path
159  if (! env_ipath.empty())
160  ipath = env_ipath;
161 
162  // Read the command line options
163  if (getOptions(argc, argv, opt_ipath, opt_ppath) == false) {
164  exit (EXIT_FAILURE);
165  }
166 
167  // Get the option values
168  if (!opt_ipath.empty())
169  ipath = opt_ipath;
170 
171  // Compare ipath and env_ipath. If they differ, we take into account
172  // the input path comming from the command line option
173  if (!opt_ipath.empty() && !env_ipath.empty()) {
174  if (ipath != env_ipath) {
175  std::cout << std::endl
176  << "WARNING: " << std::endl;
177  std::cout << " Since -i <visp image path=" << ipath << "> "
178  << " is different from VISP_IMAGE_PATH=" << env_ipath << std::endl
179  << " we skip the environment variable." << std::endl;
180  }
181  }
182 
183 
184  //
185  // Here starts really the test
186  //
187 
188  //Test on small images first
189  vpImage<unsigned char> I(6,6);
190  for (unsigned int i = 0; i < I.getSize(); i++) {
191  I.bitmap[i] = (unsigned char) i;
192  }
193  std::cout << "I:\n" << I << std::endl;
194 
195  vpMatrix kernel_1(2, 2);
196  for (unsigned int i = 0, cpt = 1; i < kernel_1.getRows(); i++) {
197  for (unsigned int j = 0; j < kernel_1.getCols(); j++, cpt++) {
198  kernel_1[i][j] = cpt;
199  }
200  }
201  std::cout << "kernel_1:\n" << kernel_1 << std::endl;
202 
203  vpMatrix kernel_2(3, 3);
204  for (unsigned int i = 0, cpt = 1; i < kernel_2.getRows(); i++) {
205  for (unsigned int j = 0; j < kernel_2.getCols(); j++, cpt++) {
206  kernel_2[i][j] = cpt;
207  }
208  }
209  std::cout << "kernel_2:\n" << kernel_2 << std::endl;
210 
211  vpMatrix kernel_3(2, 3);
212  for (unsigned int i = 0, cpt = 1; i < kernel_3.getRows(); i++) {
213  for (unsigned int j = 0; j < kernel_3.getCols(); j++, cpt++) {
214  kernel_3[i][j] = cpt;
215  }
216  }
217  std::cout << "kernel_3:\n" << kernel_3 << std::endl;
218 
219 
220  //Test correlation
221  vpImage<double> I_correlation_1, I_correlation_2, I_correlation_3;
222  vpImageFilter::filter(I, I_correlation_1, kernel_1);
223  vpImageFilter::filter(I, I_correlation_2, kernel_2);
224  vpImageFilter::filter(I, I_correlation_3, kernel_3);
225 
226  std::cout << "\nI_correlation_1:\n" << I_correlation_1 << std::endl;
227  std::cout << "I_correlation_2:\n" << I_correlation_2 << std::endl;
228  std::cout << "I_correlation_3:\n" << I_correlation_3 << std::endl;
229 
230 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020408)
231  cv::Mat matImg;
232  vpImageConvert::convert(I, matImg);
233 
234  cv::Mat mat_kernel_1(2, 2, CV_64F);
235  for (int i = 0, cpt = 1; i < mat_kernel_1.rows; i++) {
236  for (int j = 0; j < mat_kernel_1.cols; j++, cpt++) {
237  mat_kernel_1.at<double>(i, j) = cpt;
238  }
239  }
240 
241  cv::Mat mat_kernel_2(3, 3, CV_64F);
242  for (int i = 0, cpt = 1; i < mat_kernel_2.rows; i++) {
243  for (int j = 0; j < mat_kernel_2.cols; j++, cpt++) {
244  mat_kernel_2.at<double>(i, j) = cpt;
245  }
246  }
247 
248  cv::Mat mat_kernel_3(2, 3, CV_64F);
249  for (int i = 0, cpt = 1; i < mat_kernel_3.rows; i++) {
250  for (int j = 0; j < mat_kernel_3.cols; j++, cpt++) {
251  mat_kernel_3.at<double>(i, j) = cpt;
252  }
253  }
254 
255  cv::Mat matImg_correlation_1, matImg_correlation_2, matImg_correlation_3;
256  cv::filter2D(matImg, matImg_correlation_1, CV_64F, mat_kernel_1);
257  cv::filter2D(matImg, matImg_correlation_2, CV_64F, mat_kernel_2);
258  cv::filter2D(matImg, matImg_correlation_3, CV_64F, mat_kernel_3);
259 
260  std::cout << "\nTest correlation on small image:" << std::endl;
261  std::cout << "(I_correlation_1 == matImg_correlation_1)? " << check_results(matImg_correlation_1, I_correlation_1, kernel_1.getRows()/2, kernel_1.getCols()/2) << std::endl;
262  std::cout << "(I_correlation_2 == matImg_correlation_2)? " << check_results(matImg_correlation_2, I_correlation_2, kernel_2.getRows()/2, kernel_2.getCols()/2) << std::endl;
263  std::cout << "(I_correlation_3 == matImg_correlation_3)? " << check_results(matImg_correlation_3, I_correlation_3, kernel_3.getRows()/2, kernel_3.getCols()/2) << std::endl;
264 #endif
265 
266 
267  //Test convolution
268  vpImage<double> I_convolution_1, I_convolution_2, I_convolution_3;
269  vpImageFilter::filter(I, I_convolution_1, kernel_1, true);
270  vpImageFilter::filter(I, I_convolution_2, kernel_2, true);
271  vpImageFilter::filter(I, I_convolution_3, kernel_3, true);
272 
273  std::cout << "\nI_convolution_1:\n" << I_convolution_1 << std::endl;
274  std::cout << "I_convolution_2:\n" << I_convolution_2 << std::endl;
275  std::cout << "I_convolution_3:\n" << I_convolution_3 << std::endl;
276 
277 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020408)
278  cv::Mat mat_kernel_1_flip, mat_kernel_2_flip, mat_kernel_3_flip;
279  cv::flip(mat_kernel_1, mat_kernel_1_flip, -1);
280  cv::flip(mat_kernel_2, mat_kernel_2_flip, -1);
281  cv::flip(mat_kernel_3, mat_kernel_3_flip, -1);
282 
283  cv::Mat matImg_convolution_1, matImg_convolution_2, matImg_convolution_3;
284 
285  cv::Point anchor1(mat_kernel_1_flip.cols - mat_kernel_1_flip.cols/2 - 1, mat_kernel_1_flip.rows - mat_kernel_1_flip.rows/2 - 1);
286  cv::filter2D(matImg, matImg_convolution_1, CV_64F, mat_kernel_1_flip, anchor1);
287 
288  cv::Point anchor2(mat_kernel_2_flip.cols - mat_kernel_2_flip.cols/2 - 1, mat_kernel_2_flip.rows - mat_kernel_2_flip.rows/2 - 1);
289  cv::filter2D(matImg, matImg_convolution_2, CV_64F, mat_kernel_2_flip, anchor2);
290 
291  cv::Point anchor3(mat_kernel_3_flip.cols - mat_kernel_3_flip.cols/2 - 1, mat_kernel_3_flip.rows - mat_kernel_3_flip.rows/2 - 1);
292  cv::filter2D(matImg, matImg_convolution_3, CV_64F, mat_kernel_3_flip, anchor3);
293 
294  std::cout << "\nTest convolution on small image:" << std::endl;
295  std::cout << "(I_convolution_1 == matImg_convolution_1)? " << check_results(matImg_convolution_1, I_convolution_1, kernel_1.getRows()/2, kernel_1.getCols()/2) << std::endl;
296  std::cout << "(I_convolution_2 == matImg_convolution_2)? " << check_results(matImg_convolution_2, I_convolution_2, kernel_2.getRows()/2, kernel_2.getCols()/2) << std::endl;
297  std::cout << "(I_convolution_3 == matImg_convolution_3)? " << check_results(matImg_convolution_3, I_convolution_3, kernel_3.getRows()/2, kernel_3.getCols()/2) << std::endl;
298 #endif
299 
300 
301  //Test on real image
302  if (opt_ppath.empty()) {
303  filename = vpIoTools::createFilePath(ipath, "ViSP-images/Klimt/Klimt.pgm");
304  vpImageIo::read(I, filename);
305  } else {
306  filename = opt_ppath;
307  vpImageIo::read(I, filename);
308  printf("Image \"%s\" read successfully\n", filename.c_str());
309  }
310 
311 
312  //Test correlation
313  double t = vpTime::measureTimeMs();
314  vpImageFilter::filter(I, I_correlation_1, kernel_1);
315  vpImageFilter::filter(I, I_correlation_2, kernel_2);
316  vpImageFilter::filter(I, I_correlation_3, kernel_3);
317  t = vpTime::measureTimeMs() - t;
318  std::cout << "\nTime to do 3 correlation filtering: " << t << " ms ; Mean: " << t/3.0 << " ms" << std::endl;
319 
320 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020408)
321  vpImageConvert::convert(I, matImg);
322 
323  t = vpTime::measureTimeMs();
324  cv::filter2D(matImg, matImg_correlation_1, CV_64F, mat_kernel_1);
325  cv::filter2D(matImg, matImg_correlation_2, CV_64F, mat_kernel_2);
326  cv::filter2D(matImg, matImg_correlation_3, CV_64F, mat_kernel_3);
327  t = vpTime::measureTimeMs() - t;
328  std::cout << "Time to do 3 cv::filter2D: " << t << " ms ; Mean: " << t/3.0 << " ms" << std::endl;
329 
330  std::cout << "\nTest correlation on Klimt image:" << std::endl;
331  bool test = check_results(matImg_correlation_1, I_correlation_1, kernel_1.getRows()/2, kernel_1.getCols()/2);
332  std::cout << "(I_correlation_1 == matImg_correlation_1)? " << test << std::endl;
333  if (!test) {
334  std::cerr << "Failed test1 correlation with vpImageFilter::filter()!" << std::endl;
335  return EXIT_FAILURE;
336  }
337 
338  test = check_results(matImg_correlation_2, I_correlation_2, kernel_2.getRows()/2, kernel_2.getCols()/2);
339  std::cout << "(I_correlation_2 == matImg_correlation_2)? " << test << std::endl;
340  if (!test) {
341  std::cerr << "Failed test2 correlation with vpImageFilter::filter()!" << std::endl;
342  return EXIT_FAILURE;
343  }
344 
345  test = check_results(matImg_correlation_3, I_correlation_3, kernel_3.getRows()/2, kernel_3.getCols()/2);
346  std::cout << "(I_correlation_3 == matImg_correlation_3)? " << test << std::endl;
347  if (!test) {
348  std::cerr << "Failed test3 correlation with vpImageFilter::filter()!" << std::endl;
349  return EXIT_FAILURE;
350  }
351 #endif
352 
353 
354  //Test convolution
355  t = vpTime::measureTimeMs();
356  vpImageFilter::filter(I, I_convolution_1, kernel_1, true);
357  vpImageFilter::filter(I, I_convolution_2, kernel_2, true);
358  vpImageFilter::filter(I, I_convolution_3, kernel_3, true);
359  t = vpTime::measureTimeMs() - t;
360  std::cout << "\nTime to do 3 convolution filtering: " << t << " ms ; Mean: " << t/3.0 << " ms" << std::endl;
361 
362 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020408)
363 
364  t = vpTime::measureTimeMs();
365  cv::filter2D(matImg, matImg_convolution_1, CV_64F, mat_kernel_1_flip, anchor1);
366  cv::filter2D(matImg, matImg_convolution_2, CV_64F, mat_kernel_2_flip, anchor2);
367  cv::filter2D(matImg, matImg_convolution_3, CV_64F, mat_kernel_3_flip, anchor3);
368  t = vpTime::measureTimeMs() - t;
369  std::cout << "Time to do 3 cv::filter2D: " << t << " ms ; Mean: " << t/3.0 << " ms" << std::endl;
370 
371  std::cout << "\nTest convolution on Klimt image:" << std::endl;
372  test = check_results(matImg_convolution_1, I_convolution_1, kernel_1.getRows()/2, kernel_1.getCols()/2);
373  std::cout << "(I_convolution_1 == matImg_convolution_1)? " << test << std::endl;
374  if (!test) {
375  std::cerr << "Failed test1 convolution with vpImageFilter::filter()!" << std::endl;
376  return EXIT_FAILURE;
377  }
378 
379  test = check_results(matImg_convolution_2, I_convolution_2, kernel_2.getRows()/2, kernel_2.getCols()/2);
380  std::cout << "(I_convolution_2 == matImg_convolution_2)? " << test << std::endl;
381  if (!test) {
382  std::cerr << "Failed test2 convolution with vpImageFilter::filter()!" << std::endl;
383  return EXIT_FAILURE;
384  }
385 
386  test = check_results(matImg_convolution_3, I_convolution_3, kernel_3.getRows()/2, kernel_3.getCols()/2);
387  std::cout << "(I_convolution_3 == matImg_convolution_3)? " << test << std::endl;
388  if (!test) {
389  std::cerr << "Failed test3 convolution with vpImageFilter::filter()!" << std::endl;
390  return EXIT_FAILURE;
391  }
392 #endif
393 
394 
395  //Test Sobel
396  vpMatrix kernel_sobel_x(5, 5);
397  kernel_sobel_x[0][0] = 1.0; kernel_sobel_x[0][1] = 2.0; kernel_sobel_x[0][2] = 0.0; kernel_sobel_x[0][3] = -2.0; kernel_sobel_x[0][4] = -1.0;
398  kernel_sobel_x[1][0] = 4.0; kernel_sobel_x[1][1] = 8.0; kernel_sobel_x[1][2] = 0.0; kernel_sobel_x[1][3] = -8.0; kernel_sobel_x[1][4] = -4.0;
399  kernel_sobel_x[2][0] = 6.0; kernel_sobel_x[2][1] = 12.0; kernel_sobel_x[2][2] = 0.0; kernel_sobel_x[2][3] = -12.0; kernel_sobel_x[2][4] = -6.0;
400  kernel_sobel_x[3][0] = 4.0; kernel_sobel_x[3][1] = 8.0; kernel_sobel_x[3][2] = 0.0; kernel_sobel_x[3][3] = -8.0; kernel_sobel_x[3][4] = -4.0;
401  kernel_sobel_x[4][0] = 1.0; kernel_sobel_x[4][1] = 2.0; kernel_sobel_x[4][2] = 0.0; kernel_sobel_x[4][3] = -2.0; kernel_sobel_x[4][4] = -1.0;
402 
403  vpImage<double> I_sobel_x;
404  t = vpTime::measureTimeMs();
405  vpImageFilter::filter(I, I_sobel_x, kernel_sobel_x, true);
406  t = vpTime::measureTimeMs() - t;
407  std::cout << "\nTime to do Sobel: " << t << " ms" << std::endl;
408 
409 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020408)
410  cv::Mat matImg_sobel_x;
411  t = vpTime::measureTimeMs();
412  cv::Sobel(matImg, matImg_sobel_x, CV_64F, 1, 0, 5);
413  t = vpTime::measureTimeMs() - t;
414  std::cout << "Time to do cv::Sobel: " << t << " ms" << std::endl;
415 
416  std::cout << "\nTest Sobel on Klimt image:" << std::endl;
417  std::cout << "(I_sobel_x == matImg_sobel_x)? " << check_results(matImg_sobel_x, I_sobel_x, kernel_sobel_x.getRows()/2, kernel_sobel_x.getCols()/2) << std::endl;
418 #endif
419 
420  vpImage<double> I_double, Iu, Iv;
421  vpImageConvert::convert(I, I_double);
422  t = vpTime::measureTimeMs();
423  vpImageFilter::filter(I_double, Iu, Iv, kernel_sobel_x, true);
424  t = vpTime::measureTimeMs() - t;
425  std::cout << "\nTime to do Sobel Iu and Iv: " << t << " ms" << std::endl;
426 
427 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020408)
428  cv::Mat matImg_sobel_y;
429  cv::Sobel(matImg, matImg_sobel_y, CV_64F, 0, 1, 5);
430 
431  std::cout << "(Iu == matImg_sobel_x)? " << check_results(matImg_sobel_x, Iu, kernel_sobel_x.getRows()/2, kernel_sobel_x.getCols()/2) << std::endl;
432  std::cout << "(Iv == matImg_sobel_y)? " << check_results(matImg_sobel_y, Iv, kernel_sobel_x.getRows()/2, kernel_sobel_x.getCols()/2) << std::endl;
433 #endif
434 
435 
436  //Test Sobel separable filters
437  vpImage<double> I_sep_filtered;
438  vpColVector kernel_sep_x(5);
439  kernel_sep_x[0] = 1.0; kernel_sep_x[1] = 2.0; kernel_sep_x[2] = 0.0; kernel_sep_x[3] = -2.0; kernel_sep_x[4] = -1.0;
440  vpColVector kernel_sep_y(5);
441  kernel_sep_y[0] = 1.0;
442  kernel_sep_y[1] = 4.0;
443  kernel_sep_y[2] = 6.0;
444  kernel_sep_y[3] = 4.0;
445  kernel_sep_y[4] = 1.0;
446 
447  t = vpTime::measureTimeMs();
448  vpImageFilter::sepFilter(I, I_sep_filtered, kernel_sep_x, kernel_sep_y);
449  t = vpTime::measureTimeMs() - t;
450  std::cout << "\nTime to do sepFilter: " << t << " ms" << std::endl;
451 
452 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020408)
453  test = check_results(matImg_sobel_x, Iu, I_sep_filtered.getRows()/2, kernel_sobel_x.getCols()/2);
454  std::cout << "(I_sep_filtered == matImg_sobel_x)? " << test << std::endl;
455 
456  if (!test) {
457  std::cerr << "Failed separable filter!" << std::endl;
458  return EXIT_FAILURE;
459  }
460 #endif
461  }
462  catch(vpException &e) {
463  std::cerr << "Catch an exception: " << e.what() << std::endl;
464  return EXIT_FAILURE;
465  }
466 
467  std::cout << "\ntestImageFilter is ok." << std::endl;
468  return EXIT_SUCCESS;
469 }
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:97
static std::string getViSPImagesDataPath()
Definition: vpIoTools.cpp:1157
unsigned int getWidth() const
Definition: vpImage.h:226
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
static void sepFilter(const vpImage< unsigned char > &I, vpImage< double > &If, const vpColVector &kernelH, const vpColVector &kernelV)
Type * bitmap
points toward the bitmap
Definition: vpImage.h:134
static bool equal(double x, double y, double s=0.001)
Definition: vpMath.h:306
error that can be emited by ViSP classes.
Definition: vpException.h:73
VISP_EXPORT double measureTimeMs()
Definition: vpTime.cpp:93
static bool parse(int *argcPtr, const char **argv, vpArgvInfo *argTable, int flags)
Definition: vpParseArgv.cpp:76
const char * what() const
unsigned int getRows() const
Definition: vpImage.h:204
unsigned int getSize() const
Definition: vpImage.h:212
static std::string createFilePath(const std::string &parent, const std::string child)
Definition: vpIoTools.cpp:1366
static void read(vpImage< unsigned char > &I, const std::string &filename)
Definition: vpImageIo.cpp:205
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
unsigned int getHeight() const
Definition: vpImage.h:175
static void filter(const vpImage< double > &I, vpImage< double > &Iu, vpImage< double > &Iv, const vpMatrix &M, const bool convolve=false)