VTK 三维场景的基本要素(相机) vtkCamera 相机的运动

 相机的运动

当物体在处于静止位置时,相机可以在物体周围移动,摄取不同角度的图像 

 

移动

  移动分为相机的移动,和相机焦点的移动;移动改变了相机相对焦点的位置,离焦点更近或者更远;这样就会改变被渲染的物体在视野中的部分;
  相机的移动可以有水平上的移动,垂直方向的移动,前后的移动;

 vtkCamera::Dolly(double value);

    将相机与焦点的距离除以给定的推拉值。使用大于1的值向焦点推拉,
使用小于1的值远离焦点推拉。(缩放)

旋转


相机的旋转:是相机在以焦点为中心的圆球面上移动,因为相机可以水平旋转和垂直旋转;水平旋转就是在相机围绕球心过朝上方向这个轴旋转,也可以说是在球面上的维度进行旋转,但相机的镜头始终指向焦点;水平旋转就是在相机绕球面上的经线向上或者向下旋转;

围绕投影方向旋转相机。这将使摄影机绕其轴旋转:

 vtkCamera::Roll(double angle);

  围绕以焦点为中心的视图向上矢量旋转相机

请注意,视图向上矢量是通过SetViewUp设置的,不一定垂直于投影方向。结果是相机的水平旋转(纬度)

  vtkCamera::Azimuth(double angle);

    使用焦点作为旋转中心,围绕投影方向的负值与视图向上向量的叉积旋转相机。结果是场景的垂直旋转(经度)

    vtkCamera::Elevation(double angle);

    使用相机的位置作为旋转中心,围绕视图向上矢量旋转焦点

请注意,视图向上矢量是通过SetViewUp设置的,不一定垂直于投影方向。结果是场景的水平旋转(纬度)。

 vtkCamera::Yaw(double angle);

    使用相机的位置作为旋转中心,围绕视图向上矢量和投影方向的叉积旋转焦点。

结果是摄影机垂直旋转(经度)。

vtkCamera::Pitch(double angle);

缩放:

    vtkCamera::Zoom(double factor);

    在透视模式下,将视角减小指定的因子。在平行模式下,将平行比例减小指定的因子。
值大于1表示放大,
值小于1表示缩小@注意:当UseExplicitProjectionTransformMatrix为true时,
将忽略此设置。

    重置相机参数 :
 

void ResetCamera();

视频:

相机的旋转:

vtkCameraTest

视频代码:

注意这个只有初始时,旋转是对的;一但旋转后,再旋转可能是错的;

#pragma once
//#include "vtk_include.h"
#include <vtkAppendFilter.h>
#include <vtkCamera.h>
#include <vtkCellArray.h>
#include <vtkConeSource.h>
#include <vtkContourFilter.h>
#include <vtkCubeSource.h>
#include <vtkDataSetMapper.h>
#include <vtkImplicitModeller.h>
#include <vtkLODActor.h>
#include <vtkNamedColors.h>
#include <vtkNew.h>
#include <vtkPoints.h>
#include <vtkPolyData.h>
#include <vtkPolyDataMapper.h>
#include <vtkProperty.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkRenderer.h>
#include <vtkRotationalExtrusionFilter.h>
#include <vtkSphereSource.h>
#include <vtkTextActor.h>
#include <vtkTextProperty.h>
#include <vtkTransform.h>
#include <vtkTransformFilter.h>
#include <vtkTransformPolyDataFilter.h>
#include <vtkWarpTo.h>
#include <algorithm>
#include <vtkInteractorStyleTrackballCamera.h>
#include <array>

#include<stdio.h>
#include<iostream>
using namespace std;

class Normal3DCameraStyle : public vtkInteractorStyleTrackballCamera
{
public:
	static Normal3DCameraStyle* New();
	vtkTypeMacro(Normal3DCameraStyle, vtkInteractorStyleTrackballCamera);

