国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

open3d io操作

這篇具有很好參考價值的文章主要介紹了open3d io操作。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報違法"按鈕提交疑問。

目錄

1. read_image, write_image

2. read_point_cloud, write_point_cloud

3. 深度相機(jī)IO操作

4. Mesh文件讀取


1. read_image, write_image

讀取jpg. png. bmp等文件

image_io.py

import open3d as o3d

if __name__ == "__main__":
    img_data = o3d.data.JuneauImage()
    print(f"Reading image from file: Juneau.jpg stored at {img_data.path}")
    # 1. read
    img = o3d.io.read_image(img_data.path)  # JuneauImage.jpg
    print(img)  # open3d.geometry.Image. Image of size 800x489, with 3 channels.
    print("Saving image to file: copy_of_Juneau.jpg")
    # 2. write
    o3d.io.write_image("copy_of_Juneau.jpg", img)  # open3d.geometry.Image

open3d io操作

2. read_point_cloud, write_point_cloud

讀寫點(diǎn)云pcd, ply等文件

point_cloud_io.py

import open3d as o3d

if __name__ == "__main__":
    pcd_data = o3d.data.PCDPointCloud()
    print(
        f"Reading pointcloud from file: fragment.pcd stored at {pcd_data.path}")
    # 1. read PointCloud.pcd
    pcd = o3d.io.read_point_cloud(pcd_data.path)  
    print(pcd)
    print("Saving pointcloud to file: copy_of_fragment.pcd")
    # 2. write PointCloud
    o3d.io.write_point_cloud("copy_of_fragment.pcd", pcd)

3. 深度相機(jī)IO操作

讀取深度相機(jī)

realsense_io.py?

"""Demonstrate RealSense camera discovery and frame capture"""

import open3d as o3d

if __name__ == "__main__":

    o3d.t.io.RealSenseSensor.list_devices()
    rscam = o3d.t.io.RealSenseSensor()  # 深度相機(jī),比如D435i
    rscam.start_capture()
    print(rscam.get_metadata())
    for fid in range(5):
        rgbd_frame = rscam.capture_frame()
        o3d.io.write_image(f"color{fid:05d}.jpg", rgbd_frame.color.to_legacy())  # 彩色圖像. tensor轉(zhuǎn)
        o3d.io.write_image(f"depth{fid:05d}.png", rgbd_frame.depth.to_legacy())  # 深度圖像
        print("Frame: {}, time: {}s".format(fid, rscam.get_timestamp() * 1e-6))

    rscam.stop_capture()

4. Mesh文件讀取

讀取mesh網(wǎng)格數(shù)據(jù),ply等文件

triangle_mesh_io.py文章來源地址http://www.zghlxwxcb.cn/news/detail-438313.html

import open3d as o3d

if __name__ == "__main__":
    knot_data = o3d.data.KnotMesh()
    print(f"Reading mesh from file: knot.ply stored at {knot_data.path}")
    mesh = o3d.io.read_triangle_mesh(knot_data.path)  # TriangleMesh
    print(mesh)
    print("Saving mesh to file: copy_of_knot.ply")
    o3d.io.write_triangle_mesh("copy_of_knot.ply", mesh)

