openMVG:打开多视图几何库。 Motion的3D计算机视觉和结构基础

  • M1_677176
    了解作者
  • 15.9MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-07 20:03
    上传日期
OpenMVG(开放式多视图几何) 执照 文献资料 持续集成(Linux / MacOs / Windows) 建造 代码质量 聊天 我们的任务 通过开发C ++框架,扩展了从图像/摄影测量技术到3D重建功能的认识。 我们的愿景 易于阅读,准确实施最新技术和“经典”算法,可简化可重复的研究。 我们的信条 “保持简单,保持可维护性”。 OpenMVG旨在易于阅读,学习,修改和使用。 由于其严格的测试驱动开发和示例,该库允许构建受信任的大型系统。 我们的代码库和管道 OpenMVG通过结合了库,二进制文件和管道的图像框架提供了端到端的3D重建。 这些库可轻松访问各种功能,例如:图像处理,功能描述和匹配,功能跟踪,相机模型,多视图几何,鲁棒估计,运动结构算法,... 这些二进制文件解决了管道可能需要的单位任务:场景初始化,特征检测和匹配以及从运动结构重建,将重建的场景导出
openMVG-develop.zip
内容介绍
# Eigen Tensors Tensors are multidimensional arrays of elements. Elements are typically scalars, but more complex types such as strings are also supported. [TOC] ## Tensor Classes You can manipulate a tensor with one of the following classes. They all are in the namespace ```::Eigen.``` ### Class Tensor<data_type, rank> This is the class to use to create a tensor and allocate memory for it. The class is templatized with the tensor datatype, such as float or int, and the tensor rank. The rank is the number of dimensions, for example rank 2 is a matrix. Tensors of this class are resizable. For example, if you assign a tensor of a different size to a Tensor, that tensor is resized to match its new value. #### Constructor Tensor<data_type, rank>(size0, size1, ...) Constructor for a Tensor. The constructor must be passed ```rank``` integers indicating the sizes of the instance along each of the the ```rank``` dimensions. // Create a tensor of rank 3 of sizes 2, 3, 4. This tensor owns // memory to hold 24 floating point values (24 = 2 x 3 x 4). Tensor<float, 3> t_3d(2, 3, 4); // Resize t_3d by assigning a tensor of different sizes, but same rank. t_3d = Tensor<float, 3>(3, 4, 3); #### Constructor Tensor<data_type, rank>(size_array) Constructor where the sizes for the constructor are specified as an array of values instead of an explicitly list of parameters. The array type to use is ```Eigen::array<Eigen::Index>```. The array can be constructed automatically from an initializer list. // Create a tensor of strings of rank 2 with sizes 5, 7. Tensor<string, 2> t_2d({5, 7}); ### Class TensorFixedSize<data_type, Sizes<size0, size1, ...>> Class to use for tensors of fixed size, where the size is known at compile time. Fixed sized tensors can provide very fast computations because all their dimensions are known by the compiler. FixedSize tensors are not resizable. If the total number of elements in a fixed size tensor is small enough the tensor data is held onto the stack and does not cause heap allocation and free. // Create a 4 x 3 tensor of floats. TensorFixedSize<float, Sizes<4, 3>> t_4x3; ### Class TensorMap<Tensor<data_type, rank>> This is the class to use to create a tensor on top of memory allocated and owned by another part of your code. It allows to view any piece of allocated memory as a Tensor. Instances of this class do not own the memory where the data are stored. A TensorMap is not resizable because it does not own the memory where its data are stored. #### Constructor TensorMap<Tensor<data_type, rank>>(data, size0, size1, ...) Constructor for a Tensor. The constructor must be passed a pointer to the storage for the data, and "rank" size attributes. The storage has to be large enough to hold all the data. // Map a tensor of ints on top of stack-allocated storage. int storage[128]; // 2 x 4 x 2 x 8 = 128 TensorMap<Tensor<int, 4>> t_4d(storage, 2, 4, 2, 8); // The same storage can be viewed as a different tensor. // You can also pass the sizes as an array. TensorMap<Tensor<int, 2>> t_2d(storage, 16, 8); // You can also map fixed-size tensors. Here we get a 1d view of // the 2d fixed-size tensor. Tensor<float, Sizes<4, 5>> t_4x3; TensorMap<Tensor<float, 1>> t_12(t_4x3, 12); #### Class TensorRef See Assigning to a TensorRef below. ## Accessing Tensor Elements #### <data_type> tensor(index0, index1...) Return the element at position ```(index0, index1...)``` in tensor ```tensor```. You must pass as many parameters as the rank of ```tensor```. The expression can be used as an l-value to set the value of the element at the specified position. The value returned is of the datatype of the tensor. // Set the value of the element at position (0, 1, 0); Tensor<float, 3> t_3d(2, 3, 4); t_3d(0, 1, 0) = 12.0f; // Initialize all elements to random values. for (int i = 0; i < 2; ++i) { for (int j = 0; j < 3; ++j) { for (int k = 0; k < 4; ++k) { t_3d(i, j, k) = ...some random value...; } } } // Print elements of a tensor. for (int i = 0; i < 2; ++i) { LOG(INFO) << t_3d(i, 0, 0); } ## TensorLayout The tensor library supports 2 layouts: ```ColMajor``` (the default) and ```RowMajor```. Only the default column major layout is currently fully supported, and it is therefore not recommended to attempt to use the row major layout at the moment. The layout of a tensor is optionally specified as part of its type. If not specified explicitly column major is assumed. Tensor<float, 3, ColMajor> col_major; // equivalent to Tensor<float, 3> TensorMap<Tensor<float, 3, RowMajor> > row_major(data, ...); All the arguments to an expression must use the same layout. Attempting to mix different layouts will result in a compilation error. It is possible to change the layout of a tensor or an expression using the ```swap_layout()``` method. Note that this will also reverse the order of the dimensions. Tensor<float, 2, ColMajor> col_major(2, 4); Tensor<float, 2, RowMajor> row_major(2, 4); Tensor<float, 2> col_major_result = col_major; // ok, layouts match Tensor<float, 2> col_major_result = row_major; // will not compile // Simple layout swap col_major_result = row_major.swap_layout(); eigen_assert(col_major_result.dimension(0) == 4); eigen_assert(col_major_result.dimension(1) == 2); // Swap the layout and preserve the order of the dimensions array<int, 2> shuffle(1, 0); col_major_result = row_major.swap_layout().shuffle(shuffle); eigen_assert(col_major_result.dimension(0) == 2); eigen_assert(col_major_result.dimension(1) == 4); ## Tensor Operations The Eigen Tensor library provides a vast library of operations on Tensors: numerical operations such as addition and multiplication, geometry operations such as slicing and shuffling, etc. These operations are available as methods of the Tensor classes, and in some cases as operator overloads. For example the following code computes the elementwise addition of two tensors: Tensor<float, 3> t1(2, 3, 4); ...set some values in t1... Tensor<float, 3> t2(2, 3, 4); ...set some values in t2... // Set t3 to the element wise sum of t1 and t2 Tensor<float, 3> t3 = t1 + t2; While the code above looks easy enough, it is important to understand that the expression ```t1 + t2``` is not actually adding the values of the tensors. The expression instead constructs a "tensor operator" object of the class TensorCwiseBinaryOp<scalar_sum>, which has references to the tensors ```t1``` and ```t2```. This is a small C++ object that knows how to add ```t1``` and ```t2```. It is only when the value of the expression is assigned to the tensor ```t3``` that the addition is actually performed. Technically, this happens through the overloading of ```operator=()``` in the Tensor class. This mechanism for computing tensor expressions allows for lazy evaluation and optimizations which are what make the tensor library very fast. Of course, the tensor operators do nest, and the expression ```t1 + t2 * 0.3f``` is actually represented with the (approximate) tree of operators: TensorCwiseBinaryOp<scalar_sum>(t1, TensorCwiseUnaryOp<scalar_mul>(t2, 0.3f)) ### Tensor Operations and C++ "auto" Because Tensor operations create tensor operators, the C++ ```auto``` keyword does not have its intuitive meaning. Consider these 2 lines of code: Tensor<float, 3> t3 = t1 + t2; auto t4 = t1 + t2; In the first line we allocate the tensor ```t3``` and it will contain the result of the addition of ```t1``` and ```t2```. In the second line, ```t4``` is actually the tree of tensor operators that will compute the addition of ```t1``` and ```t2```. In fact, ```t4``` is *not* a tensor and you cannot get the values of its elements: Tensor<float, 3> t3 = t1 + t2
评论
    相关推荐
    • slicereg:小鼠大脑的2D-3D组织学脑切片注册应用程序
      Slicereg 鼠标大脑的2D-3D组织学脑切片注册应用程序。 特征 目前,仅实现了一些非常基本的功能: 在屏幕上显示多通道OME-TIFF文件... 如果您使用的是MacOS,BigSur OpenGL将无法正常工作。 我们仍在等待其他开发人员
    • Boom 3D 1.3.11 macOS.zip
      Boom 3D是适用于Mac和Windows系统的专业音效增强软件,旨在通过播放器,媒体或流媒体服务等介质,在不同类型的耳机上以3D环绕效果播放媒体内容。您无需使用昂贵的耳机或其他附加环绕音效增强器即可感受3D环绕音乐。 ...
    • 3D重建
      从2D图片进行3D重建 该项目使用OpenCV SFM模块从多个2D图像中重建对象,并使用PCL来处理点云。 它使用CMAKE进行编译,并且可以运行3个目标: 重建 process_pcl 建造 :hammer_and_wrench_selector: 要构建使用CMake...
    • MacOS-3D-Gtk-light.zip
      ubuntu美化的苹果主题
    • 3D WebView for Windows and macOS Web Browser v3.9
      unity 版本3D渲染网页神奇 亲自测试可以 支持播放MP4 等网页视频 商业使用请去购买 https://assetstore.unity.com/packages/tools/gui/3d-webview-for-windows-and-macos-web-browser-154144
    • Cub3d
      Program are tested in Macos and linux. 曼陀罗部分: make && ./cub3D map/map.cub 奖励部分: make bonus && ./cub3D_bonus map/map_bonus.cub Some_debug My program is not prefect because it have some ...
    • printinator:用于3D打印机的MacOS菜单栏
      印刷商 3D打印机的MacOS菜单栏。 目前支持和Makerbot。
    • osu-macOS-Agent:osu!macOS代理-用于osu!的辅助故障排除工具
      macOS代理 osu的辅助故障排除工具! 特征 自动移动添加到“下载”文件夹中的地图和外观 自动打开已添加到“下载”文件夹中的重播 按钮更新osu! 可执行文件 按钮打开osu! 文件夹 安装 下载并将其解压缩 右键单击该...
    • MacOS-3DMacOS-3D是用于基于GNOMEGTK桌面环境的类似MacOS的Material Design主题
      MacOS-3DMacOS-3D是用于基于GNOMEGTK桌面环境的类似MacOS的Material Design主题