Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Wintel64/ProcessHiLites/ProcessHilites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
#define CVBlack 0,0,0
#define CVCyan 255,255,153

#ifdef Linux
#include <stdlib.h>
#endif


using namespace std;
using namespace cv;

Expand All @@ -51,6 +56,7 @@ int leftSide = 320; // These values are very specific to the setup used in prog
int top = 120; // It woould be better to have these passed in as parameters from the trafficReports program. **********************

string inLine, lhs, rhs;

string dataPathPrefix;


Expand Down Expand Up @@ -88,6 +94,13 @@ bool blackFrame(Mat inFrame){
int main(){
// Get data path prefix from ProcessHiLites.cfg

#ifdef Linux
// IMPROVE ME : does $HOME/VST/ProcessHilities.cfg exist ?
// if it does: use it
// if not existing : use default environment values
dataPathPrefix = (string)secure_getenv("HOME") + DIR_SEP + "VST";
cout << "dataPathPrefix = " << dataPathPrefix << endl;
#endif
string lhsString[23] = {
"dataPathPrefix",
"CropLeft",
Expand Down Expand Up @@ -118,10 +131,12 @@ int main(){
while (1){ getchar(); }
}
switch (lineNo){
#ifndef Linux
case 0:
dataPathPrefix = rhs;
cout << "dataPathPrefix = " << dataPathPrefix << endl;
break;
#endif
case 1:
leftSide = stoi(rhs);
cout << "leftSide = " << leftSide << endl;
Expand Down
8 changes: 6 additions & 2 deletions src/Wintel64/common/make.rules
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
CXXFLAGS = -Wall -Werror -g
LDLIBS = -lopencv_core -lopencv_highgui -lopencv_imgproc

ifeq ($(shell uname),Darwin)
LDLIBS = -lopencv_core -lopencv_highgui -lopencv_imgproc
# Go get opencv3:
# brew install homebrew/science/opencv3
# Here's where that lands:
CPPFLAGS = -I/usr/local/opt/opencv3/include
LDFLAGS = -L/usr/local/opt/opencv3/lib
LDLIBS += -lopencv_videoio
DEBUG_FLAGS = -g
endif

ifeq ($(shell uname),Linux)
OS_EXTRA_FLAGS = -DLinux
LDLIBS = `pkg-config --cflags --libs opencv`
CPPFLAGS = -I/usr/include/opencv
#DEBUG_FLAGS = -g
endif

CXXFLAGS = -Wall -Werror ${DEBUG_FLAGS} ${OS_EXTRA_FLAGS}

# clang and g++ require c++11 for in-class const initialization
CXXFLAGS += -std=c++11