原创 寫代碼不得不看系列

在電腦上發現以前保存的一段腳本 #!/bin/bash for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do ( sys

原创 python視頻轉圖片

import cv2 capture = cv2.VideoCapture('car.avi') cnt=0 while(1): ret, frame = capture.read() cv2.imshow("resul

原创 小白看不懂的debian網卡配置

更改網卡模式 sudo iwconfig wlan0 mode master(建立熱點) sudo iwconfig wlan0 mode manage(連接wifi、熱點) ssh遇到port 22:No route t

原创 rosbag使用及問題記錄

1.命令 1.採集數據 採集所有話題:rosbag record -a 採集部分話題: rosbag record /chatter -o chat -o及後面的參數,是用來給bag文件命名的 採集特定節點訂閱的話題:ro

原创 ubuntu16.04+GTX1660深度學習相關配置

1.前情提要 本文使用cuda10.1,cuda8不行,cuda9沒試過 cudnn要使用顯卡以後發佈的版本,GTX1660發佈於20190222 考慮到官網總是掛,可以在此下載cuda10.1,cudnn cudnn的deve

原创 求點集的最小面積外接矩形

求點集的最小面積外接矩形 void Rotate(float& x, float& y, float angle) { float a = x * cos(angle) - y * sin(angle); float b

原创 opencv讀取視頻及打不開視頻的解決方法

1、 安裝ffmpeg sudo apt install ffmpeg 2、重新編譯安裝opencv cmake -DCMAKE_BUILD_TYPE=RELEASE -D WITH_FFMPEG=ON .. make

原创 vscode tips

1.設置格式化代碼大括號“{”不換行 文件(File)–>首選項(Preferences)–>設置(settings) 搜索brace C_Cpp: Clang_format_fallback Style默認爲Visual St

原创 python保存視頻

import cv2 import time time = time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime(time.time())) cap = cv2.VideoCaptu

原创 python獲取當前系統時間

datetime import datetime as dt dt.datetime.now().strftime('%F-%T') time import time t = time.strftime('%Y-%m-%

原创 darknet之輸出轉化邊界框座標

1. yolov2-tiny 以輸入爲416*416,20類,5個anchor爲例 使用的anchor是相對於特徵圖的,即anchor值是除以32的 一幅圖的輸出是1*125*13*13 125由5個anchor組成,每個anc

原创 小白都能看懂的rk3399 pro使用

前言 在ubuntu上給rk3399 pro燒錄debian,並跑深度學習 1. 準備 從這裏下載debian固件 從這裏下載燒錄工具 2. 燒錄 1、Type-C線連接主機端的USB接口和TB-RK3399Pro開發板的T

原创 C++實現按空格暫停,按任意鍵繼續,按ESC退出

藉助opencv實現 #include<opencv2/opencv.hpp> using namespace cv; int key = waitKey(10) & 0xff; if(key == 32) { waitK

原创 python調用攝像頭

import cv2 capture = cv2.VideoCapture(0) while(1) ret, frame = capture.read() cv2.imshow("results", frame) c

原创 darknet之VSCode單步調試

1. How 參考這篇博客 launch.json內容如下 { // Use IntelliSense to learn about possible attributes. // Hover to view descrip