PIXNET Logo登入

程式狂想曲

跳到主文

這裡是程式的筆記,與對未來的狂想 分享,是學習的開始~

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 1月 15 週四 201508:34
  • Halcon 3D (三) 相機校正會用到的參數(一隻相機)

 
建立校正資料開始:
create_calib_data( : : CalibSetup, NumCameras, NumCalibObjects : CalibDataID)
  CalibSetup:校正模式
  NumCameras:相機數量
  NumCalibObjects:校正版數量
  CalibDataID:校正資料ID
(繼續閱讀...)
文章標籤

Rh 發表在 痞客邦 留言(0) 人氣(994)

  • 個人分類:影像處理
▲top
  • 1月 14 週三 201514:13
  • Halcon 3D (二) 相機校正

適用  Area Camera, 使用 CCTV 鏡頭

CalPath := 'C:/Program Files/MVTec/HALCON-12.0/calib/自建/calplate_big.cpd' '校正版檔案路徑
StartCamPar := [0.016,0,0.0000074,0.0000074,320,240,640,480] '相機初始參數
(繼續閱讀...)
文章標籤

Rh 發表在 痞客邦 留言(0) 人氣(664)

  • 個人分類:影像處理
▲top
  • 12月 08 週一 201413:51
  • Halcon 3D (一) 相機校正

calibration plates with hexagonally arranged marks
Halcon 在3D 模組使用前需要將相機做參數校正
首先 需要設定 要使用的相機組成(CameraType)  與 相機與鏡頭的參數(CameraPAram)
 
CameraType 這邊參考 Halcon 的文件 選擇 合適的 Type
(繼續閱讀...)
文章標籤

Rh 發表在 痞客邦 留言(1) 人氣(2,225)

  • 個人分類:影像處理
▲top
  • 12月 02 週二 201423:46
  • 型態學 方型尋找

1
* Image Acquisition 01: Code generated by Image Acquisition 01
list_files ('D:/Study/鐵片方型尋找', ['files','follow_links'], ImageFiles)
tuple_regexp_select (ImageFiles, ['\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima|hobj)$','ignore_case'], ImageFiles)
for Index := 0 to |ImageFiles| - 1 by 1
    read_image (Image, ImageFiles[Index])
    rgb1_to_gray(Image, GrayImage)
    intensity(Image,GrayImage,Mean, Deviation)
    threshold(GrayImage,Region,0,Mean+Deviation*0.5)
    difference(GrayImage,Region,diffReg)
    fill_up(diffReg, RegionFillUp)
    reduce_domain(GrayImage, RegionFillUp, ImageReduced)
    threshold(ImageReduced,Region2,0,Mean)
    fill_up(Region2, RegionFillUp1)
    boundary(RegionFillUp1, RegionBorder, 'inner')
    connection(RegionBorder, ConnectedRegions)
    select_shape(ConnectedRegions,SelectedRegions,'contlength','and',190, 250)
    count_obj(SelectedRegions, Number)
    if (Number > 0)
        dev_display(GrayImage)
        for index := 1 to Number by 1
              select_obj(SelectedRegions, ObjectSelected, index)
              gen_contour_region_xld(ObjectSelected,Contours, 'border')
              shape_trans_xld(Contours,XLDTrans,'rectangle2')
              smallest_rectangle2_xld (XLDTrans, Row, Col, Phi, Len1, Len2)
              tuple_sin (Phi, Sin)
              tuple_cos (Phi, Cos)
              * 四点中心坐标 左,右,上,下
              L_Row := Row - (Len2 * Cos)
              L_Col := Col - (Len2 * Sin)
              B_Row := Row + (Len1 * Sin)
              B_Col := Col - (Len1 * Cos)
              T_Row := Row - (Len1 * Sin)
              T_Col := Col + (Len1 * Cos)
              R_Row := Row + (Len2 * Cos)
              R_Col := Col + (Len2 * Sin)
              gen_arrow_contour_xld (Arrow1, L_Row, L_Col, R_Row, R_Col, 1, 1)
              gen_arrow_contour_xld (Arrow2, B_Row, B_Col, T_Row, T_Col, 1, 1)
              gen_contour_polygon_xld (ContourL, [L_Row + 10 * Sin/2, L_Row - 10 * Sin/2], [L_Col - 10 * Cos/2, L_Col + 10 * Cos/2])
              gen_contour_polygon_xld (ContourR, [R_Row + 10 * Sin/2, R_Row - 10 * Sin/2], [R_Col - 10 * Cos/2, R_Col + 10 * Cos/2])
              gen_contour_polygon_xld (ContourT, [T_Row - 10 * Cos/2, T_Row + 10 * Cos/2], [T_Col - 10 * Sin/2, T_Col + 10 * Sin/2])
              gen_contour_polygon_xld (ContourB, [B_Row - 10 * Cos/2, B_Row + 10 * Cos/2], [B_Col - 10 * Sin/2, B_Col + 10 * Sin/2])
              dev_set_color ('blue')
              dev_display (Arrow1)
              dev_display (ContourL)
              dev_display (ContourR)
              dev_set_color ('green')
              dev_display (Arrow2)
              dev_display (ContourT)
              dev_display (ContourB)
              disp_message (3600, Len1 * 2, 'image', T_Row, T_Col, 'red', 'false')
              disp_message (3600, Len2 * 2, 'image', R_Row, R_Col, 'magenta', 'false')
             
             * dev_display(ObjectSelected)
              wait_seconds(1)
        endfor            
    endif    
