#include #include "user_proc.h" //绘制十字交叉线 void draw_cross(GrayImage *img, int x, int y, int size, uint8_t color){ if(!img || !img->data) return; //获取图像宽度和高度 int w = img->width; int h = img->height; if(x<0 || x>=w || y<0 || y>=h) return; //定义一个二维数组指针方便访问像素 uint8_t **image = img->rows; for(int dx=-size;dx<=size;dx++){ int nx = x + dx; if(nx>=0 && nx=0 && nywidth/2, img->height/2, 20, 0); }