Bonjour,

Dans mon projet j'ouvre une image et la parcours en sous bloc, au total il y en a 256.

Pour chaque sous bloc je souhaite construire un histogramme des gradients en faisant une sortie fichier (Excel) afin de pouvoir visualiser les courbes et y appliquer des traitements typique à Excel.

Malheureusement mon fopen plante, j'ai testé 2 solutions:
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
			for(j=0; j<block; j++) // Parse blocks
			{
			  for(i=0; i<block; i++)
			  {
                             ...
				FILE *pp;
				char *nomgrad = "histgrad.dat";
				pp = fopen(nomgrad, "a+t");
//				remove("histgrad.dat");
				for(k=0;k<512;k++)
					fprintf(pp, "%d\t", histogram_grad[k]);
				fprintf(pp, "\r");
				fclose(pp);
 
}
}
et
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
 
remove("histgrad.dat");
FILE *pp;
char *nomgrad = "histgrad.dat";
pp = fopen(nomgrad, "a+t");
			for(j=0; j<block; j++) // Parse blocks
			{
			  for(i=0; i<block; i++)
			  {
                             ...
				for(k=0;k<512;k++)
					fprintf(pp, "%d\t", histogram_grad[k]);
				fprintf(pp, "\r");
 
                            }
                          }
fclose(pp);
Mais ni l'une ni l'autre des solutions ne fonctionnent, j'ai une erreur Access violation NTDLL.DLL

quelqu'un sait pourquoi??