首页 > TAG信息列表 > oy

mpy lcd 绘制圆

1.实心 def drawCirc_fill(tft,x,y,r,pen): ox =r oy =0 err = -r while ox>=oy: last_oy = oy err +=oy oy+=1 err+=oy tft.hline(x-ox,y+last_oy,ox*2+1,pen) ##3 if last_oy != 0: tft.hlin

人工智能

#include <bits/stdc++.h> using namespace std; int a[1100][1100],n,c; int num[1100][1100]; int d[8][2]= {{-1,0},{0,1},{1,0},{0,-1},{-1,-1},{-1,1},{1,1},{1,-1}}; void fun(int x,int y,int ox,int oy) { for(int i=0; i<8; i++) { while(x+d[i][0]>=1&a

MATLAB 计算图像旋转角度

比如有图像1,将其旋转n度得到图像2,问如何比较两张图像得到旋转的度数n。 算法思路参考logpolar变换: 1.从图像中心位置向四周引出射线。 2.计算每根射线所打到图像上的像素累计和,得到极坐标灰度曲线。 3.比较两张图的灰度曲线,得到最相关的偏移位置,即为两张图像的旋转角度。 原图: 旋

用JS制作canvas画板

之前写了一篇随笔是讲 fabric.js 的,基于vue的,查看:https://www.cnblogs.com/reround/p/11468844.html 如果不基于vue用js也是可以实现的 代码如下,直接copy到html文件里就可以,无需加载其他插件,代码里都有注释 <!doctype html> <html> <head> <meta charset="utf-8">

按下鼠标,盒子动起来

<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .box{ width: 200px; height: 200px; background-color: #0ff; position: absolute; le