Skip to content

Instantly share code, notes, and snippets.

@amiltonwong
amiltonwong / gist:6ca5dbd1211be7aad8f3
Last active August 29, 2015 14:21
v0.8 build error in Ubuntu 12.04, gcc version 4.6.3
[ 0%] Building HTML documentation with Sphinx
Running Sphinx v1.1.3
loading pickled environment... done
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
no targets are out of date.
[ 0%] Built target doc
[ 3%] Built target lib_Osi
[ 15%] Built target lib_CoinUtils
@amiltonwong
amiltonwong / gist:1971c7e61877a7f30602
Created May 12, 2015 12:44
minor error in openMVG_main_SfMInit_ImageListing
You called :
/root/Downloads/openMVG/openMVG_Build/software/SfM/openMVG_main_SfMInit_ImageListing
--imageDirectory /root/Downloads/openMVG/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images
--sensorWidthDatabase /root/Downloads/openMVG/src/software/SfM/cameraSensorWidth/cameraGenerated.txt
--outputDirectory /root/Downloads/openMVG/openMVG_Build/software/SfM/tutorial_out/matches
--focal -1
--intrinsics
--camera_model 3
--group_camera_model 1
Error: Couldn't open /root/Downloads/openMVG/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/K.txt Unknown file format
@amiltonwong
amiltonwong / gist:fa1dbecf04866b32bff8
Created May 28, 2015 18:36
ccny_vision build error
root@milton-PC:~/ros_ws/package_dir# rosmake ccny_vision
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['ccny_vision']
[ rosmake ] Logging to directory /root/.ros/rosmake/rosmake_output-20150529-023319
[ rosmake ] Expanded args ['ccny_vision'] to:
['ar_pose', 'artoolkit']
[rosmake-0] Starting >>> roslang [ make ]
[rosmake-1] Starting >>> urdf_interface [ make ]
[rosmake-1] Finished <<< urdf_interface ROS_NOBUILD in package urdf_interface
[rosmake-1] Starting >>> geometry_msgs [ make ]
I0724 15:20:24.137687 26781 caffe.cpp:113] Use GPU with device ID 0
I0724 15:20:24.351411 26781 caffe.cpp:121] Starting Optimization
I0724 15:20:24.351496 26781 solver.cpp:32] Initializing solver from parameters:
test_iter: 100
test_interval: 500
base_lr: 0.001
display: 100
max_iter: 4000
lr_policy: "fixed"
momentum: 0.9
----------------------------------------------------------------------
-- example-linear-regression.lua
--
-- This script provides a very simple step-by-step example of
-- linear regression, using Torch7's neural network (nn) package,
-- and the optimization package (optim).
--
-- note: to run this script, simply do:
-- torch script.lua
----------------------------------------------------------------------
-- example-linear-regression.lua
--
-- This script provides a very simple step-by-step example of
-- linear regression, using Torch7's neural network (nn) package,
-- and the optimization package (optim).
--
-- note: to run this script, simply do:
-- torch script.lua
require 'nn'
local ReQU = torch.class('nn.ReQU', 'nn.Module')
function ReQU:updateOutput(input)
-- TODO
self.output:resizeAs(input):copy(input)
-- ...something here...
--[[
if input > 0 then
function [ Id, Dd, Kd ] = downscale( I, D, K, level )
if(level <= 1)
Id = I;
Dd = D;
Kd = K;
return;
end
% this is because we interpolate in such a way, that
% the image is discretized at the exact pixel-values (e.g. 3,7), and
function [ err ] = calcErr( IRef, DRef, I, xi, K )
% get shorthands (R, t)
T = se3Exp(xi);
R = T(1:3, 1:3);
t = T(1:3,4);
RKInv = R * K^-1;
% these contain the x,y image coordinates of the respective
function [ Jac, residual ] = deriveErrNumeric( IRef, DRef, I, xi, K )
% calculate numeric derivative. SLOW
eps = 1e-6;
Jac = zeros(size(I,1) * size(I,2),6);
residual = calcErr(IRef,DRef,I,xi,K);
for j=1:6
epsVec = zeros(6,1);
epsVec(j) = eps;