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
| public class HelloJNI { | |
| static { | |
| System.loadLibrary("hello"); // loads libhello.so | |
| } | |
| private native void sayHello(String name); | |
| public static void main(String[] args) { | |
| new HelloJNI().sayHello("Dave"); | |
| } |
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
| #!/usr/bin/env python | |
| """Siemens star chart generator | |
| Usage: | |
| stargen.py [options] <output> | |
| Options: | |
| -h, --help Show this message | |
| -n N Number of rays [default: 100] |
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
| # construct node | |
| def opencv_matrix(loader, node): | |
| mapping = loader.construct_mapping(node, deep=True) | |
| mat = np.array(mapping["data"]) | |
| mat.resize(mapping["rows"], mapping["cols"]) | |
| return mat | |
| yaml.add_constructor(u"tag:yaml.org,2002:opencv-matrix", opencv_matrix) | |
| # loading |
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
| cmake_minimum_required( VERSION 2.8 ) | |
| # Create Project | |
| project( solution ) | |
| add_executable( project main.cpp ) | |
| # Set StartUp Project (Option) | |
| # (This setting is able to enable by using CMake 3.6.0 RC1 or later.) | |
| set_property( DIRECTORY PROPERTY VS_STARTUP_PROJECT "project" ) |
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
| # mozna neni potreba: sudo apt-get install linux-generic | |
| sudo apt-get install v4l2loopback-dkms | |
| sudo modprobe v4l2loopback | |
| modprobe v4l2loopback | |
| ffmpeg -i /home/martin/Downloads/video.mp4 -f v4l2 -vcodec rawvideo /dev/video0 | |
| ffmpeg -i rtsp://10.104.103.138/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp -f v4l2 -pix_fmt yuv420p -vcodec rawvideo /dev/video0 |
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
| #!/usr/bin/env python3 | |
| from v4l2 import * | |
| import fcntl | |
| import mmap | |
| import select | |
| import time | |
| vd = open('/dev/video0', 'rb+', buffering=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
| from __future__ import print_function | |
| import requests | |
| import json | |
| import cv2 | |
| addr = 'http://localhost:5000' | |
| test_url = addr + '/api/test' | |
| # prepare headers for http request | |
| content_type = 'image/jpeg' |
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
| # rotation.py - rotation methods for GPR | |
| # Many methods borrow heavily or entirely from transforms3d | |
| # eventually some of these may be upstreamed, but credit to transforms3d | |
| # authors for implementing the many of the formulations we use here. | |
| import numpy as np | |
| ''' | |
| Rotations | |
| ========= |
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
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import numpy as np | |
| import cv2 as cv | |
| def main(argv): | |
| if len(argv) < 3: |
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
| # install mkl | |
| RUN apt update && apt install -y --force-yes apt-transport-https && \ | |
| wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \ | |
| apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \ | |
| sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' && \ | |
| apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install cpio intel-mkl-64bit-2018.3-051 && \ | |
| (find /opt/intel -name "ia32*" -exec rm -rf {} \; || echo "removing ia32 binaries") ; \ | |
| (find /opt/intel -name "examples" -type d -exec rm -rf {} \; || echo "removing examples") ; \ | |
| (find /opt/intel -name "benchmarks" -exec rm -rf {} \; || echo "removing benchmarks") ; \ | |
| (find /opt/intel -name "documentation*" -exec rm -rf {} \; || echo "removing documentation") ; \ |