SearchWinType屬性

套用至
視覺物件:Blob, ColorMatch, Contour, Correlation, DefectFinder, Geometric, ImageOp, OCR

說明
設定/傳回搜尋視窗類型。

用途

VGet  Sequence.Object.SearchWinType, var
VSet  Sequence.Object.SearchWinType, value
Sequence
表示序列名稱的字串變數
Object
物件名稱或表示物件名稱的字串變數。物件必須存在於指定序列中。
var
表示屬性值的整數變數
value
表示新屬性值的整數值或運算式

數值
下列整數值可用於指定搜尋視窗類型:

  • 1 - Rectangle
    • 視覺常數:VISION_WINTYPE_RECTANGLE
  • 2 - RotatedRectangle
    • 視覺常數:VISION_WINTYPE_ROTATEDRECT
  • 3 - Circle
    • 視覺常數:VISION_WINTYPE_CIRCLE
  • 4 - Arc
    • 視覺常數:VISION_WINTYPE_ARC
  • 9 - Polygon
    • 視覺常數:VISION_WINTYPE_POLYGON

詳細說明
設定並傳回搜尋視窗類型。可用數值如下所示:

  • 1 - Rectangle:無法旋轉的矩形搜尋視窗。
  • 2 - RotatedRectangle:可旋轉的矩形搜尋視窗。
  • 3 - Circle:圓形搜尋視窗。
  • 4 - Arc:圓弧形搜尋視窗
  • 9 - Polygon:具有12個邊和12個頂點的多邊形搜尋視窗

只有Blob、Correlation、Geometric與OCR物件可以設定4 Arc。

只有Blob、Correlation與Geometric物件可以設定 9 - Polygon。

OCR物件只能設定1 - Rectangle與4 Arc。

設定4 - Arc時,只能使用SearchWinAngleStart、SearchWinAngleEnd、SearchWinRadiusInner與SearchWinRadiusOuter屬性。相反,SearchWinHeight、SearchWinLeft、SearchWinTop與SearchWinWidth屬性則不能使用。

參考
SearchWinAngle屬性, SearchWinCenterX屬性, SearchWinCenterY屬性, SearchWinHeight屬性, SearchWinWidth屬性, SearchWinAngleStart屬性, SearchWinAngleEnd屬性, SearchWinRadiusInner屬性, SearchWinRadiusOuter屬性, SearchWinPolygonPointX1 屬性, SearchWinPolygonPointY1 屬性, SearchWinPolygonPointX2 屬性, SearchWinPolygonPointY2 屬性, SearchWinPolygonPointX3 屬性, SearchWinPolygonPointY3 屬性, SearchWinPolygonPointX4 屬性, SearchWinPolygonPointY4 屬性, SearchWinPolygonPointX5 屬性, SearchWinPolygonPointY5 屬性, SearchWinPolygonPointX6 屬性, SearchWinPolygonPointY6 屬性, SearchWinPolygonPointX7 屬性, SearchWinPolygonPointY7 屬性, SearchWinPolygonPointX8 屬性, SearchWinPolygonPointY8 屬性, SearchWinPolygonPointX9 屬性, SearchWinPolygonPointY9 屬性, SearchWinPolygonPointX10 屬性, SearchWinPolygonPointY10 屬性, SearchWinPolygonPointX11 屬性, SearchWinPolygonPointY11 屬性, SearchWinPolygonPointX12 屬性, SearchWinPolygonPointY12 屬性