Skip to content

Instantly share code, notes, and snippets.

View maz-1's full-sized avatar
🐢
slow to respond

maz-1 maz-1

🐢
slow to respond
  • WolkenVision AG
  • China
View GitHub Profile
@maz-1
maz-1 / gdal_portfile.cmake
Last active March 15, 2022 12:12
gdal portfile
set(GDAL_VERSION_SEMVER 3.4.2)
set(GDAL_REF "v${GDAL_VERSION_SEMVER}")
#...
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OSGeo/gdal
REF ${GDAL_REF}
SHA512 <VALUE>
HEAD_REF master
PATCHES ${GDAL_PATCHES}
@maz-1
maz-1 / windeployqt.cmake
Created March 3, 2022 10:29
windeployqt.cmake
# find windeployqt
if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt)
get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION)
execute_process(
COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX
RESULT_VARIABLE return_code
OUTPUT_VARIABLE qt5_install_prefix
OUTPUT_STRIP_TRAILING_WHITESPACE
@maz-1
maz-1 / test_pointnet.py
Last active January 20, 2022 10:41
keras pointnet test
#!/usr/bin/env python3
# https://keras.io/examples/vision/pointnet_segmentation/
import os
import json
import random
import numpy as np
import pandas as pd
from tqdm import tqdm
@maz-1
maz-1 / PKGBUILD
Last active August 19, 2021 07:33
opencl-amd
# Maintainer: Carson Rueter <roachh at proton mail dot com>
# Co-Maintainer: George Sofianos
# Contributor: Christopher Snowhill <kode54 at gmail dot com>
# Contributor: ipha <ipha00 at gmail dot com>
# Contributor: johnnybash <georgpfahler at wachenzell dot org>
# Contributor: grmat <grmat at sub dot red>
# Contributor: maz-1 <ohmygod19993 at gmail dot com>
prefix='amdgpu-pro-'
postfix='-ubuntu-20.04'
@maz-1
maz-1 / PKGBUILD
Last active August 19, 2021 01:10
ogre-next
# Maintainer: Tolga Hosgor <fasdfasdas@gmail.com>
_pkgname=('ogre-next')
pkgname=("$_pkgname-git")
pkgver=r12810.1878563053
pkgrel=1
pkgdesc='Scene-oriented, flexible 3D engine written in C++'
arch=('i686' 'x86_64')
url='http://ogre3d.org'
license=('MIT')
@maz-1
maz-1 / batch-export.bat
Last active March 8, 2022 00:36
batch-export.bat
@echo off
SET CLOUDCOMPARE=C:\Program Files\CloudCompare\CloudCompare.exe
SET SRC_EXT=las
SET DST_EXT=e57
SET DST_FMT=E57
rem SET GLOBAL_SHIFT=AUTO
SET GLOBAL_SHIFT=-2677990.00 -1254460.00 -441.00
var format = ".pts";
var filepath = new String();
filepath = "C:\\Users\\benoit.passot\\Documents\\";
var arrayCloudToExport=SCloud.FromSel();
for (i=0; i<arrayCloudToExport.length;i=i+1)
{
var myCloudToExport=arrayCloudToExport[i];
var myAlignedCloudName=myCloudToExport.GetName();
var myFilePath1 = filepath;
myFilePath1 += myAlignedCloudName;
const float resize_ratio = 2.0;
actorDroneMesh = vtkSmartPointer<vtkLODActor>::New ();
auto sharedData = SharedData::getSharedData(this->window());
OpenMesh::PolyMesh_ArrayKernelT< > mesh_out;
OpenMesh::IO::Options OptionRead(OpenMesh::IO::Options::Binary);
QFile file_model(":/models/drone.stl");
file_model.open(QIODevice::ReadOnly);
QStdIStream drone_model_data(&file_model);
OpenMesh::IO::read_mesh(mesh_out, drone_model_data, "stl", OptionRead);
// assimp
#include <assimp/Importer.hpp> // C++ importer interface
#include <assimp/scene.h> // Output data structure
#include <assimp/postprocess.h> // Post processing flags
#include <assimp/Exporter.hpp>
// openmesh
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
@maz-1
maz-1 / pcl_mesh_to_cgal_v1.cpp
Last active July 25, 2022 15:11
pcl_mesh_to_cgal_v1
// https://stackoverflow.com/questions/61318623/how-can-i-convert-cgal-points-into-pcl-point-cloud
template<class Pt>
static int convert_mesh_from_PCL_to_CGAL(pcl::PolygonMesh::Ptr PCL_mesh, CGAL::Surface_mesh<Pt>& CGAL_mesh, bool flipNormal = false)
{
pcl::PointCloud<pcl::PointXYZ>::Ptr mesh_cloud (new pcl::PointCloud<pcl::PointXYZ>);
pcl::fromPCLPointCloud2( PCL_mesh->cloud, *mesh_cloud );
// clear and reserve the
CGAL_mesh.clear();
int n = mesh_cloud->size();
int f = PCL_mesh->polygons.size();