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

PCL-基于超体聚类的LCCP点云分割

目录

  • 一、LCCP方法
  • 二、代码实现
  • 三、实验结果
  • 四、总结
  • 五、相关链接

一、LCCP方法

LCCP指的是Local Convexity-Constrained Patch,即局部凸约束补丁的意思。LCCP方法的基本思想是在图像中找到局部区域内的凸结构,并将这些结构用于分割图像或提取特征。这种方法可以帮助识别图像中的凸物体,并对它们进行分割。LCCP方法通常结合了空间和法线信息,以提高图像分割的准确性和稳定性。

LCCP算法大致可以分成两个部分:1.基于超体聚类的过分割。2.在超体聚类的基础上再聚类。
该方法流程图如下:
在这里插入图片描述

二、代码实现

#include <iostream>
#include <pcl/ModelCoefficients.h>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/sample_consensus/method_types.h>
#include <pcl/sample_consensus/model_types.h>
#include <pcl/segmentation/sac_segmentation.h>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/filters/extract_indices.h>
#include <boost/thread/thread.hpp>
#include <stdlib.h>
#include <cmath>
#include <limits.h>
#include <boost/format.hpp>
#include <pcl/console/parse.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/visualization/point_cloud_color_handlers.h>
#include <pcl/filters/passthrough.h>
#include <pcl/segmentation/supervoxel_clustering.h>
#include <pcl/segmentation/lccp_segmentation.h>
#include <vtkPolyLine.h> 
#include <pcl/point_cloud.h>
#include <pcl/segmentation/supervoxel_clustering.h>
#include <pcl/visualization/pcl_visualizer.h>using namespace std;
typedef pcl::PointXYZ PointT;
typedef pcl::LCCPSegmentation<PointT>::SupervoxelAdjacencyList SuperVoxelAdjacencyList;
//邻接线条可视化
void addSupervoxelConnectionsToViewer(pcl::PointXYZRGBA& supervoxel_center, pcl::PointCloud<pcl::PointXYZRGBA>& adjacent_supervoxel_centers,std::string supervoxel_name, pcl::visualization::PCLVisualizer::Ptr& viewer)
{vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();vtkSmartPointer<vtkCellArray> cells = vtkSmartPointer<vtkCellArray>::New();vtkSmartPointer<vtkPolyLine> polyLine = vtkSmartPointer<vtkPolyLine>::New();for (auto adjacent_itr = adjacent_supervoxel_centers.begin(); adjacent_itr != adjacent_supervoxel_centers.end(); ++adjacent_itr){points->InsertNextPoint(supervoxel_center.data);points->InsertNextPoint(adjacent_itr->data);}vtkSmartPointer<vtkPolyData> polyData = vtkSmartPointer<vtkPolyData>::New();polyData->SetPoints(points);polyLine->GetPointIds()->SetNumberOfIds(points->GetNumberOfPoints());for (unsigned int i = 0; i < points->GetNumberOfPoints(); i++)polyLine->GetPointIds()->SetId(i, i);cells->InsertNextCell(polyLine);polyData->SetLines(cells);viewer->addModelFromPolyData(polyData, supervoxel_name);
}int main(int argc, char** argv)
{pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_filtered(new pcl::PointCloud<pcl::PointXYZ>);pcl::PCDReader reader;// 读入点云PCD文件reader.read("E:****.pcd", *cloud);cout << "Point cloud data: " << cloud->points.size() << " points" << endl;pcl::ModelCoefficients::Ptr coefficients(new pcl::ModelCoefficients);pcl::PointIndices::Ptr inliers(new pcl::PointIndices);// 创建分割对象pcl::SACSegmentation<pcl::PointXYZ> seg;// 可选择配置,设置模型系数需要优化seg.setOptimizeCoefficients(true);// 必须配置,设置分割的模型类型、所用随机参数估计方法seg.setModelType(pcl::SACMODEL_PLANE);seg.setMethodType(pcl::SAC_RANSAC);seg.setDistanceThreshold(0.02);// 距离阈值 单位m。距离阈值决定了点被认为是局内点时必须满足的条件//seg.setDistanceThreshold(0.15);// 距离阈值 单位m。距离阈值决定了点被认为是局内点时必须满足的条件//距离阈值表示点到估计模型的距离最大值。seg.setInputCloud(cloud);//输入点云seg.segment(*inliers, *coefficients);//实现分割,并存储分割结果到点集合inliers及存储平面模型系数coefficientsif (inliers->indices.size() == 0){PCL_ERROR("Could not estimate a planar model for the given dataset.");return (-1);}//***********************************************************************//-----------输出平面模型的系数 a,b,c,d-----------cout << "Model coefficients: " << coefficients->values[0] << " "<< coefficients->values[1] << " "<< coefficients->values[2] << " "<< coefficients->values[3] << endl;cout << "Model inliers: " << inliers->indices.size() << endl;//***********************************************************************// 提取地面pcl::ExtractIndices<pcl::PointXYZ> extract;extract.setInputCloud(cloud);extract.setIndices(inliers);extract.filter(*cloud_filtered);cout << "Ground cloud after filtering: " << endl;cout << *cloud_filtered << std::endl;pcl::PCDWriter writer;writer.write<pcl::PointXYZ>("3dpoints_ground.pcd", *cloud_filtered, false);// 提取除地面外的物体extract.setNegative(true);extract.filter(*cloud_filtered);cout << "Object cloud after filtering: " << endl;cout << *cloud_filtered << endl;//writer.write<pcl::PointXYZ>(".pcd", *cloud_filtered, false);// 点云可视化boost::shared_ptr<pcl::visualization::PCLVisualizer>viewer0(new pcl::visualization::PCLVisualizer("显示点云"));//左边窗口显示输入的点云,右边的窗口显示分割后的点云int v1(0), v2(0);viewer0->createViewPort(0, 0, 0.5, 1, v1);viewer0->createViewPort(0.5, 0, 1, 1, v2);viewer0->setBackgroundColor(0, 0, 0, v1);viewer0->setBackgroundColor(0.3, 0.3, 0.3, v2);pcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ> color_in(cloud, 255, 0, 0);viewer0->addPointCloud<pcl::PointXYZ>(cloud, color_in, "cloud_in", v1);viewer0->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "cloud_in", v1);viewer0->addPointCloud<pcl::PointXYZ>(cloud_filtered, "cloud_out", v2);viewer0->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_COLOR, 0, 255, 0, "cloud_out", v2);viewer0->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "cloud_out", v2);while (!viewer0->wasStopped()){viewer0->spinOnce(100);boost::this_thread::sleep(boost::posix_time::microseconds(1000));}//***********************************************************************//超体聚类 float voxel_resolution = 0.01f;    // 设置体素大小,该设置决定底层八叉树的叶子尺寸float seed_resolution = 0.15f;    // 设置种子大小,该设置决定超体素的大小float color_importance = 0.0f;    // 设置颜色在距离测试公式中的权重,即颜色影响超体素分割结果的比重。 真实点云都是一个颜色,所以这个参数无作用float spatial_importance = 0.9f;  // 设置空间距离在距离测试公式中的权重,较高的值会构建非常规则的超体素,较低的值产生的体素会按照法线float normal_importance = 4.0f;   // 设置法向量的权重,即表面法向量影响超体素分割结果的比重。bool use_single_cam_transform = false;bool use_supervoxel_refinement = false;unsigned int k_factor = 0;//voxel_resolution is the resolution (in meters) of voxels used、seed_resolution is the average size (in meters) of resulting supervoxels  pcl::SupervoxelClustering<PointT> super(voxel_resolution, seed_resolution);super.setUseSingleCameraTransform(use_single_cam_transform);super.setInputCloud(cloud_filtered); //cloud_filteredsuper.setColorImportance(color_importance);//Set the importance of spatial distance for supervoxels.super.setSpatialImportance(spatial_importance);//Set the importance of scalar normal product for supervoxels. super.setNormalImportance(normal_importance);std::map<uint32_t, pcl::Supervoxel<PointT>::Ptr> supervoxel_clusters;super.extract(supervoxel_clusters);std::multimap<uint32_t, uint32_t> supervoxel_adjacency;super.getSupervoxelAdjacency(supervoxel_adjacency);pcl::PointCloud<pcl::PointNormal>::Ptr sv_centroid_normal_cloud = pcl::SupervoxelClustering<PointT>::makeSupervoxelNormalCloud(supervoxel_clusters);cout << "超体素分割的体素个数为:" << supervoxel_clusters.size() << endl;// 获取点云对应的超体素分割标签pcl::PointCloud<pcl::PointXYZL>::Ptr supervoxel_cloud = super.getLabeledCloud();pcl::visualization::PCLVisualizer::Ptr viewer1(new pcl::visualization::PCLVisualizer("VCCS"));viewer1->setWindowName("超体素分割");viewer1->addPointCloud(supervoxel_cloud, "超体素分割");viewer1->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "超体素分割");viewer1->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_OPACITY, 0.5, "超体素分割");//-----------------------------------------获得体素点云的邻接单元----------------------------------------------multimap<uint32_t, uint32_t>SupervoxelAdjacency;super.getSupervoxelAdjacency(SupervoxelAdjacency);for (auto label_itr = SupervoxelAdjacency.cbegin(); label_itr != SupervoxelAdjacency.cend();){uint32_t super_label = label_itr->first;//获取体素单元的标签pcl::Supervoxel<pcl::PointXYZ>::Ptr super_cloud = supervoxel_clusters.at(super_label);//把对应标签内的点云、体素质心、以及质心对应的法向量提取出来pcl::PointCloud<pcl::PointXYZRGBA> adjacent_supervoxel_centers;for (auto adjacent_itr = SupervoxelAdjacency.equal_range(super_label).first; adjacent_itr != SupervoxelAdjacency.equal_range(super_label).second; ++adjacent_itr){pcl::Supervoxel<pcl::PointXYZ>::Ptr neighbor_supervoxel = supervoxel_clusters.at(adjacent_itr->second);adjacent_supervoxel_centers.push_back(neighbor_supervoxel->centroid_);}std::stringstream ss;ss << "supervoxel_" << super_label;addSupervoxelConnectionsToViewer(super_cloud->centroid_, adjacent_supervoxel_centers, ss.str(), viewer1);label_itr = SupervoxelAdjacency.upper_bound(super_label);}// 等待直到可视化窗口关闭while (!viewer1->wasStopped()){viewer1->spinOnce(100);boost::this_thread::sleep(boost::posix_time::microseconds(1000));}//return 0;//***********************************************************************//LCCP分割float concavity_tolerance_threshold = 10;float smoothness_threshold = 0.8;uint32_t min_segment_size = 0;bool use_extended_convexity = false;bool use_sanity_criterion = false;pcl::LCCPSegmentation<PointT> lccp;lccp.setConcavityToleranceThreshold(concavity_tolerance_threshold);//CC效验beta值lccp.setSmoothnessCheck(true, voxel_resolution, seed_resolution, smoothness_threshold);lccp.setKFactor(k_factor);               //CC效验的k邻点lccp.setInputSupervoxels(supervoxel_clusters, supervoxel_adjacency);lccp.setMinSegmentSize(min_segment_size);//最小分割尺寸lccp.segment();pcl::PointCloud<pcl::PointXYZL>::Ptr sv_labeled_cloud = super.getLabeledCloud();pcl::PointCloud<pcl::PointXYZL>::Ptr lccp_labeled_cloud = sv_labeled_cloud->makeShared();lccp.relabelCloud(*lccp_labeled_cloud);SuperVoxelAdjacencyList sv_adjacency_list;lccp.getSVAdjacencyList(sv_adjacency_list);pcl::visualization::PCLVisualizer::Ptr viewer2(new pcl::visualization::PCLVisualizer("LCCP超体素分割"));viewer2->setWindowName("LCCP超体素分割");viewer2->addPointCloud(lccp_labeled_cloud, "LCCP超体素分割");viewer2->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "LCCP超体素分割");viewer2->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_OPACITY, 0.5, "LCCP超体素分割");// 等待直到可视化窗口关闭while (!viewer2->wasStopped()){viewer2->spinOnce(100);boost::this_thread::sleep(boost::posix_time::microseconds(1000));}return 0;}

三、实验结果

原数据
原数据
去除地面后
在这里插入图片描述
超体聚类过分割
在这里插入图片描述
LCCP分割
在这里插入图片描述

四、总结

从实验结果来看,LCCP算法在相似物体场景分割方面有着较好的表现,对于颜色类似但棱角分明的物体可使用该算法。

五、相关链接

[1]PCL-低层次视觉-点云分割(超体聚类)
[2]PCL_使用LCCP进行点云分割

相关文章:

PCL-基于超体聚类的LCCP点云分割

目录 一、LCCP方法二、代码实现三、实验结果四、总结五、相关链接 一、LCCP方法 LCCP指的是Local Convexity-Constrained Patch&#xff0c;即局部凸约束补丁的意思。LCCP方法的基本思想是在图像中找到局部区域内的凸结构&#xff0c;并将这些结构用于分割图像或提取特征。这种…...

git 推送时出现错误 Locking support detected on remote “origin“

背景&#xff1a;代码托管是局域网搭建的gitlab 按照提示配置 lfs.locksverify true 还是没有用。 网上搜索了一番&#xff0c;其中有人提到可能时服务器磁盘满了&#xff0c;连到服务器上 df -h 查看&#xff0c; 发现根目录已经写满了&#xff1a; 使用命令行&#xff1a; d…...

劳动仲裁经验篇【赶紧收藏】

【劳动仲裁】纯经验干货分享&#xff0c;点个关注防止需要时找不到&#xff01; 当公司决定搞你心态&#xff0c;变相逼退你时&#xff0c;无非就那么些手段&#xff0c;只要你能正确应对&#xff0c;并做好收集证据的准备&#xff0c;就不住畏惧。合理利用法律的武器维护自身…...

QT多媒体编程(一)——音频编程知识详解及MP3音频播放器Demo

目录 引言 一、QtMultimedia模块简介 主要类和功能 二、QtMultimedia相关类及函数解析 QAudioInput QAudioOutput QAudioFormat QMediaPlayer QMediaPlaylist QCamera 三、音频项目实战Demo UI界面 核心代码 运行结果 四、结论 引言 在数字时代&#xff0c;音频…...

MySQL使用教程 最最最实用的零基础教程 直接从安装开始教!!!!

数据构成了我们日益数字化的社会基础。想象一下&#xff0c;从移动应用和银行系统到搜索引擎&#xff0c;再到如 ChatGPT 这样的先进人工智能聊天机器人&#xff0c;这些工具若没有数据支撑&#xff0c;将寸步难行。你有没有好奇过这些海量数据都存放在哪里呢&#xff1f;答案正…...

pycharm怎么使用Anaconda和配置

打开Anaconda Prompt 要删除 Conda 环境 yolov5sconda&#xff0c;你可以使用以下命令&#xff1a; conda remove --name yolov5sconda --all这个命令会删除名为 yolov5sconda 的整个环境&#xff0c;包括其中安装的所有包和依赖项。请在命令提示符或终端中运行此命令。执行此…...

android中打包apk体积优化方案

1.在配置文件AndroidManifest中新增 android:extractNativeLibs"true" 2.在模块build文件下配置支持的cpu,一般配置64的就行了,多配一种so库体积大一倍&#xff0c;择优。 ndk { abiFilters arm64-v8a } 3.在模块builde文件下配置混淆除去无用的资源文件 注:三种…...

Kubernetes常见的3种部署方式

Kubernetes常见的3种部署方式 1. kubeadm2. 二进制包安装3. Minikube💖The Begin💖点点关注,收藏不迷路💖 Kubernetes(K8s)作为容器编排领域的领导者,提供了多种部署方式以适应不同场景的需求。 1. kubeadm 简介:Kubernetes官方推荐的集群部署工具。特点:简单易用…...

什么情况?我代码没了

前两天检视代码时&#xff0c;发现PR里面有两个提交的描述信息一模一样&#xff0c;于是我提出应该将这两个提交合并成一个&#xff0c;保持提交树的清晰。 1 先储存起来&#xff01; 而同事这时正在开发别的特性&#xff0c;工作区不是干净的&#xff0c;没法直接执行 git r…...

关于Unity四种合批技术详解

文章目录 一.静态合批(StaticBatching)1.启用静态合批2.举例说明3.静态合批的限制4.静态合批的优点缺点5.动态指定物品合批 二.动态合批(Dynamic Batching)1.启用动态合批2.合批规则3.举例说明4.使用限制 三.GPU Instancing1.启用GPU Instancing2.启用限制3.举例说明 四.SRP Ba…...

自定义注解+拦截器+redis限流

逻辑&#xff1a;写一个注解&#xff0c;自定义在多少秒内限制访问多少次。 自定义拦截器&#xff0c;对于加了注解的请求&#xff0c;在执行方法前。先检查有没有注解&#xff0c;如果有注解就将请求的ipurl拼接作为key。 查询redis中有没有该key&#xff0c;没有就存入&…...

Springcloud物流配送后台-计算机毕业设计源码69809

目 录 摘要 1 绪论 1.1 选题背景与意义 1.2国内外研究现状 1.3论文结构与章节安排 2 物流配送后台系统分析 2.1 可行性分析 2.1.1 技术可行性分析 2.1.2 经济可行性分析 2.1.3 操作可行性分析 2.2 系统流程分析 2.2.1数据增加流程 2.2.2 数据修改流程 2.2.3 数据…...

【Java面试篇】数据埋点监控页面pv的SDK接口实现

面试题如下: 题目要求你实现一个 Monitor.counter(String code, String dim) 接口,用于监控数据统计。 具体要求: 数据聚合: 你需要按照 code 和 dim 的组合进行数据聚合, code 代表监控项的唯一标识, dim 为自定义维度。上报频率: 每分钟上报一次聚合后的数据。数据保证…...

vue3直播视频流easy-player

vue3直播视频流easy-player <script src"/easyPlayer/EasyPlayer-element.min.js"></script> easyPlayer文件下载地址 https://download.csdn.net/download/weixin_42120669/89605739 <template><div class"container"><div …...

Python笔试面试题AI答之面向对象(3)

文章目录 12.Python中OOPS是什么&#xff1f;1. 类&#xff08;Class&#xff09;2. 对象&#xff08;Object&#xff09;3. 面向对象编程的主要特性4. 面向对象编程的优点 13.解释一下Python中的继承&#xff1f;继承的基本语法继承的特性继承的类型 14. 什么是封装&#xff1…...

vulnhub靶场serial-php渗透(蜥蜴细!)

目录 一、信息收集 1.探测主机存活&#xff08;目标主机IP地址&#xff09; 2.访问web服务 3.后台目录和端口扫描 4.解析bak.zip源码 二、漏洞利用 1.构造payload 2.通过bp的repeater模块 3.get shell 4.获取反弹shell 三、提升权限 1. 查看系统版本&#xff0c;内核…...

Qt Designer,仿作一个ui界面的练习(一):界面的基本布局

初学不要太复杂&#xff0c;先做一个结构简单的&#xff0c;大致规划一下功能分区&#xff0c;绘制草图&#xff1a; 最终的效果&#xff1a; 界面主要由顶边栏、侧边栏、内容区构成。顶边栏左边是logo&#xff0c;右边是时钟显示。侧边栏最上边是切换按钮&#xff0c;用以动画…...

《深入了解 Postman 接口测试工具》

在现代 Web 开发中&#xff0c;接口测试是确保系统稳定性和可靠性的关键环节。Postman 作为一款强大的接口测试工具&#xff0c;为开发者和测试人员提供了便捷、高效的测试体验。本文将深入详解 Postman 的各项功能和使用方法。 一、Postman 简介 Postman 是一款功能丰富的 A…...

java使用org.apache.commons:commons-compress解压 .7z压缩包

前言 java使用org.apache.commons:commons-compress解压 .7z压缩包 一、使用步骤 1.引入库 代码如下&#xff08;示例&#xff09;&#xff1a;cpmpress需要用到xz依赖&#xff0c;不一起引入会报错。 <!-- https://mvnrepository.com/artifact/org.tukaani/xz --> …...

通过知识库系统实现卓越医疗保健

提供更好的患者治疗效果&#xff1b;提高医疗保健组织的效率和有效性。 利用 Baklib 的力量 Baklib 使患者、代理人和专业人员能够轻松采用知识库系统。 1.对于患者 通过自助在线知识库提供有关药品、测试、服务、康复等的信息&#xff0c;改善患者体验和健康结果。 2.对于…...

多云管理“拦路虎”:深入解析网络互联、身份同步与成本可视化的技术复杂度​

一、引言&#xff1a;多云环境的技术复杂性本质​​ 企业采用多云策略已从技术选型升维至生存刚需。当业务系统分散部署在多个云平台时&#xff0c;​​基础设施的技术债呈现指数级积累​​。网络连接、身份认证、成本管理这三大核心挑战相互嵌套&#xff1a;跨云网络构建数据…...

使用VSCode开发Django指南

使用VSCode开发Django指南 一、概述 Django 是一个高级 Python 框架&#xff0c;专为快速、安全和可扩展的 Web 开发而设计。Django 包含对 URL 路由、页面模板和数据处理的丰富支持。 本文将创建一个简单的 Django 应用&#xff0c;其中包含三个使用通用基本模板的页面。在此…...

Linux简单的操作

ls ls 查看当前目录 ll 查看详细内容 ls -a 查看所有的内容 ls --help 查看方法文档 pwd pwd 查看当前路径 cd cd 转路径 cd .. 转上一级路径 cd 名 转换路径 …...

对WWDC 2025 Keynote 内容的预测

借助我们以往对苹果公司发展路径的深入研究经验&#xff0c;以及大语言模型的分析能力&#xff0c;我们系统梳理了多年来苹果 WWDC 主题演讲的规律。在 WWDC 2025 即将揭幕之际&#xff0c;我们让 ChatGPT 对今年的 Keynote 内容进行了一个初步预测&#xff0c;聊作存档。等到明…...

Spring Boot面试题精选汇总

&#x1f91f;致敬读者 &#x1f7e9;感谢阅读&#x1f7e6;笑口常开&#x1f7ea;生日快乐⬛早点睡觉 &#x1f4d8;博主相关 &#x1f7e7;博主信息&#x1f7e8;博客首页&#x1f7eb;专栏推荐&#x1f7e5;活动信息 文章目录 Spring Boot面试题精选汇总⚙️ **一、核心概…...

3-11单元格区域边界定位(End属性)学习笔记

返回一个Range 对象&#xff0c;只读。该对象代表包含源区域的区域上端下端左端右端的最后一个单元格。等同于按键 End 向上键(End(xlUp))、End向下键(End(xlDown))、End向左键(End(xlToLeft)End向右键(End(xlToRight)) 注意&#xff1a;它移动的位置必须是相连的有内容的单元格…...

代理篇12|深入理解 Vite中的Proxy接口代理配置

在前端开发中,常常会遇到 跨域请求接口 的情况。为了解决这个问题,Vite 和 Webpack 都提供了 proxy 代理功能,用于将本地开发请求转发到后端服务器。 什么是代理(proxy)? 代理是在开发过程中,前端项目通过开发服务器,将指定的请求“转发”到真实的后端服务器,从而绕…...

排序算法总结(C++)

目录 一、稳定性二、排序算法选择、冒泡、插入排序归并排序随机快速排序堆排序基数排序计数排序 三、总结 一、稳定性 排序算法的稳定性是指&#xff1a;同样大小的样本 **&#xff08;同样大小的数据&#xff09;**在排序之后不会改变原始的相对次序。 稳定性对基础类型对象…...

Kafka入门-生产者

生产者 生产者发送流程&#xff1a; 延迟时间为0ms时&#xff0c;也就意味着每当有数据就会直接发送 异步发送API 异步发送和同步发送的不同在于&#xff1a;异步发送不需要等待结果&#xff0c;同步发送必须等待结果才能进行下一步发送。 普通异步发送 首先导入所需的k…...

【Android】Android 开发 ADB 常用指令

查看当前连接的设备 adb devices 连接设备 adb connect 设备IP 断开已连接的设备 adb disconnect 设备IP 安装应用 adb install 安装包的路径 卸载应用 adb uninstall 应用包名 查看已安装的应用包名 adb shell pm list packages 查看已安装的第三方应用包名 adb shell pm list…...