【酷哥说库】一张图看懂openGauss(第2期)—openGauss架构和部署

在《【酷哥说库】一张图看懂openGauss(第1期)—openGauss概述》中,为大家介绍了openGauss,在本期中介绍openGauss架构和部署。
openGauss是单机系统,在这样的系统架构中,业务数据存储在单个物理节点上,数据访问任务被推送到服务节点执行,通过服务器的高并发,实现对数据处理的快速响应。同时通过日志复制可以把数据复制到备机,提供数据的高可靠和读扩展。
整体部署方案可以分为三类:单机部署、一主一备部署、一主多备部署。
在这里插入图片描述
在这里插入图片描述

Gauss松鼠会是汇集数据库爱好者和关注者的大本营,
大家共同学习、探索、分享数据库前沿知识和技术,
互助解决问题,共建数据库技术交流圈。

上一篇:【酷哥说库】一张图看懂openGauss(第1期)—openGauss概述
下一篇:【酷哥说库】一张图看懂openGauss(第3期)— openGauss高性能特性

  • 11
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 16
    评论
以下是使用Python实现该算法的代码: ```python import numpy as np from scipy.spatial import cKDTree def kd_tree_neighbor_points(PV, k=20): tree = cKDTree(PV) neighbor_indices = tree.query(PV, k=k+1, n_jobs=-1)[1][:,1:] neighbor_points = np.take(PV, neighbor_indices, axis=0) return neighbor_points def compute_normal_and_curvature(neighbor_points): centroid = np.mean(neighbor_points, axis=0) neighbor_points_centered = neighbor_points - centroid covariance_matrix = np.dot(neighbor_points_centered.T, neighbor_points_centered) / (neighbor_points.shape[0] - 1) eig_values, eig_vectors = np.linalg.eig(covariance_matrix) normal = eig_vectors[:, 2] curvature = eig_values[2] / (eig_values[0] + eig_values[1] + eig_values[2]) return normal, curvature def extract_plane_points(PV, g=3): remaining_points = PV.copy() plane_points = [] while remaining_points.shape[0] > 0: seed = remaining_points[0] neighbor_points = kd_tree_neighbor_points(remaining_points) normal, curvature = compute_normal_and_curvature(neighbor_points) if curvature < 0.1: plane_point_indices = [0] for i in range(1, neighbor_points.shape[0]): neighbor_normal, _ = compute_normal_and_curvature(neighbor_points[i:]) angle = np.degrees(np.arccos(np.dot(normal, neighbor_normal))) if angle < g: plane_point_indices.append(i) plane_points.append(neighbor_points[plane_point_indices]) remaining_points = np.delete(remaining_points, plane_point_indices, axis=0) else: remaining_points = np.delete(remaining_points, 0, axis=0) return plane_points, remaining_points ``` 其中,`PV` 表示三维点云,`k` 是 Kd-tree 中邻域点的个数,`g` 是法线夹角的阈值。函数 `kd_tree_neighbor_points` 用 Kd-tree 查找每个点的邻域点集合,函数 `compute_normal_and_curvature` 计算邻域协方差矩阵并提取出法线和曲率,函数 `extract_plane_points` 则是按照曲率排序,遍历每个点并计算法线夹角,提取出平面点云和剩余点云。
评论 16
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Gauss松鼠会

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值