Remove unused imports and linker flags
This commit is contained in:
parent
48d2620a43
commit
f652017466
@ -1,17 +1,16 @@
|
|||||||
CC=gcc
|
CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
RM=rm -f
|
SRCS=capture.cc
|
||||||
SRCS=autofocus.cc
|
|
||||||
OBJS=$(subst .cc,.o,$(SRCS))
|
OBJS=$(subst .cc,.o,$(SRCS))
|
||||||
|
|
||||||
all: $(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
|
run: capture
|
||||||
LD_PRELOAD=/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so ./autofocus
|
LD_PRELOAD=/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so ./capture
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(OBJS)
|
rm -f $(OBJS)
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
$(RM) autofocus
|
rm -f capture
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <opencv2/imgcodecs.hpp>
|
|
||||||
#include <opencv2/opencv.hpp>
|
#include <opencv2/opencv.hpp>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -16,9 +15,9 @@ string video_pipeline(int capture_width, int capture_height, int framerate,
|
|||||||
"nvvidconv flip-method=" +
|
"nvvidconv flip-method=" +
|
||||||
to_string(flip_method) +
|
to_string(flip_method) +
|
||||||
" ! "
|
" ! "
|
||||||
"video/x-raw,format=(string)BGRx ! "
|
"video/x-raw,format=(string)BGRx ! "
|
||||||
"videoconvert ! "
|
"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";
|
"appsink";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +28,7 @@ int main() {
|
|||||||
int flip_method = 2;
|
int flip_method = 2;
|
||||||
|
|
||||||
string pipeline =
|
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;
|
cout << "Using pipeline: \n\t" << pipeline << endl;
|
||||||
|
|
||||||
VideoCapture cap(pipeline, CAP_GSTREAMER);
|
VideoCapture cap(pipeline, CAP_GSTREAMER);
|
||||||
Loading…
x
Reference in New Issue
Block a user