PCL點云庫入門(第18講)——PCL庫點云特征之3DSC特征描述3D shape context descriptor

一、3DSC(3D Shape Context)特征算法原理

1. 背景

3DSC 是一種描述三維點云局部形狀的特征描述子,受二維 Shape Context 的啟發。它用于捕捉點云某一點局部的幾何分布信息,對點云配準、識別等任務非常有效。

2. 基本思想

3DSC 描述子通過統計某個關鍵點周圍點云在空間中分布的統計直方圖,編碼該關鍵點的局部結構信息。它的核心是將關鍵點附近的鄰域點投影到球坐標系統中,然后統計這些點在球坐標的不同區域內的分布

3. 具體原理步驟

  • 關鍵點選擇
    3DSC一般計算在關鍵點上(比如角點、邊緣點)【關鍵點提取算法會在后面章節進行講解說明】,提高效率和魯棒性。

  • 鄰域定義
    對關鍵點以一定半徑定義鄰域(radius),找到鄰域內的所有點。

  • 局部坐標系建立
    建立關鍵點局部參考坐標系,通常利用該點的法線方向定義z軸,通過構造局部坐標系保證描述子具有旋轉不變性。

  • 球坐標系劃分
    在局部坐標系中,以關鍵點為球心,將鄰域空間劃分成若干個體素(bins),通常按半徑(r)、極角(θ)、方位角(φ)劃分為3個維度的離散格子,如下圖所示。
    在這里插入圖片描述

  • 統計鄰域點分布
    計算鄰域中點在每個球體素內的點數,統計形成一個三維直方圖。

  • 歸一化
    對直方圖進行歸一化,得到局部幾何結構的概率分布,作為特征描述子。

  • 特征匹配
    計算兩個3DSC描述子之間的距離(例如χ2距離、Hellinger距離等)完成匹配。

4. 3DSC特點

  • 保持對旋轉和尺度的魯棒性(通過局部坐標系和歸一化處理)
  • 能夠有效捕捉局部三維結構信息
  • 特征維度較高(通常上千維),計算和存儲較大,適合關鍵點描述

二、主要成員函數和變量

1、成員變量詳解

變量名類型說明
azimuth_bins_std::size_t方位角方向劃分的 bin 數(默認 12)
elevation_bins_std::size_t仰角方向劃分的 bin 數(默認 11)
radius_bins_std::size_t半徑方向劃分的 bin 數(默認 15)
min_radius_double最小半徑,表示從點開始計算特征時的起始距離(默認 0.1)
point_density_radius_double用于計算點密度的搜索半徑(默認 0.2)
radii_interval_std::vector<float>半徑分桶區間,用于特征球體的劃分
theta_divisions_std::vector<float>方位角分桶區間
phi_divisions_std::vector<float>仰角分桶區間
volume_lut_std::vector<float>每個 bin 對應的小體積 LUT(look-up table)
descriptor_length_std::size_t每個點的描述子維度 = azimuth_bins × elevation_bins × radius_bins
rng_std::mt19937隨機數生成器,用于計算局部坐標系中 X 軸的選擇(不確定性)
rng_dist_std::uniform_real_distribution<float>0~1 的均勻分布,用于上述隨機采樣

2、 核心成員函數講解

構造函數
ShapeContext3DEstimation(bool random = false)
  • 構造函數初始化默認參數和隨機數生成器。
  • 如果 random = true,則使用當前時間作為種子,否則使用固定值 12345。

initCompute()

bool initCompute () override;
  • 初始化函數:

    • 計算并填充 radii_interval_, theta_divisions_, phi_divisions_
    • 計算每個體素的體積并填入 volume_lut_
    • 是描述子計算的前置步驟。

computePoint(...)

bool computePoint (std::size_t index, const pcl::PointCloud<PointNT>& normals, float rf[9], std::vector<float>& desc);
  • 對單個點進行特征計算。

  • 輸入:

    • 點的索引
    • 法線集合
    • 點的局部參考坐標系 rf[9]
  • 輸出:

    • 描述子 desc(長度為 descriptor_length_)

computeFeature(...)

void computeFeature (PointCloudOut &output) override;
  • 繼承自 Feature<PointInT, PointOutT> 的虛函數。
  • 用于計算整云的 3DSC 特征。
  • 遍歷所有索引點,調用 computePoint() 逐個生成描述子。

