visionpro脚本

news2024/9/20 20:16:52

visionproToolBlock的脚本的优先级优于工具连线的优先级,一般是照着脚本的执行顺序进行执行对应的工具,最常用的是C#的高级脚本,C#的脚本如下分为5部分。

第一部分:主要是一些库的引用,对于有些类型不知道库的时候,可以通过查询帮助文档输入对应的名称,查询到具体信息,其中就包含他所在的库;

第二部分:主要是一些全局变量的声明,包括标签工具、一些数据类型的声明等等,这里还声明了一个ToolBlock工具,用于该Block的工具的定义、声明、获取Record等用途;

第三部分:主要对基类中的函数进行重写;

第四部分:主要对当前的Record进行操作;

第五部分:主要对整个ToolBlock中的工具运行完成之后的最终结果进行操作,主要包括了标签操作、循环运行时中间结果的保留并附着在最终结果上等。

本片文章主要是进行两个ToolBlock的实现,包含计算两个点之间的距离,寻找某个特征点的坐标。

ToolBlock1

ToolBlock1主要是进行三角形的一个顶点到正方形顶点的距离测量,检测效果如下:

对于该任务,首先需要对三角形进行特征匹配,特征匹配完成之后,根据特征匹配建立一个新的坐标系,该坐标系+之前所建立的坐标系可以完成该图旋转,放大和缩小后的对应特征检测,再根据在这两个坐标系下的定位,找到对应矩形的顶点,完成距离的检测,对应的工作流程如图所示:

该过程基本没有连线操作,主要是通过脚本实现对应的功能,脚本代码如下:

#region namespace imports
using System;
using System.Collections;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using Cognex.VisionPro;
using Cognex.VisionPro.ToolBlock;
using Cognex.VisionPro3D;
using Cognex.VisionPro.CalibFix;
using Cognex.VisionPro.PMAlign;
using Cognex.VisionPro.Caliper;
using Cognex.VisionPro.Dimensioning;
#endregion

public class CogToolBlockAdvancedScript : CogToolBlockAdvancedScriptBase
{
  #region Private Member Variables
  private Cognex.VisionPro.ToolBlock.CogToolBlock mToolBlock;
  CogGraphicLabel mylabel = new CogGraphicLabel();
  #endregion

