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
using LINQtoCSV; | |
using NMeCab; | |
using System.Collections.Generic; | |
namespace RanukiCheckerConsole | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
// 運が良いと、ガーベージコレクタがゴミリソースを回収してくれる | |
public static void CannotAllocateMemoryMethod3(int cameraId) | |
{ | |
using (var capture = new VideoCapture(cameraId)) | |
{ | |
var srcMat = new Mat(); | |
var dstMat = new Mat(); | |
while (Cv2.WaitKey(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
// using OpenCvSharp; | |
// using OpenCvSharp.CPlusPlus; | |
// リソースを解放しないとメモリリークする | |
public static void CannotAllocateMemoryMethod(int cameraId) | |
{ | |
using (var capture = new VideoCapture(cameraId)) | |
{ | |
var srcMat = new Mat(); |
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
// using OpenCvSharp; | |
// using OpenCvSharp.CPlusPlus; | |
// リソースを自分の管理下において明示的に開放すればメモリリークしない | |
public static void CanAllocateMemoryMethod(int cameraId) | |
{ | |
using (var capture = new VideoCapture(cameraId)) | |
{ | |
var srcMat = new Mat(); |
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
using OpenCvSharp; | |
using System; | |
namespace OpenCvSharpSample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
using OpenCvSharp; | |
using OpenCvSharp.CPlusPlus; | |
using System; | |
namespace OpenCvSharpSample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
using OpenCvSharp.CPlusPlus; | |
using System; | |
namespace OpenCvSharpSample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
DynamicBackgroundSubtractorCapture(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
using OpenCvSharp; | |
using OpenCvSharp.CPlusPlus; | |
using System; | |
namespace OpenCvSharpSample.Samples | |
{ | |
public class CaptureIO | |
{ | |
public static void CameraSave(int cameraId, int fps, int second, bool putText = true) |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Util | |
{ | |
public class RandomWordMatch | |
{ |
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
/// <summary> | |
/// 値の単位は Hz | |
/// </summary> | |
public enum TemperamentEqual : int | |
{ | |
無音 = 0, | |
ド = 440, | |
ド_シャープ = 466, | |
レ_フラット = ド_シャープ, | |
レ = 494, |