在nvidia jetson xavier NX安装了opencv,然后编译darknet,提示error: ‘IplImage’ does not name a type; did you mean ‘image’?
解决方法是在src文件夹下查找错误里的image_opencv.cpp,将该文件内容全部替换为下面的内容,
#ifdef OPENCV
#include "stdio.h"
#include "stdlib.h"
#include "opencv2/opencv.hpp"
#include "image.h"
using namespace cv;
extern "C" {
Mat image_to_mat(image im)
{
image copy = copy_image(im);
constrain_image(copy);
if(im.c == 3) rgbgr_image(copy);
Mat m(cv::Size(im.w,im.h), CV_8UC(im.c));
int x,y,c;
int step = m.step;
for(y = 0; y < im.h; ++y){
for(x = 0; x < im.w; ++x){
for(c= 0; c < im.c; ++c){
float val = im.data[c*im.h*im.w + y*im.w + x]