  /// <summary>
  /// Called when the parent tool is run.
  /// Add code here to customize or replace the normal run behavior.
  /// </summary>
  /// <param name="message">Sets the Message in the tool's RunStatus.</param>
  /// <param name="result">Sets the Result in the tool's RunStatus</param>
  /// <returns>True if the tool should run normally,
  ///          False if GroupRun customizes run behavior</returns>
  public override bool GroupRun(ref string message, ref CogToolResultConstants result)
  {
    // To let the execution stop in this script when a debugger is attached, uncomment the following lines.
    // #if DEBUG
    // if (System.Diagnostics.Debugger.IsAttached) System.Diagnostics.Debugger.Break();
    // #endif


    // Run each tool using the RunTool function
    //foreach(ICogTool tool in mToolBlock.Tools)
    try
    {
      CogPMAlignTool cpmatool = mToolBlock.Tools["CogPMAlignTool1"] as CogPMAlignTool;
      cpmatool.InputImage = (CogImage8Grey) mToolBlock.Inputs["OutputImage"].Value;
      cpmatool.Run();
      if(cpmatool.Results.Count != 1)
      {
        mToolBlock.Outputs["strerr"].Value = "block1 cpmatool fail";
        return false;
      }
    
    
      CogFixtureTool cfixtool2 = mToolBlock.Tools["CogFixtureTool2"] as CogFixtureTool;
      cfixtool2.RunParams.UnfixturedFromFixturedTransform = cpmatool.Results[0].GetPose();
      cfixtool2.InputImage = cpmatool.InputImage;
      cfixtool2.Run();
      if(cfixtool2.InputImage == null)
      {
        mToolBlock.Outputs["strerr"].Value = "block1 cfixtool2 fail";
        return false;
      }
      //找点1
      CogFindLineTool cfindltool1 = mToolBlock.Tools["CogFindLineTool1"] as CogFindLineTool;
      cfindltool1.InputImage = (CogImage8Grey) cpmatool.InputImage;
      cfindltool1.Run();
      if(cfindltool1.RunStatus.Result != CogToolResultConstants.Accept)
      {
        mToolBlock.Outputs["strerr"].Value = "block1 cfindltool1 fail";
        return false;
      }
    
      CogFindLineTool cfindltool2 = mToolBlock.Tools["CogFindLineTool2"] as CogFindLineTool;
      cfindltool2.InputImage = (CogImage8Grey) cpmatool.InputImage;
      cfindltool2.Run();
      if(cfindltool2.RunStatus.Result != CogToolResultConstants.Accept)
      {
        mToolBlock.Outputs["strerr"].Value = "block1 cfindltool2 fail";
        return false;
      }
    
      CogIntersectLineLineTool cinterlinetool1 = mToolBlock.Tools["CogIntersectLineLineTool1"] as CogIntersectLineLineTool;
      cinterlinetool1.InputImage = (CogImage8Grey) cpmatool.InputImage;
      cinterlinetool1.LineA = cfindltool1.Results.GetLine();
      cinterlinetool1.LineB = cfindltool2.Results.GetLine();
      cinterlinetool1.Run();
      if(cinterlinetool1.RunStatus.Result != CogToolResultConstants.Accept)
      {
        mToolBlock.Outputs["strerr"].Value = "block1 cinterlinetool1 fail";
        return false;
      }

    
      //寻找点2
      CogFindLineTool cfindltool3 = mToolBlock.Tools["CogFindLineTool3"] as CogFindLineTool;
      cfindltool3.InputImage = (CogImage8Grey) cpmatool.InputImage;
      cfindltool3.Run();
      if(cfindltool3.RunStatus.Result != CogToolResultConstants.Accept)
      {
        mToolBlock.Outputs["strerr"].Value = "block1 cfindltool3 fail";
        return false;
      }
    
      CogFindLineTool cfindltool4 = mToolBlock.Tools["CogFindLineTool4"] as CogFindLineTool;
      cfindltool4.InputImage = (CogImage8Grey) cpmatool.InputImage;
      cfindltool4.Run();
      if(cfindltool4.RunStatus.Result != CogToolResultConstants.Accept)
      {
        mToolBlock.Outputs["strerr"].Value = "block1 cfindltool4 fail";
        return false;
      }
    
      CogIntersectLineLineTool cinterlinetool2 = mToolBlock.Tools["CogIntersectLineLineTool2"] as CogIntersectLineLineTool;
      cinterlinetool2.InputImage = (CogImage8Grey) cpmatool.InputImage;
      cinterlinetool2.LineA = cfindltool3.Results.GetLine();
      cinterlinetool2.LineB = cfindltool4.Results.GetLine();
      cinterlinetool2.Run();
      if(cinterlinetool2.RunStatus.Result != CogToolResultConstants.Accept)
      {
        mToolBlock.Outputs["strerr"].Value = "block1 cinterlinetool2 fail";
        return false;
      }
    
      //计算点与点之间的距离
      CogDistancePointPointTool cdistpptool = mToolBlock.Tools["CogDistancePointPointTool1"] as CogDistancePointPointTool;
      cdistpptool.InputImage = (CogImage8Grey) cpmatool.InputImage;
      cdistpptool.StartX = cinterlinetool1.X;
      cdistpptool.StartY = cinterlinetool1.Y;
      cdistpptool.EndX = cinterlinetool2.X;
      cdistpptool.EndY = cinterlinetool2.Y;
      cdistpptool.Run();
      if(cdistpptool.RunStatus.Result != CogToolResultConstants.Accept)
      {
        mToolBlock.Outputs["strerr"].Value = "block1 cdistpptool fail";
        return false;
      }
      mToolBlock.Outputs["strerr"].Value = "success";
      mToolBlock.Outputs["distance"].Value = cdistpptool.Distance;
      
      mylabel.SetXYText(50, 20, "宽度" + cdistpptool.Distance.ToString("F2"));
      mylabel.Color = CogColorConstants.Cyan;
      mylabel.Font = new Font("楷体", 15);
    }
    catch(Exception e)
    {
      mToolBlock.Outputs["strerr"].Value = "fail";
    
    }
    return false;
  }

