ICNR is an initialization method for sub-pixel convolution.
Papar
Github or Gist
ICNR is an initialization method for sub-pixel convolution.
Papar
Github or Gist
| Here are the steps for building OSG in the OpenGL CORE Profile | |
| once you have configured CMake as usual. | |
| 1. Download the GL CORE include folder from Khronos: | |
| https://www.khronos.org/registry/OpenGL/api/GL/ | |
| 2. Put it in a folder somewhere. You can put it in a folder called glcore, or | |
| you can make a "GL" folder in the include folder of the OSG repository and | |
| put it there. | |
| // Port of https://github.com/opencv/opencv/blob/a50a355/modules/features2d/src/blobdetector.cpp | |
| // But with special `faster` option which has slightly different semantics, | |
| // but is a whole bunch faster. | |
| function diff(v1, v2) { | |
| if (v1.x !== undefined) return { x: v1.x - v2.x, y: v1.y - v2.y }; | |
| return v1.map((value, index) => value - v2[index]); | |
| } | |
| function norm(vector) { |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
| #include "caffeclassifier.h" | |
| CaffeClassifier::CaffeClassifier(const string& model_file, | |
| const string& trained_file, | |
| const string& mean_file, | |
| const string& label_file, | |
| const bool use_GPU, | |
| const int batch_size) { | |
| if (use_GPU) | |
| Caffe::set_mode(Caffe::GPU); |
| // | |
| // | |
| // | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| // | |
| // | |
| // |
| hello: hello.cpp | |
| g++ -std=c++0x -O3 -o hello hello.cpp -I$(VEXCL_ROOT) \ | |
| -lGL -lglut -lGLEW -lOpenCL -lboost_system |
| #! /bin/bash | |
| # | |
| # Diffusion youtube avec ffmpeg | |
| # Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
| VBR="2500k" # Bitrate de la vidéo en sortie | |
| FPS="30" # FPS de la vidéo en sortie | |
| QUAL="medium" # Preset de qualité FFMPEG | |
| YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
| import cv2 | |
| import numpy as np | |
| def in_front_of_both_cameras(first_points, second_points, rot, trans): | |
| # check if the point correspondences are in front of both images | |
| rot_inv = rot | |
| for first, second in zip(first_points, second_points): | |
| first_z = np.dot(rot[0, :] - second[0]*rot[2, :], trans) / np.dot(rot[0, :] - second[0]*rot[2, :], second) | |
| first_3d_point = np.array([first[0] * first_z, second[0] * first_z, first_z]) |