到了這里,關(guān)于open3d io操作的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • open3d教程(一):open3d的安裝和測試(Python版本)

    Open3d:用于3D數(shù)據(jù)處理的現(xiàn)代庫。 Open3D 是一個開源庫,支持快速開發(fā)處理 3D 數(shù)據(jù)的軟件。 Open3D 前端在 C++ 和 Python 中公開了一組精心挑選的數(shù)據(jù)結(jié)構(gòu)和算法。后端經(jīng)過高度優(yōu)化,并設(shè)置為并行化。我們歡迎來自開源社區(qū)的貢獻(xiàn)。 Open3d的核心功能: 3D數(shù)據(jù)結(jié)構(gòu) 3D數(shù)據(jù)處理算法

    2024年02月17日
    瀏覽(38)
  • 基于Open3D的點(diǎn)云處理17-Open3d的C++版本

    基于Open3D的點(diǎn)云處理17-Open3d的C++版本

    http://www.open3d.org/docs/latest/cpp_api.html http://www.open3d.org/docs/latest/getting_started.html#c http://www.open3d.org/docs/release/cpp_project.html#cplusplus-example-project https://github.com/isl-org/open3d-cmake-find-package https://github.com/isl-org/open3d-cmake-external-project https://github.com/isl-org/Open3D/releases Note: -DBUILD_SHARED_LIBS

    2024年02月09日
    瀏覽(47)
  • open3d 0.17.0的open3d.visualization.ViewControl類有bug

    在使用過程中發(fā)現(xiàn) open3d.visualization.ViewControl 的如下方法,在 open3d 0.17.0 環(huán)境下不起作用,點(diǎn)云的顯示視場還是默認(rèn)配置;而在 open3d 0.16.0 環(huán)境下卻正常工作。 rotate set_front set_lookat set_up set_zoom 上述測試代碼在如下虛擬環(huán)境中進(jìn)行過測試,均失敗。 在如下虛擬環(huán)境中正常工作

    2024年02月21日
    瀏覽(19)
  • Open3D點(diǎn)云數(shù)據(jù)處理(一):VSCode配置python,并安裝open3d教程

    Open3D點(diǎn)云數(shù)據(jù)處理(一):VSCode配置python,并安裝open3d教程

    專欄地址:https://blog.csdn.net/weixin_46098577/category_11392993.html 在很久很久以前,我寫過這么一篇博客,講的是open3d點(diǎn)云處理的基本方法。?? 當(dāng)時是 PyCharm + Anaconda + python3.8 + open3d 0.13 已經(jīng)是2023年了,現(xiàn)在有了全新版本。目前python由當(dāng)年的3.8更新到了3.11版本,open3d也從0.13來到了

    2024年02月07日
    瀏覽(37)
  • 【Open3D可視化——添加標(biāo)簽】:如何在Open3D的可視化窗口中添加文字標(biāo)簽?

    【Open3D可視化——添加標(biāo)簽】:如何在Open3D的可視化窗口中添加文字標(biāo)簽? Open3D是一個基于Python語言開發(fā)的跨平臺開源工具包,主要用于三維數(shù)據(jù)處理和可視化。在進(jìn)行三維數(shù)據(jù)可視化過程中,往往需要在場景中添加標(biāo)簽來標(biāo)識物體、點(diǎn)云等信息。本文將介紹如何在Open3D的可

    2024年02月11日
    瀏覽(208)
  • Open3D讀取文件

    Open3D讀取文件

    Open3D可以讀取點(diǎn)云文件,三角網(wǎng)格文件,也可以讀取圖片。具體方法如下: 一、點(diǎn)云文件操作 ????????Open3D支持的文件格式有xyz,xyzn,xyzrgb,pts,ply,pcd等文件。讀取的方式也非常簡單。data = o3d.io.read_point_cloud(\\\"文件名“) 1、讀寫文件 ????????函數(shù)原型如下: ???

    2024年02月08日
    瀏覽(22)
  • Open3D學(xué)習(xí)筆記

    Open3D是一個開源庫,它支持處理3D數(shù)據(jù)的軟件的快速開發(fā)。Open3D前端在C++和Python中有一些公開的數(shù)據(jù)結(jié)構(gòu)和算法。后端經(jīng)過高度優(yōu)化,并設(shè)置為并行化。 PCL也是3D點(diǎn)云數(shù)據(jù)處理的優(yōu)秀開源庫,在C++平臺上表現(xiàn)較好,但是在Python上python-pcl長時間不更新,維護(hù)少,不太好用,不建

    2024年02月01日
    瀏覽(19)
  • 什么是open3D?

    什么是open3D?

    目錄 一、說明 二、如何安裝open3d?? 三、顯示點(diǎn)云數(shù)據(jù) 3.1 顯示點(diǎn)云場景數(shù)據(jù) 3.2 體素下采樣 3.3 頂點(diǎn)法線估計 ????????對于點(diǎn)云?處理,這里介紹哦pen3d,該軟件和opencv同樣是interl公司的產(chǎn)品。 ????????Open3D 是一個開源庫,支持快速開發(fā)處理 3D 數(shù)據(jù)的軟件。 Open3D 前

    2024年02月03日
    瀏覽(17)
  • Open3D-讀取深度圖

    ???????深度圖像(Depth Images)也被稱為距離影像(Range Image),是指將從圖像采集器到場景中各點(diǎn)的距離值作為像素值的圖像,它直接反應(yīng)了 景物可見表面的幾何形狀 。獲取方法有: 激光雷達(dá)深度成像法、計算機(jī)立體視覺成像、坐標(biāo)測量機(jī)法、莫爾條紋法、結(jié)構(gòu)光法。

    2024年02月13日
    瀏覽(27)
  • Open3D點(diǎn)云處理

    Open3D點(diǎn)云處理

    Open3D is an open-source library that supports rapid development of software that deals with 3D data. The Open3D frontend exposes a set of carefully selected data structures and algorithms in both C++ and Python. The backend is highly optimized and is set up for parallelization. Open3D是一個支持3D數(shù)據(jù)處理軟件快速開發(fā)的開源庫,在前端提供

    2023年04月17日
    瀏覽(25)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包