��dm������Ϸ��ǰ������Ѱ��ָ��ͼƬ @param dm ָ�����˾���Ĵ�Į���� @param seekPicPath ����ͼƬ��·�� @return ����ImgSeekBean����
(Dm2Java dm,String seekPicPath)
| 237 | * @return ����ImgSeekBean���� |
| 238 | */ |
| 239 | public static ImgSeekBean GameSeek(Dm2Java dm,String seekPicPath){ |
| 240 | |
| 241 | String gamePicPath = "./res/pics/pic_temp/game.jpg"; |
| 242 | dm.DeleteFile(gamePicPath); |
| 243 | dm.Capture(GB.getGx(),GB.getGy(), GB.getWidth(), GB.getHeight(), gamePicPath); |
| 244 | ImgSeekBean isb = new ImgSeekBean(); |
| 245 | isb = ImgSeek.findImg(seekPicPath, gamePicPath,false); |
| 246 | if(isb.isSeek()&&isb.getX1()!=-1){ |
| 247 | int x = isb.getX1()+(isb.getX2()-isb.getX1())/2, |
| 248 | y = isb.getY1()+(isb.getY2()-isb.getY1())/2; |
| 249 | isb.setMidX(x); |
| 250 | isb.setMidY(y); |
| 251 | // System.out.println("ģ��ͼ��ԭͼƥ��ɹ���"); |
| 252 | // System.out.println("ƥ�����Ͻ�λ��(x1="+isb.getX1()+",y1="+isb.getY1()+")"); |
| 253 | // System.out.println("ƥ�����½�λ��(x2="+isb.getX2()+",y2="+isb.getY2()+")"); |
| 254 | |
| 255 | } |
| 256 | else{ |
| 257 | isb.setSeek(false); |
| 258 | // System.out.println("ģ��ͼ��ԭͼƥ��ʧ��."); |
| 259 | } |
| 260 | // |
| 261 | // System.out.println("ģ��ͼ������������" + isb.getTempKeyPointsNum()); |
| 262 | // System.out.println("ƥ���������������" + isb.getMatchKeyPointsNum()); |
| 263 | |
| 264 | return isb; |
| 265 | |
| 266 | } |
| 267 | |
| 268 | /** |
| 269 | * ��Ե���������͵��쳣�������Ļ���� |