---
milena/sandbox/anthony/opencv/Makefile | 19 +++++++++
milena/sandbox/anthony/opencv/main.cpp | 66 ++++++++++++++++++++++++++++++++
2 files changed, 85 insertions(+)
create mode 100644 milena/sandbox/anthony/opencv/Makefile
create mode 100644 milena/sandbox/anthony/opencv/main.cpp
diff --git a/milena/sandbox/anthony/opencv/Makefile
b/milena/sandbox/anthony/opencv/Makefile
new file mode 100644
index 0000000..e08991b
--- /dev/null
+++ b/milena/sandbox/anthony/opencv/Makefile
@@ -0,0 +1,19 @@
+.PHONY: cv
+
+CCACHE=
+CXX=g++
+SRC=main.cpp
+LIBS=-L/opt/local/include -lopencv_highgui -lopencv_core -lopencv_features2d
-lopencv_nonfree -D_GNU_SOURCE
+OUTPUT=cv *.jpg
+CLEAN=${OUTPUT}
+
+all: cv
+
+cv:
+ ${CCACHE} ${CXX} -O2 ${LIBS} ${SRC} -o ${OUTPUT}
+
+debug:
+ ${CCACHE} ${CXX} -g -ggdb -O0 ${LIBS} ${SRC} -o ${OUTPUT}
+
+clean:
+ rm -rf ${CLEAN}
diff --git a/milena/sandbox/anthony/opencv/main.cpp
b/milena/sandbox/anthony/opencv/main.cpp
new file mode 100644
index 0000000..b419c3c
--- /dev/null
+++ b/milena/sandbox/anthony/opencv/main.cpp
@@ -0,0 +1,66 @@
+#include <iostream>
+#include <vector>
+
+#include "opencv2/core/core.hpp"
+#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/nonfree/features2d.hpp"
+#include "opencv2/highgui/highgui.hpp"
+
+
+// MAIN ENTRY POINT
+int main(int argc, char* argv[])
+{
+ const cv::Mat input = cv::imread("keith.pbm");
+ cv::SiftFeatureDetector detector;
+ std::vector<cv::KeyPoint> keypoints;
+ detector.detect(input, keypoints);
+
+ cv::Mat output;
+ cv::drawKeypoints(input, keypoints, output);
+ cv::imwrite("sift.jpg", output);
+
+ return 0;
+
+
+
+ // std::string inputPath, inputPath2, toolchainPath, outputPath;
+ // std::deque<ourfilters::eFilter> toolchain;
+ // bool* multithread = new bool(true);
+
+ // int validCommandLine = getCommandLine(argc, argv, inputPath,
+ // inputPath2,
+ // toolchainPath,
+ // outputPath,
+ // multithread);
+
+ // bool twoSources = inputPath2.length() > 0;
+
+ // if (!validCommandLine)
+ // return errors::invalidCommandLine();
+
+ // parser::getSteps(toolchainPath, toolchain);
+
+ // if (!(*multithread))
+ // {
+ // std::cout << "single-threader" << std::endl;
+ // tbb::task_scheduler_init intit(1);
+ // }
+
+ // tbb::pipeline pipeline;
+
+ // Picker picker(inputPath, inputPath2, twoSources);
+ // pipeline.add_filter(picker);
+
+ // ApplyFilters applicator(toolchain);
+ // pipeline.add_filter(applicator);
+
+ // Writer writer(outputPath,
+ // picker.get_codec(),
+ // picker.get_fps(),
+ // picker.get_dimensions());
+ // pipeline.add_filter(writer);
+
+ // pipeline.run(128);
+
+ // return 0;
+}
--
1.7.10.4