	//virtual void OnLeftButtonDown(void);
	//virtual void OnLeftButtonUp(void);
	//virtual void OnRightButtonDown(void);
	//virtual void OnRightButtonUp(void);
	//virtual void OnMiddleButtonDown(void);
	//virtual void OnMiddleButtonUp(void);
	//virtual void OnMouseWheelForward(void);
	//virtual void OnMouseWheelBackward(void);
	//virtual void OnMouseMove(void);

	//	/**
	//* OnChar is triggered when an ASCII key is pressed. Some basic key presses
	//* are handled here ('q' for Quit, 'p' for Pick, etc)
	//*/
	//virtual void OnChar();

	 OnKeyDown is triggered by pressing any key (identical to OnKeyPress()).
	 An empty implementation is provided. The behavior of this function should
	 be specified in the subclass.
	//virtual void OnKeyDown();

	 OnKeyUp is triggered by releaseing any key (identical to OnKeyRelease()).
	 An empty implementation is provided. The behavior of this function should
	 be specified in the subclass.
	//virtual void OnKeyUp();

	 OnKeyPress is triggered by pressing any key (identical to OnKeyDown()).
	 An empty implementation is provided. The behavior of this function should
	 be specified in the subclass.
	//virtual void OnKeyPress();

	 OnKeyRelease is triggered by pressing any key (identical to OnKeyUp()).
	 An empty implementation is provided. The behavior of this function should
	 be specified in the subclass.
	//virtual void OnKeyRelease();

	void  OnKeyPress()
	{

		switch (this->Interactor->GetKeyCode())
		{
		case 'a':
		case 'A':
			cout << "A " << endl;
			m_Camera->Azimuth(1);
			break;

		case 'b':
		case 'B':
			m_Camera->Roll(1);
			cout << "b " << endl;
			break;
		case 'v':
		case 'V':
			m_Camera->Elevation(1);

			cout << "v " << endl;
			break;
		}
		m_RenderWindows->Render();
	}

public:
	vtkCamera * m_Camera;
	vtkRenderWindow* m_RenderWindows;
};


vtkStandardNewMacro(Normal3DCameraStyle);//必须加!!!!

