VRun方法
描述
在目前專案中執行視覺序列。
語法
Sub VRun (Sequence As String)
參數
- Sequence
包含目前專案中序列之名稱的字串。
備註
VRun支援任何攝影機校準或無校準類型的序列。
若要顯示圖形,您必須使用SPELVideo控制項,並將Spel類別執行個體的SpelVideoControl屬性設為SPELVideo控制項。
執行VRun後,請使用VGet擷取結果。
VRun範例
VB 例:
Function FindPart(x As Single, y As Single, angle As Single)As Boolean
Dim found As Boolean
Dim x, y, angle As Single
With m_spel
.VRun("seq01")
.VGet("seq01", "corr01", "found", found)
If found Then
.VGet("seq01", "corr01", "cameraX", x)
.VGet("seq01", "corr01", "cameraY", y)
.VGet("seq01", "corr01", "angle", angle)
FindPart = True
End If
End With
End Function
C# 例:
bool FindPart(float x, float y, float angle)
{
bool found;
m_spel.VRun("seq01");
m_spel.VGet("seq01", "corr01", "found", found);
if (found) {
m_spel.VGet("seq01", "corr01", "cameraX", out x);
m_spel.VGet("seq01", "corr01", "cameraY", out y);
m_spel.VGet("seq01", "corr01", "angle", out angle);
}
return found;
}
← VLoadModel方法 VSave方法 →