This file contains hidden or 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 numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
import math | |
def RANSAC(x, y, z, num_iter, threshold): | |
best_inliers = [] | |
num_best_inliers = 0 |
This file contains hidden or 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
def get_random_patch(input_image, target_image, patch_size): | |
start_x = np.random.randint(input_image.shape[0] - patch_size) | |
start_y = np.random.randint(input_image.shape[1] - patch_size) | |
end_x = start_x + patch_size | |
end_y = start_y + patch_size | |
input_patch = input_image[start_x:end_x, start_y:end_y] | |
target_patch = target_image[start_x:end_x, start_y:end_y] | |
return [input_patch, target_patch] |
This file contains hidden or 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
gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw, width=640, height=480" ! videobox border-alpha=0 left=-640 ! queue ! videomixer name=mix ! videoconvert ! x264enc ! matroskamux ! filesink location=test.mkv sync=false videotestsrc ! "video/x-raw, width=640, height=480" ! videobox border-alpha=0 left=0 ! mix. |
This file contains hidden or 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
#!/bin/bash | |
VERSION=1.12.0 | |
mkdir ~/gstreamer_$VERSION | |
cd ~/gstreamer_$VERSION | |
wget https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-$VERSION.tar.xz | |
wget https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-$VERSION.tar.xz | |
wget https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-$VERSION.tar.xz |
This file contains hidden or 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
#https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt-get update |
This file contains hidden or 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
#define EPS 1e-43f | |
typedef float WorkType; | |
typedef Vec<WorkType, 1> WorkVec; | |
typedef WorkType (*get_weight_op)(WorkType*, unsigned char*,unsigned char*); | |
inline WorkType get_weight_1channel(WorkType* LUT, unsigned char* p1,unsigned char* p2) | |
{ | |
return LUT[ (p1[0]-p2[0])*(p1[0]-p2[0]) ]; | |
} |
This file contains hidden or 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
mplayer tv:// -tv driver=v4l2:norm=PAL:input=0:amode=1:width=704:height=576:outfmt=yv12:device=/dev/video1 |
This file contains hidden or 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
gst-launch-1.0 udpsrc port=5004 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)YCbCr-4:2:2, depth=(string)8, width=(string)720, height=(string)576, colorimetry=(string)BT601-5, payload=(int)96" ! rtpvrawdepay ! videoconvert ! autovideosink -v |
This file contains hidden or 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
JPG -> YUV | |
ffmpeg -i test-640x480.jpg -s 640x480 -pix_fmt yuv420p test-yuv420p.yuv | |
YUV -> JPG | |
ffmpeg -s 640x480 -pix_fmt yuv420p -i test-yuv420p.yuv test-640x480.jpg |