subroutine

void unchar_rvi_calc(unsigned char *red,unsigned char *nir,float *rvi,int height,int width)
{

int i,j;
unsigned char dn1,dn2;
float dn3;

for(i=0;i<height;i++)
{

for(j=0;j<width;j++)
{

dn1=red[i*width+j];
dn2=nir[i*width+j];
dn3=(float)dn2/(float)dn1;
rvi[i*width+j]=dn3;
//printf(“rvi=%f\n”,rvi[i*width+j]);
//fwrite(&dn3,sizeof(float),1,fpo); /*míPà ïWçÇÉfÅ[É^ÇÃèëÇ´çûÇ›*/

}

}

}