Skip to content

Instantly share code, notes, and snippets.

View 0V's full-sized avatar
🛌
Always sleeping

G2 0V

🛌
Always sleeping
View GitHub Profile
javascript:(function(){var url=/shorts\/(.+)/gi.exec(location.href)[1];var open='https://www.youtube.com/watch?v=%27+url;location.href=open;})();
@0V
0V / url_to_ezproxy.js
Last active January 16, 2023 10:45
Bookmarklet
javascript:(function(){var url=location.href;var open='https://waseda.idm.oclc.org/login?url=%27+url;location.href=open;})();
@0V
0V / lsd-slam_tutorial.md
Last active September 2, 2022 07:55
LSD-SLAMを使える環境を作るまでのあれこれ[後輩用]

LSD-SLAM の使い方 Linux初心者編

非常に簡単な解説は書きますが、十分な情報は揃っていないかもしれませんし、少々不正確な部分があるかもしれません。
それぞれの項目について、各自納得の行くまで調べてください。気になった単語を連鎖的に調べていくことで、結果的に技術の理解へとつながります。日本語文献が少なく、英語文献頼みな点もあるでしょう。大変だとは思いますが、応援しています。

LSD-SLAM とは

LSD-SLAMはVisual-SLAM(vSLAMとも)研究の一つであり、Visual-SLAMは、SLAMをカメラを用いて行う問題のことです。
SLAM(Simultaneous Localization And Mapping)は、自己位置推定とマッピング(地図作成)を同時に行う問題のことで、もとはロボットの自律制御への利用を目的とした技術です。

LSD-SLAMは、画像から特徴点を取らず、ダイレクトに勾配情報を用いています。勾配情報が十分でない領域を無視するなどの工夫で、一般的なCPU上でのリアルタイム実行を可能にしたことや、単眼カメラ特有のスケーリングの不確かさによるドリフトの問題を解決し、机の上などの小さな環境だけでなく、屋外などの大きな環境においても実行可能にしたことなどが注目すべき点です。

var controller = GetComponent<SteamVRInputRx>();
controller.ControllerState
.Where(s => s == SteamVRControllerState.TriggerPressDown)
.Subscribe(_ =>
{
// Triggerが引かれたら何かをする
});
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@0V
0V / CmykColorConverter.cs
Last active June 20, 2019 01:59
RGB ⇔ CMYK by C#
using System;
namespace ColorConverter
{
class CmykColorConverter
{
static void Main(string[] args)
{
// OpenCV の色表現は BGR なので順番注意
// 論理式としての意味合いが強いため、色の再現性は不明
@0V
0V / aprrox.c
Last active May 14, 2019 04:23
Approximationa rough calculation without math.h (for my homework)
#include <stdio.h>
#define LOG2 0.693147180559945309417 //log(2)
#define chk_nan(x) x!=x
double log_fast(double x)
{
static double table[17]={
.0 , // log( 16 /16)
.0606246218164348425806 , // log( 17 /16)
.1177830356563834545387 , // log( 18 /16)
@0V
0V / vector3d.h
Last active March 21, 2019 09:49
template 3d vector
#ifndef RAYTRACER_VECTOR3D_
#define RAYTRACER_VECTOR3D_
#include <cstddef>
#include <cmath>
template <typename T>
class Vector3d
{
private:
namespace ObjectDumpTest
{
public class SomeCollections
{
public int[] SomeArray { get; set; } = new[] { 0, 1, 2, 3, 4 };
public List<int> SomeList { get; set; } = new List<int> { 0, 1, 2, 3, 4 };
public Dictionary<string, int> SomeLDictionary { get; set; } = new Dictionary<string, int>() { { "One", 1 }, { "Two", 2 } };
public IEnumerable<int> SomeEnumerable { get { return SomeList; } }
public IEnumerable<int> SomeLazyEnumerable { get { return LazyNumber(); } }
VRTK_ControllerEvents controllerEvents = GetComponent<VRTK_ControllerEvents>();
controllerEvents.TriggerPressedAsObservable()
.Subscribe(_ =>
{
Debug.Log("Trigger Pressed!");
});