- Bluenoise in the game INSIDE (dithering, raymarching, reflections)
- Dithering, Ray marching, shadows etc
- A Survery of Blue Noise and Its Applications
- Moments In Graphics (void-and-cluster)
- Bart Wronski Implementation of Solid Angle algorithm
#define _CRT_SECURE_NO_WARNINGS | |
#include <string> | |
#include <tuple> | |
#include <Eigen/Core> | |
#include <pcl/io/ply_io.h> | |
#include <pcl/point_cloud.h> | |
#include <pcl/common/transforms.h> | |
#include <pcl/filters/voxel_grid.h> | |
#include <pcl/features/normal_3d.h> |
# forays into | |
Perfect Spatial Hashing (Lefebvre & Hoppe) | |
http://hhoppe.com/perfecthash.pdf | |
how it works: | |
There are two parts: a slow encoding step, and a fast decoding step. | |
Encoding |
// A simple quickref for Eigen. Add anything that's missing. | |
// Main author: Keir Mierle | |
#include <Eigen/Dense> | |
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d. | |
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols. | |
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd. | |
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major. | |
Matrix3f P, Q, R; // 3x3 float matrix. |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Comparator; | |
import java.util.List; | |
/** | |
* http://www.geeksforgeeks.org/closest-pair-of-points-onlogn-implementation/ | |
* https://www.youtube.com/watch?v=_pSl90jq-m0 another good explanation | |
* Given coordinates of points find closest pair points distance. | |
* |
/* | |
Following file take opencv mat file as an input and convert it to proper tensor object | |
Created by : Kumar Shubham | |
Date : 27-03-2016 | |
*/ | |
//Loading Opencv fIles for processing | |
//#include <opencv2/opencv.hpp> |
/* | |
Following file take opencv mat file as an input and run inception model on it | |
Created by : Kumar Shubham | |
Date : 27-03-2016 | |
*/ | |
//Loading Opencv fIles for processing | |
#include <opencv2/opencv.hpp> |
/// perform the Simplest Color Balancing algorithm | |
void SimplestCB(Mat& in, Mat& out, float percent) { | |
assert(in.channels() == 3); | |
assert(percent > 0 && percent < 100); | |
float half_percent = percent / 200.0f; | |
vector<Mat> tmpsplit; split(in,tmpsplit); | |
for(int i=0;i<3;i++) { | |
//find the low and high precentile values (based on the input percentile) |
#pragma once | |
// Code adapted from https://github.com/propanoid/DBSCAN | |
#include <vector> | |
#include <algorithm> | |
#include <omp.h> | |
// Any basic vector/matrix library should also work | |
#include <Eigen/Core> |
boundingSphere :: [(Float,Float,Float)] -> ((Float,Float,Float),Float) --takes a list of points in 3D to a pair (center,radius) | |
boundingSphere points = | |
case points of --induction on number of points: 0,1,2, or 3+ | |
[] -> ((0,0,0),0) | |
p:[] -> (p,0) | |
(p1,p2,p3):(q1,q2,q3):[] -> (((p1+q1)/2,(p2+q2)/2,(p3+q3)/2),dist (p1,p2,p3) (q1,q2,q3)) | |
p:pts -> let | |
y@(y1,y2,y3) = head $ filter (\pt -> (dist pt p) - 0.1 < (maximum $ map (dist p) pts)) pts | |
z@(z1,z2,z3) = head $ filter (\pt -> (dist pt y) - 0.1 < (maximum $ map (dist y) pts)) pts | |
initSphere@(ctr,rad) = (((y1+z1)/2, (y2+z2)/2, (y3+z3)/2), dist y z / 2) |