void main()
	{
		vtkNew<vtkNamedColors> colors;

		// Set the colors.
		std::array<unsigned char, 4> azArrowColor{ {255, 77, 77} };
		colors->SetColor("AzimuthArrowColor", azArrowColor.data());
		std::array<unsigned char, 4> elevArrowColor{ {77, 255, 77} };
		colors->SetColor("ElevationArrowColor", elevArrowColor.data());
		std::array<unsigned char, 4> rollArrowColor{ {255, 255, 77} };
		colors->SetColor("RollArrowColor", rollArrowColor.data());
		std::array<unsigned char, 4> spikeColor{ {255, 77, 255} };
		colors->SetColor("SpikeColor", spikeColor.data());
		// Set the background color.
		std::array<unsigned char, 4> bkg{ {26, 51, 102} };
		colors->SetColor("BkgColor", bkg.data());

		// Create the RenderWindow, Renderer and both Actors
		vtkNew<vtkRenderer> ren1;
		vtkNew<vtkRenderWindow> renWin;
		renWin->AddRenderer(ren1);
		vtkNew<vtkRenderWindowInteractor> iren;
		iren->SetRenderWindow(renWin);

		// create a camera model
		vtkNew<vtkConeSource> camCS;
		camCS->SetHeight(1.5);
		camCS->SetResolution(12);
		camCS->SetRadius(0.4);

		vtkNew<vtkCubeSource> camCBS;
		camCBS->SetXLength(1.5);
		camCBS->SetZLength(0.8);
		camCBS->SetCenter(0.4, 0, 0);

		vtkNew<vtkAppendFilter> camAPD;
		camAPD->AddInputConnection(camCS->GetOutputPort());
		camAPD->AddInputConnection(camCBS->GetOutputPort());

		vtkNew<vtkDataSetMapper> camMapper;
		camMapper->SetInputConnection(camAPD->GetOutputPort());

		vtkNew<vtkLODActor> camActor;
		camActor->SetMapper(camMapper);
		camActor->SetScale(2, 2, 2);

		// draw the arrows
		vtkNew<vtkPolyData> pd;
		vtkNew<vtkCellArray> ca;
		vtkNew<vtkPoints> fp;
		fp->InsertNextPoint(0, 1, 0);
		fp->InsertNextPoint(8, 1, 0);
		fp->InsertNextPoint(8, 2, 0);
		fp->InsertNextPoint(10, 0.01, 0);
		fp->InsertNextPoint(8, -2, 0);
		fp->InsertNextPoint(8, -1, 0);
		fp->InsertNextPoint(0, -1, 0);
		ca->InsertNextCell(7);
		ca->InsertCellPoint(0);
		ca->InsertCellPoint(1);
		ca->InsertCellPoint(2);
		ca->InsertCellPoint(3);
		ca->InsertCellPoint(4);
		ca->InsertCellPoint(5);
		ca->InsertCellPoint(6);
		pd->SetPoints(fp);
		pd->SetPolys(ca);

		vtkNew<vtkPolyData> pd2;
		vtkNew<vtkCellArray> ca2;
		vtkNew<vtkPoints> fp2;
		fp2->InsertNextPoint(0, 1, 0);
		fp2->InsertNextPoint(8, 1, 0);
		fp2->InsertNextPoint(8, 2, 0);
		fp2->InsertNextPoint(10, 0.01, 0);
		ca2->InsertNextCell(4);
		ca2->InsertCellPoint(0);
		ca2->InsertCellPoint(1);
		ca2->InsertCellPoint(2);
		ca2->InsertCellPoint(3);
		pd2->SetPoints(fp2);
		pd2->SetLines(ca2);

		vtkNew<vtkImplicitModeller> arrowIM;
		arrowIM->SetInputData(pd);
		arrowIM->SetSampleDimensions(50, 20, 8);

		vtkNew<vtkContourFilter> arrowCF;
		arrowCF->SetInputConnection(arrowIM->GetOutputPort());
		arrowCF->SetValue(0, 0.2);

		vtkNew<vtkWarpTo> arrowWT;
		arrowWT->SetInputConnection(arrowCF->GetOutputPort());
		arrowWT->SetPosition(5, 0, 5);
		arrowWT->SetScaleFactor(0.85);
		arrowWT->AbsoluteOn();

		vtkNew<vtkTransform> arrowT;
		arrowT->RotateY(60);
		arrowT->Translate(-1.33198, 0, -1.479);
		arrowT->Scale(1, 0.5, 1);

		vtkNew<vtkTransformFilter> arrowTF;
		arrowTF->SetInputConnection(arrowWT->GetOutputPort());
		arrowTF->SetTransform(arrowT);

		vtkNew<vtkDataSetMapper> arrowMapper;
		arrowMapper->SetInputConnection(arrowTF->GetOutputPort());
		arrowMapper->ScalarVisibilityOff();

		// draw the azimuth arrows
		vtkNew<vtkLODActor> a1Actor;
		a1Actor->SetMapper(arrowMapper);
		a1Actor->RotateZ(180);
		a1Actor->SetPosition(1, 0, -1);
		a1Actor->GetProperty()->SetColor(colors->GetColor3d("AzimuthArrowColor").GetData());
		a1Actor->GetProperty()->SetSpecularColor(colors->GetColor3d("White").GetData());
		a1Actor->GetProperty()->SetSpecular(0.3);
		a1Actor->GetProperty()->SetSpecularPower(20);
		a1Actor->GetProperty()->SetAmbient(0.2);
		a1Actor->GetProperty()->SetDiffuse(0.8);

		vtkNew<vtkLODActor> a2Actor;
		a2Actor->SetMapper(arrowMapper);
		a2Actor->RotateZ(180);
		a2Actor->RotateX(180);
		a2Actor->SetPosition(1, 0, 1);
		a2Actor->GetProperty()->SetColor(colors->GetColor3d("AzimuthArrowColor").GetData());
		a2Actor->GetProperty()->SetSpecularColor(colors->GetColor3d("White").GetData());
		a2Actor->GetProperty()->SetSpecular(0.3);
		a2Actor->GetProperty()->SetSpecularPower(20);
		a2Actor->GetProperty()->SetAmbient(0.2);
		a2Actor->GetProperty()->SetDiffuse(0.8);

		// draw the elevation arrows
		vtkNew<vtkLODActor> a3Actor;
		a3Actor->SetMapper(arrowMapper);
		a3Actor->RotateZ(180);
		a3Actor->RotateX(90);
		a3Actor->SetPosition(1, -1, 0);
		a3Actor->GetProperty()->SetColor(colors->GetColor3d("ElevationArrowColor").GetData());
		a3Actor->GetProperty()->SetSpecularColor(colors->GetColor3d("White").GetData());
		a3Actor->GetProperty()->SetSpecular(0.3);
		a3Actor->GetProperty()->SetSpecularPower(20);
		a3Actor->GetProperty()->SetAmbient(0.2);
		a3Actor->GetProperty()->SetDiffuse(0.8);

		vtkNew<vtkLODActor> a4Actor;
		a4Actor->SetMapper(arrowMapper);
		a4Actor->RotateZ(180);
		a4Actor->RotateX(-90);
		a4Actor->SetPosition(1, 1, 0);
		a4Actor->GetProperty()->SetColor(colors->GetColor3d("ElevationArrowColor").GetData());
		a4Actor->GetProperty()->SetSpecularColor(colors->GetColor3d("White").GetData());
		a4Actor->GetProperty()->SetSpecular(0.3);
		a4Actor->GetProperty()->SetSpecularPower(20);
		a4Actor->GetProperty()->SetAmbient(0.2);
		a4Actor->GetProperty()->SetDiffuse(0.8);

		// draw the DOP
		vtkNew<vtkTransform> arrowT2;
		arrowT2->Scale(1, 0.6, 1);
		arrowT2->RotateY(90);

		vtkNew<vtkTransformPolyDataFilter> arrowTF2;
		arrowTF2->SetInputData(pd2);
		arrowTF2->SetTransform(arrowT2);

		vtkNew<vtkRotationalExtrusionFilter> arrowREF;
		arrowREF->SetInputConnection(arrowTF2->GetOutputPort());
		arrowREF->CappingOff();
		arrowREF->SetResolution(30);

		vtkNew<vtkPolyDataMapper> spikeMapper;
		spikeMapper->SetInputConnection(arrowREF->GetOutputPort());

		vtkNew<vtkLODActor> a5Actor;
		a5Actor->SetMapper(spikeMapper);
		a5Actor->SetScale(.3, .3, .6);
		a5Actor->RotateY(90);
		a5Actor->SetPosition(-2, 0, 0);
		a5Actor->GetProperty()->SetColor(colors->GetColor3d("SpikeColor").GetData());
		a5Actor->GetProperty()->SetAmbient(0.2);
		a5Actor->GetProperty()->SetDiffuse(0.8);

		// focal point
		vtkNew<vtkSphereSource> fps;
		fps->SetRadius(0.5);
		vtkNew<vtkPolyDataMapper> fpMapper;
		fpMapper->SetInputConnection(fps->GetOutputPort());
		vtkNew<vtkLODActor> fpActor;
		fpActor->SetMapper(fpMapper);
		fpActor->SetPosition(-9, 0, 0);
		fpActor->GetProperty()->SetSpecularColor(colors->GetColor3d("White").GetData());
		fpActor->GetProperty()->SetSpecular(0.3);
		fpActor->GetProperty()->SetAmbient(0.2);
		fpActor->GetProperty()->SetDiffuse(0.8);
		fpActor->GetProperty()->SetSpecularPower(20);

		// create the roll arrows
		vtkNew<vtkWarpTo> arrowWT2;
		arrowWT2->SetInputConnection(arrowCF->GetOutputPort());
		arrowWT2->SetPosition(5, 0, 2.5);
		arrowWT2->SetScaleFactor(0.95);
		arrowWT2->AbsoluteOn();

		vtkNew<vtkTransform> arrowT3;
		arrowT3->Translate(-2.50358, 0, -1.70408);
		arrowT3->Scale(0.5, 0.3, 1);

		vtkNew<vtkTransformFilter> arrowTF3;
		arrowTF3->SetInputConnection(arrowWT2->GetOutputPort());
		arrowTF3->SetTransform(arrowT3);

		vtkNew<vtkDataSetMapper> arrowMapper2;
		arrowMapper2->SetInputConnection(arrowTF3->GetOutputPort());
		arrowMapper2->ScalarVisibilityOff();

		// draw the roll arrows
		vtkNew<vtkLODActor> a6Actor;
		a6Actor->SetMapper(arrowMapper2);
		a6Actor->RotateZ(90);
		a6Actor->SetPosition(-4, 0, 0);
		a6Actor->SetScale(1.5, 1.5, 1.5);
		a6Actor->GetProperty()->SetColor(colors->GetColor3d("RollArrowColor").GetData());
		a6Actor->GetProperty()->SetSpecularColor(colors->GetColor3d("White").GetData());
		a6Actor->GetProperty()->SetSpecular(0.3);
		a6Actor->GetProperty()->SetSpecularPower(20);
		a6Actor->GetProperty()->SetAmbient(0.2);
		a6Actor->GetProperty()->SetDiffuse(0.8);

		// Add the actors to the renderer, set the background and size
		ren1->AddActor(camActor);
		ren1->AddActor(a1Actor);
		ren1->AddActor(a2Actor);
		ren1->AddActor(a3Actor);
		ren1->AddActor(a4Actor);
		ren1->AddActor(a5Actor);
		ren1->AddActor(a6Actor);
		ren1->AddActor(fpActor);
		ren1->SetBackground(colors->GetColor3d("BkgColor").GetData());
		ren1->SetBackground(colors->GetColor3d("SlateGray").GetData());
		renWin->SetSize(640, 480);
		renWin->SetWindowName("CameraModel1");

		// render the image

		vtkCamera* cam1 = (ren1->GetActiveCamera());
		ren1->ResetCamera();


		cam1->Azimuth(150);
		cam1->Elevation(30);
		cam1->Dolly(1.5);
		ren1->ResetCameraClippingRange();

		// Create a TextActor for azimuth  (a1 and a2 actor's color)
		vtkNew<vtkTextActor> text;
		text->SetInput("Azimuth");
		vtkTextProperty* tprop = text->GetTextProperty();
		tprop->SetFontFamilyToArial();
		tprop->ShadowOff();
		tprop->SetLineSpacing(1.0);
		tprop->SetFontSize(36);
		tprop->SetColor(a1Actor->GetProperty()->GetColor());
		text->SetDisplayPosition(20, 50);
		ren1->AddActor2D(text);

		// Create a TextActor for elevation  (a3 and a4 actor's color)
		vtkNew<vtkTextActor> text2;
		text2->SetInput("Elevation");
		tprop = text2->GetTextProperty();
		tprop->SetFontFamilyToArial();
		tprop->ShadowOff();
		tprop->SetLineSpacing(1.0);
		tprop->SetFontSize(36);
		tprop->SetColor(a3Actor->GetProperty()->GetColor());
		text2->SetDisplayPosition(20, 100);
		ren1->AddActor2D(text2);

		// Create a TextActor for roll (a6 actor's color)
		vtkNew<vtkTextActor> text3;
		text3->SetInput("Roll");
		tprop = text3->GetTextProperty();
		tprop->SetFontFamilyToArial();
		tprop->ShadowOff();
		tprop->SetLineSpacing(1.0);
		tprop->SetFontSize(36);
		tprop->SetColor(a6Actor->GetProperty()->GetColor());
		text3->SetDisplayPosition(20, 150);
		ren1->AddActor2D(text3);

		vtkNew<Normal3DCameraStyle> style;

		cam1->SetFocalPoint(fpActor->GetPosition());
		cam1->SetPosition(camActor->GetPosition());

		style->m_Camera = cam1;
		style->m_RenderWindows = renWin;
		iren->SetInteractorStyle(style);


		renWin->Render();
		iren->Initialize();
		iren->Start();
	}
 

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

