Skip to content

Instantly share code, notes, and snippets.

View bemoregt's full-sized avatar
๐ŸŽฏ
Focusing

Gromit Park bemoregt

๐ŸŽฏ
Focusing
View GitHub Profile
@bemoregt
bemoregt / brix.py
Created May 27, 2020 06:07 — forked from neilslater/brix.py
Keras example image regression, extract texture height param
# -*- coding: utf-8 -*-
import numpy as np
import os
import cv2
import pandas as pd
from sklearn.cross_validation import train_test_split
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D
@bemoregt
bemoregt / pytorch_jetson_install.sh
Created December 1, 2017 04:29 — forked from dusty-nv/pytorch_jetson_install.sh
Install procedure for pyTorch on NVIDIA Jetson TX1/TX2
#!/bin/bash
#
# pyTorch install script for NVIDIA Jetson TX1/TX2,
# from a fresh flashing of JetPack 2.3.1 / JetPack 3.0 / JetPack 3.1
#
# for the full source, see jetson-reinforcement repo:
# https://github.com/dusty-nv/jetson-reinforcement/blob/master/CMakePreBuild.sh
#
# note: pyTorch documentation calls for use of Anaconda,
# however Anaconda isn't available for aarch64.
@bemoregt
bemoregt / ripoc.py
Created November 24, 2017 01:52 — forked from daisukekobayashi/ripoc.py
Rotation invariant phase-only correlation in python
#! /usr/bin/env python
# -*- coding: utf-8
import sys
import numpy
from numpy import pi, sin, cos
from scipy.optimize import leastsq
import scipy, scipy.fftpack
import cv2
@bemoregt
bemoregt / t-SNE Tutorial.ipynb
Created October 28, 2016 06:33 — forked from awjuliani/t-SNE Tutorial.ipynb
A notebook describing how to use t-SNE to visualize a neural network learn representations
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bemoregt
bemoregt / filterbank.py
Created October 12, 2016 05:52 — forked from amueller/filterbank.py
Filterbank responses for low level vision
##########################################################################
# Maximum Response filterbank from
# http://www.robots.ox.ac.uk/~vgg/research/texclass/filters.html
# based on several edge and bar filters.
# Adapted to Python by Andreas Mueller [email protected]
# Share and enjoy
#
import numpy as np
import matplotlib.pyplot as plt
@bemoregt
bemoregt / 1dPoc.cpp
Created August 10, 2016 07:47
my own gist test
// 1D POC ---------------------------------------------------------------------------------------
cv::Point2d phaseCorrelate1D(InputArray _src1, InputArray _src2, InputArray _window, int k=65535, int flag_pixel = false)
{
Mat src1 = _src1.getMat();
Mat src2 = _src2.getMat();
Mat window = _window.getMat();
CV_Assert( src1.type() == src2.type());
CV_Assert( src1.type() == CV_32FC1 || src1.type() == CV_64FC1 );
CV_Assert( src1.size == src2.size);
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone git://github.com/wbond/sublime_package_control.git Package\ Control
cd Package\ Control
git checkout python3
# restart Sublime Text 3 and you should have Package Control working

#Gist๋ฅผ ์ด์šฉํ•œ ์ฝ”๋“œ์กฐ๊ฐ๊ด€๋ฆฌ ์ด๋ฒˆ ๊ธ€์—์„œ๋Š” Code Snippet์ด๋ผ ๋ถˆ๋ฆฌ๋Š” ์ฝ”๋“œ์กฐ๊ฐ์„ ํšจ๊ณผ์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์„๊นŒ์— ๋Œ€ํ•œ ํ•˜๋‚˜์˜ ๋ฐฉ๋ฒ•์„ ๋…ผํ•˜๊ณ ์ž ํ•œ๋‹ค. ๊ฐœ๋ฐœ์„ ์ง„ํ–‰ํ•˜๋‹ค๋ณด๋ฉด ๋ฌด์ˆ˜ํžˆ ๋งŽ์€ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ฒŒ ๋œ๋‹ค. ๋•Œ๋•Œ๋กœ ์ž‘์„ฑํ•œ ์ฝ”๋“œ ์ค‘์˜ ์ผ๋ถ€๋ฅผ ๋‚˜์ค‘์—๋„ ํ™œ์šฉํ•ด๋ณด๊ธฐ ์œ„ํ•ด ์ฝ”๋“œ๋ฅผ ๋ถ„๋ฅ˜ํ•œ๋‹ค. ๋Œ€์ฒด๋กœ ์ด๋Ÿฐ ๊ฒฝ์šฐ ์ž์‹ ๋งŒ์˜ ๋ฉ”๋ชจ์žฅ์„ ํ™œ์šฉํ•˜๊ฑฐ๋‚˜, ์ž์ฃผ ์‚ฌ์šฉํ•˜๋Š” ์—๋””ํ„ฐ๋ฅผ ํ™œ์šฉํ•ด์„œ ์ด๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๊ฒฝํ–ฅ์ด ์žˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด๋Ÿฐ ๋ฐฉ๋ฒ•์€ ์ฝ”๋“œ๊ฐ€ ๋งŽ์•„์งˆ์ˆ˜๋ก ๊ฒ€์ƒ‰ํ•˜๊ธฐ๊ฐ€ ์‰ฝ์ง€ ์•Š๊ณ , ๊ฐœ๋ฐœ์–ธ์–ด์— ๋”ฐ๋ผ ํšจ์œจ์ ์œผ๋กœ ์ฝ”๋“œ๋ฅผ ๊ด€๋ฆฌํ•˜๊ธฐ๋„ ์–ด๋ ต๋‹ค. ๋˜ํ•œ ๊ฐœ๋ฐœํ•˜๋Š” IDEํ™˜๊ฒฝ์—์„œ๋„ ์†์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์œผ๋ฉฐ, ์‚ฌ๋ฌด์‹ค/์ง‘ ๋“ฑ, ์—ฌ๋Ÿฌ ์žฅ์†Œ์—์„œ ๋™์ผํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ๋„ ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค. (๋ฌผ๋ก  Dropbox)์™€ ๊ฐ™์€ ํด๋ผ์šฐ๋“œ ์„œ๋น„์Šค๋ฅผ ํ™œ์šฉํ•˜๋ฉด ์–ด๋Š์ •๋„ ๋‹ค์–‘ํ•œ ํ™˜๊ฒฝ์—์„œ ํ™œ์šฉ๊ฐ€๋Šฅํ•˜์ง€๋งŒ ์ด ๋ฐฉ๋ฒ•์€ ํšŒ์‚ฌ์™€ ๊ฐ™์ด ๋ณด์•ˆ ์ƒ์˜ ์ด์œ ๋กœ ์„œ๋น„์Šค๊ฐ€ ๋ง‰ํ˜€ ์žˆ๋Š” ๊ณณ์—์„œ๋Š” ์ œ๋Œ€๋กœ ์ ์šฉ์ด ๋ถˆ๊ฐ€๋Šฅํ•œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.

๋งŽ์€ ์›น์‚ฌ์ดํŠธ ์กฐ์‚ฌ๋ฅผ ํ†ตํ•ด ๋‹ค์–‘ํ•œ Snippet๊ด€๋ฆฌ ์„œ๋น„์Šค๋ฅผ ์ฐพ์•„๋ดค์ง€๋งŒ, ๊ทธ ์ค‘์—์„œ ๊ฐœ๋ฐœ์— ๊ฐ€์žฅ ์œ ์šฉํ•œ ๋ฐฉ์‹์€ GitHub์—์„œ ์ œ๊ณตํ•˜๋Š” Gist๋ผ๋Š” ์„œ๋น„์Šค๋ฅผ ์ด์šฉํ•˜๋Š” ๊ฒƒ์ด์—ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ณธ ์„ธ์…˜์—์„œ๋Š” Gist๋ฅผ ์ด์šฉํ•œ Snippet๊ด€๋ฆฌ ๋ฐฉ์‹์„ ์•Œ์•„๋ณด๊ณ ์ž ํ•œ๋‹ค. ๋˜ํ•œ ์ตœ๊ทผ ๊ฐ๊ด‘๋ฐ›๊ณ  ์žˆ๋Š” Sublime Text์—์„œ Gistํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํ™œ์šฉํ•˜์—ฌ ์–ด๋–ป๊ฒŒ ํšจ์œจ์ ์œผ๋กœ ๊ฐœ๋ฐœEditor์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š”์ง€๋„ ์•Œ์•„๋ณด๊ณ ์ž ํ•œ๋‹ค.

#Gistํ™˜๊ฒฝ ์…‹ํŒ…

Github ํšŒ์›๊ฐ€์ž…

Gist ์‚ฌ์šฉ์„ ์œ„ํ•ด์„œ๋Š” GitHub ํšŒ์›๊ฐ€์ž…์„ ํ•œ๋‹ค. Github๋Š” ๋งค์šฐ ์œ ๋ช…ํ•˜๊ณ  ๋„๋ฆฌ ํผ์ ธ์žˆ๋Š” ์„œ๋น„์Šค์ด๋ฏ€๋กœ ์„œ๋น„์Šค๊ฐ€ ์ค‘๋‹จ๋  ๊ฑฑ์ •์„ ํ•˜์ง€ ์•Š๊ณ  ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ์™ธ๊ตญ์‚ฌ์ดํŠธ์ด๋‹ˆ๋งŒํผ ํšŒ์›์ •๋ณด๋„ ๊ณผ๋„ํ•˜๊ฒŒ ์š”๊ตฌํ•˜์ง€ ์•Š๋Š”๋‹ค.

Sublime์— Gist ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜

#include "stdafx.h"
#include "GigECameraCap.h"
#include "opencv2/opencv.hpp"
#ifdef _DEBUG
#pragma comment(lib, "FlyCapture2d.lib")
#pragma comment(lib, "opencv_core248d.lib")
#pragma comment(lib, "opencv_highgui248d.lib")
#else
@bemoregt
bemoregt / index.html
Created June 28, 2016 02:32 — forked from demun/index.html
์„œ๋ธŒ๋ผ์ž„ํ…์ŠคํŠธ ๊ด€๋ จ ํŒ
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>sublime text tip</title>
</head>
<body>
<h3>Less.sublime-build</h3>
<code>
{