  #region When the Current Run Record is Created
  /// <summary>
  /// Called when the current record may have changed and is being reconstructed
  /// </summary>
  /// <param name="currentRecord">
  /// The new currentRecord is available to be initialized or customized.</param>
  public override void ModifyCurrentRunRecord(Cognex.VisionPro.ICogRecord currentRecord)
  {
  }
  #endregion

  #region When the Last Run Record is Created
  /// <summary>
  /// Called when the last run record may have changed and is being reconstructed
  /// </summary>
  /// <param name="lastRecord">
  /// The new last run record is available to be initialized or customized.</param>
  public override void ModifyLastRunRecord(Cognex.VisionPro.ICogRecord lastRecord)
  {
    mToolBlock.AddGraphicToRunRecord(mylabel,lastRecord,"CogPMAlignTool1.InputImage"," ");
  }
  #endregion

  #region When the Script is Initialized
  /// <summary>
  /// Perform any initialization required by your script here
  /// </summary>
  /// <param name="host">The host tool</param>
  public override void Initialize(Cognex.VisionPro.ToolGroup.CogToolGroup host)
  {
    // DO NOT REMOVE - Call the base class implementation first - DO NOT REMOVE
    base.Initialize(host);


    // Store a local copy of the script host
    this.mToolBlock = ((Cognex.VisionPro.ToolBlock.CogToolBlock)(host));
  }
  #endregion

}

 对应工具的声明和他所有的成员均可以通过在外面的工具,添加终端中寻找,他所有的成员方法均在此地方能找到。

 ToolBlock2

ToolBlock2实现的主要功能是对三个字符‘R’的左下角进行定位,包含了特征匹配,找线,找交点等操作。结果如下图所示:

对于该任务首先需要特征匹配,匹配完成之后,找线,找交点,对于工具连线操作而言,是无法进行循环操作的,所以此时就必须使用脚本进行操作,才能将三个点均找出。工具和代码如下所示:

脚本代码如下所示:

#region namespace imports
using System;
using System.Collections;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using Cognex.VisionPro;
using Cognex.VisionPro.ToolBlock;
using Cognex.VisionPro3D;
using Cognex.VisionPro.CalibFix;
using Cognex.VisionPro.PMAlign;
using Cognex.VisionPro.Caliper;
using Cognex.VisionPro.Dimensioning;
using System.Collections.Generic;
#endregion

public class CogToolBlockAdvancedScript : CogToolBlockAdvancedScriptBase
{
  #region Private Member Variables
  private Cognex.VisionPro.ToolBlock.CogToolBlock mToolBlock;
  CogGraphicLabel mylabel = new CogGraphicLabel();
  private List<ICogRecord> records = new List<ICogRecord>();
  #endregion

