点云文件常用格式转换(pcd,txt,ply,obj,stl)

2023-10-27

pcd转txt

#include <iostream>
#include <fstream>
#include <pcl/io/pcd_io.h>   

int main(int argc, char *argv[])
{
	pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
	pcl::io::loadPCDFile("rabbit.pcd", *cloud);

	std::ofstream outfile;
	outfile.open("rabbit.txt");

	for (size_t i = 0; i < cloud->points.size(); ++i)
	{
		outfile << cloud->points[i].x << "\t" << cloud->points[i].y << "\t" << cloud->points[i].z << "\n";
	}

	return 0;
}

txt转pcd

#include <iostream>
#include <fstream>
#include <pcl/io/pcd_io.h>   

int main(int argc, char *argv[])
{
	std::ifstream infile;
	infile.open("rabbit.txt");
	
	float x, y, z;
	pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
	while (infile >> x >> y >> z)
	{
		cloud->push_back(pcl::PointXYZ(x, y, z));
	}
	pcl::io::savePCDFileBinary("rabbit.pcd", *cloud);

	return 0;
}

pcd转ply

#include <iostream>          
#include <pcl/io/pcd_io.h>  
#include <pcl/point_types.h> 
#include <pcl/io/ply_io.h>  

int main(int argc, char** argv)
{
	pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
	pcl::io::loadPCDFile("rabbit.pcd", *cloud);
	pcl::io::savePLYFileBinary("rabbit.ply", *cloud);

	return 0;
}

pcd转ply(三角网格化)

#include <iostream>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/io/ply_io.h>  
#include <pcl/kdtree/kdtree_flann.h>
#include <pcl/features/normal_3d.h>
#include <pcl/surface/gp3.h>

using namespace std;

int main(int argc, char** argv)
{
	// Load input file
	pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
	pcl::io::loadPCDFile("rabbit.pcd", *cloud);

	// Normal estimation*
	pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> n;
	pcl::PointCloud<pcl::Normal>::Ptr normals(new pcl::PointCloud<pcl::Normal>);
	pcl::search::KdTree<pcl::PointXYZ>::Ptr tree(new pcl::search::KdTree<pcl::PointXYZ>);
	tree->setInputCloud(cloud);
	n.setInputCloud(cloud);
	n.setSearchMethod(tree);
	n.setKSearch(10);
	n.compute(*normals);
	//* normals should not contain the point normals + surface curvatures

	// Concatenate the XYZ and normal fields*
	pcl::PointCloud<pcl::PointNormal>::Ptr cloud_with_normals(new pcl::PointCloud<pcl::PointNormal>);
	pcl::concatenateFields(*cloud, *normals, *cloud_with_normals);
	//* cloud_with_normals = cloud + normals

	// Create search tree*
	pcl::search::KdTree<pcl::PointNormal>::Ptr tree2(new pcl::search::KdTree<pcl::PointNormal>);
	tree2->setInputCloud(cloud_with_normals);

	// Initialize objects
	pcl::GreedyProjectionTriangulation<pcl::PointNormal> gp3;
	pcl::PolygonMesh triangles;

	// Set the maximum distance between connected points (maximum edge length)
	gp3.setSearchRadius(1);

	// Set typical values for the parameters
	gp3.setMu(2.5);
	gp3.setMaximumNearestNeighbors(100);
	gp3.setMaximumSurfaceAngle(M_PI / 4); // 45 degrees
	gp3.setMinimumAngle(M_PI / 18); // 10 degrees
	gp3.setMaximumAngle(2 * M_PI / 3); // 120 degrees
	gp3.setNormalConsistency(false);

	// Get result
	gp3.setInputCloud(cloud_with_normals);
	gp3.setSearchMethod(tree2);
	gp3.reconstruct(triangles);
	pcl::io::savePLYFile("rabbit.ply", triangles);
	return 0;
}

ply转pcd

#include <iostream>          
#include <pcl/io/pcd_io.h>  
#include <pcl/point_types.h> 
#include <pcl/io/ply_io.h>  

int main(int argc, char** argv)
{
	pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
	pcl::io::loadPLYFile("rabbit.ply", *cloud);
	pcl::io::savePCDFileBinary("rabbit.pcd", *cloud);

	return 0;
}

obj/ply转pcd(均匀采样)