sqlmap 使用笔记(kali环境)

sqlmap使用 kali环境 -u或–url 直接扫描单个路径 //如果需要登录要有cookie sqlmap -u "http://10.0.0.6:8080/vulnerabilities/sqli/?id1" --cookie"PHPSESSIDisgvp2rv4uts46jbkb9bouq6ir; securitylow"-m 文件中保存多个url&#xff0c;工具会依次扫…

前后端分离好处多多,怕就怕分工不分人,哈哈

前后端分离倡导多年了&#xff0c;现在基本成为了开发的主流模式了&#xff0c;贝格前端工场承接的前端项目只要不考虑seo的&#xff0c;都采用前后端分离模式&#xff0c;这篇文章就来介绍一下前后端分离模式。 一、什么是前后端分离开发模式 前后端分离是一种软件开发的架构…

Linux第46步_通过“添加自定义菜单”来学习menuconfig图形化配置原理

通过“添加自定义菜单”来学习menuconfig图形化配置原理&#xff0c;将来移植linux要用到。 自定义菜单要求如下: ①、在主界面中添加一个名为“My test menu”&#xff0c;此菜单内部有一个配置项。 ②、配置项为“MY TESTCONFIG”&#xff0c;此配置项处于菜单“My test m…

第六篇【传奇开心果系列】Vant of Vue 开发移动应用示例:深度解析响应式布局支持

