Point Cloud Structure and Output Formats
Organized point cloud
Zivid outputs an organized point cloud by default. This means that the point cloud is laid out as a 2D array of points that resembles an image-like structure.
이 구조에는 몇 가지 장점이 있습니다.
2D 배열이 1D 배열로 해석될 수 있기 때문에 조직화되지 않은 포인트 클라우드용으로 설계된 알고리즘은 조직화에서도 작동합니다. 이것은 반대 방향으로 항상 사실이 아닙니다.
정렬된 포인트 클라우드는 2D 이미지(색상 및 깊이)의 픽셀과 포인트 클라우드의 3D 포인트 간에 1:1 상관 관계가 있습니다. 이것은 이미지의 인접 픽셀이 포인트 클라우드의 인접 포인트임을 의미합니다. 이를 통해 2D 연산 및 알고리즘을 2D 이미지에 적용하고 결과를 포인트 클라우드에 직접 적용할 수 있습니다. 예를 들어 객체 감지 및 분할의 경우 2D 이미지를 분할하고 원하는 픽셀에서 3D 포인트를 직접 추출할 수 있습니다.
포인트의 질서는 계산 속도를 높이고 특정 알고리즘, 특히 인접 포인트를 사용하는 작업의 비용을 낮춥니다.
Unorganized point cloud
An unorganized point cloud is a list of points in a 1D array. Each point contains the same information as in the organized point cloud.
There are advantages to unorganized point clouds as well.
Since the mapping to sensor pixel is not preserved, neither are points without information (NaN). As a result, unorganized point clouds can be smaller in size than organized point clouds.
When you combine multiple point clouds, it is easier to merge them into a single unorganized point cloud.
참고
It is possible to get back the pixel indices from an unorganized point cloud. This can be done using intrinsics. However, the intrinsics model does not cover the full calibration of the camera. The only way to truly get correct pixel mapping is to use the organized point cloud. See Camera Intrinsics for more information.
Zivid point cloud
서로 다른 Zivid 카메라 모델은 서로 다른 해상도의 센서를 사용하여 장면의 포인트 클라우드를 캡처합니다.
Camera |
Megapixels (MP) |
Resolution |
---|---|---|
Zivid 2+ |
5 |
2448 x 2048 |
Zivid 2 |
2.3 |
1944 x 1200 |
SDK에서 해상도를 얻는 방법에는 여러 가지가 있습니다.
const auto cameraInfo = camera.info();
auto defaultSettings = Zivid::Experimental::SettingsInfo::defaultValue<Zivid::Settings>(cameraInfo);
defaultSettings.acquisitions().emplaceBack(
Zivid::Experimental::SettingsInfo::defaultValue<Zivid::Settings::Acquisition>(cameraInfo));
defaultSettings.set(Zivid::Settings::Color{
Zivid::Experimental::SettingsInfo::defaultValue<Zivid::Settings2D>(cameraInfo)
.copyWith(Zivid::Settings2D::Acquisitions{
Zivid::Experimental::SettingsInfo::defaultValue<Zivid::Settings2D::Acquisition>(cameraInfo) }) });
std::cout << "Camera resolution for default settings:" << std::endl;
const auto resolution = Zivid::Experimental::SettingsInfo::resolution(cameraInfo, defaultSettings);
std::cout << " Height: " << resolution.height() << std::endl;
std::cout << " Width: " << resolution.width() << std::endl;
std::cout << "Point cloud (GPU memory) resolution:" << std::endl;
const auto pointCloud = camera.capture2D3D(defaultSettings).pointCloud();
std::cout << " Height: " << pointCloud.height() << std::endl;
std::cout << " Width: " << pointCloud.width() << std::endl;
std::cout << "Point cloud (CPU memory) resolution:" << std::endl;
const auto data = pointCloud.copyPointsXYZColorsRGBA_SRGB();
std::cout << " Height: " << data.height() << std::endl;
std::cout << " Width: " << data.width() << std::endl;
생성된 포인트 클라우드는 5백만 개의 포인트로 구성됩니다. 픽셀과 점 사이에는 1:1 상관 관계가 있으므로 모든 픽셀에 대해 XYZ(mm), RGB(8비트) 및 SNR을 얻을 수 있습니다. 여기서 SNR은 신호 대 잡음비입니다. 내부적으로 GPU에서 3D 좌표, 색상 값 및 SNR 값은 2448 x 2048 크기의 별도 2D 배열로 저장됩니다. 사용자 측(CPU 메모리)에서 데이터는 요청 방식에 따라 다른 형식으로 저장할 수 있습니다. 자세한 설명은 Point Cloud Tutorial 참조하십시오.
생성된 포인트 클라우드는 230만 포인트로 구성되어 있습니다. 픽셀과 점 사이에는 1:1 상관 관계가 있으므로 모든 픽셀에 대해 XYZ(mm), RGB(8비트) 및 SNR을 얻을 수 있습니다. 여기서 SNR은 신호 대 잡음비입니다. GPU 내부에서 3D 좌표, 색상 값 및 SNR 값은 1944 x 1200 크기의 별도 2D 배열로 저장됩니다. 사용자 측(CPU 메모리)에서 데이터는 요청 방식에 따라 다른 형식으로 저장할 수 있습니다. 자세한 설명은 Point Cloud Tutorial 참조하십시오.

