基礎

01.TCP/UDP 連線  Server / Client 連線與傳輸

02. Serial Port(RS232) 資料傳輸 與接收

03.FTP 資料上傳

04.文字檔輸出與讀取

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

 

建立校正資料開始:
create_calib_data
( : : CalibSetup, NumCameras, NumCalibObjects : CalibDataID)
  CalibSetup:校正模式
  NumCameras:相機數量

文章標籤

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

適用  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] '相機初始參數

'開始建立 相機校正create_calib_data ('calibration_object', 1, 1, CalibDataID)

文章標籤

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

Halcon 在3D 模組使用前需要將相機做參數校正

首先 需要設定 要使用的相機組成(CameraType)  與 相機與鏡頭的參數(CameraPAram)

 

CameraType 這邊參考 Halcon 的文件 選擇 合適的 Type

 

文章標籤

Rh 發表在 痞客邦 留言(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])

文章標籤

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

Hard link 就是 建立A目錄 連接到  B目錄

例:

D:\ 沒有temp 的資料夾    

mklink /j  D:\temp C:\temp

如此 D:\下會自動建立一個 temp 連接到 C:\temp

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

尋照細線  

Paste your text here.read_image (Image, 'CutImage.png')
rgb1_to_gray (Image, GrayImage)
get_image_size (GrayImage, Width, Height)
dev_close_window ()
dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
dev_display (Image)
dev_set_draw ('margin')

*排除塗黑的區塊
mean_image (GrayImage, ImageMean, 50, 50)
threshold (ImageMean, RegionBlacked, 20, 255)
erosion_circle (RegionBlacked, RegionBlackedDilation, 20.5)
median_rect (GrayImage, ImageMedian, 1, 5)

*方法:提取線
lines_gauss (ImageMedian, Lines, 1, 2, 6, 'dark', 'true', 'bar-shaped', 'true')
union_collinear_contours_xld (Lines, UnionContours, 10, 1, 5, 0.4, 'attr_keep')
select_shape_xld (UnionContours, SelectedXLD, 'contlength', 'and', 40, 99999)
select_shape_xld (SelectedXLD, SelectedXLD1, 'anisometry_points', 'and', 10, 99999)
gen_region_contour_xld (SelectedXLD1, RegionLines, 'filled')
intersection (RegionLines, RegionBlackedDilation, RegionIntersection)
union1 (RegionIntersection, RegionUnion1)
closing_circle (RegionUnion1, RegionClosing, 3.5)
connection (RegionClosing, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegionsFinal, 'area', 'and', 75, 9999999)
union1 (SelectedRegionsFinal, RegionUnionFinal)

*方法:邊緣檢測後提取線
derivate_gauss (ImageMedian, DerivGauss, 1, 'gradient')
sobel_amp (ImageMedian, EdgeAmplitude, 'sum_abs', 5)
lines_gauss (EdgeAmplitude, Lines1, 1, 6, 15, 'light', 'true', 'bar-shaped', 'true')
union_collinear_contours_xld (Lines1, UnionContours1, 10, 1, 5, 0.4, 'attr_keep')
select_shape_xld (UnionContours1, SelectedXLD2, 'contlength', 'and', 40, 99999)
select_shape_xld (SelectedXLD2, SelectedXLD3, 'anisometry_points', 'and', 10, 99999)
gen_region_contour_xld (SelectedXLD3, RegionLines1, 'filled')
intersection (RegionLines1, RegionBlackedDilation, RegionIntersection1)
union1 (RegionIntersection1, RegionUnion2)
closing_circle (RegionUnion2, RegionClosing1, 3.5)
connection (RegionClosing1, ConnectedRegions1)
select_shape (ConnectedRegions1, SelectedRegionsFinal1, 'area', 'and', 75, 9999999)
union1 (SelectedRegionsFinal1, RegionUnionFinal1)

*結合兩種方法
union2 (RegionUnionFinal, RegionUnionFinal1, AllRegions)
dilation_circle (AllRegions, Defects, 6.5)

*可視化
dev_set_color ('red')
dev_display (Image)
dev_display (Defects)

 


文章標籤

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

一直以來  進到一個誤區,為了讓VM可以跑得很順利 升級電腦  加大記憶體  到最近換了 SSD

的確,花了錢  開 VM的確順很多

但雙開 VM 還是會卡卡的。

最後發現  給予VM適當的RAM 大小很重要

 

文章標籤

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

如果只是要消除  顯示的 三角形
 padding的參數中 設個數值就好
 datagridview1.RowHeadersDefaultCellStyle.Padding = New Padding(50)

 

 單純 設定 RowHeade 的文字

文章標籤

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

在自定義物件的操作,當要在物件被回收時 同時啟用 某個相關 操作

可複寫 該物件的 Finalize

 

  Protected Overrides Sub Finalize()
     ..............

文章標籤

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