#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/io/pcd_io.h>
#include <pcl/io/vtk_lib_io.h>
#include <pcl/common/transforms.h>
#include <vtkVersion.h>
#include <vtkPLYReader.h>
#include <vtkOBJReader.h>
#include <vtkTriangle.h>
#include <vtkTriangleFilter.h>
#include <vtkPolyDataMapper.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/console/print.h>
#include <pcl/console/parse.h>
#include <vtkAutoInit.h>
#include <vtkRenderWindow.h>


VTK_MODULE_INIT(vtkRenderingOpenGL2)
VTK_MODULE_INIT(vtkInteractionStyle)


inline double uniform_deviate(int seed)
{
	double ran = seed * (1.0 / (RAND_MAX + 1.0));
	return ran;
}

inline void randomPointTriangle(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3, Eigen::Vector4f& p)
{
	float r1 = static_cast<float> (uniform_deviate(rand()));
	float r2 = static_cast<float> (uniform_deviate(rand()));
	float r1sqr = std::sqrt(r1);
	float OneMinR1Sqr = (1 - r1sqr);
	float OneMinR2 = (1 - r2);
	a1 *= OneMinR1Sqr;
	a2 *= OneMinR1Sqr;
	a3 *= OneMinR1Sqr;
	b1 *= OneMinR2;
	b2 *= OneMinR2;
	b3 *= OneMinR2;
	c1 = r1sqr * (r2 * c1 + b1) + a1;
	c2 = r1sqr * (r2 * c2 + b2) + a2;
	c3 = r1sqr * (r2 * c3 + b3) + a3;
	p[0] = c1;
	p[1] = c2;
	p[2] = c3;
	p[3] = 0;
}

inline void randPSurface(vtkPolyData * polydata, std::vector<double> * cumulativeAreas, double totalArea, Eigen::Vector4f& p, bool calcNormal, Eigen::Vector3f& n)
{
	float r = static_cast<float> (uniform_deviate(rand()) * totalArea);

	std::vector<double>::iterator low = std::lower_bound(cumulativeAreas->begin(), cumulativeAreas->end(), r);
	vtkIdType el = vtkIdType(low - cumulativeAreas->begin());

	double A[3], B[3], C[3];
	vtkIdType npts = 0;
	vtkIdType *ptIds = NULL;
	polydata->GetCellPoints(el, npts, ptIds);
	polydata->GetPoint(ptIds[0], A);
	polydata->GetPoint(ptIds[1], B);
	polydata->GetPoint(ptIds[2], C);
	if (calcNormal)
	{
		// OBJ: Vertices are stored in a counter-clockwise order by default
		Eigen::Vector3f v1 = Eigen::Vector3f(A[0], A[1], A[2]) - Eigen::Vector3f(C[0], C[1], C[2]);
		Eigen::Vector3f v2 = Eigen::Vector3f(B[0], B[1], B[2]) - Eigen::Vector3f(C[0], C[1], C[2]);
		n = v1.cross(v2);
		n.normalize();
	}
	randomPointTriangle(float(A[0]), float(A[1]), float(A[2]),
		float(B[0]), float(B[1]), float(B[2]),
		float(C[0]), float(C[1]), float(C[2]), p);
}

void uniform_sampling(vtkSmartPointer<vtkPolyData> polydata, size_t n_samples, bool calc_normal, pcl::PointCloud<pcl::PointNormal> & cloud_out)
{
	polydata->BuildCells();
	vtkSmartPointer<vtkCellArray> cells = polydata->GetPolys();

	double p1[3], p2[3], p3[3], totalArea = 0;
	std::vector<double> cumulativeAreas(cells->GetNumberOfCells(), 0);
	size_t i = 0;
	vtkIdType npts = 0, *ptIds = NULL;
	for (cells->InitTraversal(); cells->GetNextCell(npts, ptIds); i++)
	{
		polydata->GetPoint(ptIds[0], p1);
		polydata->GetPoint(ptIds[1], p2);
		polydata->GetPoint(ptIds[2], p3);
		totalArea += vtkTriangle::TriangleArea(p1, p2, p3);
		cumulativeAreas[i] = totalArea;
	}

	cloud_out.points.resize(n_samples);
	cloud_out.width = static_cast<pcl::uint32_t> (n_samples);
	cloud_out.height = 1;

	for (i = 0; i < n_samples; i++)
	{
		Eigen::Vector4f p;
		Eigen::Vector3f n;
		randPSurface(polydata, &cumulativeAreas, totalArea, p, calc_normal, n);
		cloud_out.points[i].x = p[0];
		cloud_out.points[i].y = p[1];
		cloud_out.points[i].z = p[2];
		if (calc_normal)
		{
			cloud_out.points[i].normal_x = n[0];
			cloud_out.points[i].normal_y = n[1];
			cloud_out.points[i].normal_z = n[2];
		}
	}
}

