Any one have idea about how to convert detected face to byte array using OpenCVForUnity Face detection?

I am trying to use opencvforunity for face recognition. I need to pass detected face image to an api to pull details of that person from the database for that need to cut and convert face to byte array from webcam live stream. Using OpenCVForUnity i am able to detect faces real time. But don’t have an idea how to convert detected face to byte array for processing. Please help if anyone have idea about the same. thanks in advance.

@nitroey , if you are still looking OpenCVForUnity related ~
You can crop the ROI after face detection. Just use the Mat(Mat m , Rect ROI ) constructor.