This file contains 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 <iostream> | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
// カスタムアロケータ | |
namespace cvut | |
{ | |
template<int alignment_bytes> | |
class customAllocator: public cv::MatAllocator | |
{ |
This file contains 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
// Custom Allocator for OpenCV's cv::Mat | |
// this code samples writen by facebook.com/matsuda.kazuki and published under public domain. | |
// You can copy and use this code in any situation under any license. | |
#ifndef __CVUT_ALLOCATOR__ | |
#define __CVUT_ALLOCATOR__ 1 | |
#include <opencv2/core/core.hpp> |
This file contains 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
public class test{ | |
public static void main(String args[]){ | |
Runnable lammda = new Runnable() { | |
@Override | |
public void run() { | |
System.out.println("Run!"); | |
} | |
}; | |
lammda.run(); |
This file contains 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
public class TestSynchronized { | |
public static void main(String[] args) { | |
Runnable action = new Runnable() { | |
Long var = new Long(0); // Long 方 var | |
public void run() { | |
for (long i = 0; i < 10_000_000L; ++i) { // 1000万回ループ内で | |
synchronized (var) { // ロックして | |
var++; // インクリメント! | |
} | |
} |
This file contains 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
Index: modules/calib3d/include/opencv2/calib3d/calib3d.hpp | |
=================================================================== | |
--- modules/calib3d/include/opencv2/calib3d/calib3d.hpp (revision 8696) | |
+++ modules/calib3d/include/opencv2/calib3d/calib3d.hpp (working copy) | |
@@ -748,4 +748,10 @@ | |
#endif | |
+// Auto linking by "#pragma comment(lib)" syntax | |
+#include "opencv2/core/pragma_lib.hpp" |
This file contains 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 <stdint.h> | |
#include <random> | |
namespace tetlist{ | |
template <typename IntType> | |
class random{ | |
#if defined(_WIN64) || defined(__LP64__) | |
typedef std::mt19937_64 mt19937; | |
#else | |
typedef std::mt19937 mt19937; |
This file contains 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 "stdafx.h" | |
namespace tetlist{ | |
template <typename DATATYPE, typename FIT_PARAM, typename ACCURANCY = float> | |
class ransac{ | |
public: | |
typedef std::vector<DATATYPE> DATAM; | |
typedef FIT_PARAM FIT_PARAM; | |
typedef void (fitting)( |
This file contains 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 <cstddef> | |
#include <cstdint> | |
#include <time.h> | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#pragma comment(lib, "opencv_core249.lib") | |
#pragma comment(lib, "opencv_highgui249.lib") |
This file contains 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
# チェーン無限ループ | |
sub foo :Chained('/foo') :CaptureArg(1){ | |
} |
This file contains 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 <opencv2/core.hpp> | |
typedef cv::Point3_<uint8_t> Pixel; | |
typedef cv::Mat_<Pixel> MatT; | |
const cv::Size SIZE_FULL_HD(1920, 1020); | |
void ShowResult(const std::string name, const double time) { | |
std::cout << cv::format("%40s | %20.10f", name.c_str(), time) << std::endl; | |
return; | |
} |
OlderNewer