当前位置: 首页 > news >正文

C# Onnx 特征匹配 DeDoDe 检测,不描述---描述,不检测

目录

介绍

效果

模型信息

项目

代码 

下载 


介绍

github地址:https://github.com/Parskatt/DeDoDe

DeDoDe 🎶 Detect, Don't Describe - Describe, Don't Detect, for Local Feature Matching

The DeDoDe detector learns to detect 3D consistent repeatable keypoints, which the DeDoDe descriptor learns to match. The result is a powerful decoupled local feature matcher.

Training DeDoDe

DISCLAMER: I've (Johan) not yet tested that the training scripts here reproduces our original results. This repo is very similar to the internal training repo, but there might be bugs introduced by refactoring etc. Let me know if you face any issues reproducing our results (or if you somehow get better results :D).

See experiments for the scripts to train DeDoDe. We trained on a single A100-40GB with a batchsize of 8. Note that you need to do the data prep first, see data_prep.

As usual, we require that you have the MegaDepth dataset already downloaded, and that you have the prepared scene info from DKM.

效果

模型信息

Inputs
-------------------------
name:images
tensor:Float[-1, 3, -1, -1]
---------------------------------------------------------------

Outputs
-------------------------
name:matches_A
tensor:Float[-1, -1]
name:matches_B
tensor:Float[-1, -1]
name:batch_ids
tensor:Int64[-1]
---------------------------------------------------------------

项目

VS2022

.net framework 4.8

OpenCvSharp 4.8

Microsoft.ML.OnnxRuntime 1.16.2

代码 

using Microsoft.ML.OnnxRuntime.Tensors;
using Microsoft.ML.OnnxRuntime;
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Linq;
using System.Drawing;
using static System.Net.Mime.MediaTypeNames;
using System.Numerics;