using namespace pcl;
using namespace pcl::io;
using namespace pcl::console;

const int default_number_samples = 1000000;
const float default_leaf_size = 1.0f;

void printHelp(int, char **argv)
{
	print_error("Syntax is: %s input.{ply,obj} output.pcd <options>\n", argv[0]);
	print_info("  where options are:\n");
	print_info("                     -n_samples X      = number of samples (default: ");
	print_value("%d", default_number_samples);
	print_info(")\n");
	print_info(
		"                     -leaf_size X  = the XYZ leaf size for the VoxelGrid -- for data reduction (default: ");
	print_value("%f", default_leaf_size);
	print_info(" m)\n");
	print_info("                     -write_normals = flag to write normals to the output pcd\n");
	print_info(
		"                     -no_vis_result = flag to stop visualizing the generated pcd\n");
}

/* ---[ */
int main(int argc, char **argv)
{
	print_info("Convert a CAD model to a point cloud using uniform sampling. For more information, use: %s -h\n", argv[0]);

	if (argc < 3)
	{
		printHelp(argc, argv);
		return (-1);
	}

	// Parse command line arguments
	int SAMPLE_POINTS_ = default_number_samples;
	parse_argument(argc, argv, "-n_samples", SAMPLE_POINTS_);
	float leaf_size = default_leaf_size;
	parse_argument(argc, argv, "-leaf_size", leaf_size);
	bool vis_result = !find_switch(argc, argv, "-no_vis_result");
	const bool write_normals = find_switch(argc, argv, "-write_normals");

	// Parse the command line arguments for .ply and PCD files
	std::vector<int> pcd_file_indices = parse_file_extension_argument(argc, argv, ".pcd");
	if (pcd_file_indices.size() != 1)
	{
		print_error("Need a single output PCD file to continue.\n");
		return (-1);
	}
	std::vector<int> ply_file_indices = parse_file_extension_argument(argc, argv, ".ply");
	std::vector<int> obj_file_indices = parse_file_extension_argument(argc, argv, ".obj");
	if (ply_file_indices.size() != 1 && obj_file_indices.size() != 1)
	{
		print_error("Need a single input PLY/OBJ file to continue.\n");
		return (-1);
	}

	vtkSmartPointer<vtkPolyData> polydata1 = vtkSmartPointer<vtkPolyData>::New();
	if (ply_file_indices.size() == 1)
	{
		pcl::PolygonMesh mesh;
		pcl::io::loadPolygonFilePLY(argv[ply_file_indices[0]], mesh);
		pcl::io::mesh2vtk(mesh, polydata1);
	}
	else if (obj_file_indices.size() == 1)
	{
		vtkSmartPointer<vtkOBJReader> readerQuery = vtkSmartPointer<vtkOBJReader>::New();
		readerQuery->SetFileName(argv[obj_file_indices[0]]);
		readerQuery->Update();
		polydata1 = readerQuery->GetOutput();
	}

	//make sure that the polygons are triangles!
	vtkSmartPointer<vtkTriangleFilter> triangleFilter = vtkSmartPointer<vtkTriangleFilter>::New();
#if VTK_MAJOR_VERSION < 6
	triangleFilter->SetInput(polydata1);
#else
	triangleFilter->SetInputData(polydata1);
#endif
	triangleFilter->Update();

	vtkSmartPointer<vtkPolyDataMapper> triangleMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
	triangleMapper->SetInputConnection(triangleFilter->GetOutputPort());
	triangleMapper->Update();
	polydata1 = triangleMapper->GetInput();

	bool INTER_VIS = false;

	if (INTER_VIS)
	{
		visualization::PCLVisualizer vis;
		vis.addModelFromPolyData(polydata1, "mesh1", 0);
		vis.setRepresentationToSurfaceForAllActors();
		vis.spin();
	}

	pcl::PointCloud<pcl::PointNormal>::Ptr cloud_1(new pcl::PointCloud<pcl::PointNormal>);
	uniform_sampling(polydata1, SAMPLE_POINTS_, write_normals, *cloud_1);

	if (INTER_VIS)
	{
		visualization::PCLVisualizer vis_sampled;
		vis_sampled.addPointCloud<pcl::PointNormal>(cloud_1);
		if (write_normals)
			vis_sampled.addPointCloudNormals<pcl::PointNormal>(cloud_1, 1, 0.02f, "cloud_normals");
		vis_sampled.spin();
	}

	// Voxelgrid
	VoxelGrid<PointNormal> grid_;
	grid_.setInputCloud(cloud_1);
	grid_.setLeafSize(leaf_size, leaf_size, leaf_size);

	pcl::PointCloud<pcl::PointNormal>::Ptr voxel_cloud(new pcl::PointCloud<pcl::PointNormal>);
	grid_.filter(*voxel_cloud);


	if (!write_normals)
	{
		pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_xyz(new pcl::PointCloud<pcl::PointXYZ>);
		// Strip uninitialized normals from cloud:
		pcl::copyPointCloud(*voxel_cloud, *cloud_xyz);
		savePCDFileBinary(argv[pcd_file_indices[0]], *cloud_xyz);
	}
	else
	{
		savePCDFileBinary(argv[pcd_file_indices[0]], *voxel_cloud);
	}
}