  /// <summary>
  /// Called when the parent tool is run.
  /// Add code here to customize or replace the normal run behavior.
  /// </summary>
  /// <param name="message">Sets the Message in the tool's RunStatus.</param>
  /// <param name="result">Sets the Result in the tool's RunStatus</param>
  /// <returns>True if the tool should run normally,
  ///          False if GroupRun customizes run behavior</returns>
  public override bool GroupRun(ref string message, ref CogToolResultConstants result)
  {
    // To let the execution stop in this script when a debugger is attached, uncomment the following lines.
    // #if DEBUG
    // if (System.Diagnostics.Debugger.IsAttached) System.Diagnostics.Debugger.Break();
    // #endif
    mToolBlock.Outputs["strerr"].Value = "";
    string str = "";
    try
    {
      CogPMAlignTool cpmatool = mToolBlock.Tools["CogPMAlignTool1"] as CogPMAlignTool;
      cpmatool.InputImage = (ICogImage) mToolBlock.Inputs["InputImage"].Value;
      cpmatool.Run();
      if(cpmatool.Results.Count != 3)
      {
        mToolBlock.Outputs["strerr"].Value = "block2 cpmatool fail";
        return false;
      }
      records.Clear();
      for(int i = 0;i < cpmatool.Results.Count;i++)
      {
        CogFixtureTool cfixtool2 = mToolBlock.Tools["CogFixtureTool2"] as CogFixtureTool;
        cfixtool2.RunParams.UnfixturedFromFixturedTransform = cpmatool.Results[i].GetPose();
        cfixtool2.InputImage = cpmatool.InputImage;
        cfixtool2.Run();
        if(cfixtool2.InputImage == null)
        {
          mToolBlock.Outputs["strerr"].Value = "block2 cfixtool2 fail";
          return false;
        }
    
        CogFindLineTool cfindltool1 = mToolBlock.Tools["CogFindLineTool1"] as CogFindLineTool;
        cfindltool1.InputImage = (CogImage8Grey) cpmatool.InputImage;
        cfindltool1.Run();
        if(cfindltool1.RunStatus.Result != CogToolResultConstants.Accept)
        {
          mToolBlock.Outputs["strerr"].Value = "block2 cfindltool1 fail";
          return false;
        }
    
        CogFindLineTool cfindltool2 = mToolBlock.Tools["CogFindLineTool2"] as CogFindLineTool;
        cfindltool2.InputImage = (CogImage8Grey) cpmatool.InputImage;
        cfindltool2.Run();
        if(cfindltool2.RunStatus.Result != CogToolResultConstants.Accept)
        {
          mToolBlock.Outputs["strerr"].Value = "block2 cfindltool2 fail";
          return false;
        }
    
        CogIntersectLineLineTool cinterlinetool1 = mToolBlock.Tools["CogIntersectLineLineTool1"] as CogIntersectLineLineTool;
        cinterlinetool1.InputImage = cpmatool.InputImage;
        cinterlinetool1.LineA = cfindltool1.Results.GetLine();
        cinterlinetool1.LineB = cfindltool2.Results.GetLine();
        cinterlinetool1.Run();
        if(cinterlinetool1.Intersects == false)
        {
          mToolBlock.Outputs["strerr"].Value = "block2 cinterlinetool1 fail";
          return false;
        }
        PointF p1 = (new PointF(float.Parse(cinterlinetool1.X.ToString("F2")), float.Parse(cinterlinetool1.Y.ToString("F2"))));
        str += p1.ToString();
        mToolBlock.Outputs["strerr"].Value = "success";
        records.Add(cinterlinetool1.CreateLastRunRecord());
      }
      mToolBlock.Outputs["respoint"].Value = str;
      mylabel.SetXYText(50, 5, "坐标" + str);
      mylabel.Color = CogColorConstants.Black;
      mylabel.Font = new Font("楷体", 10);
    }
    catch(Exception e)
    {
      str = "Exception: {e.Message}";
      mToolBlock.Outputs["strerr"].Value = str;
    }
    return false;
  }

  #region When the Current Run Record is Created
  /// <summary>
  /// Called when the current record may have changed and is being reconstructed
  /// </summary>
  /// <param name="currentRecord">
  /// The new currentRecord is available to be initialized or customized.</param>
  public override void ModifyCurrentRunRecord(Cognex.VisionPro.ICogRecord currentRecord)
  {
  }
  #endregion

  #region When the Last Run Record is Created
  /// <summary>
  /// Called when the last run record may have changed and is being reconstructed
  /// </summary>
  /// <param name="lastRecord">
  /// The new last run record is available to be initialized or customized.</param>
  public override void ModifyLastRunRecord(Cognex.VisionPro.ICogRecord lastRecord)
  {     
    
    
    lastRecord.SubRecords[0].SubRecords.Clear();
    for(int i = 0;i < 3;i++)
    {
      lastRecord.SubRecords[0].SubRecords.Add(records[i]);
    }
    
    mToolBlock.AddGraphicToRunRecord(mylabel, lastRecord, "CogPMAlignTool1.InputImage", " ");
  }
  #endregion

  #region When the Script is Initialized
  /// <summary>
  /// Perform any initialization required by your script here
  /// </summary>
  /// <param name="host">The host tool</param>
  public override void Initialize(Cognex.VisionPro.ToolGroup.CogToolGroup host)
  {
    // DO NOT REMOVE - Call the base class implementation first - DO NOT REMOVE
    base.Initialize(host);


    // Store a local copy of the script host
    this.mToolBlock = ((Cognex.VisionPro.ToolBlock.CogToolBlock)(host));
  }
  #endregion

}











 循环主要是针对特征匹配到的R的数量进行循环次数操作的,这里需要注意,因为visionpro在进行操作的时候,会将之前找到的交点的痕迹覆盖掉,因此需要将中间过程的Record记录下来,因此在一开始需要声明 private List<ICogRecord> records = new List<ICogRecord>()对中间过程的Record记录,添加到列表的操作:records.Add(cinterlinetool1.CreateLastRunRecord()),然后需要在最后lastrunrecord上记录:

