資源簡介
基于MATLAB與ADB的微信跳一跳小程序輔助。如有問題請留言

代碼片段和文件信息
function?distance?=?FindPoint()
img?=?imread(‘screen/screen.png‘);
img?=?double(img);
imgr?=?img(::1);
imgg?=?img(::2);
imgb?=?img(::3);
%尋找人的下邊界
startp?=?find(50
[startpxstartpy]?=?ind2sub(size(img(::1))startp);
startx?=?max(startpx);
startl?=?startpy(find(startpx==startx));
starty?=?round(median(startl));
rlflag?=?starty<=540;
backcolor?=?img(50010:);
flag?=?0;
tempr?=?[];
tempg?=?[];
tempb?=?[];
for?n?=?500:1500
%找將要跳去平面的上頂點
%?tempr?=?double(img(n:1));
%?tempg?=?double(img(n:2));
%?tempb?=?double(img(n:3));
tempr?=?img(nrlflag*540+1:540+540*rlflag1);
tempg?=?img(nrlflag*540+1:540+540*rlflag2);
tempb?=?img(nrlflag*540+1:540+540*rlflag3);
if?std(tempr)>1?&&?std(tempg)>1?&&?std(tempb)>1
tempr1?=?abs(backcolor(1)-tempr);
tempg1?=?abs(backcolor(2)-tempg);
tempb1?=?abs(backcolor(3)-tempb);
tempy?=?find(tempr1>10|tempg1>10|tempb1>10);
break;
%?p?=?1;
%?tempy?=?[];
%?for?m?=?10:1000
%?if?abs(backcolor(1)-tempr(m))>20?||...
%?abs(backcolor(2)-tempg(m))>20?||...
%?abs(backcolor(3)-tempb(m))>10
%?tempy(p)?=?m;
%?p?=?p+1;
%?flag?=?1;
%?else?
%?if?flag?==?1
%?break
%?end
%?end
%?end
end
%?if?flag?==?1
%?break
%?end
end
upx?=?n;
upy?=?rlflag*540+round(median(tempy));
upcolor(1)?=?img(upxupy1);
upcolor(2)?=?img(upxupy2);
upcolor(3)?=?img(upxupy3);
tempr?=?[];
tempg?=?[];
tempb?=?[];
%尋找下頂點
for?n?=?upx+220:-1:upx
tempr?=?img(nupy1);
tempg?=?img(nupy2);
tempb?=?img(nupy3);
if?abs(upcolor(1)-tempr)+...
abs(upcolor(2)-tempg)+...
abs(upcolor(3)-tempb)<30
downx?=?n;
downy?=?upy;
break
end
end
downx;
downy;
endx?=?round((upx+downx)*0.5);
endy?=?upy;
fprintf(‘start:?%d%d\n?end:?%d%d\n‘startxstartyendxendy);
distance?=?abs(endx-startx)+abs(endy-starty)
????%distance?=?abs(upx-startx)+abs(upy-starty)-60
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1009664??2014-11-07?18:41??Jump_MATLAB\adb.exe
?????文件??????????0??2014-12-08?20:18??Jump_MATLAB\adb1.0.32.txt
?????文件??????96256??2014-11-07?18:41??Jump_MATLAB\AdbWinApi.dll
?????文件??????60928??2014-11-07?18:41??Jump_MATLAB\AdbWinUsbApi.dll
?????文件?????196608??2014-11-07?18:41??Jump_MATLAB\fastboot.exe
?????文件???????2106??2018-01-12?12:53??Jump_MATLAB\FindPoint.m
?????文件??????57880??2018-01-11?23:02??Jump_MATLAB\screen\screen.png
?????文件??????73873??2018-01-09?19:00??Jump_MATLAB\screen\screen1.png
?????文件??????67115??2018-01-09?22:19??Jump_MATLAB\screen\screen2.png
?????文件??????95184??2018-01-11?18:08??Jump_MATLAB\screen\screen3.png
?????文件???????1313??2018-01-12?12:54??Jump_MATLAB\WeChat_autojump.m
?????目錄??????????0??2018-01-12?12:42??Jump_MATLAB\screen
?????目錄??????????0??2018-01-12?12:42??Jump_MATLAB
-----------?---------??----------?-----??----
??????????????1660927????????????????????13
評論
共有 條評論