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) | |
project( OpenCVTest ) | |
find_package( OpenCV REQUIRED ) | |
include_directories( ${OpenCV_INCLUDE_DIRS} ) | |
add_executable( resizecpu resize_cpu.cpp ) | |
target_link_libraries( resizecpu ${OpenCV_LIBS} ) | |
add_executable( resizegpu resize_gpu.cpp ) | |
target_link_libraries( resizegpu ${OpenCV_LIBS} ) |
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
#include <stdio.h> | |
#include <opencv2/opencv.hpp> | |
#include "opencv2/cudaimgproc.hpp" | |
using namespace cv; | |
int main(int argc, char** argv ) { | |
if ( argc != 2 ) { | |
printf("usage: resizegpu <Image_Path>\n"); | |
return -1; |
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
#include <stdio.h> | |
#include <opencv2/opencv.hpp> | |
using namespace cv; | |
int main(int argc, char** argv ) { | |
if ( argc != 2 ) { | |
printf("usage: resizecpu <Image_Path>\n"); | |
return -1; | |
} |
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 nvidia/cuda:10.1-devel-ubuntu18.04 | |
WORKDIR /build | |
RUN apt-get update | |
RUN apt-get install -y unzip python3 cmake g++ | |
ADD vendor/opencv-4.1.1.tar.gz /build/ | |
ADD vendor/opencv_contrib-4.1.1.tar.gz /build/ |
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
/* eslint-env node, mocha */ | |
const should = require('should'); | |
describe('Some encrypt/decrypt test', function(){ | |
const passphrase = 'good passphrases are long'; | |
const passphraseIV = Buffer.from('AAAAAAAAAAAAAAAAAAAAAA==', 'base64'); | |
let fileBlob = 'start'; | |
let ciphertext = null; | |
let nock = require('nock'); |
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
// | |
// FILE: MultiSpeedI2CScanner.ino | |
// AUTHOR: Rob Tillaart | |
// VERSION: 0.1.04 | |
// PURPOSE: I2C scanner @different speeds | |
// DATE: 2013-11-05 | |
// URL: http://forum.arduino.cc/index.php?topic=197360 | |
// | |
// Released to the public domain | |
// |
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 rplidar import RPLidar | |
lidar = RPLidar('/dev/tty.SLAB_USBtoUART') | |
info = lidar.get_info() | |
print(info) | |
health = lidar.get_health() | |
print(health) | |
for i, scan in enumerate(lidar.iter_scans()): |
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 cv2 as cv | |
import glob | |
import pickle | |
# termination criteria | |
criteria = (cv.TERM_CRITERIA_EPS + cv.TERM_CRITERIA_MAX_ITER, 30, 0.001) | |
# prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0) | |
objp = np.zeros((6*6,3), np.float32) |
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 picamera.array import PiRGBArray | |
from picamera import PiCamera | |
import cv2 | |
import time | |
# initialize the camera and grab a reference to the raw camera capture | |
camera = PiCamera() | |
camera.resolution = (1280, 720) | |
camera.framerate = 10 | |
rawCapture = PiRGBArray(camera, size=(1280, 720)) |
NewerOlder