pcd转obj

#include <iostream>
#include <pcl/io/io.h>
#include <pcl/io/pcd_io.h>
#include <pcl/io/obj_io.h>
#include <pcl/PolygonMesh.h>

int main(int argc, char** argv)
{
	pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
	pcl::io::loadPCDFile("rabbit.pcd", *cloud);
	pcl::PolygonMesh mesh;
	pcl::toPCLPointCloud2(*cloud, mesh.cloud);
	pcl::io::saveOBJFile("rabbit.obj", mesh);

	return 0;
}

stl转ply

#include <fstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include <time.h>

using namespace std;

struct Coordinate {
	float x, y, z;
	bool operator<(const Coordinate& rhs) {
		return x<rhs.x || (x == rhs.x&&y<rhs.y) || (x == rhs.x&&y == rhs.y&&z<rhs.z);
	}
	bool operator==(const Coordinate& rhs) {
		return x == rhs.x&&y == rhs.y && z == rhs.z;
	}
};
vector<Coordinate> vecSorted, vecOrigin;
vector<Coordinate>::iterator iter, iterBegin;

int numberOfFacets;
int numberOfPoints;
int index;


char c1[] = "ply\nformat binary_little_endian 1.0\ncomment By ET \nelement vertex ";
char c2[] = "\nproperty float x\nproperty float y\nproperty float z\nelement face ";
char c3[] = "\nproperty list uchar int vertex_indices\nend_header\n";