public override void ModifyLastRunRecord(Cognex.VisionPro.ICogRecord lastRecord)
  {     
    
    
    lastRecord.SubRecords[0].SubRecords.Clear();
    for(int i = 0;i < 3;i++)
    {
      lastRecord.SubRecords[0].SubRecords.Add(records[i]);
    }
    
    mToolBlock.AddGraphicToRunRecord(mylabel, lastRecord, "CogPMAlignTool1.InputImage", " ");
  }

注意这里的SubRecoRecordrds[i]的编号表示需要在第几个工具结果上添加记录下来的Record,还应该注意标签放置操作应该在这个操作之后,在这个操作之前会被clear掉。

OuterBlock

有时候可能一个工程文件中有多个Block模块,此时需要在外层套一个Block,将所有子Block包含,并且可能不同的Block对应不同的照片进行执行,为了便于在最外层查看lastrunrecord,一般将所有子Block的第一个CogFixtureTool挪动到OuterBlock中,再将其OutputImage传入到各个子Block中,如下所示:

 为了更好的控制某个Block的执行,一般需要在外面添加参数并且通过脚本进行控制实现:

#region namespace imports
using System;
using System.Collections;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using Cognex.VisionPro;
using Cognex.VisionPro.ToolBlock;
using Cognex.VisionPro3D;
using Cognex.VisionPro.CalibFix;
#endregion

public class CogToolBlockAdvancedScript : CogToolBlockAdvancedScriptBase
{
  #region Private Member Variables
  private Cognex.VisionPro.ToolBlock.CogToolBlock mToolBlock;
  #endregion

  /// <summary>
  /// Called when the parent tool is run.
  /// Add code here to customize or replace the normal run behavior.
  /// </summary>
  /// <param name="message">Sets the Message in the tool's RunStatus.</param>
  /// <param name="result">Sets the Result in the tool's RunStatus</param>
  /// <returns>True if the tool should run normally,
  ///          False if GroupRun customizes run behavior</returns>
  public override bool GroupRun(ref string message, ref CogToolResultConstants result)
  {
    // To let the execution stop in this script when a debugger is attached, uncomment the following lines.
    // #if DEBUG
    // if (System.Diagnostics.Debugger.IsAttached) System.Diagnostics.Debugger.Break();
    // #endif


    // Run each tool using the RunTool function
    //foreach(ICogTool tool in mToolBlock.Tools)
    //mToolBlock.RunTool(tool, ref message, ref result);
    CogFixtureTool cfixtool = mToolBlock.Tools["CogFixtureTool1"] as CogFixtureTool;
    cfixtool.InputImage = (CogImage8Grey) mToolBlock.Inputs["OutputImage"].Value;
    cfixtool.Run();
    if(cfixtool.InputImage == null)
    {
      mToolBlock.Outputs["outtoolblock"].Value = "outtoolblock cfixtool fail ";
      return false;
    }
    
    CogToolBlock block1 = mToolBlock.Tools["CogToolBlock1"] as CogToolBlock;
    CogToolBlock block2 = mToolBlock.Tools["CogToolBlock2"] as CogToolBlock;
    if(cfixtool.OutputImage.Width == 640)
    {
      block1.Run();
    }
    else
    {
      block2.Run();
    }
    mToolBlock.Outputs["outtoolblock"].Value = block1.Outputs["strerr"].Value.ToString() + block2.Outputs["strerr"].Value.ToString();
    
    
    return false;
  }

  #region When the Current Run Record is Created
  /// <summary>
  /// Called when the current record may have changed and is being reconstructed
  /// </summary>
  /// <param name="currentRecord">
  /// The new currentRecord is available to be initialized or customized.</param>
  public override void ModifyCurrentRunRecord(Cognex.VisionPro.ICogRecord currentRecord)
  {
  }
  #endregion

  #region When the Last Run Record is Created
  /// <summary>
  /// Called when the last run record may have changed and is being reconstructed
  /// </summary>
  /// <param name="lastRecord">
  /// The new last run record is available to be initialized or customized.</param>
  public override void ModifyLastRunRecord(Cognex.VisionPro.ICogRecord lastRecord)
  {
  }
  #endregion

