This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static NvDsInferParseObjectInfo convertBBoxYoloV4(const float& bx1, const float& by1, const float& bx2, | |
| const float& by2, const uint& netW, const uint& netH) | |
| { | |
| NvDsInferParseObjectInfo b; | |
| // Restore coordinates to network input resolution | |
| float x1 = bx1 * netW; | |
| float y1 = by1 * netH; | |
| float x2 = bx2 * netW; | |
| float y2 = by2 * netH; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <gst/gst.h> | |
| /* Structure to contain all our information, so we can pass it to callbacks */ | |
| struct CustomData { | |
| GstElement *pipeline; | |
| GstElement *source; | |
| GstElement *convert; | |
| GstElement *resample; | |
| GstElement *tee; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <gst/gst.h> | |
| int main(int arg, char *argv[]) { | |
| GstElement *pipeline = nullptr; | |
| GstBus *bus = nullptr; | |
| GstMessage *msg = nullptr; | |
| // gstreamer initialization | |
| gst_init(&arg, &argv); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.16) | |
| project(gstreamer_01) #Project name | |
| set(CMAKE_CXX_STANDARD 14) #setting C++ 14 standard | |
| find_package(PkgConfig) #finding pkg-config is a helper tool | |
| #using pkg-config to getting Gstreamer | |
| pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <string.h> | |
| #include <string> | |
| #include <sstream> | |
| #include <iostream> | |
| #include <ostream> | |
| #include <fstream> | |
| #include "gstdsexample.h" | |
| #include <npp.h> | |
| #include <sys/time.h> | |
| GST_DEBUG_CATEGORY_STATIC (gst_dsexample_debug); |