- 系统&软件:Ubuntu 20.04 + GTX 3090 + CUDA 11.8 + Python 3.10
安装以下依赖库
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 <iostream> | |
#include <vector> | |
//ref to : https://web.archive.org/web/20150222120106/xenia.media.mit.edu/~cwren/interpolator/ | |
std::vector<float> getPerspectiveTransformJnulzl(const std::vector<float>& src, | |
const std::vector<float>& dst) | |
{ | |
float a1 = src[0]; | |
float b1 = src[1]; | |
float a2 = src[2]; |
## CMAKE_TOOLCHAIN_FILE from https://github.com/Tencent/ncnn/tree/master/toolchains
cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./opencv_mini \
-DCMAKE_TOOLCHAIN_FILE=$NCNN_ROOT/toolchains/arm-linux-gnueabihf.toolchain.cmake \
-DBUILD_JPEG=ON -DBUILD_TIFF=ON -DBUILD_PNG=ON -DBUILD_ZLIB=ON \
-DBUILD_opencv_calib3d=OFF -DBUILD_opencv_features2d=OFF -DBUILD_opencv_flann=OFF \
import os | |
import sys | |
import argparse | |
def convert_func(src_path, des_path, upper, align_byte = 16, step = 12): | |
array_name = os.path.basename(src_path).replace('.', '_') | |
count = 1 | |
with open(des_path, 'wb') as result_file: | |
result_file.write(b'#ifndef __%s__H__\n' % array_name.upper().encode('utf-8')) |
libtorch-cxx11-abi-shared-with-deps-1.4.0+cu92.zip : https://download.pytorch.org/libtorch/cu92/libtorch-cxx11-abi-shared-with-deps-1.4.0%2Bcu92.zip
libtorch-cxx11-abi-shared-with-deps-1.4.0+cu100.zip : https://download.pytorch.org/libtorch/cu100/libtorch-cxx11-abi-shared-with-deps-1.4.0%2Bcu100.zip
libtorch-cxx11-abi-shared-with-deps-1.4.0.zip : https://download.pytorch.org/libtorch/cu101/libtorch-cxx11-abi-shared-with-deps-1.4.0.zip
libtorch-cxx11-abi-shared-with-deps-1.5.0+cu92.zip : https://download.pytorch.org/libtorch/cu92/libtorch-cxx11-abi-shared-with-deps-1.5.0%2Bcu92.zip