// Jump.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
#include "pch.h"
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <graphics.h>
#include <math.h>
IMAGE image,img;
//判断颜色相似度
double Simailarity(COLORREF color1,COLORREF color2)
{
int r1 = GetRValue(color1);
int g1 = GetGValue(color1);
int b1 = GetBValue(color1);
int r2 = GetRValue(color2);
int g2 = GetGValue(color2);
int b2 = GetBValue(color2);
//pow x的y次方
return sqrt(double((r1 - r2)*(r1 - r2) + (g1 - g2)*(g1 - g2) + (b1 - b2)*(b1 - b2)));
}
int main()
{
initgraph(690, 790,SHOWCONSOLE);
while (true)
{
system("adb shell screencap -p /sdcard/screen.png");
system("adb pull /sdcard/screen.png");
loadimage(&image, L"screen.png", 720, 1440);
putimage(0, 0, &image);
SetWorkingImage(&a
C++ 写微信跳一跳
最新推荐文章于 2023-04-14 17:06:39 发布