Bonjour ;

on veut programmer le calcule des local binary pattern et on arrive pas à positionner le centre ,comment régler ce problème ?

int a=1; int b=1;
int lbp;
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
for(int i=0;i<=nl;i++)
{
    for(int j=0;j<=nc;j++)
        {//printf("bonjour");
            if (T[a*nc+b]>T[(i*nc)-1+(j-1)])  R[(i*nc)-1+(j-1)]=0; else R[(i*nc)-1+(j-1)]=1;// printf("%u\n",R[(i*nc)-1+(j-1)]);
            if (T[a*nc+b]>T[(i*nc)-1+j])      R[(i*nc)-1+j]=0; else R[(i*nc)-1+j]=1;
            if (T[a*nc+b]>T[(i*nc)-1+(j+1)])  R[(i*nc)-1+(j+1)] =0 ; else R[(i*nc)-1+(j+1)] =1;
            if (T[a*nc+b]>T[(i*nc)+j+1])      R[(i*nc)+j+1] =0; else R[(i*nc)+j+1] =1;
            if (T[a*nc+b]>T[(i*nc)+1+j+1])    R[(i*nc)+1+j+1] =0; else R[(i*nc)+1+j+1] =1;
            if (T[a*nc+b]>T[(i*nc)+1+j])      R[(i*nc)+1+j]=0; else R[(i*nc)+1+j]=1;
            if (T[a*nc+b]>T[(i*nc)+1+(j-1)])  R[(i*nc)+1+(j-1)]=0 ; else R[(i*nc)+1+(j-1)]=1;
et merci.