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
| :: ================================================================ | |
| :: BATCH SCRIPT FOR AUTOMATED PHOTOGRAMMETRY TRACKING WORKFLOW | |
| :: By polyfjord - https://youtube.com/polyfjord | |
| :: ================================================================ | |
| :: USAGE | |
| :: • Double-click this .bat or run it from a command prompt. | |
| :: • Frames are extracted, features matched, and a sparse | |
| :: reconstruction is produced automatically. | |
| :: • Videos that have already been processed are skipped on | |
| :: subsequent runs. |
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
| def get_jacobian(net, x, noutputs): | |
| x = x.squeeze() | |
| n = x.size()[0] | |
| x = x.repeat(noutputs, 1) | |
| x.requires_grad_(True) | |
| y = net(x) | |
| y.backward(torch.eye(noutputs)) | |
| return x.grad.data |
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
| # OpenMesh-Python Cheat Sheet | |
| ''' | |
| documentation: https://openmesh-python.readthedocs.io/en/latest/ | |
| OpenMesh-Python official repository: | |
| https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python | |
| C++ documentation: | |
| https://www.openmesh.org/media/Documentations/OpenMesh-Doc-Latest/a04099.html | |
| ''' | |
| import openmesh | |
| import numpy as np |
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
| template<typename PointT> | |
| std::pair<typename pcl::PointCloud<PointT>::Ptr, typename pcl::PointCloud<PointT>::Ptr> | |
| ProcessPointClouds<PointT>::SegmentPlane( typename pcl::PointCloud<PointT>::Ptr cloud, int maxIterations, float distanceThreshold) { | |
| // Time segmentation process | |
| auto startTime = std::chrono::steady_clock::now(); | |
| // downsample input point cloud | |
| auto cloud_ds = DownSample(cloud, 1.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
| # OpenMesh-Python Cheat Sheet | |
| ''' | |
| documentation: https://openmesh-python.readthedocs.io/en/latest/ | |
| OpenMesh-Python official repository: | |
| https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python | |
| C++ documentation: | |
| https://www.openmesh.org/media/Documentations/OpenMesh-Doc-Latest/a04099.html | |
| Installation: | |
| * pip install openmesh # https://pypi.org/project/openmesh/ |
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
| def get_jacobian(net, x, noutputs): | |
| x = x.squeeze() | |
| n = x.size()[0] | |
| x = x.repeat(noutputs, 1) | |
| x.requires_grad_(True) | |
| y = net(x) | |
| y.backward(torch.eye(noutputs)) | |
| return x.grad.data |
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 <sstream> | |
| #include <iostream> | |
| #include <iomanip> | |
| std::string uint8_to_hex_string(const uint8_t *v, const size_t s) { | |
| std::stringstream ss; | |
| ss << std::hex << std::setfill('0'); | |
| for (int i = 0; i < s; i++) { |