Last active
October 27, 2017 05:34
-
-
Save dboyliao/95fafe895cefbeed469bc4e2460d9a49 to your computer and use it in GitHub Desktop.
Header for convert UIImage to dlib image (2d pixel array) and vise versa
This file contains 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
// | |
// dlib_ios.h | |
// TryDlibVideoStream | |
// | |
// Created by DboyLiao on 13/03/2017. | |
// | |
#ifndef dlib_ios_h | |
#define dlib_ios_h | |
#include "dlib/pixel.h" | |
#include "dlib/array2d/array2d_kernel.h" | |
void UIImageToDlibImage(const UIImage* uiImage, dlib::array2d<dlib::bgr_pixel>& dlibImage, bool alphaExists = false); | |
UIImage* DlibImageToUIImage(dlib::array2d<dlib::bgr_pixel>& dlibImage); | |
#endif /* dlib_ios_h */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The implementation is here