Skip to content

Instantly share code, notes, and snippets.

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

G2 0V

🛌
Always sleeping
View GitHub Profile
using OpenCvSharp;
using OpenCvSharp.CPlusPlus;
namespace OpenCvSharpSample.Samples
{
public class MethodTest
{
public static void DetectAnimeFace()
{
string fileName = "image.jpg";
@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 / wallis_formula.cpp
Created April 17, 2015 08:33
Wallis' Formula by C++
// for Visual Studio
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
long double wallis_formula(int);
int main() {
int input_count = 0;
@0V
0V / gist.css
Last active August 29, 2015 14:19
/* gist */
.gist .line-number {
line-height: 1.625;
}
@0V
0V / GaussSeidel.cs
Last active August 29, 2015 14:19
C# で Gauss-Seidel 法 によるn元連立1次方程式の単純な solver 実装
using System;
namespace MathUtil
{
public class Solver
{
static void Main(string[] args)
{
// 方程式
// 3x + 2y + z = 10
@0V
0V / settings.json
Created May 6, 2015 08:00
VisualSudioCode の設定ファイル
{
"editor.tabSize": "2",
"editor.insertSpaces": "2"
}
#!/bin/bash
targettopdir=`pwd`/PTAM-work
pwdinfo=`pwd`
sudo apt-get update
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install liblapack-dev freeglut3-dev libdc1394-22-dev
sudo apt-get install liblapack-dev libblas-dev
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev libv4l-dev
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <opencv2\opencv.hpp>
using namespace cv;
using namespace std;
int main(int argc, char* argv[]){
if (argc < 2){
cout << "画像の名前を入力してください。";
return -1;
@0V
0V / 対称定規.cs
Last active October 17, 2015 16:28
OpenCvSharp で対称定規。 依存関係は OpenCvSharp のみ
using System;
using System.Collections.Generic;
using OpenCvSharp.CPlusPlus;
using OpenCvSharp;
namespace OpenCvSharpSomethings
{
class Program
{
static Mat[] rotMat;
@0V
0V / symmetry.pde
Last active October 18, 2015 08:54
Processing入門したので対称定規を作ってみた。Processing強力すぎました。協力してくれた @8q に感謝です。
void setup(){
size(640,360);
background(0);
frameRate(60);
stroke(120,100,210);
}
void draw(){
if(mouseButton == LEFT){
int px1 = pmouseX - width / 2;
int py = pmouseY - height / 2;