컬러 이미지와 Depth 맵은 Zivid 포인트 클라우드에서 직접 추출할 수 있습니다. 이를 수행하는 방법의 예는 GitHub repository 를 참조하십시오.
Zivid output formats
Zivid Studio에서 Zivid Data File (*.zdf) 에 포인트 클라우드를 저장할 수 있습니다. 또한 다음과 같은 형식으로 포인트 클라우드(File → Export)를 내보낼 수 있습니다.:
Polygon (PLY)
Point Cloud Data (PCD)
ASCII (XYZ)
For each format you can choose among different export options when exporting from Zivid Studio, like color space and normals.
Export options for PLY, PCD, and XYZ file formats.
The Zivid Data File (*.zdf) is the native Zivid file format. If you are using the API, you can loop over the point cloud and save the X, Y, Z, R, G, B, and SNR data in whichever format you prefer. Check out our Samples to see how to read or convert Zivid data using C++, C#, and Python.
팁
Zivid 포인트 클라우드를 보는 가장 쉬운 방법은 ZDF 파일을 PC에 복사하고 Zivid Studio 를 사용하는 것입니다. 또는 API를 사용하여 ZDF를 PLY로 변환(또는 Python script 사용)하고 3D 뷰어(예: MeshLab , CloudCompare ) 를 사용하는 것입니다.
ASCII points (*.xyz)
ASCII 문자는 데카르트 좌표를 저장하는 데 사용됩니다. XYZ는 공백으로 구분됩니다. 우리 버전에서는 RGB 값도 각 포인트에 추가됩니다. 각각의 새 점은 newline character로 구분됩니다. 이 파일은 일반 텍스트 편집기에서 볼 수 있습니다.
PLY file (*.ply)
PLY는 Stanford에서 개발한 파일 형식입니다. Learn more about PLY.
Point Cloud Data file (*.pcd)
PCD는 Point Cloud Library 고유의 파일 형식입니다. Learn more about PCD.
Use Experimental::PointCloudExport::exportFrame
API to export point clouds to your preferred format using the Zivid SDK.
Read this is you use Frame::save
API to export point clouds to PCD
Organized PCD format
When using Frame::save
the Zivid SDK stores the organized point cloud with a header that indicates an unorganized point cloud.
Since SDK 2.5, it is possible to configure the SDK with the Config.yml file to export PCD with the correct header that indicates an organized point cloud.
If the file already exists and its located in %LOCALAPPDATA%\Zivid\API
for Windows or "${XDG_CONFIG_HOME-$HOME/.config}"/Zivid/API
for Ubuntu,
update Configuration/APIBreakingBugFixes/FileFormats/PCD/UseOrganizedFormat
.
If the file does not exist:
Config.yml
파일을 다운로드합니다.구성 파일에는 다음 정보가 포함되어 있습니다.
__version__: serializer: 1 data: 12 Configuration: APIBreakingBugFixes: FileFormats: PCD: UseOrganizedFormat: yes
구성 파일을 다음 디렉터리에 배치합니다.
mkdir %LOCALAPPDATA%\Zivid\API move %HOMEPATH%\Downloads\Config.yml %LOCALAPPDATA%\Zivid\API\
mkdir --parents "${XDG_CONFIG_HOME-$HOME/.config}"/Zivid/API mv ~/Downloads/Config.yml "${XDG_CONFIG_HOME-$HOME/.config}"/Zivid/API/
조심
Any existing Config file will be overwritten.
조심
Zivid 구성 파일은 .yaml이 아닌 .yml 파일 확장자를 사용해야 합니다.
Version History
SDK |
Changes |
---|---|
2.16.0 |
Added support for |