C#数字图像处理(三)---待完善

article/2025/7/3 23:27:21

文章目录

  • 前言
  • 1.图像平移
    • 1.1 图像平移定义
    • 1.2 图像平移编程实例
  • 2.图像镜像
    • 2.1 图像镜像定义
    • 2.2 图像镜像编程实例
  • 3.图像缩放
    • 3.1 图像缩放定义
    • 3.2 灰度插值法
    • 3.3 图像缩放编程实例
  • 4.图像旋转
    • 4.1 图像旋转定义
    • 4.2 图像旋转编程实例

前言

  在某种意义上来说,图像的几何运算是与点运算相对立的。它改变了像素之间的空间位置和空间关系,但它没有改变灰度等级值。几何运算需要两个独立的算法:空间变换灰度值插值
  在本章所介绍的几何运算中,应用空间变换算法对图像进行平移、镜像处理,应用空间变换和灰度值插值算法对图像进行缩放和旋转处理。
  需要说明的是,在这里,以图像的几何中心作为坐标原点,x轴由左向右递增,y轴由上至下递增。
  因此,在进行图像旋转时,是以图像的几何中心为基准进行旋转的:在进行图像缩放时,也是以图像的几何中心为基准,其上下左右均等地向内收缩或向外扩大的。这种坐标转换会使图像变换更自然。另外,在进行几何运算的时候,保持原图像的尺寸大小不变,如果变换后的图像超出该尺寸,超出部分会被截断,而不足部分会以白色像素填充。

1.图像平移

1.1 图像平移定义

在这里插入图片描述

1.2 图像平移编程实例

  该实例通过设置横向和纵向的平移量,实现了图像的平移。
