@AJ: Danke ich werde mir das mal reinziehen.
Andy: Ich hab den Fehler gefunden. Anscheinend will er die Positionen doch nicht als Struct haben, sondern direkt als Int-Werte. Aber laut der cpp-Datei will er es aber als Struct haben. Das verwirrt mich ein bisschen. Naja egal. So muss es dann aussehen:
Spoiler anzeigen
Func _OpenCV_Circle($_tImage, $_iX, $_iY, $_iRadius, $_iColor = 0xFFFFFF, $_iThickness = 1, $_iLineType = 8, $_iShift = 0)
Local $_iR = BitAND(BitShift($_iColor, 16), 0xFF)
Local $_iG = BitAND(BitShift($_iColor, 8), 0xFF)
Local $_iB = BitAND($_iColor, 0xFF)
DllCall($__ghOCVDll_1, "none:cdecl", "cvCircle", "ptr", DllStructGetPtr($_tImage), "int", $_iX, "int", $_iY, "int", $_iRadius, _
"double", $_iB, "double", $_iG, "double", $_iR, "double", 0, "int", $_iThickness, "int", $_iLineType, "int", $_iShift)
If @error Then Return SetError(@error, 0, 0)
Return 1
EndFunc
Func _OpenCV_Ellipse($_tImage, $_iX, $_iY, $_iWidth, $_iHeight, $_iAngle, $_iStartAngle, $_iEndAngle, $_iColor = 0xFFFFFF, $_iThickness = 1, $_iLineType = 1, $_iShift = 0)
Local $_iR = BitAND(BitShift($_iColor, 16), 0xFF)
Local $_iG = BitAND(BitShift($_iColor, 8), 0xFF)
Local $_iB = BitAND($_iColor, 0xFF)
DllCall($__ghOCVDll_1, "none:cdecl", "cvEllipse", "ptr", DllStructGetPtr($_tImage), "int", $_iX, "int", $_iY, "int", $_iWidth, "int", $_iHeight, _
"double", $_iAngle, "double", $_iStartAngle, "double", $_iEndAngle, _
"double", $_iB, "double", $_iG, "double", $_iR, "double", 0, "int", $_iThickness, "int", $_iLineType, "int", $_iShift)
If @error Then Return SetError(@error, 0, 0)
Return 1
EndFunc
Func _OpenCV_Line($_tImage, $_iX1, $_iY1, $_iX2, $_iY2, $_iColor = 0xFFFFFF, $_iThickness = 1, $_iLineType = 8, $_iShift = 0)
Local $_iR = BitAND(BitShift($_iColor, 16), 0xFF)
Local $_iG = BitAND(BitShift($_iColor, 8), 0xFF)
Local $_iB = BitAND($_iColor, 0xFF)
DllCall($__ghOCVDll_1, "none:cdecl", "cvLine", "ptr", DllStructGetPtr($_tImage), "int", $_iX1, "int", $_iY1, "int", $_iX2, "int", $_iY2, _
"double", $_iB, "double", $_iG, "double", $_iR, "double", 0, "int", $_iThickness, "int", $_iLineType, "int", $_iShift)
If @error Then Return SetError(@error, 0, 0)
Return 1
EndFunc
Aber wie immer...Hauptsache es funktioniert.