传奇开心果系列 系列博文目录Vant开发移动应用示例系列 博文目录前言一、Vant响应式布局介绍二、媒体查询实现响应式布局示例代码三、短点设置实现响应式布局示例代码四、响应式工具类实现响应式布局示例代码五、栅格系统实现响应式布局示例代码六、响应式组件实现响应式布局示…

ubuntu彻底卸载cuda 重新安装cuda

sudo apt-get --purge remove "*cublas*" "*cufft*" "*curand*" \"*cusolver*" "*cusparse*" "*npp*" "*nvjpeg*" "cuda*" "nsight*" cuda10以上 cd /usr/local/cuda-xx.x/bin/ s…

python 基础知识点(蓝桥杯python科目个人复习计划38)

今日复习内容&#xff1a;DFS的剪枝 我理解的剪枝&#xff0c;和《运筹学》里面“分支定界法”的剪枝操作一样&#xff0c;不停按照题目所给条件分割&#xff0c;当所得目标函数的值已偏离最优解时&#xff0c;就将其减去。 例题1&#xff1a;数字王国之军训排队 题目描述&a…

MySQL篇----第二十一篇

系列文章目录 文章目录 系列文章目录前言一、什么是乐观锁二、什么是悲观锁三、什么是时间戳四、什么是行级锁前言 前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到网站,这篇文章男女通用,看懂了就去分享给你的码吧。 一、…

