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.
Answer by adrienPlayerium · Aug 07, 2017 at 04:18 AM
@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.
Now i have another issue, how to add a click handler to the rectangle which is shown on the face?
The rectangle is drawned on the texture. The best way I can think of would be to create a transparent button on screen and move it around. The exercise is to convert the texture coordinates to screenPoint coordinates you can do it :D