int main(int argc, char **argv)
{
	cout << ".exe .STL .ply" << endl;
	clock_t start, finish;
	double totaltime;
	start = clock();

	int length;
	int position = 80;
	fstream fileIn(argv[1], ios::in | ios::binary);
	fileIn.seekg(0, ios::end);
	length = (int)fileIn.tellg();
	fileIn.seekg(0, ios::beg);
	char* buffer = new char[length];
	fileIn.read(buffer, length);
	fileIn.close();


	numberOfFacets = *(int*)&(buffer[position]);
	position += 4;
	cout << "Number of Facets: " << numberOfFacets << endl;
	for (int i = 0; i < numberOfFacets; i++)
	{
		Coordinate tmpC;
		position += 12;
		for (int j = 0; j < 3; j++)
		{
			tmpC.x = *(float*)&(buffer[position]);
			position += 4;
			tmpC.y = *(float*)&(buffer[position]);
			position += 4;
			tmpC.z = *(float*)&(buffer[position]);
			position += 4;
			vecOrigin.push_back(tmpC);
		}
		position += 2;
	}

	free(buffer);

	vecSorted = vecOrigin;
	sort(vecSorted.begin(), vecSorted.end());
	iter = unique(vecSorted.begin(), vecSorted.end());
	vecSorted.erase(iter, vecSorted.end());
	numberOfPoints = vecSorted.size();

	ofstream fileOut(argv[2], ios::binary | ios::out | ios::trunc);

	fileOut.write(c1, sizeof(c1) - 1);
	fileOut << numberOfPoints;
	fileOut.write(c2, sizeof(c2) - 1);
	fileOut << numberOfFacets;
	fileOut.write(c3, sizeof(c3) - 1);


	buffer = new char[numberOfPoints * 3 * 4];
	position = 0;
	for (int i = 0; i < numberOfPoints; i++)
	{
		buffer[position++] = *(char*)(&vecSorted[i].x);
		buffer[position++] = *((char*)(&vecSorted[i].x) + 1);
		buffer[position++] = *((char*)(&vecSorted[i].x) + 2);
		buffer[position++] = *((char*)(&vecSorted[i].x) + 3);
		buffer[position++] = *(char*)(&vecSorted[i].y);
		buffer[position++] = *((char*)(&vecSorted[i].y) + 1);
		buffer[position++] = *((char*)(&vecSorted[i].y) + 2);
		buffer[position++] = *((char*)(&vecSorted[i].y) + 3);
		buffer[position++] = *(char*)(&vecSorted[i].z);
		buffer[position++] = *((char*)(&vecSorted[i].z) + 1);
		buffer[position++] = *((char*)(&vecSorted[i].z) + 2);
		buffer[position++] = *((char*)(&vecSorted[i].z) + 3);
	}


	fileOut.write(buffer, numberOfPoints * 3 * 4);

	free(buffer);

	buffer = new char[numberOfFacets * 13];

	for (int i = 0; i < numberOfFacets; i++)
	{
		buffer[13 * i] = (unsigned char)3;
	}

	iterBegin = vecSorted.begin();
	position = 0;
	for (int i = 0; i < numberOfFacets; i++)
	{
		position++;
		for (int j = 0; j < 3; j++)
		{
			iter = lower_bound(vecSorted.begin(), vecSorted.end(), vecOrigin[3 * i + j]);
			index = iter - iterBegin;
			buffer[position++] = *(char*)(&index);
			buffer[position++] = *((char*)(&index) + 1);
			buffer[position++] = *((char*)(&index) + 2);
			buffer[position++] = *((char*)(&index) + 3);

		}
	}

	fileOut.write(buffer, numberOfFacets * 13);

	free(buffer);
	fileOut.close();

	finish = clock();
	totaltime = (double)(finish - start) / CLOCKS_PER_SEC * 1000;
	cout << "All Time: " << totaltime << "ms\n";

	return 0;
}

ply转stl

#include <pcl/io/vtk_lib_io.h>
#include <vtkPLYReader.h>
#include <vtkSTLWriter.h>

