Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
GPU
• DeepStream Version
deepstream 6.1 triton(docker)
Hello
I want to convert NvBufSurface to jpeg
I know that “nvds_obj_enc_process” can convert, but I want another way ex)libturbo-jpeg, libjpeg
so could you tell me how to convert NvBufSurface to jpeg?
this is code
GstMapInfo inmap = GST_MAP_INFO_INIT;
if (!gst_buffer_map(buf, &inmap, GST_MAP_READ)) {
std::cerr << "input buffer mapinfo failed\n";
return;
}
NvBufSurface *ip_surf = (NvBufSurface *) inmap.data;
fanzh
3
please refer to Dump jpeg in deepstream5.0
Before you dump data from NvBufSurface, you need to check memType, format and layout first. Different memType, format and layout, the dump method is different. DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums 5
here is a sample: DeepStream SDK FAQ - #18 by bcao
fanzh
5
Is this still an issue to support? Thanks
Hi
I am solving the problem with opencv through the link you sent me, but there is a compilation error
I installed opencv4.2 and set the makefile like this
CUDA_VER?=
ifeq ($(CUDA_VER),)
$(error "CUDA_VER is not set")
endif
CXX=g++
APP:= deepstream-test5-app
TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -)
NVDS_VERSION:=6.1
LIB_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream-$(NVDS_VERSION)/lib/
APP_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream-$(NVDS_VERSION)/bin/
ifeq ($(TARGET_DEVICE),aarch64)
CFLAGS:= -DPLATFORM_TEGRA
endif
SRCS:= deepstream_test5_app_main.c deepstream_utc.cpp image_meta_consumer.cpp capture_time_rules.cpp
SRCS+= ../deepstream-app/deepstream_app.c ../deepstream-app/deepstream_app_config_parser.c
SRCS+= $(wildcard ../../apps-common/src/*.c)
INCS:= $(wildcard *.h)
PKGS:= gstreamer-1.0 gstreamer-video-1.0 x11 json-glib-1.0
PKGS+= opencv4
OBJS:= $(patsubst %.c,%.o, $(patsubst %.cpp,%.o, $(SRCS)))
CFLAGS+= -I../../apps-common/includes \
-I../../../includes \
-I /usr/local/include/librdkafka \
-I../deepstream-app/ -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=5 \
-I /usr/local/cuda-$(CUDA_VER)/include \
-I /opencv2
LIBS:= -L/usr/local/cuda-$(CUDA_VER)/lib64/ -lcudart
LIBS+= -L$(LIB_INSTALL_DIR) -lnvdsgst_meta -lnvds_meta -lrdkafka -lnvdsgst_helper -lnvdsgst_smartrecord -lnvds_batch_jpegenc -lnvds_utils -lnvds_msgbroker -lm \
-lcuda -lgstrtspserver-1.0 -lpthread -ldl -Wl,-rpath,$(LIB_INSTALL_DIR)
CFLAGS+= $(shell pkg-config --cflags $(PKGS))
LIBS+= $(shell pkg-config --libs $(PKGS))
all: $(APP)
%.o: %.c $(INCS) Makefile
$(CC) -c -o $@ $(CFLAGS) $<
%.o: %.cpp $(INCS) Makefile
$(CXX) -c -o $@ $(CFLAGS) $<
$(APP): $(OBJS) Makefile
$(CXX) -o $(APP) $(OBJS) $(LIBS)
install: $(APP)
cp -rv $(APP) $(APP_INSTALL_DIR)
clean:
rm -rf $(OBJS) $(APP)
include is here
#include "opencv2/opencv_modules.hpp"
using namespace cv;
using namespace std;
and error message is here
error: 'cv' is not a namespace-name
fanzh
7
please refer to deepstream sample deepstream-mrcnn-app, it will use opencv.
fanzh
9
Is this still an issue to support? Thanks
system
Closed
11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.