This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adapted from http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_imgproc/py_pyramids/py_pyramids.html | |
import cv2 | |
import numpy as np | |
def Laplacian_Pyramid_Blending_with_mask(A, B, m, num_levels = 6): | |
# assume mask is float32 [0,1] | |
# generate Gaussian pyramid for A,B and mask | |
GA = A.copy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
import cv2 | |
import os | |
import v4l2capture | |
import select | |
if __name__ == '__main__': | |
#cap = cv2.VideoCapture(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
import os | |
import json | |
import sys | |
import argparse | |
import math | |
import subprocess | |
from tqdm import tqdm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - Try to find FFMPEG | |
# Once done this will define | |
# FFMPEG_FOUND - System has FFMPEG | |
# FFMPEG_INCLUDE_DIRS - The FFMPEG include directories | |
# FFMPEG_LIBRARIES - The libraries needed to use FFMPEG | |
# FFMPEG_LIBRARY_DIRS - The directory to find FFMPEG libraries | |
# | |
# written by Roy Shilkrot 2013 http://www.morethantechnical.com/ | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
from tkVideoPlayer import TkinterVideo | |
from ffmpeg import FFmpeg, Progress | |
import os | |
import sys | |
import argparse | |
parser = argparse.ArgumentParser(description="Crop a video") | |
parser.add_argument("video", metavar="video", type=str, help="video file to crop") | |
args = parser.parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert the video to a 480x GIF @ x2 speed | |
file1=$(basename -- "$1") | |
dir=$(dirname "$1") | |
file1="${file1%.*}" | |
/usr/local/bin/ffmpeg -hide_banner -loglevel panic -i "$1" -filter_complex "[0:v] scale=w='min(480,iw)':h=-1,fps=8,setpts=(1/2)*PTS, split [a][b]; [a] palettegen [p]; [b][p] paletteuse" -y "$dir/$file1.gif" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
def cylindricalWarp(img, K): | |
"""This function returns the cylindrical warp for a given image and intrinsics matrix K""" | |
h_,w_ = img.shape[:2] | |
# pixel coordinates | |
y_i, x_i = np.indices((h_,w_)) | |
X = np.stack([x_i,y_i,np.ones_like(x_i)],axis=-1).reshape(h_*w_,3) # to homog | |
Kinv = np.linalg.inv(K) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SimpleAdHocTracker.cpp | |
* | |
* Created on: Mar 15, 2015 | |
* Author: roy_shilkrot | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Roy Shilkrot | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
import logging | |
import os | |
import sys | |
import argparse | |
import urllib.parse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <opencv2/features2d/features2d.hpp> | |
#include <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/video/video.hpp> | |
#include <iostream> | |
using namespace cv; | |
using namespace std; |