endfor
(繼續閱讀...)
文章標籤

Rh 發表在 痞客邦 留言(0) 人氣(233)

  • 個人分類:影像處理
▲top
  • 3月 30 週日 201408:19
  • Halcon 學習(二)

閥值 threshold : 利用亮度值  做區域分割
 
auto_threshold : 自動閥值
參數 : sigma 
(繼續閱讀...)
文章標籤

Rh 發表在 痞客邦 留言(0) 人氣(4,163)

  • 個人分類:影像處理
▲top
  • 3月 30 週日 201400:00
  • Halcon 學習(ㄧ)


ㄧ、常見育處理影像方法:
1. mean_image or binomial_filter 消除雜訊
2.mediam_image 抑制小斑點或細線
3.smooth_image 平滑圖像
(繼續閱讀...)
文章標籤

Rh 發表在 痞客邦 留言(0) 人氣(10,131)

  • 個人分類:影像處理
▲top
  • 3月 29 週六 201420:11
  • 機器視覺與圖像處理常見方法

滤波(平滑、降噪)
增强
边缘锐化
纹理分析(去骨架、连通性)
(繼續閱讀...)
文章標籤

Rh 發表在 痞客邦 留言(0) 人氣(815)

  • 個人分類:影像處理
▲top
1

個人資訊

Rh
暱稱:
Rh
分類:
數位生活
好友:
累積中
地區:

參觀人氣

  • 本日人氣:
  • 累積人氣:

程式碼

熱門文章

  • (27,571)Form Show 與 ShowDialog 的比較
  • (8,757)Backgroundworker
  • (6,511)委派其實很簡單(二)---跨執行緒
  • (6,189)XML 與 Linq 的結合一 之Xelement
  • (3,526)With 與 美化DataGridView
  • (2,852)List 資料的查詢 用 Find 方法
  • (1,124)Interface 與 DLL 動態聯結運用
  • (1,069)自定義物件 List.Sort()
  • (915)Garbage Collector
  • (837)VB6 MSHFlexGrid 匯出到 Excel

文章分類

  • SQL (1)
  • Halcon (5)
  • 電腦應用 (3)
  • 影像處理 (3)
  • 影像處理 (7)
  • VC++ (1)
  • 生活狂想 (5)
  • C#.NET and VB.NET (51)
  • GDI+ (11)
  • Jsp Servlet 專題 (1)
  • Excel (1)
  • 程式狂想 (5)
  • 未分類文章 (1)

最新文章

  • MIT Yolo V9 rd 使用:三、強化訓練參數設定
  • MIT Yolo V9 rd 使用:二、影像訓練
  • MIT Yolo V9 rd 使用:一、 Anaconda 環境設定
  • Windows 11 (Win11) 設置 Visual studio 默認以管理者權限啟用
  • WIFI DHCP 的DNS異常
  • VMware 無法使用鍵盤處裡
  • 七夕求人緣桃花
  • 台灣房價開始起跌 (青壯年人口與結婚人數會影響買房的需求) II
  • Halcon 形狀物件特性
  • 多點手眼標定

最新留言

  • [25/09/12] 一柱擎天 於文章「MIT Yolo V9 rd 使用:三、...」留言:
    大男人 https://www.tw9g.com/go...
  • [21/10/27] 訪客 於文章「Bitmap 進階繪圖(一) 可移動 改...」留言:
    謝謝 受益良多...
  • [18/06/21] n622689 於文章「Halcon 形狀物件特性...」留言:
    p0hO奢侈品仿牌,保固說到做到,誠信經營,,官網秋冬同步設...
  • [17/07/23] Roy Chang 於文章「Halcon 3D (一) 相機校正...」留言:
    您好,想請問如果是使用 羅技 Webcam C920r HD...
  • [16/10/19] Ting 於文章「Bitmap 進階繪圖(二) 可移動...」留言:
    佛心來著,受益良多...
  • [16/02/23] Liu Cheng-Kun 於文章「Backgroundworker...」留言:
    你好,請叫一下,我按照你的方法,將myobj宣告完, 結果...
  • [15/02/17] Ken 於文章「由記憶體取圖...」留言:
    您好,想跟您請教如何存圖(format16bppGraySc...
  • [14/10/28] ktbs6088 於文章「如何雙開 VM 還可以很順暢...」留言:
    ﹍字§幕♀機﹉製造﹂商○tinyurl.com/mfmg8...
  • [13/09/10] 訪客 於文章「委派其實很簡單(一)...」留言:
    您好 ~ 謝謝您的分享 有個問題跟你請教一下 直接寫這樣...
  • [13/03/03] Rh 於文章「Bitmap 進階繪圖(二) 可移動...」留言:
    圓形是 Circle 方形請用 Rectangle...

文章搜尋