Skip to content

Instantly share code, notes, and snippets.

View Harold2017's full-sized avatar
😃

Harold Harold2017

😃
View GitHub Profile
@Harold2017
Harold2017 / Open3d.md
Created November 27, 2020 09:48
Compile Open3d on macos

compile error occurs when link flann as follows:

[ 77%] Linking CXX executable ../../bin/ConvertPointCloud

Undefined symbols for architecture x86_64:

  "_LZ4_compress_HC_continue", referenced from:
@Harold2017
Harold2017 / Eigen2CV.h
Created December 14, 2020 04:17 — forked from BloodAxe/Eigen2CV.h
This header file contains code snippet for easy mapping Eigen types to OpenCV and back with minimal overhead.
/**
* @brief Mapping functions from Eigen data types to OpenCV
* @author Eugene Khvedchenya <[email protected]>
* @details This header file contains code snippet for easy mapping Eigen types to OpenCV and back with minimal overhead.
* @more computer-vision.talks.com/articles/mapping-eigen-to-opencv/
* Features:
* - Mapping plain data types with no overhead (read/write access)
* - Mapping expressions via evaluation (read only acess)
*
* Known issues:
@Harold2017
Harold2017 / circ_shift.h
Created April 12, 2021 02:10 — forked from tesch1/circ_shift.h
Eigen circShift and fftshift and ifftshift
// circ_shift.h
// https://stackoverflow.com/questions/46077242/eigen-modifyable-custom-expression/46301503#46301503
// this file implements circShift, fftshift, and ifftshift for Eigen vectors/matrices.
//
#pragma once
#include <Eigen/Core>
template <bool B> using bool_constant = std::integral_constant<bool, B>;
@Harold2017
Harold2017 / print_csdn.js
Last active April 24, 2021 10:36
print csdn blog
(function(){
$("#side").remove();
    $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();
    $(".nav_top_2011, #header, #navigator").remove();
    $(".csdn-side-toolbar,.template-box,.reward-user-box").remove();
    $(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box,#dmp_ad_58").remove();
    $("aside").remove();
    $(".tool-box").remove();
    $("main").css('display','content');
    $("main").css('float','left');
@Harold2017
Harold2017 / git-commit-log-stats.md
Created July 13, 2021 05:40 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@Harold2017
Harold2017 / repair_broken_pdf.md
Created August 23, 2021 08:02
repair broken pdf

use QPDF

brew install qpdf
qpdf --decrypt broken.pdf recovery.pdf
@Harold2017
Harold2017 / CMakeLists.txt
Last active September 23, 2021 07:24
cmake denpendency build
# .
# bin
# source
# dependency
# include
# source
# example
# include
# source
# external
@Harold2017
Harold2017 / pcl crash on texture mesh.md
Last active November 17, 2021 03:08
Crash when use PCL texture mesh

PCL release: PCL-1.12.0-AllInOne-msvc2019-win64.exe

Related issue: PointCloudLibrary/pcl#2147

Crash trace: ~TextureMesh() / Eigen::aligned_allocator

Reason: PCL pre-compiled binary is compiled with AVX enabled which caused incompatibility of EIGEN_IDEAL_MAX_ALIGN_BYTES

Solution: add_compile_options(/arch:AVX)

@Harold2017
Harold2017 / cameraToWorld.cs
Created November 19, 2021 02:37 — forked from tarukosu/cameraToWorld.cs
HoloLens カメラ座標から世界座標への変換
void OnPhotoCaptured(PhotoCapture.PhotoCaptureResult result, PhotoCaptureFrame photoCaptureFrame)
{
Matrix4x4 cameraToWorldMatrix;
photoCaptureFrame.TryGetCameraToWorldMatrix(out cameraToWorldMatrix);
Matrix4x4 projectionMatrix;
photoCaptureFrame.TryGetProjectionMatrix(out projectionMatrix);
var imagePosZeroToOne = new Vector2(pixelPos.x / imageWidth, 1 - (pixelPos.y / imageHeight));
var imagePosProjected = (imagePosZeroToOne * 2) - new Vector2(1, 1); // -1 to 1 space
@Harold2017
Harold2017 / compiletime-strings.hpp
Last active December 22, 2021 09:46 — forked from jgcoded/compiletime-strings.hpp
C++ Compile time conversion of a number to a string
/*!
This file contains code to convert unsigned integers to strings
at compile-time, and then modify those strings include more
information.
One use case is to convert library MAJOR, MINOR, and PATCH
numbers into a custom string (see below).
Other types like signed integers and floats can be added
with template specializition on the converter struct.