Darknet: image_opencv.o: error: conversion from 'cv::Mat' to non-scalar type 'IplImage {aka _IplImage}' requested

Created on 17 Jan 2020  路  5Comments  路  Source: pjreddie/darknet

i make darknet with OPENCV=1

g++ -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -c ./src/image_opencv.cpp -o obj/image_opencv.o
./src/image_opencv.cpp: In function 'image mat_to_image(cv::Mat)':
./src/image_opencv.cpp:63:20: error: conversion from 'cv::Mat' to non-scalar type \u2018IplImage {aka _IplImage}\u2019 requested
IplImage ipl = m;
^
compilation terminated due to -Wfatal-errors.
Makefile:86: recipe for target 'obj/image_opencv.o' failed
make: * [obj/image_opencv.o] Error 1

ubuntu version 16.04.12
gcc version 5.4.0 20160609
opencv version:3.4.9

Most helpful comment

try this
IplImage ipl = cvIplImage(m);

All 5 comments

Did you solved it? Encountered in the same problem in the same darknet code :(

I also faced the same problem! Want to know how to solve it!

Having the same issue as well

Hi, I found the solution to it. Check https://github.com/pjreddie/darknet/issues/1347 answered by user @ojmakhura

try this
IplImage ipl = cvIplImage(m);

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gpsmit picture gpsmit  路  3Comments

job2003 picture job2003  路  3Comments

ryuzakinho picture ryuzakinho  路  4Comments

HoracceFeng picture HoracceFeng  路  3Comments

AaronYKing picture AaronYKing  路  3Comments