Skip to content

Instantly share code, notes, and snippets.

View dbcesar's full-sized avatar

Diego Cesar dbcesar

  • Bremen, Germany
View GitHub Profile
@dbcesar
dbcesar / set_date_time_eken.sh
Last active May 22, 2018 09:15
Script for register the date taken in the Exif information for pictures taken by Eken H6s cameras. From the PHOTO folder, set the date taken information on the camera exif. This is required for sort images by date. The script will rename files to match the exiftool requirements and later will set the date.
##!/bin/bash
set -e
for D in *
do
if [ -d "$D" ]
then
cd $D
for f in *.JPG
do
@dbcesar
dbcesar / move_bracket_shots_and_generate_tiff.sh
Last active December 20, 2017 00:15
For canon cameras. Move to a different folder all bracket images (useful for HDR creation)
#!/bin/bash
INPUT_DIR="$@"
if [ "$#" -ne 1 ]; then
echo "Wrong usage"
echo "Usage: move_bracket_shots_and_generate_tiff.sh <INPUT_DIR>"
exit
fi
@dbcesar
dbcesar / batch_hdr_creator.sh
Last active December 20, 2017 00:16
Shell script for create batch HDR images using Luminance HDR cli
#!/bin/bash
# OPTIONS number of group bracket shot and verbose
set -e
INPUT_DIR="$@"
if [ "$#" -ne 1 ]; then
echo "Wrong usage"
@dbcesar
dbcesar / colorlabel_group.lua
Created October 18, 2017 12:40
Lua script for set color label on group images
--[[
Set color labels to group
Script to provide shortcuts for setting color labels in images groups.
Useful for those who are RAW+JPEG shooters.
Installation and usage:
1. Copy this file into ~/.config/darktable/lua/
@dbcesar
dbcesar / rsync.txt
Last active January 19, 2017 15:39
Typical rsync command
rsync -avzPn --delete 20161202-1* diego@diego-bir:/home/diego/logs_catarina
Usefull
-n, --dry-run perform a trial run with no changes made
-v, --verbose increase verbosity
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
-z, --compress compress file data during the transfer
-P same as --partial --progress
--partial keep partially transferred files
sudo apt-get install docker.io
%%%%%%%%%%%%%%%%%%%%%%%%%
% Run with ubuntu:16:04
docker run --rm -ti ubuntu:16.04 /bin/bash
%%%%%%%%%%%%%%%%%%%%%%%%%
% commit changes
sudo su
@dbcesar
dbcesar / solvePnP_comments.txt
Created February 25, 2016 23:37
solvePnP comments
solvePnP gives the object coordinates in respect to the camera coordinates.
To get the camera coordinates with respect to object coordinates, you have to invert the solvePnP output.
There is a trick to invert transformation matrices that allows you to save the inversion operation,
which is usually expensive. Given a transformation [R|t], we have that inv([R|t]) = [R'|-R'*t],
where R' is the transpose of R.
So the C++ code would be like: