0
私は次のコードを持っています。コードを実行すると、マウスポインタが0 0の座標に移動します。私はx1 y1の位置にカーソルを移動する必要があります。 x1 y1の値は整数です。xdotoolコマンドで変数を使用する方法
int x1,y1;
for(int i=0; i<nomdef; i++)
{
if(defectArray[i].depth > 40)
{
con=con+1;
if(con==1)
{
x1=(defectArray[i].depth_point)->x;
y1=(defectArray[i].depth_point)->y;
}
cvLine(src, *(defectArray[i].start), *(defectArray[i].depth_point),CV_RGB(255,255,0),1, CV_AA, 0);
cvCircle(src, *(defectArray[i].depth_point), 5, CV_RGB(0,0,255), 2, 8,0); cvDrawContours(src,defects,CV_RGB(0,0,0),CV_RGB(255,0,0),-1,CV_FILLED,8);
}
}system("xdotool mousemove x1 y1");