Skip to content

Instantly share code, notes, and snippets.

View diramazioni's full-sized avatar

Eli Spizzichino diramazioni

  • Italy (looking for other destination)
View GitHub Profile
@diramazioni
diramazioni / blurCV_detect.py
Last active April 11, 2023 20:46
Find out the "bluriness" of each extracted image-frame to select the best image out of N frames, copy the resulting frames in a new dir mantaining exif info
#!/usr/bin/env python
"""
### Find out the "bluriness" of each extracted image-frame to select the best image out of N frames,
### copy the resulting frames in a new dir mantaining exif info
### Arguments: image_directory best_of_n_frames method (1 or 2)
### python blurCV_detect.py /home/SfM/footage 30 1
"""
import sys, glob, os, shutil
@diramazioni
diramazioni / selectfile.py
Created September 23, 2019 17:25 — forked from DrDub/selectfile.py
A file selection class build for ipywidgets without any extra dependencies.
import os
import ipywidgets as widgets
class FileBrowser(object):
def __init__(self, init_path=None):
if init_path:
self.path = os.getcwd()+'/'+init_path
else:
@diramazioni
diramazioni / texture_change.py
Created February 27, 2014 17:54
blender python: texture change from command line
'''
texture image path are relative to the blend file directory. run from command line like this:
texture=img/2012720989_c.jpg blender -b mug.blend --python texture_change.py -F PNG -s 1 -e 1 -j 1 -t 0 -a
''''
import os
image_file = os.getenv('texture')
if not image_file:
image_file="img/2012720989_c.jpg"
@diramazioni
diramazioni / pdfimages2txt
Created September 15, 2013 18:17
A script I quickly come up for my needs to extract image from pdf, preprocess and extract text with tesseract
#!/bin/bash
STARTPAGE=2
ENDPAGE=75
SOURCE=book.pdf
OUTPUT=book.txt
RESOLUTION=600
LAYOUT="1"
[[ -e out.txt ]] && rm out.txt
for i in `seq $STARTPAGE $ENDPAGE`; do
@diramazioni
diramazioni / copy_particles_to_sim.py
Created August 7, 2013 02:33
This add-on bridge the particle system and Rigid Bodies system in blender: creates real rigid body object based on the original settings of the object instantiated by the particle system Instructions: · Create an emitter and an object/group that will be emitted · Assign a rigid body to the obj · Optionally create a field, like a force field, tha…
bl_info = {
"name": "Copy Particles to Rigid Bodies",
"version": (0, 0, 8),
"blender": (2, 6, 8),
"location": "View3D > Tool Shelf",
"description": "Transfers dupliobjects from a PS to a Rigid Bodies simulation",
"author": "Liero (on blenderartist), Eli Spizzichino",
"category": "Animation",
}