namespace Onnx_Demo
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";
        string image_path = "";
        string image_path2 = "";

        DateTime dt1 = DateTime.Now;
        DateTime dt2 = DateTime.Now;

        int inpWidth;
        int inpHeight;

        float[] mean =new float[] { 0.485f, 0.456f, 0.406f };
        float[] std = new float[] { 0.229f, 0.224f, 0.225f };

        Mat image;
        Mat image2;

        string model_path = "";

        SessionOptions options;
        InferenceSession onnx_session;
        Tensor<float> input_tensor;
        Tensor<float> mask_tensor;
        List<NamedOnnxValue> input_ontainer;

        IDisposableReadOnlyCollection<DisposableNamedOnnxValue> result_infer;
        DisposableNamedOnnxValue[] results_onnxvalue;

        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = fileFilter;
            if (ofd.ShowDialog() != DialogResult.OK) return;

            pictureBox1.Image = null;
            pictureBox2.Image = null;
            textBox1.Text = "";

            image_path = ofd.FileName;
            pictureBox1.Image = new System.Drawing.Bitmap(image_path);
            image = new Mat(image_path);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // 创建输入容器
            input_ontainer = new List<NamedOnnxValue>();

            // 创建输出会话
            options = new SessionOptions();
            options.LogSeverityLevel = OrtLoggingLevel.ORT_LOGGING_LEVEL_INFO;
            options.AppendExecutionProvider_CPU(0);// 设置为CPU上运行

            // 创建推理模型类,读取本地模型文件
            model_path = "model/dedode_end2end_1024.onnx";

            inpHeight = 256;
            inpWidth = 256;

            onnx_session = new InferenceSession(model_path, options);

            // 创建输入容器
            input_ontainer = new List<NamedOnnxValue>();

            image_path = "test_img/im_A.jpg";
            pictureBox1.Image = new Bitmap(image_path);

            image_path2 = "test_img/im_B.jpg";
            pictureBox3.Image = new Bitmap(image_path2);

        }

        private unsafe void button2_Click(object sender, EventArgs e)
        {
            if (image_path == "")
            {
                return;
            }
            textBox1.Text = "检测中,请稍等……";
            pictureBox2.Image = null;
            System.Windows.Forms.Application.DoEvents();

            image = new Mat(image_path);
            image2 = new Mat(image_path2);

            float[] input_tensor_data = new float[2 * 3 * inpWidth * inpHeight];

            //preprocess
            Mat dstimg = new Mat();
            Cv2.CvtColor(image, dstimg, ColorConversionCodes.BGR2RGB);
            Cv2.Resize(dstimg, dstimg, new OpenCvSharp.Size(inpWidth, inpHeight));
            for (int c = 0; c < 3; c++)
            {
                for (int i = 0; i < inpHeight; i++)
                {
                    for (int j = 0; j < inpWidth; j++)
                    {
                        float pix = ((byte*)(dstimg.Ptr(i).ToPointer()))[j * 3 + c];
                        input_tensor_data[c * inpWidth * inpHeight + i * inpWidth + j] = (float)((pix / 255.0 - mean[c]) / std[c]);
                    }
                }
            }

            Cv2.CvtColor(image2, dstimg, ColorConversionCodes.BGR2RGB);
            Cv2.Resize(dstimg, dstimg, new OpenCvSharp.Size(inpWidth, inpHeight));
            for (int c = 0; c < 3; c++)
            {
                for (int i = 0; i < inpHeight; i++)
                {
                    for (int j = 0; j < inpWidth; j++)
                    {
                        float pix = ((byte*)(dstimg.Ptr(i).ToPointer()))[j * 3 + c];
                        input_tensor_data[(3+c )* inpWidth * inpHeight + i * inpWidth + j] = (float)((pix / 255.0 - mean[c]) / std[c]);
                    }
                }
            }

            input_tensor = new DenseTensor<float>(input_tensor_data, new[] { 2, 3, inpHeight, inpWidth });

            //将 input_tensor 放入一个输入参数的容器,并指定名称
            input_ontainer.Add(NamedOnnxValue.CreateFromTensor("images", input_tensor));

            dt1 = DateTime.Now;
            //运行 Inference 并获取结果
            result_infer = onnx_session.Run(input_ontainer);
            dt2 = DateTime.Now;

            //Postprocessing
            //将输出结果转为DisposableNamedOnnxValue数组
            results_onnxvalue = result_infer.ToArray();

            float[] matches_A = results_onnxvalue[0].AsTensor<float>().ToArray();
            float[] matches_B = results_onnxvalue[1].AsTensor<float>().ToArray();
            int num_points = results_onnxvalue[0].AsTensor<float>().Dimensions[0];

            List<KeyPoint> points_A = new List<KeyPoint>();
            List<KeyPoint> points_B = new List<KeyPoint>();

            KeyPoint temp;
            for (int i = 0; i < num_points; i++)
            {
                temp = new KeyPoint();
                temp.Pt.X = (float)((matches_A[i * 2] + 1) * 0.5 * image.Cols);
                temp.Pt.Y = (float)((matches_A[i * 2 + 1] + 1) * 0.5 * image.Rows);
                temp.Size = 1f;
                points_A.Add(temp);
            }

            num_points = results_onnxvalue[1].AsTensor<float>().Dimensions[0];
            for (int i = 0; i < num_points; i++)
            {
                temp = new KeyPoint();
                temp.Pt.X = (float)((matches_B[i * 2] + 1) * 0.5 * image2.Cols);
                temp.Pt.Y = (float)((matches_B[i * 2 + 1] + 1) * 0.5 * image2.Rows);
                temp.Size = 1f;
                points_B.Add(temp);
            }

            //匹配结果放在matches里面
            num_points = points_A.Count();
            List<DMatch> matches=new List<DMatch>();
            for (int i = 0; i < num_points; i++)
            {
                matches.Add(new DMatch(i, i, 0f));
            }

            //按照匹配关系将图画出来,背景图为match_img
            Mat match_img = new Mat();
            Cv2.DrawMatches(image, points_A, image2, points_B, matches, match_img);

            pictureBox2.Image = new System.Drawing.Bitmap(match_img.ToMemoryStream());
            textBox1.Text = "推理耗时:" + (dt2 - dt1).TotalMilliseconds + "ms";

        }

        private void pictureBox2_DoubleClick(object sender, EventArgs e)
        {
            Common.ShowNormalImg(pictureBox2.Image);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = fileFilter;
            if (ofd.ShowDialog() != DialogResult.OK) return;

            pictureBox3.Image = null;
            pictureBox2.Image = null;
            textBox1.Text = "";

            image_path2 = ofd.FileName;
            pictureBox3.Image = new System.Drawing.Bitmap(image_path2);
            image2 = new Mat(image_path2);
        }

        private void pictureBox3_DoubleClick(object sender, EventArgs e)
        {
            Common.ShowNormalImg(pictureBox3.Image);
        }

        private void pictureBox1_DoubleClick(object sender, EventArgs e)
        {
            Common.ShowNormalImg(pictureBox1.Image);
        }
    }
}