C#系列-Entity Framework 架构(18)

下图展示了EF的整体架构。现在让我们逐个地看看架构的各个组件&#xff1a; EF组件图 EDM&#xff08;Entity Data Mode 实体数据模型&#xff09;:EDM 由三个主要部分组成&#xff1a;概念模型&#xff0c;映射和存储模型。 Conceptual Model&#xff08;概念模型&#xff0…

【深度优先搜索】【树】【图论】2973. 树中每个节点放置的金币数目

作者推荐 视频算法专题 本博文涉及知识点 深度优先搜索 树 图论 分类讨论 LeetCode2973. 树中每个节点放置的金币数目 给你一棵 n 个节点的 无向 树&#xff0c;节点编号为 0 到 n - 1 &#xff0c;树的根节点在节点 0 处。同时给你一个长度为 n - 1 的二维整数数组 edges…

【Linux技术宝典】Linux入门:揭开Linux的神秘面纱

文章目录 官网Linux 环境的搭建方式一、什么是Linux&#xff1f;二、Linux的起源与发展三、Linux的核心组件四、Linux企业应用现状五、Linux的发行版本六、为什么选择Linux&#xff1f;七、总结 Linux&#xff0c;一个在全球范围内广泛应用的开源操作系统&#xff0c;近年来越来…

深入学习《大学计算机》系列之第1章 1.7节——图灵机的一个例子

