dennis068899
一般會員
發表:1 回覆:0 積分:0 註冊:2007-04-10
發送簡訊給我
|
<textarea class="c#" rows="10" cols="60" name="code">#include
#include
#include
#include <math.h>
#define picsize 512
#define psnrsize 512
unsigned char pic_buf0[picsize][picsize];
unsigned char end_buf[picsize][picsize];
float pic_buf1[picsize][picsize];
FILE *ptrcoverin;
char *filecoverin="lena.raw";
FILE *ptrcoverdel;
char *filecoverdel="lena_del.raw";
//psnr
unsigned char psnrbuf[512][512];
unsigned char psnrbuf_fruit[512][512];
FILE *ptrpsnr1;
char *filepsnr1="lena.raw"; //psnr image_1
FILE *ptrpsnr2;
char *filepsnr2="lena_del.raw"; //psnr image_2
//psnr
void psnr(void)
{
int psnrj;
int psnrc,psnrd;
double psnrdiv,psnrdiver;
float psnrresult;
ptrpsnr1=fopen(filepsnr1,"rb");
if(ptrpsnr1==NULL){perror(filepsnr1);getch();exit(1);}
ptrpsnr2=fopen(filepsnr2,"rb");
if(ptrpsnr2==NULL){perror(filepsnr2);getch();exit(1);}
psnrdiv=psnrdiver=0;
for(psnrj=0;psnrj
|