0

私は次のコードを持っています。コードを実行すると、マウス ポインターが 0 0 座標に移動します。カーソルを x1 y1 の位置に移動する必要があります。x1 y1 の値は整数です。

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");
4

1 に答える 1