  #region When the Script is Initialized
  /// <summary>
  /// Perform any initialization required by your script here
  /// </summary>
  /// <param name="host">The host tool</param>
  public override void Initialize(Cognex.VisionPro.ToolGroup.CogToolGroup host)
  {
    // DO NOT REMOVE - Call the base class implementation first - DO NOT REMOVE
    base.Initialize(host);


    // Store a local copy of the script host
    this.mToolBlock = ((Cognex.VisionPro.ToolBlock.CogToolBlock)(host));
  }
  #endregion

}

 最后就能实现在距离计算图片输入的时候,执行Block1,找字符R的时候,执行Block2,同时旁边的图片均能显示。

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2149964.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

14_Python面向对象

面向过程与面向对象 在编程范式&#xff08;programming paradigms&#xff09;中&#xff0c;面向过程&#xff08;Procedural Programming&#xff09;和面向对象&#xff08;Object-Oriented Programming&#xff0c;简称OOP&#xff09;是两种主要的编程风格。 Python是一…

【医学半监督】置信度指导遮蔽学习的半监督医学图像分割

摘要: 半监督学习(Semi-supervised learning)旨在利用少数标记数据和多数未标记数据训练出高性能模型。现有方法大多采用预测任务机制,在一致性或伪标签的约束下获得精确的分割图,但该机制通常无法克服确认偏差。针对这一问题,本文提出了一种用于半监督医学图像分割的新…

(十六)Ubuntu 20.04 下搭建PX4+MATLAB 仿真环境(HITL)

在文章&#xff08;十五&#xff09;Ubuntu 20.04 下搭建PX4MATLAB 仿真环境我们学习了如何配置仿真环境&#xff0c;在本节&#xff0c;主要进行HITL的仿真环境搭建。 根据&#xff08;十五&#xff09;Ubuntu 20.04 下搭建PX4MATLAB 仿真环境完成配置到如下界面&#xff1a;…

志邦家居CIO吴俊涛谈转型:天润融通如何赋能家居行业未来

根据国家统计局、住建部等各部门综合数据显示&#xff0c;2024年国内泛家居全渠道销售额在预计将超过4.7万亿元&#xff0c;并且在存量房需求释放与智能家居品类创新的推动下&#xff0c;预计2027年将突破5.3万亿元&#xff0c;展现出强劲的增长弹性。 然而&#xff0c;家居行…

【matlab】将程序打包为exe文件(matlab r2023a为例)

文章目录 一、安装运行时环境1.1 安装1.2 简介 二、打包三、打包文件为什么很大 一、安装运行时环境 使用 Application Compiler 来将程序打包为exe&#xff0c;相当于你使用C编译器把C语言编译成可执行程序。 在matlab菜单栏–App下面可以看到Application Compiler。 或者在…

mybatisplus逻辑删除

逻辑删除配置 mybatis-plus:global-config:db-config:logic-delete-field: deletedlogic-not-delete-value:0logic-delete-value:1 查询语句也会自动加上where isdeleted0

FedOV

3 FEDOV: ONE-SHOT FEDERATED OPEN-SET VOTING FRAMEWORK 3.1 PROBLEM STATEMENT 假设有个客户端及其本地数据集。我们的目标是在服务器的帮助下&#xff0c;在不交换原始数据的情况下&#xff0c;训练一个优秀的机器学习模型 。此外&#xff0c;每个客户端只允许与服务器进行…

Linux 删除文件不释放空间问题处理

背景&#xff1a; 服务器磁盘空间已经达到100%&#xff0c;删除存放日志路径下的文件后&#xff0c;发现空间并未释放&#xff01; 原因&#xff1a;在linux系统中&#xff0c;通过rm删除文件将会从文件系统的文件夹结构上解除链接(unlink)然后删除&#xff0c;然而假设文件是被…

基于存内计算架构的模型部署与映射优化

先进计算大赛背景&#xff1a; ‘’存内计算”架构通过消除存储与计算单元间的物理距离&#xff0c;突破传统冯诺依曼架构的限制&#xff0c;自2016年起受到广泛关注&#xff0c;被视为国产算力发展的关键技术。 ​ 在存内计算架构中&#xff0c;权重布局对提高存算单元利用率…

