Bonsoir à tous!

Je bloque sur une erreur de compilation depuis pas mal de temps maintenant, du coup j'aimerais avoir votre avis dessus s'il vous plaît:

Mon compilateur me renvoie l'erreur suivante: erreur: request for member ‘importRVBtolabstats’ in ‘Source’, which is of non-class type ‘Image()’

Pour mieux comprendre, voici mon code source:

image.h

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef IMAGE_1_H
#define IMAGE_1_H
#include "matrice.h"
#include "bmp_io.hh"
#include<string>
 
class Image
{
 public:
  Image();
  void importRVBtolabstats(std::string const &file_name);
  void stats();
  void labtoRVB();
  ~Image();
 
 protected:
  double m_lm; //L MOYEN
  double m_sigl; // écart type selon l
  double m_am; // alpha moyen
  double m_siga;
  double m_bm;
  double m_sigb;
 
};
 
#endif
image.cc

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#include<iostream>
#include<math.h>
#include "matrice.h"
#include "image.h"
#include "bmp_io.hh"
#include <cstdlib>
#include<string>
 
using namespace std;
 
//Constructeur image par défaut
 
Image::Image()
{
  m_lm=0;
  m_sigl=0;
  m_am=0;
  m_siga=0;
  m_bm=0;
  m_sigb=0;
}
 
 
// Méthode importe l'image, convertir RVB->lab, définit les stats de l'image
 
void Image::importRVBtolabstats(std::string const &file_name)  
{
 
  Bmp24 input_bmp(file_name); //à régler?
  size_t width = input_bmp.width();
  size_t height = input_bmp.height();
  unsigned char const * const input_data = input_bmp.pixel_data();
 
  double l=0; //compteur pour la composante l
  double l2=0; //compteur pour l²
  double a=0;
  double a2=0;
  double b=0;
  double b2=0;
 
 for(size_t pixel_index = 0 ; pixel_index < width * height ; ++pixel_index) 
  {
    //création du vecteur RVB pour chaque pixel
    //RVB ou BVR? BVR!!!
    double rvb[3]={int(input_data[3 * pixel_index+2]),int(input_data[3 * pixel_index + 1]),int(input_data[3 * pixel_index])};
    Matrice RVB(rvb);
       //       RVB.affichervecteur();       
 
       //Conversion RVB -> lab
  double vecteurnul[3]={0,0,0};
  Matrice LMS(vecteurnul); //initialiser LMS
 
  double m1a[3]={0.3811,0.1967,0.0241};
  double m1b[3]={0.5783,0.7244,0.1288};
  double m1c[3]={0.0402,0.0782,0.8444};
 
  Matrice M1(m1a,m1b,m1c);
  LMS.produitmatvect(M1,RVB);
  //   LMS.affichervecteur();
 
  LMS.lnvecteur();
  //LMS.affichervecteur();
  //LMS est maintenant ln(LMS)
 
  double m2a[3]={1,1,1};
  double m2b[3]={1,1,-1};
  double m2c[3]={1,-2,0};
 
  Matrice M2(m2a,m2b,m2c);
  //M2.affichermatrice();
 
  double m3a[3]={1/(sqrt(3)),0,0};
  double m3b[3]={0,1/sqrt(6),0};
  double m3c[3]={0,0,1/sqrt(2)};
 
  Matrice M3(m3a,m3b,m3c);
  // M3.affichermatrice();
 
  double m0a[3]={0,0,0};
  double m0b[3]={0,0,0}; //On peut aussi utiliser vecteurnul
  double m0c[3]={0,0,0};
 
  Matrice M0(m0a,m0b,m0c); //Matrice intermédiaire
 
  M0.produitmatvect(M2,LMS);
  // M0.affichervecteur();
 
  Matrice lab(m0a,m0b,m0c);
  lab.produitmatvect(M3,M0);
  //  lab.affichervecteur();
 
  //Conversion RVB -> lab complète  
 
  l=l+lab.extraireelt(0);
  l2=l2+lab.extraireelt(0)*lab.extraireelt(0);
 
  a=a+lab.extraireelt(1);
  a2=a2+lab.extraireelt(1)*lab.extraireelt(1);
 
  b=b+lab.extraireelt(2);
  b2=b2+lab.extraireelt(2)*lab.extraireelt(2);
  }
 
 int nb_pixels=width*height;
 cout << "nb de pixels de "<< file_name << " ="  << nb_pixels << endl;
 
//moyenne de tous les l,a,b
 
 m_lm=l/nb_pixels;
 m_am=a/nb_pixels;
 m_bm=b/nb_pixels;
 
 //moyenne des l²,a²,b²
 
 double l2m=l2/nb_pixels;
 double a2m=a2/nb_pixels;
 double b2m=b2/nb_pixels;
 
 //ecarts types
 
 m_sigl=sqrt(l2m-(m_lm)*(m_lm));
 m_siga=sqrt(a2m-(m_am)*(m_am));
 m_sigb=sqrt(b2m-(m_bm)*(m_bm));
 
 cout << endl;
 cout << "lm de l'image "<< file_name << " ="  << m_lm;
 cout << "am de l'image "<< file_name << " ="  << m_am;
 cout << "bm de l'image "<< file_name << " ="  << m_bm;
 cout << "ecart type l de l'image "<< file_name << " ="  <<  m_sigl;
 cout << "ecart type a de l'image "<< file_name << " ="  <<  m_siga;
 cout << "ecart type b de l'image "<< file_name << " ="  <<  m_sigb;
}
main.cc

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include<math.h>
#include "bmp_io.hh"
#include <cstdlib>
#include"matrice.h" 
#include"image.h"
 
using namespace std;
int main ()
{
 
 Image Source();	
 Source.importRVBtolabstats("source.bmp");
 
 
 
return 0;
 
}

Que faire pour y remédier?