setMinimalRadius() / getMinimalRadius()

void setMinimalRadius(double radius);
double getMinimalRadius();
  • 設置 / 獲取最小半徑 rmin(決定特征球從哪里開始采樣)

setPointDensityRadius() / getPointDensityRadius()

void setPointDensityRadius(double radius);
double getPointDensityRadius();
  • 設置 / 獲取計算點密度時的搜索半徑。

getAzimuthBins(), getElevationBins(), getRadiusBins()

  • 獲取當前 azimuth/elevation/radius 的 bin 數量。

rnd()

inline float rnd() { return rng_dist_(rng_); }
  • 內部隨機數生成函數(0~1 均勻分布),用于隨機選擇局部坐標軸方向。

3、 特征維度說明

描述子維度為

descriptor_length_ = azimuth_bins_ × elevation_bins_ × radius_bins_;

默認情況下為:

12 × 11 × 15 = 1980維(對應 pcl::ShapeContext1980)

4、總結:整體流程(computeFeature)

  1. 初始化(initCompute()) → 構建球形體素劃分

  2. 遍歷輸入點集(computeFeature()

  3. 對每個點:

    • 建立局部坐標系(通常由法線和隨機 X 方向構建)
    • 鄰域點轉換到該局部坐標系
    • 根據方位角/仰角/半徑落入 bin 中計數
    • 根據 bin 的體積歸一化 → 得到直方圖
  4. 存入輸出點云 PointCloudOut(即每個點一個1980維向量)


三、主要實現代碼注解

1、計算單點 3D 形狀上下文描述子(Shape Context 3D Descriptor)

// 模板函數:計算指定點的 Shape Context 描述子
template <typename PointInT, typename PointNT, typename PointOutT> 
bool pcl::ShapeContext3DEstimation<PointInT, PointNT, PointOutT>::computePoint (std::size_t index,                          // 當前計算的點在索引列表中的索引const pcl::PointCloud<PointNT> &normals,   // 所有法線float rf[9],                                // 輸出:參考坐標系(Reference Frame,3x3 矩陣展開為數組)std::vector<float> &desc)                   // 輸出:形狀上下文描述子
{// rf 中的三個向量組成了局部參考系 RF:x_axis | y_axis | normalEigen::Map<Eigen::Vector3f> x_axis (rf);Eigen::Map<Eigen::Vector3f> y_axis (rf + 3);Eigen::Map<Eigen::Vector3f> normal (rf + 6);// 在指定搜索半徑內查找鄰域點pcl::Indices nn_indices;std::vector<float> nn_dists;const std::size_t neighb_cnt = searchForNeighbors ((*indices_)[index], search_radius_, nn_indices, nn_dists);if (neighb_cnt == 0){// 若無鄰居,返回 NaN 描述子和空的參考系std::fill (desc.begin (), desc.end (), std::numeric_limits<float>::quiet_NaN ());std::fill (rf, rf + 9, 0.f);return (false);}// 找到最近鄰點索引(用來獲取該點的法線)const auto minDistanceIt = std::min_element(nn_dists.begin (), nn_dists.end ());const auto minIndex = nn_indices[std::distance (nn_dists.begin (), minDistanceIt)];// 獲取當前點的位置Vector3fMapConst origin = (*input_)[(*indices_)[index]].getVector3fMap ();// 使用最近鄰的法線作為當前點的法線normal = normals[minIndex].getNormalVector3fMap ();// 初始化 x_axis 為一個隨機向量,用于之后與法線正交化x_axis[0] = rnd ();x_axis[1] = rnd ();x_axis[2] = rnd ();if (!pcl::utils::equal (normal[2], 0.0f))x_axis[2] = - (normal[0]*x_axis[0] + normal[1]*x_axis[1]) / normal[2];else if (!pcl::utils::equal (normal[1], 0.0f))x_axis[1] = - (normal[0]*x_axis[0] + normal[2]*x_axis[2]) / normal[1];else if (!pcl::utils::equal (normal[0], 0.0f))x_axis[0] = - (normal[1]*x_axis[1] + normal[2]*x_axis[2]) / normal[0];x_axis.normalize ();// 斷言 x_axis 與 normal 正交assert (pcl::utils::equal (x_axis.dot(normal), 0.0f, 1E-6f));// y_axis = normal × x_axis,構成正交參考系y_axis.matrix () = normal.cross (x_axis);// 遍歷鄰域內每個鄰居點for (std::size_t ne = 0; ne < neighb_cnt; ne++){if (pcl::utils::equal (nn_dists[ne], 0.0f))continue;// 獲取鄰居坐標Eigen::Vector3f neighbour = (*surface_)[nn_indices[ne]].getVector3fMap ();// --- 計算鄰居點的極坐標 ---float r = std::sqrt (nn_dists[ne]); // 與中心點距離// 將點投影到切平面(normal 所在平面)Eigen::Vector3f proj;pcl::geometry::project (neighbour, origin, normal, proj);proj -= origin;proj.normalize ();// phi:投影在切平面后,與 x_axis 形成的角度(0 ~ 360°)Eigen::Vector3f cross = x_axis.cross (proj);float phi = pcl::rad2deg (std::atan2 (cross.norm (), x_axis.dot (proj)));phi = cross.dot (normal) < 0.f ? (360.0f - phi) : phi;// theta:當前鄰居點與法線的夾角(0 ~ 180°)Eigen::Vector3f no = neighbour - origin;no.normalize ();float theta = normal.dot (no);theta = pcl::rad2deg (std::acos (std::min (1.0f, std::max (-1.0f, theta))));// --- 計算鄰居所在的直方圖 Bin(j,k,l) ---const auto rad_min = std::lower_bound(std::next (radii_interval_.cbegin ()), radii_interval_.cend (), r);const auto theta_min = std::lower_bound(std::next (theta_divisions_.cbegin ()), theta_divisions_.cend (), theta);const auto phi_min = std::lower_bound(std::next (phi_divisions_.cbegin ()), phi_divisions_.cend (), phi);const auto j = std::distance(radii_interval_.cbegin (), std::prev(rad_min));const auto k = std::distance(theta_divisions_.cbegin (), std::prev(theta_min));const auto l = std::distance(phi_divisions_.cbegin (), std::prev(phi_min));// --- 計算當前鄰居點的局部點密度 ---pcl::Indices neighbour_indices;std::vector<float> neighbour_distances;int point_density = searchForNeighbors (*surface_, nn_indices[ne], point_density_radius_, neighbour_indices, neighbour_distances);if (point_density == 0)continue;// 權重 w = 體素歸一化體積 LUT / 鄰域點數float w = (1.0f / static_cast<float> (point_density)) *volume_lut_[(l*elevation_bins_*radius_bins_) +  (k*radius_bins_) + j];assert (w >= 0.0);if (w == std::numeric_limits<float>::infinity ())PCL_ERROR ("Shape Context Error INF!\n");if (std::isnan(w))PCL_ERROR ("Shape Context Error IND!\n");// 將權重累加到對應的直方圖 bin 中desc[(l*elevation_bins_*radius_bins_) + (k*radius_bins_) + j] += w;assert (desc[(l*elevation_bins_*radius_bins_) + (k*radius_bins_) + j] >= 0);}// 注意:Shape Context 3D 的參考系不具備重復性,因此輸出設為 0,提示用戶std::fill (rf, rf + 9, 0);return (true);
}

此函數的關鍵步驟為

  1. 計算局部參考坐標系(使用最近鄰的法線,并構造 x/y 軸);
  2. 搜索鄰域點,并將鄰居映射到形狀上下文的三維極坐標空間;
  3. 根據點在 (r, θ, φ) 空間中的位置,統計加權直方圖
  4. 輸出形狀上下文描述子 desc(一維向量,長度為 radius_bins_ * elevation_bins_ * azimuth_bins_);
  5. 將 RF 置零表示其不可重復。

2、計算所有點 3D 形狀上下文描述子(3DSC)

下面是你提供的 pcl::ShapeContext3DEstimation::computeFeature 函數的 逐行中文注釋版,便于理解其作用和流程。


template <typename PointInT, typename PointNT, typename PointOutT> 
void pcl::ShapeContext3DEstimation<PointInT, PointNT, PointOutT>::computeFeature(PointCloudOut &output)
{// 確保描述子的長度為 1980(由半徑/角度劃分決定)assert (descriptor_length_ == 1980);// 假設輸出點云初始是 dense(沒有無效點)output.is_dense = true;// 遍歷每一個需要計算描述子的點(由 indices_ 指定)for (std::size_t point_index = 0; point_index < indices_->size(); point_index++){// 如果當前點不是有限(如有 NaN 或 Inf),填充 NaN 描述子并跳過if (!isFinite((*input_)[(*indices_)[point_index]])){// 將 descriptor 數組設置為 NaNstd::fill(output[point_index].descriptor, output[point_index].descriptor + descriptor_length_,std::numeric_limits<float>::quiet_NaN());// 將局部參考幀 rf 設置為 0(表示無效)std::fill(output[point_index].rf, output[point_index].rf + 9, 0);// 標記整個輸出點云為非 dense(包含無效點)output.is_dense = false;continue;}// 初始化當前點的描述子向量,長度為 descriptor_length_(1980)std::vector<float> descriptor(descriptor_length_);// 調用 computePoint 函數計算當前點的 3D Shape Context 描述子和局部參考幀 rf// 如果失敗(如搜索不到鄰域點),將該點視作無效點if (!computePoint(point_index, *normals_, output[point_index].rf, descriptor))output.is_dense = false;// 將計算出的 descriptor 拷貝到 output 中對應點的 descriptor 成員里std::copy(descriptor.begin(), descriptor.end(), output[point_index].descriptor);}
}

說明:

  • descriptor_length_ == 1980 是由 Shape Context 直方圖的劃分決定的:
    通常為:radius_bins × elevation_bins × azimuth_bins,如 5 × 6 × 66 = 1980

  • rf 是局部參考幀(Local Reference Frame),由三個正交軸組成(x, y, normal),用于保證描述子的方向不變性。

  • 如果點本身是無效的,或在 computePoint() 中無法找到有效鄰域點,會將該點描述子設置為 NaN。

  • output.is_dense 是一個標志位,表示結果是否全部為有效點(無 NaN)。


四、使用代碼示例

/*****************************************************************//**
* \file   PCLFeature3DSCmain.cpp
* \brief
*
* \author YZS
* \date   Jun 2025
*********************************************************************/#include <iostream>#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/features/normal_3d.h>
#include <pcl/features/3dsc.h>
#include <pcl/search/kdtree.h>int PCL3DSC(int argc, char** argv)
{// 加載點云std::string fileName = "E:/PCLlearnData/18/fragment.pcd";pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>());if (pcl::io::loadPCDFile<pcl::PointXYZ>(fileName, *cloud) == -1){std::cerr << "無法讀取點云文件"<< fileName << std::endl;return -1;}std::cout << "點云加載成功,點數: " << cloud->size() << std::endl;// 計算法線pcl::PointCloud<pcl::Normal>::Ptr normals(new pcl::PointCloud<pcl::Normal>());pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> ne;ne.setInputCloud(cloud);pcl::search::KdTree<pcl::PointXYZ>::Ptr tree(new pcl::search::KdTree<pcl::PointXYZ>());ne.setSearchMethod(tree);ne.setRadiusSearch(0.05); // 法線估計半徑ne.compute(*normals);std::cout << "法線估計完成。" << std::endl;// 創建ShapeContext3D特征估計器pcl::ShapeContext3DEstimation<pcl::PointXYZ, pcl::Normal, pcl::ShapeContext1980> sc3d;sc3d.setInputCloud(cloud);  // 輸入點云sc3d.setInputNormals(normals); // 輸入法線sc3d.setSearchMethod(tree);sc3d.setRadiusSearch(0.2);  // 特征提取的球形鄰域半徑// 輸出描述子pcl::PointCloud<pcl::ShapeContext1980>::Ptr descriptors(new pcl::PointCloud<pcl::ShapeContext1980>());sc3d.compute(*descriptors);std::cout << "3DSC特征計算完成,特征維度: " << pcl::ShapeContext1980::descriptorSize() << std::endl;std::cout << "輸出特征個數: " << descriptors->size() << std::endl;// 打印前3個點的描述子片段for (size_t i = 0; i < std::min<size_t>(3, descriptors->size()); ++i){std::cout << "點 " << i << " 描述子 (前50維): ";for (int j = 0; j < 50; ++j)std::cout << descriptors->points[i].descriptor[j] << " ";std::cout << std::endl;}return 0;
}int main(int argc, char* argv[])
{PCL3DSC(argc, argv);std::cout << "Hello World!" << std::endl;std::system("pause");return 0;
}

結果展示:
在這里插入圖片描述


至此完成第十八節PCL庫點云特征之3DSC特征描述,下一節我們將進入《PCL庫中點云特征之GASD(Globally Aligned Spatial Distribution )特征描述》的學習,歡迎喜歡的朋友訂閱。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/84353.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/84353.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/84353.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

SpringBoot+Mysql校園跑腿服務平臺系統源碼

&#x1f497;博主介紹&#x1f497;&#xff1a;?在職Java研發工程師、專注于程序設計、源碼分享、技術交流、專注于Java技術領域和畢業設計? 溫馨提示&#xff1a;文末有 CSDN 平臺官方提供的老師 Wechat / QQ 名片 :) Java精品實戰案例《700套》 2025最新畢業設計選題推薦…

分庫分表的取舍

文章目錄 大數據量下采用**水平分表**的缺點**1. 跨表查詢復雜性與性能下降****2. 數據分布不均衡****3. 分布式事務與一致性問題****4. 擴展性受限****5. 查詢條件限制與索引管理復雜****6. 數據遷移與維護成本高****7. 業務邏輯復雜度增加****總結** shardingJdbc分片策略**1…

Vue3解決“找不到模塊@/components/xxx.vue或其相應的類型聲明ts文件(2307)”

問題 1&#xff1a;如果沒有這個env.d.ts文件&#xff0c;就新建 declare module "*.vue" {import { DefineComponent } from "vue";const component: DefineComponent<{}, {}, any>;export default component; }2&#xff1a;如果有tsconfig.json文…

計算機視覺與深度學習 | 基于MATLAB的圖像特征提取與匹配算法總結

基于MATLAB的圖像特征提取與匹配算法全面指南 圖像特征提取與匹配 基于MATLAB的圖像特征提取與匹配算法全面指南一、圖像特征提取基礎特征類型分類二、點特征提取算法1. Harris角點檢測2. SIFT (尺度不變特征變換)3. SURF (加速魯棒特征)4. FAST角點檢測5. ORB (Oriented FAST …

如何通過API接口獲取淘寶商品列表?操作詳解

一、準備工作 注冊開發者賬號 訪問淘寶開放平臺官網/萬邦開放平臺&#xff0c;完成企業開發者認證&#xff08;個人賬號權限受限&#xff09;&#xff0c;使用已有淘寶賬號可直接登錄。創建應用并填寫基本信息&#xff08;如應用名稱、類型等&#xff09;&#xff0c;系統生成A…

大數據驅動企業決策智能化的路徑與實踐

&#x1f4dd;個人主頁&#x1f339;&#xff1a;慌ZHANG-CSDN博客 &#x1f339;&#x1f339;期待您的關注 &#x1f339;&#x1f339; 一、引言&#xff1a;數據驅動的企業競爭力重構 在這個瞬息萬變的商業時代&#xff0c;“快者勝”的競爭邏輯愈發明顯。企業如何在復雜環…

DataGridView關閉默認第一列及表頭居中設置

1、關閉默認第一列 如上圖所示&#xff0c;C#和VB.net中的DataGridView控件都是有一個默認的第一列&#xff08;雖然是空白&#xff09;的&#xff0c;如何關閉這個默認列呢&#xff1f; 把“RowHeadersVisible”的值設置成“false”就可以了&#xff1a; 2、表頭居中顯示 如上…

nodejs express 打包部署

當前文件路徑 webpack.config.js const path require(path); module.exports {entry: ./app.js, // Express 入口文件target: node, // 指定 Node.js 環境output: {path: path.resolve(__dirname, dist),filename: bundle.js},mode: production };打包命令 npx webpac…

CentOS 7 修改為靜態 IP 地址完整指南

在企業網絡環境中,服務器通常需要配置靜態 IP 地址以確保網絡連接的穩定性和可管理性。以下是使用 NetworkManager 工具在 CentOS 7 系統中將動態 IP 配置修改為靜態 IP 的完整指南: 一、檢查當前網絡配置 查看網絡連接狀態: 使用 nmcli connection show 命令列出所有網絡連…

微信小程序動態組件加載的應用場景與實現方式

動態組件加載的應用場景與實現方式 你提供的代碼展示了微信小程序中動態加載組件的方法&#xff0c;但這種方式在實際開發中需要注意使用場景和實現細節。下面我來詳細說明如何應用&#xff1a; 應用場景 按需加載組件&#xff1a;在某些條件滿足時才加載組件動態配置組件&a…

學習記錄: 使用react-router-dom

假設有一個vite創建的react項目,先npm install react-router-dom. 在app中: import { RouterProvider, createBrowserRouter } from "react-router-dom"; import Login from "./comm/Login"; import Home from "./comm/Home"; import TotalMan…

Angular中Webpack與ngx-build-plus 淺學

Webpack 在 Angular 中的概念 Webpack 是一個模塊打包工具&#xff0c;用于將多個模塊和資源打包成一個或多個文件。在 Angular 項目中&#xff0c;Webpack 負責將 TypeScript、HTML、CSS 等文件打包成瀏覽器可以理解的 JavaScript 文件。Angular CLI 默認使用 Webpack 進行項目…

java中word快速轉pdf

java中word快速轉pdf 網上其他方法轉pdf要不轉的太慢&#xff0c;要不就是損失格式&#xff0c;故而留下此方法留作備用。 文章目錄 java中word快速轉pdf一、依賴二、依賴包三、代碼 一、依賴 <dependency><groupId>com.aspose</groupId><artifactId>…

Maven 概述、安裝、配置、倉庫、私服詳解

目錄 1、Maven 概述 1.1 Maven 的定義 1.2 Maven 解決的問題 1.3 Maven 的核心特性與優勢 2、Maven 安裝 2.1 下載 Maven 2.2 安裝配置 Maven 2.3 測試安裝 2.4 修改 Maven 本地倉庫的默認路徑 3、Maven 配置 3.1 配置本地倉庫 3.2 配置 JDK 3.3 IDEA 配置本地 Ma…

Unity使用代碼分析Roslyn Analyzers

一、創建項目&#xff08;注意這里不要選netstandard2.1會有報錯&#xff09; 二、NuGet上安裝Microsoft.CodeAnalysis.CSharp 三、實現[Partial]特性標注的類&#xff0c;結構體&#xff0c;record必須要partial關鍵字修飾 需要繼承DiagnosticAnalyzer 注意一定要加特性Diagn…

knife4j:4.3.0 default-flat-param-object: true 沒有生效

Get 方式請求 前端接口文檔中的鍵值對方式&#xff08;get&#xff09;發送對象參數&#xff0c;將對象請求參數展開

C++.OpenGL (15/64)Assimp(Open Asset Import Library)

Assimp(Open Asset Import Library) 3D模型加載核心流程 #mermaid-svg-cKmTZDxPpROr7ly1 {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-cKmTZDxPpROr7ly1 .error-icon{fill:#552222;}#mermaid-svg-cKmTZDxPpROr…

課堂筆記:吳恩達的AI課(AI FOR EVERYONE)-第一周part2 人工智能術語人工智能公司應該怎么做

人工智能術語&人工智能公司應該怎么做 一、人工智能術語 1.機器學習&#xff1a; 讓電腦能夠不用開發軟件&#xff0c;而自主獲取某種能力的研究領域。 2.數據科學&#xff1a; 從數據中提取知識和見解的科學&#xff1b; 3.深度學習&#xff1a; 度學習是一種機器…

【服務器壓力測試】本地PC電腦作為服務器運行時出現卡頓和資源緊張(Windows/Linux)

要讓本地PC電腦作為服務器運行時出現卡頓和資源緊張的情況&#xff0c;可以通過以下幾種方式模擬或觸發&#xff1a; 1. 增加CPU負載 運行大量計算密集型任務&#xff0c;例如&#xff1a; 使用多線程循環執行復雜計算&#xff08;如數學運算、加密解密等&#xff09;。運行圖…

鴻蒙開發——如何修改模擬器的顯示圖標/標題

1.圖標 第一步&#xff1a;將你所需要的圖標方到src/main/resources/base/media下 第二步&#xff1a;找到entry項目下面的src/main/module.json5 第三步&#xff1a;將原來的 "icon": "$media:layered_image", 切換成 "icon": "$media…