VBA技术资料MF198:禁用下拉拖放

我给VBA的定义&#xff1a;VBA是个人小型自动化处理的有效工具。利用好了&#xff0c;可以大大提高自己的工作效率&#xff0c;而且可以提高数据的准确度。“VBA语言専攻”提供的教程一共九套&#xff0c;分为初级、中级、高级三大部分&#xff0c;教程是对VBA的系统讲解&#…

c++ day01

格式化输入 #include <iostream> #include<iomanip> using namespace std;int main() {double num1090.123456;cout<<"num"<<num<<endl;cout<<oct<<"num"<<num<<endl;cout<<hex<<&qu…

【C#】内存的使用和释放

在 C# 中&#xff0c;内存管理主要是由 .NET 的垃圾回收器&#xff08;Garbage Collector, GC&#xff09;自动处理的。然而&#xff0c;了解如何正确地使用和释放内存对于编写高效且可靠的代码非常重要。以下是一些关键点和最佳实践&#xff1a; 1. 内存分配 托管资源&#x…

如何查询论文的SCI检索号?

一、登录Web of Science 不要自己登录&#xff0c;需要选择机构为CHINA CERNET Federation&#xff0c;否则无法查询文章。 然后转到机构&#xff0c;选择对应的大学。 更具对应文章名查询文献。 二、查询文献名

python基础知识(六)--字典遍历、公共运算符、公共方法、函数、变量分类、参数分类、拆包、引用

字典遍历方法 函数名含义keys()以列表的形式&#xff0c;返回一个字典所有的键。values()以列表的形式&#xff0c;返回一个字典所有的值。items()返回由键值组成的序列&#xff0c;主要应用于遍历字典。 公共运算符 运算符描述支持的容器类型合并字符串、列表、元组*复制字符…

linux入门到实操-9 linux文件操作命令:创建文件、复制文件或文件夹、删除和移动文件、多种查看文件的方法

教程来源&#xff1a;B站视频BV1WY4y1H7d3 3天搞定Linux&#xff0c;1天搞定Shell&#xff0c;清华学神带你通关_哔哩哔哩_bilibili 整理汇总的课程内容笔记和课程资料&#xff08;包含课程同版本linux系统文件等内容&#xff09;&#xff0c;供大家学习交流下载&#xff1a;…

PHP限定post提交数据的次数

PHP限定post提交数据的次数。 在PHP中&#xff0c;你可以通过记录IP地址的提交次数并在会话或数据库中存储这些信息来实现这个需求。以下是一个简单的PHP示例&#xff0c;它使用会话来跟踪IP地址的提交次数。 <?php session_start(); // 获取用户的IP地址 $ip_address $…

迁移学习+多模态融合,小白轻松发一区!创新性拉满!

多模态研究如今愈发火热&#xff0c;已成为各大顶级会议的投稿热门。今天&#xff0c;我为大家提供一个多模态的创新思路&#xff1a;迁移学习与多模态融合。 迁移学习多模态融合方向的优势 1.提升模型性能&#xff1a;综合更多维度优势&#xff0c;跨模态互补 2.快速适应新…

计算机网络 --- 初识协议

序言 上一篇文章中 &#xff08;&#x1f449;点击查看&#xff09;&#xff0c;我们简单的了解了怎么寻找目标计算机&#xff0c;需要通过交换机&#xff0c;路由器等设备跨越多个网络来不断的转发我们需要传输的数据&#xff0c;直至到达目标计算机。  那我们设备之间数据是…

挖矿病毒排查演示

1、上传病毒文件到/opt目录中 2、把压缩文件名修改成virus.zip 3、检查一下/etc/passwd ​ root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:…

GeoGebra 與數學探索 3 GeoGebra 在微積分的探索與動態演示

Goal: GeoGebra 除了可以輕鬆的讓我們以即時動態反饋圖形的方式模擬探索幾何的問題, 或是幫我們驗證答案, 也可以進行數論、微積分、矩陣等等各方面的探索, 在問題尺度不大又需要即時以圖像視覺呈現探索過程的情況下, GeoGebra 其實優於以寫程式的方式進行探索. “Talk is che…