// 头文件
typedef struct
{
/* data */
cv::Mat img_ori; //输入原图
cv::Mat mask; //输出掩码
std::string img_name; // 图片名称
unsigned flag;
} Result; //typedef将结构体命名为Result
typedef Result* Result_ptr; //typedef将结构体指针命名为Result_ptr
在头文件中声明结构体,在调用时必须分配内存空间,比如Result_ptr res_ptr = (Result_ptr)molloc(sizeof(Result));如果给结构体指针赋值,res_ptr->img_name="img.jpg",不知道字符串放在内存中哪个区域