Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'fileutils'
FileUtils.cd("/Users/drew/Desktop/ladder") do
prev_num = -1;
i = 0;
Dir['*.png'].each do |filename|
number = /ladybug_panoramic_(\d{6}).png/.match(filename)[1]
num_i = number.to_i
@andrewmacquarrie
andrewmacquarrie / fill_dropped_frames.rb
Last active August 29, 2015 14:15
fill_dropped_frames.rb
#!/usr/bin/env ruby
require 'fileutils'
# Takes two arguments:
# Arg 1 - path to the "GRP/frame information" txt file, output by LadybugCapPro
# Arg 2 - path to the folder containing all the fames as PNG files. Assumes prefix 'ladybug_panoramic_'
path_to_frame_info_file = ARGV[0]
path_to_png_folder = ARGV[1]