Début du TP convolution. Pour l'instant uniquement lecture d'une vidéo.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 06_Convolution / provider / ConvolutionProvider.cpp
1 #include "ConvolutionProvider.h"
2
3 #include <iostream>
4 using namespace std;
5
6 #include "CaptureVideo.h"
7
8 Convolution* ConvolutionProvider::create(int w, int h)
9 {
10 return new Convolution(w, h);
11 }
12
13 Image* ConvolutionProvider::createGL(const string& videoPath)
14 {
15 CaptureVideo* captureur = new CaptureVideo(videoPath, "");
16
17 ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 0);
18 return new ImageConvolutionCuda(create(captureur->getW(), captureur->getH()), captureur, ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel
19 }