mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Another compile fix
This commit is contained in:
2
Makefile
2
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 $@
|
||||
|
@ -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 <cstdio>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
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<int>(0, -pleft), std::max<int>(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 <chrono>
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user