Oui bien sur j'ai une boucle pour remplir mes vecteurs. Si tu veux X et Y sont des attributs membres de ma classe, en fait là c'est juste un exemple.
Voici comment je remplit mes vecteurs :
	
	1 2 3 4 5 6 7 8 9 10 11 12
   | for (y = 0; y < iHeight; y++)
        {
            for ( x = 0; x < iWidth; x++)
            {
 
 
             pixel = 255 * ((image[y * iWidth + x] ) - min) / (max - min) ;
             X[y * iWidth + x] = pixel;
 
             Y[pixel] = Histo[pixel] + 1 ;
            }
      } | 
 Et j'ai fait aussi en changeant le pas , mais j'ai toujours un histogramme tres bizarre, dont je comprends vraiment pas, c'est inexploitable je joins la figure :
	
	myCurve.setData(X.data(), Y.data(), X.size()) ;
 
merci d'avance
						
					
Partager