OpenCV坐标系
一、坐标系
OpenCV的坐标系原点(0, 0)是图片的左上角点,这种坐标系在OpenCV的结构体Mat、Rect、Point中都适用。
OpenCV中坐标系的X轴为图像矩形的上水平线,从左往右;Y轴为图像矩形的左垂直线,从上到下。
注意:Point(x, y)和Rect(x, y) 中,第一个参数x代表的是元素所在图像的列数cols; 第二个参数y代表的是元素所在图像的行数rows。
二、像素操作
python中对opencv像素操作,可以认为是对Numpy数组进行操
一、坐标系
OpenCV的坐标系原点(0, 0)是图片的左上角点,这种坐标系在OpenCV的结构体Mat、Rect、Point中都适用。
OpenCV中坐标系的X轴为图像矩形的上水平线,从左往右;Y轴为图像矩形的左垂直线,从上到下。
注意:Point(x, y)和Rect(x, y) 中,第一个参数x代表的是元素所在图像的列数cols; 第二个参数y代表的是元素所在图像的行数rows。
二、像素操作
python中对opencv像素操作,可以认为是对Numpy数组进行操
snap7-full-1.4.2 examples 里面自带c++、c、c#、delphi等例子。
pip install python-snap7
import snap7
import struct
from snap7 import util
# 连接
client = snap7.client.Client()
client.connect(‘192.168.2.1’, 0, 1)
# 读取
# DB1.DBD100
data = clien
1、父窗体
/// <summary>
/// 弹窗
/// </summary>
/// <param name=”sender”></param>
/// <param name=”e”></param>
private void btnPopWin_Click(object sender, EventArgs e)
{
FormItem formItem = new FormIte
1、NuGet安装QRCoder库。
2、测试代码。
using QRCoder;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
1、build.gradle中dependencies引用。
implementation ‘org.apache.commons:commons-lang3:3.7’
2、
“{\”code\”:\”0\”,\”data\”:[{\”factweight\”:\”0.00\”,\”planweight\”:\”15.00\”,\”siteno\”:\”1\”,\”taskdate\”:\”2022-06-29 13:36:08\”,\”taskno\”:\”bi2022051
1、build.gradle中dependencies引用。
implementation ‘com.journeyapps:zxing-android-embedded:3.5.0’
2、Activity、Fragment区别。
Activity调用:
IntentIntegrator integrator = new IntentIntegrator(this);
Fragment调用:
IntentIntegrator integrator
使用 pyinstaller 命令
#打包成exe并设置图标
pyinstaller -F –icon=logo.ico main.py
#打包成exe且不包含控制台
pyinstaller -F -w main.py
#打包成exe 设置图标 且不包含控制台
pyinstaller -F –icon=logo.ico -w main.py
#打包成exe 设置图标 且不包含控制台
pyinstaller -D –icon=logo.ico -w main.
注意:python 3.10 无法安装pyqt5。需要降低版本,使用python 3.9。
1、安装 python-3.9.13-amd64.exe。
2、安装 PyCharm Community Edition 2022.1.3。
3、安装pyqt5、pyqt5-tools。
#pip升级
C:\Python39\python.exe -m pip install –upgrade pip
#安装pyqt5
pip install pyqt5 -i https:/
下载地址:http://fazecast.github.io/jSerialComm/
import com.fazecast.jSerialComm.*;
public class Test
{
public static void main(String[] args)
{
//System.out.println(“Hello World!”);
SerialPort mSerialPort;
mSerialPort = SerialPort.getC
下载地址:https://github.com/sknown/libghttp
./configure –enable-static –prefix=/home/jiang/code/libghttp/target_x86
make && make install
出现错误x86_64-unkown-linux-gun
需要安装libtool。
sudo apt-get install libtool
需要将config.guess和
下载地址:https://libmodbus.org/download/
一、交叉编译 libmodbus
为了使 ARM 工控板能使用 libmodbus 相关的功能,所以交叉编译 libmodbus。
目标:交叉编译工具编译 libmodbus 库,并将库及测试文件拷贝到工控板中进行测试。
将 libmodbus-3.1.7.tar.gz 压缩包上传到 ubuntu 系统的 libmodbus 目录下,解压。
在源码目录配置编译:
./configure –b
ubuntu 终端:
# 在主机上执行如下命令
sudo apt install gcc-arm-linux-gnueabihf
# 安装完成后使用如下命令查看版本
arm-linux-gnueabihf-gcc -v
#include <stdio.h>
int main(int argc, char *argv[])
{
int i;
printf(“Hello World http://chanpinxue.cn \n”);
pri
ubuntu-22.04-desktop 图形界面下操作非常的卡顿。
解决办法:在虚拟机关机状态下,进入虚拟机设置,取消 3D图形的勾选。
下载地址:https://cn.ubuntu.com/download/desktop
注意:在项目工程里面–管理NuGet程序包–搜索你需要的包(nmodbus4)–安装即可。
// 私有串口实例
private SerialPort serialPort = new SerialPort();
// 设定串口参数
serialPort.PortName = cbxPort.SelectedItem.ToString();
serialPort.BaudRate = 9600;
serialPort.Parity = Parity.Non
下载地址:https://github.com/S7NetPlus/s7netplus
S7.Net 与 S7-200,S7-300,S7-400,S7-1200 和 S7-1500 兼容。
// 创建一个 PLC 实例,连接和断开连接
Plc plc = new Plc(CpuType.S7200Smart, “192.168.2.1”, 0, 0);
// 连接到 PLC
plc.Open();
//public object Read(string varia
1、下载安装包。
https://globalcdn.nuget.org/packages/microsoft.netframework.referenceassemblies.net45.1.0.2.nupkg
2、以 rar 方式解压下载的安装包.nupkg(可以直接修改后缀名为 .rar 再进行解压)。
3、复制目录。
将microsoft.netframework.referenceassemblies.net45.1.0.2.rar\build\.NETFramewor
SQLServer 通过触发器调用存储过程,同时在存储过程中调用web http服务。
1、sqlserver数据库开启相关服务
–sqlserver数据库开启相关服务
–查看 OLE Automation Procedures 的当前设置。0未启用。
exec sp_configure ‘show advanced option’, ‘1’ –只有这个高级选项被打开的时候,才有权限修改其他配置。
go
reconfigure –运行reconfigure语
一、下载安装
1、通过https://github.com/tporadowski/redis/releases 地址,下载Redis-x64-5.0.14.1.msi 文件。
2、双击Redis-x64-5.0.14.1.msi 文件进行安装。
二、配置服务启动
开始->运行,输入services.msc
启动类似:自动
三、密码设置
在C:\Program Files\Redis\redis.windows-service.conf
No protocol specified
Exception in thread “main” java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.ru
下载地址:https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html
(1)、关闭系统防火墙。
systemctl stop firewalld
systemctl disable firewalld
(2)、关闭selinux。
vim /etc/selinux/config
SELINUX=disabled
(3)、安装依赖包。
yum install compa