Skip to content

Instantly share code, notes, and snippets.

Roy Shilkrot royshil

Block or report user

Report or block royshil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@royshil
royshil / OGL_OCV_common.cpp
Created Feb 16, 2015
OpenCV OpenGL common interop: OpenCV Mat to OpenGL texture, 2D drawing of textures
View OGL_OCV_common.cpp
/*
* OGL_OCV_common.cpp
* Common interop between OpenCV and OpenGL
*
* Created by Roy Shilkrot on 2/16/2015
* Copyright 2015 Roy Shilkrot. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@royshil
royshil / setup.sh
Last active Jan 27, 2018
Setup an automatic Tensorflow-CUDA-Docker-Jupyter machine on Google Cloud Platform
View setup.sh
#!/bin/bash
# First you must install the 4.4.0 kernel:
# $ sudo apt-get install linux-image-4.4.0-112-generic
# find all the other kernels and remove them:
# $ sudo apt-get purge linux-image-4.13.0-1008-gcp
# $ sudo update-grub
# $ sudo reboot
sudo apt-get update && sudo apt-get install -y \
@royshil
royshil / BUILD
Created Mar 8, 2018
Scripts for cross-compiling Tensorflow 1.5+ for the Jetson TK1 arm-based SoM
View BUILD
package(default_visibility = ["//visibility:public"])
cc_toolchain_suite(
name = "toolchain",
toolchains = {
"armeabi-v7a|compiler": ":cc-compiler-armeabi",
"k8|compiler": ":cc-compiler-local",
},
)
@royshil
royshil / opencv_capture_v4l2.py
Created Mar 4, 2016
A way to set V4L2 camera params for OpenCV, when cv2.VideoCapture doesn't work. This requires the python-v42lcapture module (https://github.com/gebart/python-v4l2capture)
View opencv_capture_v4l2.py
#!/usr/bin/env python
import numpy as np
import cv2
import os
import v4l2capture
import select
if __name__ == '__main__':
#cap = cv2.VideoCapture(0)
View segmentation_graphcut_superpixels.py
import cv2
import numpy as np
import matplotlib.pyplot as plt
from skimage.segmentation import slic
from skimage.segmentation import mark_boundaries
from skimage.data import astronaut
from skimage.util import img_as_float
import maxflow
from scipy.spatial import Delaunay
@royshil
royshil / gist:6318407
Created Aug 23, 2013
A CMake Find module for FFMPEG that will tear the HD apart looking for the libs and includes ;)
View gist:6318407
# - 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/
#
@royshil
royshil / SimpleARQGLViewer.cpp
Created Feb 16, 2015
Augmented Reality application with QGLViewer
View SimpleARQGLViewer.cpp
/*
* SimpleARQGLViewer.cpp
* Creating an AR application with QGLViewer
*
* Created by Roy Shilkrot on 2/16/2015
* Copyright 2015 Roy Shilkrot. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@royshil
royshil / SimpleAdHocTracker.cpp
Created Mar 15, 2015
Ad-Hoc AR tracker from a planar scene without need for markers
View SimpleAdHocTracker.cpp
/*
* SimpleAdHocTracker.cpp
*
* Created on: Mar 15, 2015
* Author: roy_shilkrot
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Roy Shilkrot
*
@royshil
royshil / copy_tf_headers.sh
Last active May 9, 2019
A script to copy Tensorflow headers to build custom C++ applications
View copy_tf_headers.sh
#!/bin/bash
# inspired by a part of: https://github.com/cjweeks/tensorflow-cmake/blob/master/build.sh
#
# Assumes Tensorflow libraries libtensorflow_framework.so and libtensorflow_cc.so were built with Bazel,
# and the ${TF_ROOT}/tensorflow/contrib/makefile/download_dependencies.sh script was executed.
set -o nounset
set -o errexit
set -o pipefail
@royshil
royshil / GLWidgetOpenGL4Example.cpp
Last active Jul 17, 2019
Simple example of OpenGL 4.1 in a QGLWidget
View GLWidgetOpenGL4Example.cpp
/*
* GLWidgetOpenGL4Example.h
*
* Created on: Apr 23, 2016
* Author: roy_shilkrot
*
*/
class GLWidgetOpenGL4Example : public QGLWidget {
public:
You can’t perform that action at this time.