Skip to content

Instantly share code, notes, and snippets.

/// Get the intrinsic associated to a view
std::shared_ptr<const cameras::IntrinsicBase> GetIntrinsicOrDie(const View * view) const
{
return std::const_pointer_cast<const cameras::IntrinsicBase>(intrinsics.at(view->id_intrinsic));
}
@mitjap
mitjap / gist:062ae13d6ed04f68d49ae08e5b1d297c
Last active August 3, 2016 08:13
// C = inv(R) * -t;
struct CameraPositionError : public AbstractPositionError {
CameraPositionError(vector<double> &observed, double sigma)
: observed(observed), sigma(sigma) {
weigth = 1 / (sigma * sigma);
}
vector<double> observed;
double sigma, weigth;
template <typename T>
@mitjap
mitjap / equihist.m
Created October 18, 2013 17:38
equihist
function img_eq = equihist(img)
% compute hist with 256 bins
h = myhist(img, 256);
% cum hist
%for i = 2 : size(h(:))
% h(i) = h(i) + h(i-1);
%end
h = cumsum(h);
ply
format ascii 1.0
comment PCL generated
element vertex 10
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
class LocationsForm(forms.Form):
locations = forms.ChoiceField(choices=locationsChoices(), label='', required=False)
def locationsChoices():
return itertools.chain((('', _("Don't mock location")),(("%s-%s" % (backend.get_full_name(), node.id), node.name) for backend, node in nodes.get_all_nodes_with_backends())))
Successfully installed Django Jinja2 PyYAML Pygments Sphinx amqplib anyjson billiard blinker celery django-appconf django-browserid django-celery django-classy-tags django-missing django-pushserver django-sekizai django-staticfiles django-tastypie django-tastypie-mongoengine docutils kombu lxml mimeparse mongodbforms mongoengine mongogeneric py-hbpush pymongo python-dateutil pytz tornado tweepy requests brukva
Cleaning up...
(env_piplmesh)mitjap@mitjap-ubuntu:~/Projects/temp/PiplMesh$ pip freeze
Django==1.4.1
Jinja2==2.6
PyYAML==3.10
Pygments==1.5
Sphinx==1.1.3
amqplib==1.0.2
anyjson==0.3.3
jQuery.Event
currentTarget: HTMLDocument
data: undefined
delegateTarget: HTMLDocument
exclusive: undefined
handleObj: Object
isTrigger: true
jQuery172027660612505860627: true
namespace: ""
namespace_re: null