Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extern "C" {
- __declspec(dllexport) void * Image_new(uint32_t channels, void ** data) {
- std::vector<myns::Matrix> v;
- for (int i = 0; i < channels; ++i) v.push_back(*((myns::Matrix*)data[i]));
- return new (std::nothrow) myns::Image(channels, v);
- }
- __declspec(dllexport) void * Image_convolve(void * im, void * kernel) {
- return &(((myns::Image*)im)->convolve(*(myns::Kernel*)kernel));
- }
- __declspec(dllexport) double * Image_getPixel(void * im, uint32_t i, uint32_t j) {
- return ((myns::Image*)im)->getPixel(i, j);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement