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
|
endif
|
||||||
|
|
||||||
$(EXEC): $(OBJS)
|
$(EXEC): $(OBJS)
|
||||||
$(CPP) $(COMMON) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
$(CPP) -std=c++11 $(COMMON) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
||||||
|
|
||||||
$(OBJDIR)%.o: %.c $(DEPS)
|
$(OBJDIR)%.o: %.c $(DEPS)
|
||||||
$(CC) $(COMMON) $(CFLAGS) -c $< -o $@
|
$(CC) $(COMMON) $(CFLAGS) -c $< -o $@
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "http_stream.h"
|
||||||
|
|
||||||
#ifdef OPENCV
|
#ifdef OPENCV
|
||||||
//
|
//
|
||||||
// a single-threaded, multi client(using select), debug webserver - streaming out mjpg.
|
// a single-threaded, multi client(using select), debug webserver - streaming out mjpg.
|
||||||
@ -40,6 +42,7 @@ struct _INIT_W32DATA
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <algorithm>
|
||||||
using std::cerr;
|
using std::cerr;
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
@ -52,7 +55,6 @@ using std::endl;
|
|||||||
#endif
|
#endif
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
#include "http_stream.h"
|
|
||||||
#include "image.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 img_rect(cv::Point2i(0, 0), img.size());
|
||||||
cv::Rect new_src_rect = src_rect & img_rect;
|
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());
|
cv::Mat cropped(cv::Size(src_rect.width, src_rect.height), img.type());
|
||||||
cropped.setTo(cv::Scalar::all(0));
|
cropped.setTo(cv::Scalar::all(0));
|
||||||
@ -330,6 +332,8 @@ image image_data_augmentation(IplImage* ipl, int w, int h,
|
|||||||
|
|
||||||
#endif // OPENCV
|
#endif // OPENCV
|
||||||
|
|
||||||
|
// -----------------------------------------------------
|
||||||
|
|
||||||
#if __cplusplus >= 201103L || _MSC_VER >= 1900 // C++11
|
#if __cplusplus >= 201103L || _MSC_VER >= 1900 // C++11
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
#ifndef HTTP_STREAM_H
|
#ifndef HTTP_STREAM_H
|
||||||
#define HTTP_STREAM_H
|
#define HTTP_STREAM_H
|
||||||
|
|
||||||
|
#ifdef OPENCV
|
||||||
|
#include "opencv2/highgui/highgui_c.h"
|
||||||
|
#include "opencv2/imgproc/imgproc_c.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user