Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename T> struct Kernel1D {
- std::vector<T> data;
- int mem1, mem2;
- void ProcessImage(std::string filename) {
- // ...
- }
- };
- template<typename T> Kernel1D<T> Gauss(double, int) {
- Kernel1D<T> ret;
- // fill out ret here
- return ret;
- }
- int main() {
- Gauss<float>(5.0, 1).ProcessImage("mahdir/mahfilepath.jpg");
- // or
- Kernel1D<float> k = Gauss(5.0, 1);
- k.ProcessImage("mahdir/mahfilepath.jpg");
- }
Advertisement
Add Comment
Please, Sign In to add comment