發表文章

目前顯示的是有「圖學影像演算法研讀」標籤的文章

儀表指針刻度識別作法演算法參考文章收集

圖片
  一些技術新聞 アナログメーターの計測値をセンサーで読み取るサービス、日立製作所が開始 https://dcross.impress.co.jp/docs/news/000332.html https://conexio-iot.jp/serviceproduct/sri/template_meter.html Smart Ready IoTメーター読み取り_アニメーション動画 https://www.youtube.com/watch?v=n3pF7Trkk64&t=63s&ab_channel=SS-IDIoT アナログメーター認識システムに機能追加し販売開始 https://tiisys.com/blog/2019/07/10/post-28760/ https://socialsolution.omron.com/software/en/assets/file/catalog/catalog_dx_meter.pdf メーター撮ってAIで読む、シンプルな“仮設IoT”は定着するか https://newswitch.jp/p/19772 アナログなメーターをデジタルなネットワークに接続する https://labs.cybozu.co.jp/blog/akky/2021/07/analog-meter-linked-to-digital-network/ Analog-Gauge-Reader https://www.codeproject.com/Articles/1221181/Analog-Gauge-Reader python-opencv-Gauge Reader(中文影片教學思路參考-基礎理想化情況) https://www.youtube.com/watch?v=KFOVYYyVo2w&ab_channel=vvnChao ディープラーニング:ディープラーニングによるメーター値読み取り https://www.youtube.com/watch?v=3kg5KGX9D6A&ab_channel=MATLABJapan 【OpenCV】動画から自動でメーターの角度とってCSVに書き出す【Pythonプログラミング入門/ゆっくり解説】 https://www.youtube.com/watch?v=GWQZ...

Motion History Image_演算法流程圖

圖片
程式碼精簡化過後 #include "opencv2/video/tracking.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc_c.h" #include <time.h> // for CLOCKS_PER_SEC 及 clock() #include <stdio.h> #include <ctype.h> // various tracking parameters (in seconds) const double MHI_DURATION = 3;//1s 為運動跟踪的最大持續時間 // number of cyclic frame buffer used for motion detection // (should, probably, depend on FPS) const int N = 5;//frame buffer當中你要存取的frame數 // ring image buffer IplImage **buf = 0; // 創建 frame buffer , 型態為IplImage * buf 的 Array int last = 0; // temporary images IplImage *mhi = 0; // MHI IplImage *mask = 0; // valid orientation mask //用來建立一個指定大小的記憶體區塊,若為0, //則建立的記憶體區塊大小依照預設值為64k // parameters: // img - input video frame // dst - resultant motion picture // args - optional parameters static void update_mhi(IplImage* img, IplImage* dst, int diff_threshold) { double timestamp = (double)clock() / CLOCKS_PER_SEC;...

opencv_MHI_深入研究

圖片
MHI 最初是由 Bobick 和 Davis 提出的, 在此之前, Bobick 和 Davis 首先提出了二值的運動能量圖 ( Motion Energy Image , MEI ),通過描述物體如何移動和運動在空間中發生的位置, 來進行基於運動的物體識別。 運動能量圖顯示了運動的輪廓和能量的空間分佈。 在運動能量圖的基礎上產生了運動歷史圖( Motion History Image , MHI )。 運動歷史圖是一種基於視覺的模板方法,通過計算時間段內同一位置的像素變化, 將目標運動情況以圖像亮度的形式表現出來。 其每個像素的灰度值表示了在一組視頻序列中該位置像素的最近的運動情況。 最後運動的時刻越接近當前幀,該像素的灰度值越高。 因此, MHI 圖像可以表徵人體在一個動作過程中最近的動作情況, 這使得 MHI 被廣 ​​泛應用於動作識別領域。 設 H 為運動歷史圖像素的強度值, H (x, y, t) 可以由更新函數計算得出: 式中, (x, y) 和 t 為像素點的位置及時間; ( tau )  【 念法: ʹtau  】:  τ(小寫) 為持續時間, 代表 「一個時間區間」 ,從幀數的角度決定了​​運動的時間範圍 Ψ( psi ) /【 念法: ʹpsaɪ 】 :  Ψ(x, y, t)為更新函數, 可由幀間差(Frame Difference)或光流(Optical Flow)等多種方法定義 δ( delta )  /  【 念法:   ʹdɛltə  】  : 為衰退參數 (1)      mhi(x,y) = timestamp if silhouette(x,y)!=0. 即當運動輪廓圖像在坐標 (x,y) 處不為零時,那麼將 mhi 在 (x,y) 處打上時間標記 timestamp. (2)      mhi(x,y) = 0 if silhouette(x, y) = 0 and mhi(x,y) < (timestamp - duration)...

Emgucv_Motion_Detection_MotionHistory_Human_Activity_in_video

圖片
This topic introduces you to the function  MotionHistory of emgucv . The motion history image (MHI) is a static image template helps in understanding the motion location and path as it progresses. In MHI, the temporal motion information is collapsed into a single image template where intensity is a function of recency of motion. The MHI pixel intensity is a function of the motion history at that location, where brighter values correspond to a more recent motion. Using MHI, moving parts of a video sequence can be engraved with a single image, from where one can predict the motion flow as well as the moving parts of the video action. Video  Effect  Algorithm1 ========================================================= for each time t   Bt := absolute_difference(It, It-1) > threshold end for ========================================================= Algorithm2 ========================================================= for ea...

Non-photorealistic rendering(非真實感渲染)_使用opencv實現卡通化效果_ex2

圖片
這次要帶領大家來進行有趣的視訊卡通化濾鏡功能 首先  我們觀察一下 這個效果   主要是  著重於   邊緣(界)提取 第一階段 - 邊界偵測 一般在電腦視覺中,常被用到的是我們的Canny圖像邊界偵測!!! 這是由 John F.Canny 所開發的 , 因而以其名來命名。 此方法滿足下列三種條件: (1) 低錯誤率 : 僅在存在的邊界上,偵測效果不錯。 (2)局部化良好 : 偵測到像素邊界之間的距離最小,實際邊界的pixel也最小(minimal) (3)簡單反應 : 每個邊界只有一個偵測效果。 偵測步驟如下 : 1. 用  Gauassian Filter 去 過濾 除去 雜訊 2. 用 類似 Sobel方法 尋找圖像傾斜度的強度。 3. 採用 非最大壓制( non-maximum suppression) , 這個步驟會移除認為不是邊界的像素,所以會只留下細線。 4.滯後作用 : 這是最後步驟使用兩種臨界法 如果 pixel傾斜度 高於 上臨界值就會被認為是邊界。 如果pixel 傾斜度 低於 下臨界值就捨去 如果pixel傾斜度介於兩臨界值間,而相連的pixel強度高於上臨界值就被認定為邊界。 原創者 John F.Canny 認為  上下 臨界值分別是  2:1   與 3:1 【程式碼】 #include<opencv/highgui.h> #include <opencv/cv.h> #include <iostream> using namespace cv; using namespace std; int main(int argc, char** argv) { IplImage *frame, *GrayFrame; //VideoCapture cap(0); // open the default camera CvCapture *capture = cvCaptureFromCAM(0);//cvCaptureFromCAM()其實跟cvCreateCameraCapture()一模一樣 ...