ViSP  2.9.0
vpImageFilter.cpp
1 /****************************************************************************
2  *
3  * $Id: vpImageFilter.cpp 4661 2014-02-10 19:34:58Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Various image tools, convolution, ...
36  *
37  * Authors:
38  * Eric Marchand
39  *
40  *****************************************************************************/
41 
42 #include <visp/vpImageFilter.h>
43 #include <visp/vpImageConvert.h>
44 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020101)
45 #include <opencv2/imgproc/imgproc_c.h>
46 #elif defined(VISP_HAVE_OPENCV)
47 #include <cv.h>
48 #endif
49 
58 void
60  vpImage<double>& If,
61  const vpMatrix& M)
62 {
63 
64  unsigned int size = M.getRows() ;
65  unsigned int half_size = size/2 ;
66 
67  If.resize(I.getHeight(),I.getWidth()) ;
68 
69  If = 0 ;
70 
71  for (unsigned int i=half_size ; i < I.getHeight()-half_size ; i++)
72  {
73  for (unsigned int j=half_size ; j < I.getWidth()-half_size ; j++)
74  {
75  double conv_x = 0 ;
76 
77  for(unsigned int a = 0 ; a < size ; a++ )
78  for(unsigned int b = 0 ; b < size ; b++ )
79  {
80  double val = I[i-half_size+a][j-half_size+b] ;
81  conv_x += M[a][b] * val ;
82  }
83  If[i][j] = conv_x ;
84  }
85  }
86 
87 }
88 
98 void
100  vpImage<double>& Iu,
101  vpImage<double>& Iv,
102  const vpMatrix& M)
103 {
104 
105  unsigned int size = M.getRows() ;
106  unsigned int half_size = size/2 ;
107 
108  Iu.resize(I.getHeight(),I.getWidth()) ;
109  Iv.resize(I.getHeight(),I.getWidth()) ;
110 
111  Iu = 0 ;
112  Iv = 0 ;
113  for (unsigned int v=half_size ; v < I.getHeight()-half_size ; v++)
114  {
115  for (unsigned int u=half_size ; u < I.getWidth()-half_size ; u++)
116  {
117  double conv_u = 0 ;
118  double conv_v = 0 ;
119 
120  for(unsigned int a = 0 ; a < size ; a++ )
121  for(unsigned int b = 0 ; b < size ; b++ )
122  {
123  double val = I[v-half_size+a][u-half_size+b] ;
124  conv_u += M[a][b] * val ;
125  conv_v += M[b][a] * val ;
126  }
127  Iu[v][u] = conv_u ;
128  Iv[v][u] = conv_v ;
129  }
130  }
131 
132 }
133 
134 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100)
135 
175 void
178  const unsigned int gaussianFilterSize,
179  const double thresholdCanny,
180  const unsigned int apertureSobel)
181 {
182  IplImage* img_ipl = NULL;
183  vpImageConvert::convert(Isrc, img_ipl);
184  IplImage* edges_ipl;
185  edges_ipl = cvCreateImage(cvSize(img_ipl->width, img_ipl->height), img_ipl->depth, img_ipl->nChannels);
186 
187  cvSmooth(img_ipl, img_ipl, CV_GAUSSIAN, (int)gaussianFilterSize, (int)gaussianFilterSize, 0, 0);
188  cvCanny(img_ipl, edges_ipl, thresholdCanny, thresholdCanny, (int)apertureSobel);
189 
190  vpImageConvert::convert(edges_ipl, Ires);
191  cvReleaseImage(&img_ipl);
192  cvReleaseImage(&edges_ipl);
193 }
194 #endif
195 
199 void vpImageFilter::filter(const vpImage<unsigned char> &I, vpImage<double>& GI, const double *filter,unsigned int size)
200 {
201  vpImage<double> GIx ;
202  filterX(I, GIx,filter,size);
203  filterY(GIx, GI,filter,size);
204  GIx.destroy();
205 }
206 
210 void vpImageFilter::filter(const vpImage<double> &I, vpImage<double>& GI, const double *filter,unsigned int size)
211 {
212  vpImage<double> GIx ;
213  filterX(I, GIx,filter,size);
214  filterY(GIx, GI,filter,size);
215  GIx.destroy();
216 }
217 
218 void vpImageFilter::filterX(const vpImage<unsigned char> &I, vpImage<double>& dIx, const double *filter,unsigned int size)
219 {
220  dIx.resize(I.getHeight(),I.getWidth()) ;
221  for (unsigned int i=0 ; i < I.getHeight() ; i++)
222  {
223  for (unsigned int j=0 ; j < (size-1)/2 ; j++)
224  {
225  dIx[i][j]=vpImageFilter::filterXLeftBorder(I,i,j,filter,size);
226  //dIx[i][j]=0;
227  }
228  for (unsigned int j=(size-1)/2 ; j < I.getWidth()-(size-1)/2 ; j++)
229  {
230  dIx[i][j]=vpImageFilter::filterX(I,i,j,filter,size);
231  }
232  for (unsigned int j=I.getWidth()-(size-1)/2 ; j < I.getWidth() ; j++)
233  {
234  dIx[i][j]=vpImageFilter::filterXRightBorder(I,i,j,filter,size);
235  //dIx[i][j]=0;
236  }
237  }
238 }
239 void vpImageFilter::filterX(const vpImage<double> &I, vpImage<double>& dIx, const double *filter,unsigned int size)
240 {
241  dIx.resize(I.getHeight(),I.getWidth()) ;
242  for (unsigned int i=0 ; i < I.getHeight() ; i++)
243  {
244  for (unsigned int j=0 ; j < (size-1)/2 ; j++)
245  {
246  dIx[i][j]=vpImageFilter::filterXLeftBorder(I,i,j,filter,size);
247  //dIx[i][j]=0;
248  }
249  for (unsigned int j=(size-1)/2 ; j < I.getWidth()-(size-1)/2 ; j++)
250  {
251  dIx[i][j]=vpImageFilter::filterX(I,i,j,filter,size);
252  }
253  for (unsigned int j=I.getWidth()-(size-1)/2 ; j < I.getWidth() ; j++)
254  {
255  dIx[i][j]=vpImageFilter::filterXRightBorder(I,i,j,filter,size);
256  //dIx[i][j]=0;
257  }
258  }
259 }
260 void vpImageFilter::filterY(const vpImage<unsigned char> &I, vpImage<double>& dIy, const double *filter,unsigned int size)
261 {
262  dIy.resize(I.getHeight(),I.getWidth()) ;
263  for (unsigned int i=0 ; i < (size-1)/2 ; i++)
264  {
265  for (unsigned int j=0 ; j < I.getWidth() ; j++)
266  {
267  dIy[i][j]=vpImageFilter::filterYTopBorder(I,i,j,filter,size);
268  }
269  }
270  for (unsigned int i=(size-1)/2 ; i < I.getHeight()-(size-1)/2 ; i++)
271  {
272  for (unsigned int j=0 ; j < I.getWidth() ; j++)
273  {
274  dIy[i][j]=vpImageFilter::filterY(I,i,j,filter,size);
275  }
276  }
277  for (unsigned int i=I.getHeight()-(size-1)/2 ; i < I.getHeight() ; i++)
278  {
279  for (unsigned int j=0 ; j < I.getWidth() ; j++)
280  {
281  dIy[i][j]=vpImageFilter::filterYBottomBorder(I,i,j,filter,size);
282  }
283  }
284 }
285 void vpImageFilter::filterY(const vpImage<double> &I, vpImage<double>& dIy, const double *filter,unsigned int size)
286 {
287  dIy.resize(I.getHeight(),I.getWidth()) ;
288  for (unsigned int i=0 ; i < (size-1)/2 ; i++)
289  {
290  for (unsigned int j=0 ; j < I.getWidth() ; j++)
291  {
292  dIy[i][j]=vpImageFilter::filterYTopBorder(I,i,j,filter,size);
293  }
294  }
295  for (unsigned int i=(size-1)/2 ; i < I.getHeight()-(size-1)/2 ; i++)
296  {
297  for (unsigned int j=0 ; j < I.getWidth() ; j++)
298  {
299  dIy[i][j]=vpImageFilter::filterY(I,i,j,filter,size);
300  }
301  }
302  for (unsigned int i=I.getHeight()-(size-1)/2 ; i < I.getHeight() ; i++)
303  {
304  for (unsigned int j=0 ; j < I.getWidth() ; j++)
305  {
306  dIy[i][j]=vpImageFilter::filterYBottomBorder(I,i,j,filter,size);
307  }
308  }
309 }
310 
320 void vpImageFilter::gaussianBlur(const vpImage<unsigned char> &I, vpImage<double>& GI, unsigned int size, double sigma, bool normalize)
321 {
322  double *fg=new double[(size+1)/2] ;
323  vpImageFilter::getGaussianKernel(fg, size, sigma, normalize) ;
324  vpImage<double> GIx ;
325  vpImageFilter::filterX(I, GIx,fg,size);
326  vpImageFilter::filterY(GIx, GI,fg,size);
327  GIx.destroy();
328  delete[] fg;
329 }
330 
340 void vpImageFilter::getGaussianKernel(double *filter, unsigned int size, double sigma, bool normalize)
341 {
342  if (size%2 != 1)
344  "Bad Gaussian filter size"));
345 
346  if (sigma<= 0)
347  sigma = (size-1)/6.0;
348 
349  int middle = (int)(size-1)/2;
350  double sigma2 = vpMath::sqr(sigma);
351  for( int i=0; i<= middle; i++)
352  {
353  filter[i] = (1./(sigma*sqrt(2.*M_PI)))*exp(-(i*i)/(2.*sigma2));
354  }
355  if (normalize) {
356  //renormalization
357  double sum=0;
358  for(int i=1; i<=middle; i++)
359  {
360  sum += 2*filter[i] ;
361  }
362  sum += filter[0];
363 
364  for(int i=0; i<=middle; i++)
365  {
366  filter[i] = filter[i]/sum;
367  }
368  }
369 }
370 
380 void vpImageFilter::getGaussianDerivativeKernel(double *filter, unsigned int size, double sigma, bool normalize)
381 {
382  if (size%2 != 1)
384  "Bad Gaussian filter size"));
385 
386  if (sigma<= 0)
387  sigma = (size-1)/6.0;
388 
389  int middle = (int)(size-1)/2;
390  double sigma2 = vpMath::sqr(sigma);
391  filter[0] = 0.;
392  for(int i=1; i<= middle; i++)
393  {
394  filter[i] = -(1./(sigma*sqrt(2.*M_PI)))*(exp(-((i+1)*(i+1))/(2.*sigma2))-exp(-((i-1)*(i-1))/(2.*sigma2)))/2.;
395  }
396 
397  if (normalize) {
398  double sum=0;
399  for(int i=1; i<=middle; i++)
400  {
401  sum += 2.*(1./(sigma*sqrt(2.*M_PI)))*exp(-(i*i)/(2.*sigma2));
402  }
403  sum += (1./(sigma*sqrt(2.*M_PI))) ;
404 
405  for(int i=1; i<=middle; i++)
406  {
407  filter[i] = filter[i]/sum;
408  }
409  }
410 }
411 
412 
414 {
415  dIx.resize(I.getHeight(),I.getWidth()) ;
416  //dIx=0;
417  for (unsigned int i=0 ; i < I.getHeight() ; i++)
418  {
419  for (unsigned int j=0 ; j < 3 ; j++)
420  {
421  dIx[i][j]=0;
422  }
423  for (unsigned int j=3 ; j < I.getWidth()-3 ; j++)
424  {
425  dIx[i][j]=vpImageFilter::derivativeFilterX(I,i,j);
426  }
427  for (unsigned int j=I.getWidth()-3 ; j < I.getWidth() ; j++)
428  {
429  dIx[i][j]=0;
430  }
431  }
432 }
433 
435 {
436  dIy.resize(I.getHeight(),I.getWidth()) ;
437  //dIy=0;
438  for (unsigned int i=0 ; i < 3 ; i++)
439  {
440  for (unsigned int j=0 ; j < I.getWidth() ; j++)
441  {
442  dIy[i][j]=0;
443  }
444  }
445  for (unsigned int i=3 ; i < I.getHeight()-3 ; i++)
446  {
447  for (unsigned int j=0 ; j < I.getWidth() ; j++)
448  {
449  dIy[i][j]=vpImageFilter::derivativeFilterY(I,i,j);
450  }
451  }
452  for (unsigned int i=I.getHeight()-3 ; i < I.getHeight() ; i++)
453  {
454  for (unsigned int j=0 ; j < I.getWidth() ; j++)
455  {
456  dIy[i][j]=0;
457  }
458  }
459 }
460 
461 void vpImageFilter::getGradX(const vpImage<unsigned char> &I, vpImage<double>& dIx, const double *filter,unsigned int size)
462 {
463  dIx.resize(I.getHeight(),I.getWidth()) ;
464  //#pragma omp parallel for
465  for (unsigned int i=0 ; i < I.getHeight() ; i++)
466  {
467  for (unsigned int j=0 ; j < (size-1)/2 ; j++)
468  {
469  dIx[i][j]=0;
470  }
471  for (unsigned int j=(size-1)/2 ; j < I.getWidth()-(size-1)/2 ; j++)
472  {
473  dIx[i][j]=vpImageFilter::derivativeFilterX(I,i,j,filter,size);
474  }
475  for (unsigned int j=I.getWidth()-(size-1)/2 ; j < I.getWidth() ; j++)
476  {
477  dIx[i][j]=0;
478  }
479  }
480 }
481 void vpImageFilter::getGradX(const vpImage<double> &I, vpImage<double>& dIx, const double *filter,unsigned int size)
482 {
483  dIx.resize(I.getHeight(),I.getWidth()) ;
484  //dIx=0;
485  for (unsigned int i=0 ; i < I.getHeight() ; i++)
486  {
487  for (unsigned int j=0 ; j < (size-1)/2 ; j++)
488  {
489  dIx[i][j]=0;
490  }
491  for (unsigned int j=(size-1)/2 ; j < I.getWidth()-(size-1)/2 ; j++)
492  {
493  dIx[i][j]=vpImageFilter::derivativeFilterX(I,i,j,filter,size);
494  }
495  for (unsigned int j=I.getWidth()-(size-1)/2 ; j < I.getWidth() ; j++)
496  {
497  dIx[i][j]=0;
498  }
499  }
500 }
501 
502 void vpImageFilter::getGradY(const vpImage<unsigned char> &I, vpImage<double>& dIy, const double *filter,unsigned int size)
503 {
504  dIy.resize(I.getHeight(),I.getWidth()) ;
505  //#pragma omp parallel for
506  for (unsigned int i=0 ; i < (size-1)/2 ; i++)
507  {
508  for (unsigned int j=0 ; j < I.getWidth() ; j++)
509  {
510  dIy[i][j]=0;
511  }
512  }
513  //#pragma omp parallel for
514  for (unsigned int i=(size-1)/2 ; i < I.getHeight()-(size-1)/2 ; i++)
515  {
516  for (unsigned int j=0 ; j < I.getWidth() ; j++)
517  {
518  dIy[i][j]=vpImageFilter::derivativeFilterY(I,i,j,filter,size);
519  }
520  }
521  //#pragma omp parallel for
522  for (unsigned int i=I.getHeight()-(size-1)/2 ; i < I.getHeight() ; i++)
523  {
524  for (unsigned int j=0 ; j < I.getWidth() ; j++)
525  {
526  dIy[i][j]=0;
527  }
528  }
529 }
530 
531 void vpImageFilter::getGradY(const vpImage<double> &I, vpImage<double>& dIy, const double *filter,unsigned int size)
532 {
533  dIy.resize(I.getHeight(),I.getWidth()) ;
534  //dIy=0;
535  for (unsigned int i=0 ; i < (size-1)/2 ; i++)
536  {
537  for (unsigned int j=0 ; j < I.getWidth() ; j++)
538  {
539  dIy[i][j]=0;
540  }
541  }
542  for (unsigned int i=(size-1)/2 ; i < I.getHeight()-(size-1)/2 ; i++)
543  {
544  for (unsigned int j=0 ; j < I.getWidth() ; j++)
545  {
546  dIy[i][j]=vpImageFilter::derivativeFilterY(I,i,j,filter,size);
547  }
548  }
549  for (unsigned int i=I.getHeight()-(size-1)/2 ; i < I.getHeight() ; i++)
550  {
551  for (unsigned int j=0 ; j < I.getWidth() ; j++)
552  {
553  dIy[i][j]=0;
554  }
555  }
556 }
557 
566 void vpImageFilter::getGradXGauss2D(const vpImage<unsigned char> &I, vpImage<double>& dIx, const double *gaussianKernel, const double *gaussianDerivativeKernel, unsigned int size)
567 {
568  vpImage<double> GIy;
569  vpImageFilter::filterY(I, GIy, gaussianKernel, size);
570  vpImageFilter::getGradX(GIy, dIx, gaussianDerivativeKernel, size);
571 }
572 
581 void vpImageFilter::getGradYGauss2D(const vpImage<unsigned char> &I, vpImage<double>& dIy, const double *gaussianKernel, const double *gaussianDerivativeKernel,unsigned int size)
582 {
583  vpImage<double> GIx;
584  vpImageFilter::filterX(I, GIx, gaussianKernel, size);
585  vpImageFilter::getGradY(GIx, dIy, gaussianDerivativeKernel, size);
586 }
587 
588 //operation pour pyramide gaussienne
590 {
592 #ifdef VISP_HAVE_OPENCV
593  IplImage* imgsrc = NULL;//cvCreateImage(cvGetSize(imgign), IPL_DEPTH_8U, 1);
594  IplImage* imgdest = NULL;//cvCreateImage(cvGetSize(imgign), IPL_DEPTH_8U, 1);
595  imgsrc = cvCreateImage(cvSize((int)I.getWidth(),(int)I.getHeight()), IPL_DEPTH_8U, 1);
596  imgdest = cvCreateImage(cvSize((int)I.getWidth()/2,(int)I.getHeight()/2), IPL_DEPTH_8U, 1);
597  vpImageConvert::convert(I,imgsrc);
598  cvPyrDown( imgsrc, imgdest);
599  vpImageConvert::convert(imgdest,GI);
600 
601  cvReleaseImage(&imgsrc);
602  cvReleaseImage(&imgdest);
603  //vpImage<unsigned char> sGI;sGI=GI;
604 
605 #else
608 #endif
609 }
610 
612 {
613 #if 0
614  GI.resize(I.getHeight(),(int)((I.getWidth()+1.)/2.)) ;
615  for (unsigned int i=0 ; i < I.getHeight() ; i++)
616  {
617  GI[i][0]=I[i][0];
618  for (unsigned int j=1 ; j < ((I.getWidth()+1.)/2.)-1 ; j++)
619  {
620  GI[i][j]=vpImageFilter::filterGaussXPyramidal(I,i,2*j);
621  }
622  GI[i][(int)((I.getWidth()+1.)/2.)-1]=I[i][2*((int)((I.getWidth()+1.)/2.)-1)];
623  }
624 #else
625  unsigned int w = I.getWidth()/2;
626 
627  GI.resize(I.getHeight(), w) ;
628  for (unsigned int i=0 ; i < I.getHeight() ; i++)
629  {
630  GI[i][0]=I[i][0];
631  for (unsigned int j=1 ; j < w-1 ; j++)
632  {
633  GI[i][j]=vpImageFilter::filterGaussXPyramidal(I,i,2*j);
634  }
635  GI[i][w-1]=I[i][2*w-1];
636  }
637 
638 #endif
639 }
641 {
642 
643 #ifdef ORIG
644  GI.resize((int)((I.getHeight()+1.)/2.),I.getWidth()) ;
645  for (unsigned int j=0 ; j < I.getWidth() ; j++)
646  {
647  GI[0][j]=I[0][j];
648  for (unsigned int i=1 ; i < ((I.getHeight()+1.)/2.)-1 ; i++)
649  {
650  GI[i][j]=vpImageFilter::filterGaussYPyramidal(I,2*i,j);
651  }
652  GI[(int)((I.getHeight()+1.)/2.)-1][j]=I[2*((int)((I.getHeight()+1.)/2.)-1)][j];
653  }
654 
655 #else
656  unsigned int h = I.getHeight()/2;
657 
658  GI.resize(h, I.getWidth()) ;
659  for (unsigned int j=0 ; j < I.getWidth() ; j++)
660  {
661  GI[0][j]=I[0][j];
662  for (unsigned int i=1 ; i < h-1 ; i++)
663  {
664  GI[i][j]=vpImageFilter::filterGaussYPyramidal(I,2*i,j);
665  }
666  GI[h-1][j]=I[2*h-1][j];
667  }
668 #endif
669 }
670 
671 
static void getGaussPyramidal(const vpImage< unsigned char > &I, vpImage< unsigned char > &GI)
Definition of the vpMatrix class.
Definition: vpMatrix.h:98
static double filterXLeftBorder(const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size)
unsigned int getWidth() const
Definition: vpImage.h:159
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
static void getGradX(const vpImage< unsigned char > &I, vpImage< double > &dIx)
static void getGaussYPyramidal(const vpImage< unsigned char > &I, vpImage< unsigned char > &GI)
static void getGradY(const vpImage< unsigned char > &I, vpImage< double > &dIy)
static double derivativeFilterY(const vpImage< T > &I, const unsigned int r, const unsigned int c)
static void getGaussianKernel(double *filter, unsigned int size, double sigma=0., bool normalize=true)
static unsigned char filterGaussYPyramidal(const vpImage< unsigned char > &I, unsigned int i, unsigned int j)
static void getGradYGauss2D(const vpImage< unsigned char > &I, vpImage< double > &dIy, const double *gaussianKernel, const double *gaussianDerivativeKernel, unsigned int size)
Error that can be emited by the vpImage class and its derivates.
static void getGradXGauss2D(const vpImage< unsigned char > &I, vpImage< double > &dIx, const double *gaussianKernel, const double *gaussianDerivativeKernel, unsigned int size)
static void filterY(const vpImage< unsigned char > &I, vpImage< double > &dIx, const double *filter, unsigned int size)
static void getGaussXPyramidal(const vpImage< unsigned char > &I, vpImage< unsigned char > &GI)
static void filter(const vpImage< double > &I, vpImage< double > &Iu, vpImage< double > &Iv, const vpMatrix &M)
static double sqr(double x)
Definition: vpMath.h:106
static void gaussianBlur(const vpImage< unsigned char > &I, vpImage< double > &GI, unsigned int size=7, double sigma=0., bool normalize=true)
static double filterYTopBorder(const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size)
static double filterXRightBorder(const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size)
void resize(const unsigned int h, const unsigned int w)
set the size of the image
Definition: vpImage.h:532
void destroy()
destructor
Definition: vpImage.h:553
static void filterX(const vpImage< unsigned char > &I, vpImage< double > &dIx, const double *filter, unsigned int size)
static void getGaussianDerivativeKernel(double *filter, unsigned int size, double sigma=0., bool normalize=true)
static double filterYBottomBorder(const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size)
static unsigned char filterGaussXPyramidal(const vpImage< unsigned char > &I, unsigned int i, unsigned int j)
unsigned int getHeight() const
Definition: vpImage.h:150
static void canny(const vpImage< unsigned char > &I, vpImage< unsigned char > &Ic, const unsigned int gaussianFilterSize, const double thresholdCanny, const unsigned int apertureSobel)
unsigned int getRows() const
Return the number of rows of the matrix.
Definition: vpMatrix.h:161
static double derivativeFilterX(const vpImage< T > &I, const unsigned int r, const unsigned int c)
Definition: vpImageFilter.h:91