This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cameraMatrix = cv::Mat::eye(3, 3, CV_32F); | |
distCoeffs = cv::Mat::zeros(4, 1, CV_32F); | |
std::vector<cv::Mat> rvecs, tvecs; | |
float rms = cv::calibrateCamera( | |
std::vector<std::vector<cv::Point3f>>(kCalibrationPoints, grid), | |
imagePoints, | |
rgb.size(), | |
cameraMatrix, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repeatM :: Monad m => m a -> (a -> m a) -> Int -> m a | |
repeatM m _ 0 | |
= m | |
repeatM m f n | |
= repeatM (m >>= f) f (n - 1) | |
inRange :: (Int, Int) -> Bool | |
inRange (x, y) | |
= x `elem` [0..9] && y `elem` [0..9] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>RANSAC</title> | |
<style type="text/css"> | |
#canvas, body, html { | |
width: 100%; | |
height: 100%; | |
margin: 0; padding: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (C) 2015 Nandor Licker. All rights reserved. | |
#include "kernel.h" | |
namespace lenet { | |
namespace cl { | |
void CheckCLError(const std::string &file, size_t line, const std::string &func, cl_int err) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (C) 2015 Nandor Licker. All rights reserved. | |
#include <cstdlib> | |
#include <exception> | |
#include <iostream> | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <opencv2/imgproc/imgproc.hpp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cmath> | |
#include <cstdlib> | |
#include <array> | |
#include <fstream> | |
#include <iostream> | |
#include <memory> | |
#include <sstream> | |
#include <unordered_map> | |
#include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return goog.object.getValues(goog.object.filter(all, function(elem) { | |
return goog.array.some(elem.getVertices(), function(v) { | |
return goog.array.every(planes, function(plane) { | |
return goog.vec.Vec3.dot(v.position, plane.n) + plane.d >= 0; | |
}); | |
}); | |
}, this)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liveVariables :: SFunction -> Map Int (Set SVar) | |
liveVariables func@SFunction{..} | |
= fst . last . takeWhile snd . iterate next $ (initial, True) | |
where | |
(cfg, _) = buildFlowGraph func | |
labels = map fst . Map.toList $ sfBlocks | |
initial = foldr (\x -> Map.insert x Set.empty) Map.empty labels | |
next (mp, _) | |
= foldl update (mp, False) labels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is part of the PiEMU Project | |
// Licensing information can be found in the LICENSE file | |
// (C) 2014 Nandor Licker. All rights reserved. | |
#include "common.h" | |
// ----------------------------------------------------------------------------- | |
static void Branch(THUMBState *, uint16_t) FORCEINLINE; | |
static void Add(THUMBState *, int32_t &, int32_t, int32_t) FORCEINLINE; | |
static void Sub(THUMBState *, int32_t &, int32_t, int32_t) FORCEINLINE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is part of the Proto Project | |
# Licensing information can be found in the LICENSE file | |
# (C) 2014 Nandor Licker. All rights reserved. | |
# Computes a normal vector | |
normal = (a, b, c) -> | |
d1 = vec3.create() | |
vec3.sub(d1, b, a) | |
d2 = vec3.create() | |
vec3.sub(d2, c, a) |