Skip to content

Instantly share code, notes, and snippets.

View nenoNaninu's full-sized avatar
🍌
wi(l)d-screen baroque

nenoNaninu nenoNaninu

🍌
wi(l)d-screen baroque
View GitHub Profile
#pragma once
#include<RealSense\SenseManager.h>
#include<RealSense\Session.h>
#include<RealSense\SampleReader.h>
#ifdef _REALSENSE_FOR_UNITY__
#define _REALSENSE_API_ __declspec(dllexport)
#else
#define _REALSENSE_API_ __declspec(dllimport)
#endif
#include"realsenseAPIForUnity.h"
#include<opencv2\core.hpp>
#include<opencv2\imgproc.hpp>
using namespace Intel::RealSense;
using cv::Mat;
int RealsenseInterface::initRealsenseColor() {
senseManager = SenseManager::CreateInstance();
using UnityEngine;
using System;
using System.Collections;
using System.Runtime.InteropServices;
public class realsense : MonoBehaviour {
[DllImport("openCVRealsenseForUnity")]
private static extern IntPtr getCamera();
//
// SimplestAVFoundation.swift
// simplestAVFoundation
//
// Created by neno naninu on 2018/05/17.
// Copyright © 2018年 neno naninu. All rights reserved.
//
import UIKit
import Foundation
import AVFoundation
@nenoNaninu
nenoNaninu / bilateralFilter.pde
Created June 6, 2018 14:56
processingでbilateralFilter
void setup() {
size(1820, 407);
background(255, 255, 255);
PImage img = loadImage("icon.jpg");
//まずは特になにもしたい状態で描画
image(img, 0, 0);
//バイラテラルフィルタを適応する。
PImage dstImg = new PImage(img.width, img.height, RGB);
bilateralFilter(img, dstImg, 50, 20);
@nenoNaninu
nenoNaninu / yolo_object_detection.cpp
Created June 7, 2018 16:30
opencvでyolov2を動かすためのサンプルコード(opencvのmasterから消されたので置いておく)
// Brief Sample of using OpenCV dnn module in real time with device capture, video and image.
// VIDEO DEMO: https://www.youtube.com/watch?v=NHtRlndE2cg
#include<opencv2\core\ocl.hpp>
#include <opencv2/dnn.hpp>
#include <opencv2/dnn/shape_utils.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <fstream>
#include <iostream>
#pragma warning disable 0414
using System;
using System.IO;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEngine.UI;
namespace VRM
{
public class VRMRuntimeLoader : MonoBehaviour
@nenoNaninu
nenoNaninu / DirectDllRefrence.csproj
Created January 19, 2019 15:56
.csprojの参照やnugetで参照を追加するのではなく、dllを直接無理やり参照する書き方。良くないけどね。
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="ProjectName">
<HintPath>filpath\to\dll\ProjectName.dll</HintPath>
@nenoNaninu
nenoNaninu / dark_default_extension.json
Created January 20, 2019 13:50
vscodeのカラーテーマの設定。標準のものにターミナルの色の設定を色々加えたものになっている。
{
"$schema": "vscode://schemas/color-theme",
"name": "Dark Default Colors",
"colors": {
"editor.background": "#1E1E1E",
"editor.foreground": "#D4D4D4",
"editor.inactiveSelectionBackground": "#3A3D41",
"editorIndentGuide.background": "#404040",
"editorIndentGuide.activeBackground": "#707070",
"editor.selectionHighlightBackground": "#ADD6FF26",
from datetime import datetime
from PIL import Image, ImagePalette
import numpy as np
import cv2
import os
def get_palette(class_num):
""" Returns the color palette for visualizing the segmentation mask.
Args: