1 image.h中加入函数声明 void save_cut_image(int px, int py, int ph, int pw, int no, image m_img, char **names, float cut_pro, int the_class); 2 image.c中加入如下函数定义 void save_cut_image(int px, int py, int ph, int pw, int no, image m_img, char **names, float cut_pro, int the_class) { image copy = copy_image(m_img); if (m_img.c == 3) rgbgr_image(copy); int x, y, k; char buff[256]; sprintf(buff, "results//%s%.0f%%%d.jpg", names[the_class], cut_pro, no); printf(" cut_class :%s ...........cut_class:%.0f ", names[the_class], cut_pro); printf(names[the_class]); printf("%f",cut_pro); IplImage *disp = cvCreateImage(cvSize(m_img.w, m_img.h), IPL_DEPTH_8U, m_img.c); int step = disp->widthStep; for (y = 0; y < m_img.h; ++y) { for (x = 0; x < m_img.w; ++x) { for (k = 0; k < m_img.c; +