一.欢迎来到我的酒馆 第1章 1.7节&#xff0c;图灵机的一个例子。 目录 一.欢迎来到我的酒馆二.图灵机2.1 艾伦-图灵简介2.2 图灵机简介 三.图灵机工作原理3.1 使用图灵机打印二进制数3.2 图灵机工作原理总结 四.总结 二.图灵机 本节内容主要介绍计算机科学之父——艾伦-图灵、…

【CC++】内存管理2:new + delete

前言 今天继续来学new和delete operator new 与operator delete函数 new和delete是用户进行动态内存申请和释放的操作符&#xff0c;operator new 和operator delete是系统提供的全局函数&#xff0c;new在底层调用operator new全局函数来申请空间&#xff0c;delete在底层通…

OpenCV入门:图像处理的基石

在数字图像处理领域&#xff0c;OpenCV&#xff08;开源计算机视觉库&#xff09;是一个不可或缺的工具。它包含了一系列强大的算法和函数&#xff0c;使得开发者可以轻松地处理图像和视频数据。本文将带你走进OpenCV的世界&#xff0c;了解其基本概念和常见应用。 1. OpenCV简…

【开源】基于JAVA+Vue+SpringBoot的公司货物订单管理系统

目录 一、摘要1.1 项目介绍1.2 项目录屏 二、功能模块2.1 客户管理模块2.2 商品维护模块2.3 供应商管理模块2.4 订单管理模块 三、系统展示四、核心代码4.1 查询供应商信息4.2 新增商品信息4.3 查询客户信息4.4 新增订单信息4.5 添加跟进子订单 五、免责说明 一、摘要 1.1 项目…

锐捷(十九)锐捷设备的接入安全

1、PC1的IP地址和mac地址做全局静态ARP绑定; 全局下&#xff1a;address-bind 192.168.1.1 mac&#xff08;pc1&#xff09; G0/2:ip verify source port-securityarp-check 2、PC2的IP地址和MAC地址做全局IPMAC绑定&#xff1a; Address-bind 192.168.1.2 0050.7966.6807Ad…

Hugging Face 刚刚推出了一款开源的 AI 助手制造工具,直接向 OpenAI 的定制 GPT 挑战

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗&#xff1f;订阅我们的简报&#xff0c;深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同&#xff0c;从行业内部的深度分析和实用指南中受益。不要错过这个机会&#xff0c;成为AI领…

MMKV:轻巧高效的跨平台键值存储解决方案

MMKV&#xff1a;轻巧高效的跨平台键值存储解决方案 引言 在移动应用的开发中&#xff0c;数据存储是一个至关重要的环节。随着移动应用的普及和功能的增多&#xff0c;应用需要存储和管理各种类型的数据&#xff0c;包括用户配置信息、缓存数据、临时状态等。传统的数据存储…

Ubuntu Desktop 删除文件

Ubuntu Desktop 删除文件 1. right mouse click on the file -> Move to Trash2. right mouse click on the file -> DeleteReferences 1. right mouse click on the file -> Move to Trash ​ 2. right mouse click on the file -> Delete ​​​ References …

Unity Meta Quest MR 开发(四):使用 Scene API 和 Depth API 实现深度识别和环境遮挡

文章目录 &#x1f4d5;教程说明&#x1f4d5;Scene API 实现遮挡&#x1f4d5;Scene API 实现遮挡的缺点&#x1f4d5;Depth API 实现遮挡⭐导入 Depth API⭐修改环境配置⭐添加 EnvironmentDepthOcclusion 预制体⭐给物体替换遮挡 Shader⭐取消现实手部的遮挡效果 此教程相关…

C++ //练习 5.6 改写上一题的程序,使用条件运算符(参见4.7节,第134页)代替if else语句。

C Primer&#xff08;第5版&#xff09; 练习 5.6 练习 5.6 改写上一题的程序&#xff0c;使用条件运算符&#xff08;参见4.7节&#xff0c;第134页&#xff09;代替if else语句。 环境&#xff1a;Linux Ubuntu&#xff08;云服务器&#xff09; 工具&#xff1a;vim 代码…