From f6520174661e49befe8d398b18d714feb455d014 Mon Sep 17 00:00:00 2001 From: Tobias Eidelpes Date: Mon, 13 Feb 2023 18:13:02 +0100 Subject: [PATCH] Remove unused imports and linker flags --- jetson-deployment/image-capture/Makefile | 13 ++++++------- .../image-capture/{autofocus.cc => capture.cc} | 7 +++---- 2 files changed, 9 insertions(+), 11 deletions(-) rename jetson-deployment/image-capture/{autofocus.cc => capture.cc} (85%) diff --git a/jetson-deployment/image-capture/Makefile b/jetson-deployment/image-capture/Makefile index f69abd0..e5376bc 100644 --- a/jetson-deployment/image-capture/Makefile +++ b/jetson-deployment/image-capture/Makefile @@ -1,17 +1,16 @@ CC=gcc CXX=g++ -RM=rm -f -SRCS=autofocus.cc +SRCS=capture.cc OBJS=$(subst .cc,.o,$(SRCS)) all: $(SRCS) - $(CXX) -std=c++11 -Wall -I/usr/lib/opencv -I/usr/include/opencv4 $< -L/usr/lib -lopencv_core -lopencv_highgui -lopencv_videoio -lopencv_imgproc -lopencv_imgcodecs -o autofocus + $(CXX) -std=c++11 -Wall -I/usr/lib/opencv -I/usr/include/opencv4 $< -L/usr/lib -lopencv_core -lopencv_videoio -lopencv_imgcodecs -o capture -run: autofocus - LD_PRELOAD=/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so ./autofocus +run: capture + LD_PRELOAD=/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so ./capture clean: - $(RM) $(OBJS) + rm -f $(OBJS) distclean: clean - $(RM) autofocus + rm -f capture diff --git a/jetson-deployment/image-capture/autofocus.cc b/jetson-deployment/image-capture/capture.cc similarity index 85% rename from jetson-deployment/image-capture/autofocus.cc rename to jetson-deployment/image-capture/capture.cc index 2269b9e..325922b 100644 --- a/jetson-deployment/image-capture/autofocus.cc +++ b/jetson-deployment/image-capture/capture.cc @@ -1,5 +1,4 @@ #include -#include #include using namespace std; @@ -16,9 +15,9 @@ string video_pipeline(int capture_width, int capture_height, int framerate, "nvvidconv flip-method=" + to_string(flip_method) + " ! " - "video/x-raw,format=(string)BGRx ! " + "video/x-raw,format=(string)BGRx ! " "videoconvert ! " - "video/x-raw,format=(string)BGR,width=(int)3264,height=(int)2464 ! " + "video/x-raw,format=(string)BGR,width=(int)3264,height=(int)2464 ! " "appsink"; } @@ -29,7 +28,7 @@ int main() { int flip_method = 2; string pipeline = - focus_pipeline(capture_width, capture_height, framerate, flip_method); + video_pipeline(capture_width, capture_height, framerate, flip_method); cout << "Using pipeline: \n\t" << pipeline << endl; VideoCapture cap(pipeline, CAP_GSTREAMER);