Skip to content

Instantly share code, notes, and snippets.

View jediofgever's full-sized avatar
🎯
Focusing

Fetullah Atas jediofgever

🎯
Focusing
View GitHub Profile
@UnaNancyOwen
UnaNancyOwen / main.cpp
Last active December 27, 2022 14:31
Convert to cv::Mat from pcl::PointCloud<pcl::PointXYZRGBA> that retrieved from Kinect v1/v2 sensor using KinectGrabber/Kinect2Grabber
if( !cloud->empty() ){
// Create cv::Mat
image = cv::Mat( cloud->height, cloud->width, CV_8UC4 );
// pcl::PointCloud to cv::Mat
#pragma omp parallel for
for( int y = 0; y < image.rows; y++ ) {
for( int x = 0; x < image.cols; x++ ) {
pcl::PointXYZRGBA point = cloud->at( x, y );
image.at<cv::Vec4b>( y, x )[0] = point.b;
@roman-smirnov
roman-smirnov / eigen_ransac.cpp
Last active December 15, 2022 17:24
Usage of Eigen library with PCL PointCloud (PCL uses Eigen::Matrix as its representation for point clouds under the hood )
template<typename PointT>
std::pair<typename pcl::PointCloud<PointT>::Ptr, typename pcl::PointCloud<PointT>::Ptr>
ProcessPointClouds<PointT>::SegmentPlane( typename pcl::PointCloud<PointT>::Ptr cloud, int maxIterations, float distanceThreshold) {
// Time segmentation process
auto startTime = std::chrono::steady_clock::now();
// downsample input point cloud
auto cloud_ds = DownSample(cloud, 1.0);
@primus852
primus852 / cuda_11.7_installation_on_Ubuntu_22.04
Last active June 19, 2024 05:51 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.7 and cuDNN 8.5 installation on Ubuntu 22.04 for PyTorch 1.12.1
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check