detect_indent_fft.hdev相關例程學習(檢測凹痕)
Index:.../Applications/Surface-Inspection/detect_indent_fft.hdev
主要步驟:
主要步驟:
* Optimize the fft speed for the specific image size
optimize_rft_speed (Width, Height, 'standard')
* 選取了最優rft變化速度的影像大小
* Construct a suitable filter by combining two gaussian
* filters
Sigma1 := 10.0
Sigma2 := 3.0
gen_gauss_filter (GaussFilter1, Sigma1, Sigma1, 0.0, 'none', 'rft', Width, Height)
gen_gauss_filter (GaussFilter2, Sigma2, Sigma2, 0.0, 'none', 'rft', Width, Height)
sub_image (GaussFilter1, GaussFilter2, Filter, 1, 0)
* 建立兩個高斯濾波器然後又結合起來
*要搞明白究竟何為高斯濾波器
*要搞明白究竟何為高斯濾波器
* Process the images iteratively
NumImages := 11
for Index := 1 to NumImages by 1
*
* Read an image and convert it to gray values
read_image (Image, 'plastics/plastics_' + Index$'02')
rgb1_to_gray (Image, Image)
* Perform the convolution in the frequency domain
rft_generic (Image, ImageFFT, 'to_freq', 'none', 'complex', Width)
convol_fft (ImageFFT, Filter, ImageConvol)
rft_generic (ImageConvol, ImageFiltered, 'from_freq', 'n', 'real', Width)
* 各種rft變化加摺積在rft變化
* Process the filtered image
gray_range_rect (ImageFiltered, ImageResult, 10, 10)
*通過此步驟就找到了凹痕所在,看了這個運算元的幫助文件,我就明白關鍵在於計算了每個mask中灰度的差,然後給一個總返回值,沒有參考文獻,看來是halcon自己的演算法。
*通過此步驟就找到了凹痕所在,看了這個運算元的幫助文件,我就明白關鍵在於計算了每個mask中灰度的差,然後給一個總返回值,沒有參考文獻,看來是halcon自己的演算法。
min_max_gray (ImageResult, ImageResult, 0, Min, Max, Range)
threshold (ImageResult, RegionDynThresh, max([5.55,Max * 0.8]), 255)
connection (RegionDynThresh, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 4, 99999)
union1 (SelectedRegions, RegionUnion)
closing_circle (RegionUnion, RegionClosing, 10)
connection (RegionClosing, ConnectedRegions1)
select_shape (ConnectedRegions1, SelectedRegions1, 'area', 'and', 10, 99999)
area_center (SelectedRegions1, Area, Row, Column)
* 一系列提取演算法,沒有需要關注的point
學習了這個例程,明白如何有效構建高斯濾波器和利用fft變化,halcon裡有rft和fft不知道內在區別,但核心都是FFT。
相關文章
- 檢測金屬圓環表面的凹痕
- 檢測-紋理表面凸起、凹痕、劃痕缺陷的檢測
- DG學習筆記(12)_相關檢視筆記
- 學習 java 做自動化測試相關Java
- Oracle SCN相關問題學習與測試Oracle
- 目標檢測相關論文
- Inception相關功能學習
- OpenCV&Qt學習之四——OpenCV 實現人臉檢測與相關知識整理OpenCVQT
- 深度學習相關論文深度學習
- 深度學習相關網址深度學習
- IOS學習 UIGestureRecognizer相關iOSUI
- Caffe:Layer的相關學習
- 相關API學習網址API
- 深度學習相關理論深度學習
- Notadd 環境檢測相關資訊(Alpha)
- three.js學習3_相機相關JS
- CVPR2017-目標檢測相關
- iOS相關許可權檢測和申請iOS
- 深度學習:乳腺x檢測深度學習
- 圖學習相關論文快訊
- View工作流程-相關學習View
- 機器學習,深度學習相關介紹機器學習深度學習
- JMeter學習的相關網站JMeter網站
- oracle10g_impdp工具測試學習_之三_remap相關OracleREM
- 開源相機管理庫Aravis例程學習(五)——camera-apiAPI
- 網路、HTTP相關學習總結HTTP
- GC相關知識簡單學習GC
- JVM相關知識整理和學習JVM
- iOS相關學習資料的整理iOS
- 學習 PixiJS — 碰撞檢測JS
- 深度學習之目標檢測深度學習
- 使用深度學習檢測瘧疾深度學習
- 深度學習之瑕疵缺陷檢測深度學習
- opencv學習之邊緣檢測OpenCV
- 開源相機管理庫Aravis例程學習(四)——multiple-acquisition-signalUI
- 開源相機管理庫Aravis例程學習(六)——camera-features
- oracle Metrics相關檢視Oracle
- 跟阿銘學Linux-相關學習連結Linux