per image randomness in crop layer

This commit is contained in:
Joseph Redmon
2015-04-17 12:32:54 -07:00
parent 47528e37cf
commit f199fd3b64
8 changed files with 72 additions and 45 deletions

View File

@ -182,8 +182,8 @@ void show_image(image p, char *name)
}
}
free_image(copy);
if(disp->height < 500 || disp->width < 500 || disp->height > 1000){
int w = 500;
if(disp->height < 448 || disp->width < 448 || disp->height > 1000){
int w = 448;
int h = w*p.h/p.w;
if(h > 1000){
h = 1000;
@ -191,7 +191,7 @@ void show_image(image p, char *name)
}
IplImage *buffer = disp;
disp = cvCreateImage(cvSize(w, h), buffer->depth, buffer->nChannels);
cvResize(buffer, disp, CV_INTER_NN);
cvResize(buffer, disp, CV_INTER_LINEAR);
cvReleaseImage(&buffer);
}
cvShowImage(buff, disp);