原创 使用easylogging++進行日誌輸出

#include <iostream> #include <fstream> //支持多線程 #define ELPP_THREAD_SAFE #include "easylogging++.h" INITIALIZE_EASYLOGG

原创 python對文件夾中的文件分類處理

把算法檢測出來目標進行分類,車輛行人非機動車自然物體,python真好用,不用學蒙都能寫對 import os import shutil def GetPathNameExt(filename): (filepath,tem

原创 字符編碼格式轉換

int gb2312toutf8(const char *sourcebuf, size_t sourcelen, char *destbuf, size_t destlen) { iconv_t ict;

原创 ffmpeg推送rtsp流或者視頻文件到rtsp服務器

1.推送rtsp視頻流 ffmpeg -i rtsp://admin:[email protected]:554/h264/ch1/sub/av_stream -codec copy -f rtsp rtsp://192.16

原创 獲取當前計算機時間並寫入文件

1.    SYSTEMTIME now; GetLocalTime(&now); char timenow[100]; sprintf(timenow, "%d%02d%02d%02d%02d", now.wYear, now.wMo

原创 編譯使用glog

1.linux 進入源碼目錄 cd glog 修改CMakeList.txt option (BUILD_SHARED_LIBS "Build shared libraries" OFF) 修改爲 option (BUILD_SHA

原创 linux文件夾遍歷字符串處理等基礎功能函數

/************************************************************************* > File Name: filenameio.h > Author: lcmf

原创 linux計算函數執行時間

#ifndef _TIME_USED_H_ #define _TIME_USED_H_ #include <stdio.h> #include <sys/time.h> //extern FILE* g_fp; class time

原创 windows編譯openH264

1.安裝MinGW 2.安裝VS2015 3.將MinGW/bin目錄加入環境變量 4.啓動/MinGW/msys/1.0/msys.bat腳本(也有人說需要從VS的bash調起msys.bat) 5.將openh264源碼拷貝到當前目錄

原创 分割字符串

//substring std::string substr(char* str, unsigned int start, unsigned int end) { unsigned n = end - start; char stb

原创 ffmpeg偵測碼流格式

std::string SniffingNetworkFlow(uint8_t* pbuf, int nbufsize, double* dTime) { av_register_all(); AVIOContext *pb = N

原创 解碼H264視頻文件實現類似av_parser_parse2功能

#include "SubsectionDecoder.h" #include "H264_2_RGB.h" #include <pthread.h> #include <iostream> #include <Windows.h>

原创 使用ffmpeg打開rtsp流等視頻流

void open_rtsp(const char *rtsp) {     unsigned int    i;     int             ret;     int             video_st_index

原创 Qt使用Opencv庫顯示圖片及遇見問題記錄

問題一: Qt默認使用的Debug模式,我編譯的庫都是Release的所有出現以下函數未定義,比如說一下函數 cvtColor imwrite imshow等等, IplImage等C函數好像不受影響   Mat轉QPixmap Mat

原创 Dlib人臉檢測(C++)

1.時間檢測類 #ifndef TIMESTRAMP_H #define TIMESTRAMP_H #include <stdio.h> #include <iostream> #ifndef _WIN32 #include <sy