diff --git a/Makefile b/Makefile index ec74a813..0ebaf1b0 100644 --- a/Makefile +++ b/Makefile @@ -124,7 +124,7 @@ $(APPNAMESO): $(LIBNAMESO) src/yolo_v2_class.hpp src/yolo_console_dll.cpp endif $(EXEC): $(OBJS) - $(CPP) $(COMMON) $(CFLAGS) $^ -o $@ $(LDFLAGS) + $(CPP) -std=c++11 $(COMMON) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(OBJDIR)%.o: %.c $(DEPS) $(CC) $(COMMON) $(CFLAGS) -c $< -o $@ diff --git a/src/http_stream.cpp b/src/http_stream.cpp index 3a5ce61c..57feea0e 100644 --- a/src/http_stream.cpp +++ b/src/http_stream.cpp @@ -1,3 +1,5 @@ +#include "http_stream.h" + #ifdef OPENCV // // a single-threaded, multi client(using select), debug webserver - streaming out mjpg. @@ -40,6 +42,7 @@ struct _INIT_W32DATA #include #include #include +#include using std::cerr; using std::endl; @@ -52,7 +55,6 @@ using std::endl; #endif using namespace cv; -#include "http_stream.h" #include "image.h" @@ -280,7 +282,7 @@ image image_data_augmentation(IplImage* ipl, int w, int h, cv::Rect img_rect(cv::Point2i(0, 0), img.size()); cv::Rect new_src_rect = src_rect & img_rect; - cv::Rect dst_rect(cv::Point2i(std::max(0, -pleft), std::max(0, -ptop)), new_src_rect.size()); + cv::Rect dst_rect(cv::Point2i(std::max(0, -pleft), std::max(0, -ptop)), new_src_rect.size()); cv::Mat cropped(cv::Size(src_rect.width, src_rect.height), img.type()); cropped.setTo(cv::Scalar::all(0)); @@ -330,6 +332,8 @@ image image_data_augmentation(IplImage* ipl, int w, int h, #endif // OPENCV +// ----------------------------------------------------- + #if __cplusplus >= 201103L || _MSC_VER >= 1900 // C++11 #include diff --git a/src/http_stream.h b/src/http_stream.h index 166c1c7e..b7702250 100644 --- a/src/http_stream.h +++ b/src/http_stream.h @@ -2,6 +2,11 @@ #ifndef HTTP_STREAM_H #define HTTP_STREAM_H +#ifdef OPENCV +#include "opencv2/highgui/highgui_c.h" +#include "opencv2/imgproc/imgproc_c.h" +#endif + #ifdef __cplusplus extern "C" { #endif