在这里插入图片描述
  分别为该窗体内的2个Button控件添加Click事件,为了和主窗体之间传递数据,再添加2个get属性访问器,代码如下:

  public partial class translation : Form{public translation(){InitializeComponent();}private void start_Click(object sender, EventArgs e){this.DialogResult = DialogResult.OK;}private void close_Click(object sender, EventArgs e){this.Close();}public string GetXOffset{get{//横向平移量return xOffset.Text;}}public string GetYOffset{get{//纵向平移量return yOffset.Text;}}}

  回到主窗体,为“图像平移”按钮添加Click事件,代码如下:

 /// <summary>/// 图像平移/// </summary>private void translation_Click(object sender, EventArgs e){if (curBitmap!=null){translation traForm = new translation();if (traForm.ShowDialog()==DialogResult.OK){Rectangle rect = new Rectangle(0, 0, curBitmap.Width, curBitmap.Height);BitmapData bmpData = curBitmap.LockBits(rect, ImageLockMode.ReadWrite, curBitmap.PixelFormat);IntPtr ptr = bmpData.Scan0;int bytes = bmpData.Stride * bmpData.Height;byte[] grayValues = new byte[bytes];Marshal.Copy(ptr, grayValues, 0, bytes);//得到两个方向的图像平移量int x = Convert.ToInt32(traForm.GetXOFFset);int y = Convert.ToInt32(traForm.GetYOffset);byte[] tempArray = new byte[bytes];//临时初始化为白色(255)像素for (int i = 0; i < bytes; i++){tempArray[i] = 255;}for (int j = 0; j < curBitmap.Height; j++){//保证纵向平移不出界if ((j + y) < curBitmap.Height && (j + y) > 0){for (int i = 0; i < curBitmap.Width * 3; i += 3){if ((i + x * 3) < curBitmap.Width * 3 && (i + x * 3) > 0){//保证横向平移不出界tempArray[(i + x * 3) + 0 + (j + y) * bmpData.Stride] = grayValues[i + 0 + j * bmpData.Stride];tempArray[i + x * 3 + 1 + (j + y) * bmpData.Stride] = grayValues[i + 1 + j * bmpData.Stride];tempArray[i + x * 3 + 2 + (j + y) * bmpData.Stride] = grayValues[i + 2 + j * bmpData.Stride];}}}}//数组复制,返回平移图像grayValues = (byte[])tempArray.Clone();Marshal.Copy(grayValues, 0, ptr, bytes);curBitmap.UnlockBits(bmpData);}Invalidate();}

  要注意像素格式PixelFormat,如24位灰度图像是1440万色,但是我们书上给的算法是对8为进行处理,可以采用分割的思想将24位拆开成3个8位,由这三个8为所保存的数据组合为24位,在处理的时候就将他们分开处理但是要整体观看。

在这里插入图片描述

2.图像镜像

2.1 图像镜像定义

  镜像是一个物体相对于一个镜面的复制品。图像镜像分为水平镜像垂直镜像两种。
  水平镜像就是将图像左半部分和右半部分以图像垂直中轴线为中心镜像进行对换;
   垂直镜像就是将图像上半部分和下半部分以图像水平中轴线为中心镜像进行对换。
在这里插入图片描述

2.2 图像镜像编程实例

该实例实现了图像的水平镜像和垂直镜像。
在这里插入图片描述
  分别为该窗体内的2个Button控件添加Click事件,并再添加1个get属性访问器,代码如下:

    private void startMirror_Click(object sender, EventArgs e){this.DialogResult = DialogResult.OK;}private void close_Click(object sender, EventArgs e){this.Close();}public bool GetMirror{get{return horMirror.Checked;}}
}

  回到主窗体,为“图像镜像”按钮添加Click事件,代码如下:

private void mirror_Click(object sender, EventArgs e){if (curBitmap!=null){mirror mirForm = new mirror();if (mirForm.ShowDialog()==DialogResult.OK){Rectangle rect = new Rectangle(0, 0, curBitmap.Width, curBitmap.Height);BitmapData bmpData = curBitmap.LockBits(rect, ImageLockMode.ReadWrite, curBitmap.PixelFormat);IntPtr ptr = bmpData.Scan0;int bytes = 0;判断是灰度色图像还是彩色图像,给相应的大小if (curBitmap.PixelFormat==PixelFormat.Format8bppIndexed){bytes= curBitmap.Width * curBitmap.Height;}else if (curBitmap.PixelFormat == PixelFormat.Format24bppRgb){bytes = curBitmap.Width * curBitmap.Height * 3;}byte[] pixelValues = new byte[bytes];Marshal.Copy(ptr, pixelValues, 0, bytes);//水平中轴int halfWidth = curBitmap.Width / 2;//垂直中轴int halfHeight = curBitmap.Height / 2;byte temp;byte temp1;byte temp2;byte temp3;if (curBitmap.PixelFormat == PixelFormat.Format8bppIndexed){if (mirForm.GetMirror){for (int i = 0; i < curBitmap.Height; i++)for (int j = 0; j < halfWidth; j++){temp = pixelValues[i * curBitmap.Width + j];pixelValues[i * curBitmap.Width + j] = pixelValues[(i + 1) * curBitmap.Width - j - 1];pixelValues[(i + 1) * curBitmap.Width - j - 1] = temp;}}else{for (int j = 0; j < curBitmap.Width; j++){for (int i = 0; i < halfHeight; i++){temp = pixelValues[i * curBitmap.Width + j];pixelValues[i * curBitmap.Width + j] = pixelValues[(curBitmap.Height - i - 1) * curBitmap.Width + j];pixelValues[(curBitmap.Height - i - 1) * curBitmap.Width + j] = temp;}}}}else if (curBitmap.PixelFormat == PixelFormat.Format24bppRgb){if (mirForm.GetMirror){//水平镜像处理  for (int i = 0; i < curBitmap.Height; i++){//每个像素的三个字节在水平镜像时顺序不能变,所以这个方法不能用//for (int j = 0; j < halfWidth; j++)//{//    //以水平中轴线为对称轴,两边像素值交换  //    temp = pixelValues[i * curBitmap.Width * 3 + j * 3];//    pixelValues[i * curBitmap.Width * 3 + j * 3] = pixelValues[(i + 1) * curBitmap.Width * 3 - 1 - j * 3];//    pixelValues[(i + 1) * curBitmap.Width * 3 - 1 - j * 3] = temp;//}for (int j = 0; j < halfWidth; j++){//每三个字节组成一个像素,顺序不能乱temp = pixelValues[0 + i * curBitmap.Width * 3 + j * 3];temp1 = pixelValues[1 + i * curBitmap.Width * 3 + j * 3];temp2 = pixelValues[2 + i * curBitmap.Width * 3 + j * 3];pixelValues[0 + i * curBitmap.Width * 3 + j * 3] = pixelValues[0 + (i + 1) * curBitmap.Width * 3 - (j + 1) * 3];pixelValues[1 + i * curBitmap.Width * 3 + j * 3] = pixelValues[1 + (i + 1) * curBitmap.Width * 3 - (j + 1) * 3];pixelValues[2 + i * curBitmap.Width * 3 + j * 3] = pixelValues[2 + (i + 1) * curBitmap.Width * 3 - (j + 1) * 3];pixelValues[0 + (i + 1) * curBitmap.Width * 3 - (j + 1) * 3] = temp;pixelValues[1 + (i + 1) * curBitmap.Width * 3 - (j + 1) * 3] = temp1;pixelValues[2 + (i + 1) * curBitmap.Width * 3 - (j + 1) * 3] = temp2;}}}else{//垂直镜像处理  for (int i = 0; i < curBitmap.Width * 3; i++){for (int j = 0; j < halfHeight; j++){//以垂直中轴线为对称轴。两边像素值互换  temp = pixelValues[j * curBitmap.Width * 3 + i];pixelValues[j * curBitmap.Width * 3 + i] = pixelValues[(curBitmap.Height - j - 1) * curBitmap.Width * 3 + i];pixelValues[(curBitmap.Height - j - 1) * curBitmap.Width * 3 + i] = temp;}}}}Marshal.Copy(pixelValues, 0, ptr, bytes);curBitmap.UnlockBits(bmpData);}Invalidate();}}
原图

在这里插入图片描述

水平镜像

在这里插入图片描述

垂直镜像

在这里插入图片描述

3.图像缩放

  在图像缩放运算和图像旋转运算中,要用到灰度插值算法,因此这里给出灰度插值的两种算法。

3.1 图像缩放定义

在这里插入图片描述

3.2 灰度插值法

  应用公式(4.5)所产生的图像中的像素有可能在原图像中找不到相应的像素点,因为数字图像中的坐标总是整数。这样就必须进行近似处理。一般是应用灰度插值法。它包括最近邻插值双线性插值
  最近邻插值也称零阶插值,是最简单的插值方法。其做法是令输出像素的灰度值等于离它所映射到的位置最近的输入像素的灰度值。该插值计算虽然十分简单,但它会带来锯齿形的边,图像中也会出现孔洞和重叠。
  双线性插值也称一阶插值,该方法是求到相邻的4个方格上点的距离之比,用这个比率和4个邻点像素的灰度值进行灰度插值,具体方法如下。
在这里插入图片描述
  双线性插值法计算量大,但缩放后图像质量高,不会出现像素值不连续的情况。由于双线性插值具有低通滤波器的性质,使高频分量受损,所以可能会使图像轮廓在一定程度上变得模糊。

3.3 图像缩放编程实例

  该实例应用最近邻插值法和双线性插值法实现图像的缩放。
  在主窗体内添加1个Button控件,其属性修改如表4.5所示。
在这里插入图片描述
   创建1个名为zoom 的 Windows窗体,该窗体用于选择缩放量及用何种灰度插值法。为该窗体添加2个Button控件、1个GroupBox控件、2个RadioButton 控件、2个Label 控件和2个TextBox控件,其属性修改如表4.6所示。
在这里插入图片描述
  分别为该窗体内的2个Button控件添加Click事件,并再添加3个get属性访问器,代码如下:

   private void startZoom_Click(object sender, EventArgs e){if (xZoom.Text == "0" || yZoom.Text == "0"){MessageBox.Show("缩放量不能为0!\n请重新正确填写。", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}else{this.DialogResult = DialogResult.OK;}}private void close_Click(object sender, EventArgs e){this.Close();}public bool GetNearOrBil{get{//判断是最近邻插值法还是双线性插值法return nearestNeigh.Checked;}}public string GetXZoom{get{//得到横向缩放量return xZoom.Text;}}public string GetYZoom{get{//得到纵向缩放量return yZoom.Text;}}

  回到主窗体,为“图像缩放”按钮控件添加Click事件代码,代码如下:

   private void zoom_Click(object sender, EventArgs e){if (curBitmap != null){zoom zoomForm = new zoom();if (zoomForm.ShowDialog() == DialogResult.OK){Rectangle rect = new Rectangle(0, 0, curBitmap.Width, curBitmap.Height);System.Drawing.Imaging.BitmapData bmpData = curBitmap.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadWrite, curBitmap.PixelFormat);IntPtr ptr = bmpData.Scan0;int bytes = curBitmap.Width * curBitmap.Height;byte[] grayValues = new byte[bytes];System.Runtime.InteropServices.Marshal.Copy(ptr, grayValues, 0, bytes);double x = Convert.ToDouble(zoomForm.GetXZoom);double y = Convert.ToDouble(zoomForm.GetYZoom);int halfWidth = (int)(curBitmap.Width / 2);int halfHeight = (int)(curBitmap.Height / 2);int xz = 0;int yz = 0;int tempWidth = 0;int tempHeight = 0;byte[] tempArray = new byte[bytes];if (zoomForm.GetNearOrBil == true){for (int i = 0; i < curBitmap.Height; i++){for (int j = 0; j < curBitmap.Width; j++){tempHeight = i - halfHeight;tempWidth = j - halfWidth;if (tempWidth > 0){xz = (int)(tempWidth / x + 0.5);}else{xz = (int)(tempWidth / x - 0.5);}if (tempHeight > 0){yz = (int)(tempHeight / y + 0.5);}else{yz = (int)(tempHeight / y - 0.5);}tempWidth = xz + halfWidth;tempHeight = yz + halfHeight;if (tempWidth < 0 || tempWidth >= curBitmap.Width || tempHeight < 0 || tempHeight >= curBitmap.Height){tempArray[i * curBitmap.Width + j] = 255;}else{tempArray[i * curBitmap.Width + j] = grayValues[tempHeight * curBitmap.Width + tempWidth];}}}}else{double tempX, tempY, p, q;for (int i = 0; i < curBitmap.Height; i++){for (int j = 0; j < curBitmap.Width; j++){tempHeight = i - halfHeight;tempWidth = j - halfWidth;tempX = tempWidth / x;tempY = tempHeight / y;if (tempWidth > 0){xz = (int)tempX;}else{xz = (int)(tempX - 1);}if (tempHeight > 0){yz = (int)tempY;}else{yz = (int)(tempY - 1);}p = tempX - xz;q = tempY - yz;tempWidth = xz + halfWidth;tempHeight = yz + halfHeight;if (tempWidth < 0 || (tempWidth + 1) >= curBitmap.Width || tempHeight < 0 || (tempHeight + 1) >= curBitmap.Height){tempArray[i * curBitmap.Width + j] = 255;}else{tempArray[i * curBitmap.Width + j] = (byte)((1.0 - q) * ((1.0 - p) * grayValues[tempHeight * curBitmap.Width + tempWidth] + p * grayValues[tempHeight * curBitmap.Width + tempWidth + 1]) + q * ((1.0 - p) * grayValues[(tempHeight + 1) * curBitmap.Width + tempWidth] + p * grayValues[(tempHeight + 1) * curBitmap.Width + 1 + tempWidth]));}}}}grayValues = (byte[])tempArray.Clone();System.Runtime.InteropServices.Marshal.Copy(grayValues, 0, ptr, bytes);curBitmap.UnlockBits(bmpData);}Invalidate();}}

在这里插入图片描述
在这里插入图片描述

最近邻插值放大5倍

在这里插入图片描述

双线性插值放大5倍

在这里插入图片描述

4.图像旋转

4.1 图像旋转定义

在这里插入图片描述
  同理,旋转后得到的图像像素也有可能在原图像中找不到相应的像素点,因此旋转处理也要用到插值法。由于双线性插值法在图像处理性能上要好过最近邻插值,因此,我们只应用双线性插值这一种方法对图像进行旋转处理。

4.2 图像旋转编程实例

  该实例实现了任意角度的图像旋转。
  1).在主窗体内添加1个Button 控件,其属性修改如表4.7所示。
在这里插入图片描述
  2).创建1个名为rotation的 Windows窗体,该窗体用于选择旋转的角度。为该窗体添加2个Button控件、1个Label控件和1个TextBox控件,其属性修改如表4.8所示。
在这里插入图片描述
在这里插入图片描述
  分别为该窗体内的2个Button控件添加Cick事件,并再添加1个get属性访问器,代码如下:

  private void startRot_Click(object sender, EventArgs e){this.DialogResult = DialogResult.OK;}private void close_Click(object sender, EventArgs e){this.Close();}public string GetDegree{get{//得到所要旋转的角度return degree.Text;}}

  回到主窗体,为“图像旋转”按钮控件添加Click事件,代码如下:

  private void rotation_Click(object sender, EventArgs e){if (curBitmap != null){rotation rotForm = new rotation();if (rotForm.ShowDialog() == DialogResult.OK){Rectangle rect = new Rectangle(0, 0, curBitmap.Width, curBitmap.Height);System.Drawing.Imaging.BitmapData bmpData = curBitmap.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadWrite, curBitmap.PixelFormat);IntPtr ptr = bmpData.Scan0;int bytes = curBitmap.Width * curBitmap.Height;byte[] grayValues = new byte[bytes];System.Runtime.InteropServices.Marshal.Copy(ptr, grayValues, 0, bytes);int degree = Convert.ToInt32(rotForm.GetDegree);double radian = degree * Math.PI / 180.0;double mySin = Math.Sin(radian);double myCos = Math.Cos(radian);int halfWidth = (int)(curBitmap.Width / 2);int halfHeight = (int)(curBitmap.Height / 2);int xr = 0;int yr = 0;int tempWidth = 0;int tempHeight = 0;byte[] tempArray = new byte[bytes];double tempX, tempY, p, q;for (int i = 0; i < curBitmap.Height; i++){for (int j = 0; j < curBitmap.Width; j++){tempHeight = i - halfHeight;tempWidth = j - halfWidth;tempX = tempWidth * myCos - tempHeight * mySin;tempY = tempHeight * myCos + tempWidth * mySin;if (tempWidth > 0){xr = (int)tempX;}else{xr = (int)(tempX - 1);}if (tempHeight > 0){yr = (int)tempY;}else{yr = (int)(tempY - 1);}p = tempX - xr;q = tempY - yr;tempWidth = xr + halfWidth;tempHeight = yr + halfHeight;if (tempWidth < 0 || (tempWidth + 1) >= curBitmap.Width || tempHeight < 0 || (tempHeight + 1) >= curBitmap.Height){tempArray[i * curBitmap.Width + j] = 255;}else{tempArray[i * curBitmap.Width + j] = (byte)((1.0 - q) * ((1.0 - p) * grayValues[tempHeight * curBitmap.Width + tempWidth] + p * grayValues[tempHeight * curBitmap.Width + tempWidth + 1]) +q * ((1.0 - p) * grayValues[(tempHeight + 1) * curBitmap.Width + tempWidth] + p * grayValues[(tempHeight + 1) * curBitmap.Width + 1 + tempWidth]));}}}grayValues = (byte[])tempArray.Clone();System.Runtime.InteropServices.Marshal.Copy(grayValues, 0, ptr, bytes);curBitmap.UnlockBits(bmpData);}Invalidate();}}

在这里插入图片描述
在这里插入图片描述


http://www.hkcw.cn/article/dQqiIIyJUF.shtml

相关文章

webfuture:提示“Strict-Transport-Security头未设置”漏洞的解决方法

问题描述&#xff1a; Web 服务器对于 HTTP 请求的响应头中缺少 Strict-Transport-Security&#xff0c;这将导致浏览器提供的安全特性失效。 当 Web 服务器的 HTTP 头中包含 Strict-Transport-Security 头时&#xff0c;浏览器将持续使用 HTTPS 来访问 Web 站点&#xff0c;可…

激光雷达的强度像和距离像误差与噪声分析(2)2025.6.2

激光雷达强度像与距离像的误差、噪声及主要影响因素分析 一、距离像误差来源及影响因素 1. 系统误差 激光特性&#xff1a; 波长选择&#xff1a;如905nm/1550nm激光在大气中的散射差异&#xff0c;短波长易受雾霾影响&#xff0c;导致能量衰减。功率不足&#xff1a;远距离…

Artificial Analysis2025年Q1人工智能发展六大趋势总结

2025年第一季度人工智能发展六大趋势总结 ——基于《Artificial Analysis 2025年Q1人工智能报告》 趋势一&#xff1a;AI持续进步&#xff0c;竞争格局白热化 前沿模型竞争加剧&#xff1a;OpenAI凭借“o4-mini&#xff08;高智能版&#xff09;”保持领先&#xff0c;但谷歌&…

2024年数维杯国际大学生数学建模挑战赛D题城市弹性与可持续发展能力评价解题全过程论文及程序

2024年数维杯国际大学生数学建模挑战赛 D题 城市弹性与可持续发展能力评价 原题再现&#xff1a; 中国人口老龄化趋势的加剧和2022年首次出现人口负增长&#xff0c;表明未来一段较长时期内我国人口将呈现下降趋势。这一趋势必将影响许多城市的高质量和可持续发展&#xff0c…

第18讲、Odoo接口开发详解:原理、类型与实践

1. 引言 Odoo作为一个功能强大的开源ERP和业务应用套件&#xff0c;其开放性和可扩展性是核心优势之一。接口&#xff08;API&#xff09;开发在Odoo生态中扮演着至关重要的角色&#xff0c;它使得Odoo能够与外部系统、第三方应用、移动端以及Web前端进行数据交换和功能集成。…

react实现markdown文件预览

文章目录 react实现markdown文件预览1、实现md文件预览2、解决图片不显示3、实现效果 react实现markdown文件预览 1、实现md文件预览 1️⃣第一步&#xff1a;安装依赖&#xff1a; npm install react-markdown remark-gfmreact-markdown&#xff1a;将 Markdown 渲染为 Rea…

AI大数据模型如何与thingsboard物联网结合

一、 AI大数据与ThingsBoard物联网的结合可以从以下几个方面实现&#xff1a; 1. 数据采集与集成 设备接入&#xff1a;ThingsBoard支持多种通信协议&#xff08;如MQTT、CoAP、HTTP、Modbus、OPC-UA等&#xff09;&#xff0c;可以方便地接入各种物联网设备。通过这些协议&am…

一张图,生成一个网站!

大家好&#xff01;我是羊仔&#xff0c;专注AI工具、智能体、编程。 最近羊仔在网上冲浪的时候&#xff0c;又发现一个超级有意思的AI工具&#xff0c;简直是效率神器&#xff01; 今天要跟大家聊聊的&#xff0c;就是这个最近在GitHub上爆火的开源项目—— LlamaCoder&#…

ToolsSet之:数值提取及批处理

ToolsSet是微软商店中的一款包含数十种实用工具数百种细分功能的工具集合应用&#xff0c;应用基本功能介绍可以查看以下文章&#xff1a; Windows应用ToolsSet介绍https://blog.csdn.net/BinField/article/details/145898264 ToolsSet中Number菜单下的Numeric Batch是一个数…

会计科目主数据:企业数字化转型的“数据总线“与财务核算基石

在数字化浪潮席卷全球的今天&#xff0c;企业数据管理面临前所未有的挑战与机遇。作为财务管理的核心要素&#xff0c;会计科目不仅是ERP系统的基础架构&#xff0c;更是连接企业各业务系统的"数据总线"。本文将深入解析会计科目作为主数据的本质特征、跨系统应用模式…

微服务-Sentinel

目录 背景 Sentinel使用 Sentinel控制台 Sentinel控制规则 Sentinel整合OpenFeign 背景 在微服务项目架构中&#xff0c;存在多个服务相互调用场景&#xff0c;在某些情况下某个微服务不可用时&#xff0c;上游调用者若一直等待&#xff0c;会产生资源的消耗&#xff0c;极端情…

机器学习知识图谱——逻辑回归算法(Logistic Regression)

目录 一、图解逻辑回归 (Logistic Regression)算法知识图谱 二、什么是逻辑回归? 三、应用场景 四、算法核心思想 五、数学表达式公式 六、分类规则 七、损失函数(Log Loss) 八、优点 与 缺点 九、与线性回归的区别 十、Python 简易代码示例 机器学习知识图谱——…

【机器学习基础】机器学习入门核心算法:Mini-Batch K-Means算法

机器学习入门核心算法&#xff1a;Mini-Batch K-Means算法 一、算法逻辑工作流程与传统K-Means对比 二、算法原理与数学推导1. 目标函数2. Mini-Batch更新规则3. 学习率衰减机制4. 伪代码 三、模型评估1. 内部评估指标2. 收敛性判断3. 超参数调优 四、应用案例1. 图像处理 - 颜…

前端框架Vue

vue基础知识点 首先介绍用 HTML 写结构 script 里写 Vue&#xff0c;不需要环境 1.差值表达式{{ }} <!DOCTYPE html> <html> <head><meta charset"UTF-8"><title>Hello Vue</title><script src"https://cdn.jsdeliv…

ESP32系列AT固件快速开发——Wi-Fi MQTT

目录 【烧录固件时硬件接线】 【烧录固件】 【AT指令WiFi部分】 设置 Wi-Fi 模式 (Station/SoftAP/StationSoftAP) 查询 Wi-Fi 状态和 Wi-Fi 信息 【AT指令MQTT部分】 Demo:已验证的Wi-Fi连接MQTT连接、发布与订阅 设置MQTT用户属性 设置MQTT连接属性&#xff08;测试…

重温经典算法——并归排序

版权声明 本文原创作者&#xff1a;谷哥的小弟作者博客地址&#xff1a;http://blog.csdn.net/lfdfhl 基本原理 归并排序基于分治思想&#xff0c;递归地将数组拆分为两个子数组&#xff0c;分别排序后合并。时间复杂度为 O(n log n)&#xff0c;空间复杂度 O(n)&#xff08;…

05-power BI高级筛选器filter与Values人工造表

返回一个表&#xff0c;用于表示另一个表或表达的子集&#xff0c;不能够单独使用&#xff0c; fileter函数对筛选的表进行横向的逐行扫描&#xff0c;这样的函数也叫迭代函数 例&#xff1a;countrows(fileter(表筛选条件))filter的第一参数必须是唯一值得表&#xff0c; 如果…

贪心算法应用:欧拉路径(Fleury算法)详解

Java中的贪心算法应用&#xff1a;欧拉路径&#xff08;Fleury算法&#xff09;详解 一、欧拉路径与欧拉回路基础 1.1 基本概念 欧拉路径&#xff08;Eulerian Path&#xff09;是指在一个图中&#xff0c;经过图中每一条边且每一条边只经过一次的路径。如果这条路径的起点和…

【CF】Day73——Codeforces Round 887 (Div. 2) B (思维 + 模拟)

B. Fibonaccharsis 题目&#xff1a; 思路&#xff1a; 比C题有意思&#xff0c;但也么意思 对于这一题我们可以考虑最小的情况&#xff0c;即 f0 0&#xff0c;f1 1 时&#xff0c;然后看看什么时候会超过 n 的最大值&#xff0c;我们可以发现 k > 30 时就炸了&#xff…

工作流引擎-16-开源审批流项目之 整合Flowable官方的Rest包

工作流引擎系列 工作流引擎-00-流程引擎概览 工作流引擎-01-Activiti 是领先的轻量级、以 Java 为中心的开源 BPMN 引擎&#xff0c;支持现实世界的流程自动化需求 工作流引擎-02-BPM OA ERP 区别和联系 工作流引擎-03-聊一聊流程引擎 工作流引擎-04-流程引擎 activiti 优…