int main(int argc, char** argv)
{
	vtkSmartPointer<vtkPLYReader> reader = vtkSmartPointer<vtkPLYReader>::New();
	reader->SetFileName("rabbit.ply");
	reader->Update();

	vtkSmartPointer<vtkPolyData> polyData = vtkSmartPointer<vtkPolyData>::New();
	polyData = reader->GetOutput();
	polyData->GetNumberOfPoints();

	vtkSmartPointer<vtkSTLWriter> writer = vtkSmartPointer<vtkSTLWriter>::New();
	writer->SetInputData(polyData);
	writer->SetFileName("rabbit.stl");
	writer->Write();

	return 0;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

点云文件常用格式转换(pcd,txt,ply,obj,stl) 的相关文章

  • 泊松重建算法原理介绍

    目录 1 泊松重建算法 2 泊松重建核心思想及原理 3 泊松算法流程 本文出自CSDN点云侠 原文链接 爬虫自重 把自己当个人 1 泊松重建算法 泊松重建是Kazhdan M在2006年提出的基于八叉树和泊松方程的一种网格三维重建算法 其本
  • pyopencv基础操作指南

    个人学习整理 欢迎指正 实验版本 python版本 3 6 13 opencv版本 2 4 9 1 opencv简介 官网 http docs opencv org 3 0 beta doc py tutorials py tutorial
  • 深度学习2015年文章整理(CVPR2015)

    国内外从事计算机视觉和图像处理相关领域的著名学者都以在三大顶级会议 ICCV CVPR和ECCV 上发表论文为荣 其影响力远胜于一般SCI期刊论文 这三大顶级学术会议论文也引领着未来的研究趋势 CVPR是主要的计算机视觉会议 可以把它看作是
  • 用MATLAB实现人脸识别

    1 人脸识别技术的细节 一般来说 人脸识别系统包括图像提取 人脸定位 图形预处理 以及人脸识别 身份确认或者身份查找 系统输入一般是一张或者一系列含有未确定身份的人脸图像 以及人脸数据库中的若干已知身份的人脸图像或者相应的编码 而其输出则是
  • opencv中resize错误可能导致的原因之一

    cv2 error OpenCV 4 5 5 1 error 5 Bad argument in function resize 在用resize时会产生这个错误 有可能时传入的图片不存在了 假如你是从摄像头读取的图片 需要通过 ret f
  • 图像特征提取技术

    目 录 前 言 基于颜色的特征提取 1 颜色空间 2 直方图以及特征提取 基于纹理的特征提取 1 灰度共生矩阵 2 tamura纹理 基于深度神经网络的图像处理 前 言 图像特征提取属于图像分析的范畴 是数字图像处理的高级阶段 本文将从理论
  • 计算机图形学---常用颜色模型汇总(RGB,CMY,HSV)

    本文整理自西安交通大学软件学院祝继华老师的计算机图形学课件 请勿转载 文章目录 常用颜色模型 RGB颜色模型 CMY颜色模型 HSV颜色模型 常用颜色模型 颜色模型 某个三维颜色空间中的一个可见光子集 包含某个颜色域的所有颜色 用途 在某个
  • 仅用61行代码,你也能从零训练大模型

    本文并非基于微调训练模型 而是从头开始训练出一个全新的大语言模型的硬核教程 看完本篇 你将了解训练出一个大模型的环境准备 数据准备 生成分词 模型训练 测试模型等环节分别需要做什么 AI 小白友好 文中代码可以直接实操运行 欢迎阅读体验 目
  • OpenCV 笔记(9):常用的边缘检测算子—— Roberts、Prewitt、Sobel

    在本文开始之前 我们先了解一下算子的概念 算子 英语是 Operator 它是一个函数空间到函数空间上的映射 O X X 广义上的算子可以推广到任何空间 函数 是从数到数的映射 泛函 是从函数到数的映射 算子 是从函数到函数的映射 算子不等
  • 工业相机与镜头选型方法(含实例)

    一 相机介绍及选型方法 1 工业相机介绍 工业相机与我们手机上面的相机或者我们单反相机不同 工业相机它能够使用各种恶劣的工作环境 比如说高温 高压 高尘等 工业相机主要有面阵相机和线阵相机 线阵相机主要用于检测精度要求很高 运动速度很快的场
  • halcon视觉缺陷检测常用的6种方法

    一 缺陷检测综述 缺陷检测是视觉需求中难度最大一类需求 主要是其稳定性和精度的保证 首先常见缺陷 凹凸 污点瑕疵 划痕 裂缝 探伤等 常用的手法有六大金刚 在halcon中的ocv和印刷检测是针对印刷行业的检测 有对应算子封装 1 blob
  • Far3D:直接干到150m,视觉3D目标检测新思路(AAAI2024)

    点击下方 卡片 关注 自动驾驶之心 公众号 ADAS巨卷干货 即可获取 gt gt 点击进入 自动驾驶之心 3D目标检测 技术交流群 论文作者 自动驾驶Daily 编辑 自动驾驶之心 近来在 Arxiv 读到一篇纯视觉环视感知的新工作 它延
  • 推荐几个计算机视觉与自动驾驶相关的平台!

    今年来 各家自动驾驶与AI公司开始规模化量产 可落地的技术成为大家争先占领的重点 然而这个行业对从业者能力要求较高 内部非常卷 一个岗位难求 如何从内卷中脱颖而出 除了极强的自律外 系统的学习方法也很重要 这里给大家推荐了几个国内非常具有影
  • 软件测试/人工智能丨计算机视觉常见业务场景,计算原理和测试指标

    计算机视觉是利用计算机系统对图像 视频或其他视觉数据进行解释和处理的领域 在各个行业中 计算机视觉被广泛应用 以下是一些常见的计算机视觉的业务场景 计算原理以及相关的测试指标 1 人脸识别 业务场景 安防系统 通过人脸识别技术进行门禁控制
  • 第二部分相移干涉术

    典型干涉图 相移干涉术 相移干涉术的优点 1 测量精度高 gt 1 1000 条纹 边缘跟踪仅为 1 10 边缘 2 快速测量 3 低对比度条纹测量结果良好 4 测量结果不受瞳孔间强度变化的影响 独立于整个瞳孔的强度变化 5 在固定网格点获
  • 【图像配准】

    非配对配准 Non rigid registration 和配对配准 Rigid registration 是医学图像配准中常用的两种方法 它们有着不同的含义和应用 非配对配准 Non rigid registration 非配对配准是指将
  • 友思特分享 | CamSim相机模拟器:极大加速图像处理开发与验证过程

    来源 友思特 机器视觉与光电 友思特分享 CamSim相机模拟器 极大加速图像处理开发与验证过程 原文链接 https mp weixin qq com s IED7Y6R8WE4HmnTiRY8lvg 欢迎关注虹科 为您提供最新资讯 随着
  • 图神经网络与智能化创作艺术:开启艺术的智能时代

    导言 图神经网络 GNNs 与智能化创作艺术的结合为艺术领域带来了新的可能性 本文深入研究二者的结合方向 包括各自的侧重点 当前研究动态 技术运用 实际场景 未来展望 并提供相关链接 1 图神经网络与智能化创作艺术的结合方向 1 1 图神经
  • 基于opencv的大米计数统计(详细处理流程+代码)

    在我每周的标准作业清单中 有一项是编写计算机视觉算法来计算该图像中米粒的数量 因此 当我的一个好朋友M给我发了一张纸上的扁豆照片 显然是受到上述转发的启发 请我帮他数一下谷物的数量时 它勾起了我怀旧的回忆 因此 我在我的旧硬盘上寻找很久以前
  • 作物叶片病害识别系统

    介绍 由于植物疾病的检测在农业领域中起着重要作用 因为植物疾病是相当自然的现象 如果在这个领域不采取适当的护理措施 就会对植物产生严重影响 进而影响相关产品的质量 数量或产量 植物疾病会引起疾病的周期性爆发 导致大规模死亡 这些问题需要在初

随机推荐

  • 离散数学 --- 谓词逻辑 --- 谓词合式公式推理

    第一部分 推理形式和推理规则 1 谓词在拥有命题演算的基本蕴含公式的同时 还有着自己独有的基本蕴含公式 当我们的描述在个体和整体之间转换时 就需要进行量词的消去和添加 1 全称特指规则 US规则 其实就是全称量词消去规则 2 全称量词消去有
  • docker-compose

    能做什么 一个用来把 docker 自动化的东西 有了 docker compose 你可以把所有繁复的 docker 操作全都一条命令 自动化的完成 通过创建compose文件 YUML语法 在这个文件上面描述应用的架构 如使用什么镜像
  • 《零基础入门学习Python》(6)--Python之常用操作符

    前言 Python当中常用操作符 有分为以下几类 幂运算 正负号 算术操作符 比较操作符 lt lt gt gt 逻辑运算符 not and or 操作符介绍 幂运算 gt gt gt 3 3 27 正负号 幂运算的优先级比较特殊 因为幂操
  • 凸多边形面积_C++计算任意多边形的面积

    任意多边形的面积计算 拾忆楓灵的博客 CSDN博客 blog csdn net 计算任意多边形的面积 tenos 博客园 www cnblogs com 完美解决计算3D空间任意多边形面积 Studiouss的博客 CSDN博客 blog
  • 微信小程序开发实战 ②〇(Npm包)

    作者 SYFStrive 作者 SYFStrive 博客首页 HomePage 微信小程序 个人社区 欢迎大佬们加入 社区链接 觉得文章不错可以点点关注 专栏连接 感谢支持 学累了可以先看小段由小胖给大家带来的街舞 微信小程序 目录 什么是
  • React 性能优化完全指南,将自己这几年的心血总结成篇!

    作者 MoonBall 原文地址 https juejin cn post 6935584878071119885 本文分为三部分 首先介绍 React 的工作流 让读者对 React 组件更新流程有宏观的认识 然后列出笔者总结的一系列优化
  • MUMPS 安装

    Centos 7 Install MUMPS 1 下载安装包 需要提交申请 http mumps enseeiht fr 2 安装并行版MUMPS需要以下一些依赖包 MPI BLAS library BLACS library ScaLAP
  • C语言种根号怎么表示 比如(1-x)的二分之一次方

    库函数sqrt x include
  • 5.39 综合案例2.0 - STM32蓝牙遥控小车3(摇杆控制)

    综合案例2 0 蓝牙遥控小车1 摇杆控制 成品展示 案例说明 器件说明 小车连线 小车源码 PS2摇杆手柄 遥控连线 摇杆代码 成品展示 用python开发板和stm32制作一个摇杆控制蓝牙全向智能车 源码开放 案例说明 用STM32单片机
  • 《计算机网络》期末模拟考试练习+答案

    期末考试模拟试题参考 一 单选题 共20题 20分 1 下列有线传输介质中抗电磁干扰最好的是 A 屏蔽双绞线 B 同轴电缆 C 非屏蔽双绞线 D 光纤 正确答案 D 解析 2 TELNET通过TCP IP协议在客户机和远程登录服务器之间建立
  • struct和typedef struct的用法解析

    1 首先 注意在C和C 里不同 在C中定义一个结构体类型要用typedef typedef struct Student int a Stu 于是在声明变量的时候就可 Stu stu1 如果没有typedef就必须用struct Stude
  • Calendar对象获取当前周的bug

    项目场景 双周项目管理 需要获取当前周为一年之中的第几周 原先的代码是用Calendar对象 先用setTime 把当前时间传入 再用get 3 获取一年中的第几周 问题描述 实际发现会比真实的周少一点 且时间是周日到周六为一周 原因分析
  • python:pyqt5的基本使用

    文章目录 基本框架 程序启动画面 一 设置主界面 1 窗体字体设置 2 界面设置 二 设置控件 1 QMessageBox消息框 2 文本编辑框和文本浏览框 3 各种按钮 4 标签 5 单行文本框 6 下拉选择框和数字调节框 7 滑动条和旋
  • 简单快速实现子序列的判断

    针对力扣的判断子序列题目进行算法实现 原题链接可以点击地址 https leetcode cn com problems is subsequence 基于近两年较火的力扣leetcode刷题训练站点 本人为了能够保持算法和数据结构这些底层
  • CVPR 2021 目标检测论文大盘点(65篇论文)

    前言 一共搜集了65篇2D目标检测论文 涉及 通用目标检测 旋转目标检测 Few shot 自监督 半监督 无监督目标检测等方向 作者 Amusi 来源 CVer CVer 正式盘点CVPR 2021上各个方向的工作 本篇是热度依然很高的2
  • SpringCloudAlibaba微服务架构搭建(五)Sentinel 详细教程(实战教程)

    SpringCloudAlibaba微服务架构搭建 五 Sentinel 详细教程 实战教程 1 介绍 1 1 什么是Spring Cloud Alibaba Sentinel Spring Cloud Alibaba Sentinel 简
  • Vue + OpenLayers 实时定位(一) 前端展示

    文章目录 前言 一 定义标签样式 二 模拟 GeoJSON 数据 三 创建 VerctorLayer 四 构建地图 五 模拟实时移动 总结 前言 本系列文章介绍一个简单的实时定位示例 示例的组成主要包括 服务后端 使用 Java 语言编写
  • 如何理解 Transformer 中的 Query、Key 与 Value

    原创文章欢迎转载 但请注明出处 Transformer 起源于 2017 年的一篇 google brain 的又一篇神文 Attention is all you need 至此由引领了在 NLP 和 CV 了又一研究热点 在 Trans
  • 数据加密:RSA 加解密

    1 加解密方法 对于RSA加解密来说 在iOS的API中同样也是提供了这两种形式的方法 SecKeyEncrypt 加密 SecKeyDecrypt 解密 复制代码 openssl 同样也提供了一系列的方法 RSA public encry
  • 点云文件常用格式转换(pcd,txt,ply,obj,stl)

    目录 pcd转txt txt转pcd pcd转ply pcd转ply 三角网格化 ply转pcd obj ply转pcd 均匀采样 pcd转obj stl转ply ply转stl pcd转txt include