摘要: https://blog.csdn.net/dpjcn1990/article/details/136085443 #define LED_BUILTIN1 12 #define LED_BUILTIN2 13 //usb转ttl即可,无需485转ttl #define RS485_RX_PIN 1 阅读全文
posted @ 2025-02-24 07:48 辛河 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Windows中可以使用Python的multiprocessing库 举一个例子 进程间可以传递参数 在Windows中,Python的multiprocessing库支持通过进程间通信(IPC)机制来传递数据,包括使用**kwargs(关键字参数)的形式。不过,需要注意的是,当你通过multip 阅读全文
posted @ 2025-02-21 22:04 辛河 阅读(1) 评论(0) 推荐(0) 编辑
摘要: # 获取字体的实际高度(行高) font_height = self.axis_font.metrics("linespace") print(f"Font height (linespace): {font_height} pixels") # 创建一个隐藏的Label来测量文本宽度 # hidd 阅读全文
posted @ 2025-02-20 23:21 辛河 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 提问 文心一言: OPENCV+PYTHON 棋盘格的函数 答案: 在 OpenCV 和 Python 中,棋盘格(Chessboard)常用于相机标定(Camera Calibration)中,因为它提供了一种已知图案,用于计算相机的内部参数和外部参数。棋盘格图案通常由交替的黑白方块组成。 以下是 阅读全文
posted @ 2025-02-03 16:45 辛河 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 平移 建议 图片长宽不一样 import cv2 import numpy as np # # 通过cv2.warpAffine()实现移动 # img=cv2.imread('D:\Python_OpenCV\chapter3_Pics\weiqi1.jpg') # 构造移动矩阵M,设在x轴方向移 阅读全文
posted @ 2025-02-01 12:48 辛河 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 一、函数原型pythonrect = cv2.minAreaRect(points) 输入值: points:一个形状为 [-1, 1, 2] 的 NumPy 数组,表示轮廓上的点集。这通常是通过 cv2.findContours 函数从二值图像中检测到的轮廓。返回值 cv2.minAreaRect 阅读全文
posted @ 2025-01-31 22:23 辛河 阅读(36) 评论(0) 推荐(0) 编辑
摘要: # pymodbus 3.8.3 # Y轴 30齿 有减速机 变速比 19:1 距离变角位移:360/30/2*Sy_mm*19 地址 2 # X轴 丝杠1204 每周移动4mm 距离变角位移:360/4*Sx_mm 地址 3 # Z轴 20齿 无减速机 距离变角位移:360/20/2*Sz_mm 阅读全文
posted @ 2025-01-31 10:23 辛河 阅读(25) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import tkinter as tk from tkinter import filedialog, messagebox, simpledialog from PIL import Image, ImageTk import math from 阅读全文
posted @ 2025-01-30 21:02 辛河 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 同样使用面向对象设计方法,定义一个tk.Frame派生类,class PlotCurve(tk.Frame)。此类在窗口中作为一个控件显示。 # -*- coding: utf-8 -*- """ 使用matplotlib绘制图形,并在窗口中显示 """ import tkinter as tk f 阅读全文
posted @ 2025-01-30 11:42 辛河 阅读(19) 评论(0) 推荐(0) 编辑
摘要: # 引用模块 import tkinter as tk from tkinter import ttk #引用文件 import log import animation_page as act_plot # 应用主窗口类 class MainWindow(tk.Tk): def __init__( 阅读全文
posted @ 2025-01-30 11:17 辛河 阅读(18) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示