This repository was archived by the owner on Mar 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHelpers.h
More file actions
69 lines (45 loc) · 1.32 KB
/
Copy pathHelpers.h
File metadata and controls
69 lines (45 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//
// Helpers.h
// TypeMotion
//
// Created by Joseph Chow on 2/1/14.
//
//
#ifndef TypeMotion_Helpers_h
#define TypeMotion_Helpers_h
#include "cxCv.h"
namespace cxCv {
class Helpers{
public:
/**
Loads a image into a Surface.
Note : images should be in assets
*/
static ci::Surface loadImage(std::string path){
ci::Surface image(cinder::loadImage(::cinder::app::loadAsset(path)));
return image;
};
/**
Converts a cv::Mat to a gl::Texture
*/
ci::gl::Texture toTexture(cv::Mat from){
ci::gl::Texture image(ci::fromOcv(from));
return image;
}
/*============= OPENCV SPECIFIC ============= */
/**
Runs a OpenCV threshold algorithim on a Surface
*/
static cv::Mat thresholdImage(ci::Surface32f inputs,float thresholdLevel){
};
/**
Turns input into grayscale image
*/
static cv::Mat toGray(cv::Mat input){
cv::Mat gray;
cv::cvtColor(input,gray,CV_RGB2GRAY);
return gray;
}
};
};//end namespace
#endif