Another compile fix

pull/1724/head
AlexeyAB 7 years ago
parent e92c635f35
commit 67f33ff5dc
  1. 2
      Makefile
  2. 8
      src/http_stream.cpp
  3. 5
      src/http_stream.h

@ -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

Loading…
Cancel
Save