using Microsoft.ML.OnnxRuntime.Tensors;
using Microsoft.ML.OnnxRuntime;
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Linq;
using System.Drawing;
using static System.Net.Mime.MediaTypeNames;
using System.Numerics;namespace Onnx_Demo
{public partial class frmMain : Form{public frmMain(){InitializeComponent();}string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";string image_path = "";string image_path2 = "";DateTime dt1 = DateTime.Now;DateTime dt2 = DateTime.Now;int inpWidth;int inpHeight;float[] mean =new float[] { 0.485f, 0.456f, 0.406f };float[] std = new float[] { 0.229f, 0.224f, 0.225f };Mat image;Mat image2;string model_path = "";SessionOptions options;InferenceSession onnx_session;Tensor<float> input_tensor;Tensor<float> mask_tensor;List<NamedOnnxValue> input_ontainer;IDisposableReadOnlyCollection<DisposableNamedOnnxValue> result_infer;DisposableNamedOnnxValue[] results_onnxvalue;private void button1_Click(object sender, EventArgs e){OpenFileDialog ofd = new OpenFileDialog();ofd.Filter = fileFilter;if (ofd.ShowDialog() != DialogResult.OK) return;pictureBox1.Image = null;pictureBox2.Image = null;textBox1.Text = "";image_path = ofd.FileName;pictureBox1.Image = new System.Drawing.Bitmap(image_path);image = new Mat(image_path);}private void Form1_Load(object sender, EventArgs e){// 创建输入容器input_ontainer = new List<NamedOnnxValue>();// 创建输出会话options = new SessionOptions();options.LogSeverityLevel = OrtLoggingLevel.ORT_LOGGING_LEVEL_INFO;options.AppendExecutionProvider_CPU(0);// 设置为CPU上运行// 创建推理模型类,读取本地模型文件model_path = "model/dedode_end2end_1024.onnx";inpHeight = 256;inpWidth = 256;onnx_session = new InferenceSession(model_path, options);// 创建输入容器input_ontainer = new List<NamedOnnxValue>();image_path = "test_img/im_A.jpg";pictureBox1.Image = new Bitmap(image_path);image_path2 = "test_img/im_B.jpg";pictureBox3.Image = new Bitmap(image_path2);}private unsafe void button2_Click(object sender, EventArgs e){if (image_path == ""){return;}textBox1.Text = "检测中,请稍等……";pictureBox2.Image = null;System.Windows.Forms.Application.DoEvents();image = new Mat(image_path);image2 = new Mat(image_path2);float[] input_tensor_data = new float[2 * 3 * inpWidth * inpHeight];//preprocessMat dstimg = new Mat();Cv2.CvtColor(image, dstimg, ColorConversionCodes.BGR2RGB);Cv2.Resize(dstimg, dstimg, new OpenCvSharp.Size(inpWidth, inpHeight));for (int c = 0; c < 3; c++){for (int i = 0; i < inpHeight; i++){for (int j = 0; j < inpWidth; j++){float pix = ((byte*)(dstimg.Ptr(i).ToPointer()))[j * 3 + c];input_tensor_data[c * inpWidth * inpHeight + i * inpWidth + j] = (float)((pix / 255.0 - mean[c]) / std[c]);}}}Cv2.CvtColor(image2, dstimg, ColorConversionCodes.BGR2RGB);Cv2.Resize(dstimg, dstimg, new OpenCvSharp.Size(inpWidth, inpHeight));for (int c = 0; c < 3; c++){for (int i = 0; i < inpHeight; i++){for (int j = 0; j < inpWidth; j++){float pix = ((byte*)(dstimg.Ptr(i).ToPointer()))[j * 3 + c];input_tensor_data[(3+c )* inpWidth * inpHeight + i * inpWidth + j] = (float)((pix / 255.0 - mean[c]) / std[c]);}}}input_tensor = new DenseTensor<float>(input_tensor_data, new[] { 2, 3, inpHeight, inpWidth });//将 input_tensor 放入一个输入参数的容器,并指定名称input_ontainer.Add(NamedOnnxValue.CreateFromTensor("images", input_tensor));dt1 = DateTime.Now;//运行 Inference 并获取结果result_infer = onnx_session.Run(input_ontainer);dt2 = DateTime.Now;//Postprocessing//将输出结果转为DisposableNamedOnnxValue数组results_onnxvalue = result_infer.ToArray();float[] matches_A = results_onnxvalue[0].AsTensor<float>().ToArray();float[] matches_B = results_onnxvalue[1].AsTensor<float>().ToArray();int num_points = results_onnxvalue[0].AsTensor<float>().Dimensions[0];List<KeyPoint> points_A = new List<KeyPoint>();List<KeyPoint> points_B = new List<KeyPoint>();KeyPoint temp;for (int i = 0; i < num_points; i++){temp = new KeyPoint();temp.Pt.X = (float)((matches_A[i * 2] + 1) * 0.5 * image.Cols);temp.Pt.Y = (float)((matches_A[i * 2 + 1] + 1) * 0.5 * image.Rows);temp.Size = 1f;points_A.Add(temp);}num_points = results_onnxvalue[1].AsTensor<float>().Dimensions[0];for (int i = 0; i < num_points; i++){temp = new KeyPoint();temp.Pt.X = (float)((matches_B[i * 2] + 1) * 0.5 * image2.Cols);temp.Pt.Y = (float)((matches_B[i * 2 + 1] + 1) * 0.5 * image2.Rows);temp.Size = 1f;points_B.Add(temp);}//匹配结果放在matches里面num_points = points_A.Count();List<DMatch> matches=new List<DMatch>();for (int i = 0; i < num_points; i++){matches.Add(new DMatch(i, i, 0f));}//按照匹配关系将图画出来,背景图为match_imgMat match_img = new Mat();Cv2.DrawMatches(image, points_A, image2, points_B, matches, match_img);pictureBox2.Image = new System.Drawing.Bitmap(match_img.ToMemoryStream());textBox1.Text = "推理耗时:" + (dt2 - dt1).TotalMilliseconds + "ms";}private void pictureBox2_DoubleClick(object sender, EventArgs e){Common.ShowNormalImg(pictureBox2.Image);}private void button3_Click(object sender, EventArgs e){OpenFileDialog ofd = new OpenFileDialog();ofd.Filter = fileFilter;if (ofd.ShowDialog() != DialogResult.OK) return;pictureBox3.Image = null;pictureBox2.Image = null;textBox1.Text = "";image_path2 = ofd.FileName;pictureBox3.Image = new System.Drawing.Bitmap(image_path2);image2 = new Mat(image_path2);}private void pictureBox3_DoubleClick(object sender, EventArgs e){Common.ShowNormalImg(pictureBox3.Image);}private void pictureBox1_DoubleClick(object sender, EventArgs e){Common.ShowNormalImg(pictureBox1.Image);}}
}

下载 

源码下载

相关文章:

C# Onnx 特征匹配 DeDoDe 检测,不描述---描述,不检测

目录 介绍 效果 模型信息 项目 代码 下载 介绍 github地址&#xff1a;https://github.com/Parskatt/DeDoDe DeDoDe &#x1f3b6; Detect, Dont Describe - Describe, Dont Detect, for Local Feature Matching The DeDoDe detector learns to detect 3D consisten…...

第十六章 处理空字符串和 Null 值

文章目录 第十六章 处理空字符串和 Null 值空字符串和 Null 值的默认映射导出值控制空元素的形式 第十六章 处理空字符串和 Null 值 类和属性参数 XMLUSEEMPTYELEMENT XMLIGNORENULL XMLNILNOOBJECT XMLNIL 空字符串和 Null 值的默认映射 下表总结了空字符串和 null 值的…...

MYSQL 处理重复数据

文章目录 前言防止表中出现重复数据统计重复数据过滤重复数据删除重复数据在这里插入代码片后言 前言 hello world欢迎来到前端的新世界 &#x1f61c;当前文章系列专栏&#xff1a;Mysql &#x1f431;‍&#x1f453;博主在前端领域还有很多知识和技术需要掌握&#xff0c;正…...

世岩清上:未来科技展览的策展视野

面对科技未来&#xff0c;策展视野的核心在于把握趋势&#xff0c;理解人性&#xff0c;并充分运用科技手段提升观众的体验。以下是我对未来科技展览的策展视野。 一、以人为本的设计理念 科技发展的最终目的是服务于人类&#xff0c;提升人们的生活质量。因此&#xff0c;展…...

如何理解2023vivo开发者大会,使用Rust语言编写蓝河操作系统(BlueOS)?

在2023年vivo开发者大会上&#xff0c;vivo宣布使用Rust语言编写其蓝河操作系统&#xff08;BlueOS&#xff09;。 什么是Rust语言&#xff1f; Rust 是一种开放源代码系统编程语言&#xff0c;可用于开发高效、安全的软件。 使用 Rust 可管理内存并控制其低级详细信息。 但你…...

Android flutter this and base files have different roots

类似经历者 Android build fails with certain plugins if project is in a different drive (from sdk) 错误描述 我是windows系统&#xff0c;下载 flutter sdk 我是放在D盘&#xff0c;flutter项目是放在E盘&#xff0c;flutter 执行 pub get的时候&#xff0c;会在我C盘…...

Excel动态选择某一行/列的最后一个数据

选择列的最后一个数据&#xff1a; 以A列为例&#xff0c;使用&#xff1a; LOOKUP(1,0/(A:A<>""),A:A)选择行的最后一个数据&#xff1a; 以第3行为例&#xff0c;使用&#xff1a; LOOKUP(1,0/(3:3<>""),3:3)示例程序 列最后一个数据&a…...

扫描条形码到电脑:Barcode to pc 4.6.3 Crack

像专业人士一样使用条形码将条形码发送到 PC 排名第一的智能手机扫描应用程序 将条形码即时发送到计算机程序并自动执行任务的最简单方法 受到全球 500,000 多名用户的信赖 条形码到 PC&#xff1a;Wi-Fi 扫描仪应用程序&#xff0c;条码到 PC&#xff1a;适用于 Android 和 i…...

从0到0.01入门 Webpack| 003.精选 Webpack面试题

&#x1f90d; 前端开发工程师&#xff08;主业&#xff09;、技术博主&#xff08;副业&#xff09;、已过CET6 &#x1f368; 阿珊和她的猫_CSDN个人主页 &#x1f560; 牛客高级专题作者、在牛客打造高质量专栏《前端面试必备》 &#x1f35a; 蓝桥云课签约作者、已在蓝桥云…...

[数据结构]-红黑树

前言 作者&#xff1a;小蜗牛向前冲 名言&#xff1a;我可以接受失败&#xff0c;但我不能接受放弃 如果觉的博主的文章还不错的话&#xff0c;还请点赞&#xff0c;收藏&#xff0c;关注&#x1f440;支持博主。如果发现有问题的地方欢迎❀大家在评论区指正 目录 一、红黑树的…...

Android 13.0 Launcher3 app列表页桌面图标按安装时间排序

1.概述 在13.0的系统rom定制化开发中,在对Launcher3进行功能开发时,系统默认的app列表页排序是安装app名称进行排序的, 由于功能的需要要求按照app安装时间进行排序,这就需要找到相关的排序地方,进行排序方式的修改就能完成这个功能 2.Launcher3 app列表页桌面图标按安装…...

QFont如何设置斜体|QlineEdit设置只能输入数字|QThread::finished信号发出后worker未调用析构函数

QFont如何设置斜体 要设置 QFont 的斜体,你可以使用 setItalic() 方法。以下是一个示例代码: #include <QApplication> #include <QLabel> #include <QFont> int main(int argc, char *argv...

中伟视界:创新解决方案,搭建自适应的AI算法模型训练平台

搭建AI算法模型自训练平台是当今人工智能领域的热门话题&#xff0c;但是其中存在着许多技术难点需要克服。 自训练平台需要具备高效的算法模型&#xff0c;这就要求能够处理庞大的数据量并进行高速计算。 平台需要具备强大的数据管理及存储能力&#xff0c;以满足训练过程中的…...

UML建模图文详解教程08——部署图

版权声明 本文原创作者&#xff1a;谷哥的小弟作者博客地址&#xff1a;http://blog.csdn.net/lfdfhl本文参考资料&#xff1a;《UML面向对象分析、建模与设计&#xff08;第2版&#xff09;》吕云翔&#xff0c;赵天宇 著 部署图概述 部署图(deployment diagram)也被译作配置…...

发布鸿蒙的第一个java应用

1.下载和安装华为自己的app开发软件DevEco Studio HUAWEI DevEco Studio和SDK下载和升级 | HarmonyOS开发者 2.打开IDE新建工程&#xff08;当前用的IDEA 3.1.1 Release&#xff09; 选择第一个&#xff0c;其他的默认只能用(API9)版本&#xff0c;搞了半天才发现8&#xff…...

【C++干货铺】优先队列 | 仿函数

个人主页点击直达&#xff1a;小白不是程序媛 C系列专栏&#xff1a;C干货铺 代码仓库&#xff1a;Gitee 目录 优先队列&#xff08;priority_queue &#xff09;的介绍和使用 priority_queue的介绍 priority_queue的使用 大堆 小堆 priority_queue的模拟实现 仿…...

突破技术障碍:软件工程师如何应对项目中的难题?

在软件开发项目中&#xff0c;工程师常常会遇到各种技术难题。这些难题可能涉及到复杂的算法、不兼容的系统、难以预见的软件行为&#xff0c;或者其他许多方面。 以下是一些策略和方法&#xff0c;可以帮助软件工程师有效地应对这些挑战&#xff1a; 1、理解问题&#xff1a;…...

Linux(7):Vim 程序编辑器

vi 基本上 vi 共分为三种模式&#xff0c;分别是【一般指令模式】、【编辑模式】与【指令列命令模式】。 这三种模式的作用分别是&#xff1a; 一般指令模式(command mode) 以 vi 打开一个文件就直接进入一般指令模式了(这是默认的模式&#xff0c;也简称为一般模式)。在这个模…...

windows搭建gitlab教程

1.安装gitlab 说明&#xff1a;由于公司都是windows服务器&#xff0c;这里安装以windows为例&#xff0c;先安装一个虚拟机&#xff0c;然后安装一个docker&#xff08;前提条件&#xff09; 1.1搜索镜像 docker search gitlab #搜索所有的docker search gitlab-ce-zh #搜索…...

力扣:单调栈算法思路题

单调栈分为单调递增栈和单调递减栈&#xff0c;通过使用单调栈我们可以访问到最近一个比它大&#xff08;小&#xff09;的元素。 &#x1f34a; 单调递增栈&#xff1a;单调递增栈就是从栈底到栈顶数据是依次递增&#xff0c;通常是寻找某方向第一个比它小的元素。 &#x1f…...

Prompt Tuning、P-Tuning、Prefix Tuning的区别

一、Prompt Tuning、P-Tuning、Prefix Tuning的区别 1. Prompt Tuning(提示调优) 核心思想:固定预训练模型参数,仅学习额外的连续提示向量(通常是嵌入层的一部分)。实现方式:在输入文本前添加可训练的连续向量(软提示),模型只更新这些提示参数。优势:参数量少(仅提…...

反向工程与模型迁移:打造未来商品详情API的可持续创新体系

在电商行业蓬勃发展的当下&#xff0c;商品详情API作为连接电商平台与开发者、商家及用户的关键纽带&#xff0c;其重要性日益凸显。传统商品详情API主要聚焦于商品基本信息&#xff08;如名称、价格、库存等&#xff09;的获取与展示&#xff0c;已难以满足市场对个性化、智能…...

循环冗余码校验CRC码 算法步骤+详细实例计算

通信过程&#xff1a;&#xff08;白话解释&#xff09; 我们将原始待发送的消息称为 M M M&#xff0c;依据发送接收消息双方约定的生成多项式 G ( x ) G(x) G(x)&#xff08;意思就是 G &#xff08; x ) G&#xff08;x) G&#xff08;x) 是已知的&#xff09;&#xff0…...

《Playwright:微软的自动化测试工具详解》

Playwright 简介:声明内容来自网络&#xff0c;将内容拼接整理出来的文档 Playwright 是微软开发的自动化测试工具&#xff0c;支持 Chrome、Firefox、Safari 等主流浏览器&#xff0c;提供多语言 API&#xff08;Python、JavaScript、Java、.NET&#xff09;。它的特点包括&a…...

UE5 学习系列(三)创建和移动物体

这篇博客是该系列的第三篇&#xff0c;是在之前两篇博客的基础上展开&#xff0c;主要介绍如何在操作界面中创建和拖动物体&#xff0c;这篇博客跟随的视频链接如下&#xff1a; B 站视频&#xff1a;s03-创建和移动物体 如果你不打算开之前的博客并且对UE5 比较熟的话按照以…...

【第二十一章 SDIO接口(SDIO)】

第二十一章 SDIO接口 目录 第二十一章 SDIO接口(SDIO) 1 SDIO 主要功能 2 SDIO 总线拓扑 3 SDIO 功能描述 3.1 SDIO 适配器 3.2 SDIOAHB 接口 4 卡功能描述 4.1 卡识别模式 4.2 卡复位 4.3 操作电压范围确认 4.4 卡识别过程 4.5 写数据块 4.6 读数据块 4.7 数据流…...

汽车生产虚拟实训中的技能提升与生产优化​

在制造业蓬勃发展的大背景下&#xff0c;虚拟教学实训宛如一颗璀璨的新星&#xff0c;正发挥着不可或缺且日益凸显的关键作用&#xff0c;源源不断地为企业的稳健前行与创新发展注入磅礴强大的动力。就以汽车制造企业这一极具代表性的行业主体为例&#xff0c;汽车生产线上各类…...

基于数字孪生的水厂可视化平台建设:架构与实践

分享大纲&#xff1a; 1、数字孪生水厂可视化平台建设背景 2、数字孪生水厂可视化平台建设架构 3、数字孪生水厂可视化平台建设成效 近几年&#xff0c;数字孪生水厂的建设开展的如火如荼。作为提升水厂管理效率、优化资源的调度手段&#xff0c;基于数字孪生的水厂可视化平台的…...

P3 QT项目----记事本(3.8)

3.8 记事本项目总结 项目源码 1.main.cpp #include "widget.h" #include <QApplication> int main(int argc, char *argv[]) {QApplication a(argc, argv);Widget w;w.show();return a.exec(); } 2.widget.cpp #include "widget.h" #include &q…...

3403. 从盒子中找出字典序最大的字符串 I

3403. 从盒子中找出字典序最大的字符串 I 题目链接&#xff1a;3403. 从盒子中找出字典序最大的字符串 I 代码如下&#xff1a; class Solution { public:string answerString(string word, int numFriends) {if (numFriends 1) {return word;}string res;for (int i 0;i &…...