Hi.
I'm attempting to do feature detection using HOG and then face detection using the SVM api to detect faces using trained vectors (trained using opencv, as suggested by the documentation).
My plan of action is as follows -
Calculate hog vectors using `fcvExtractHogu16()`. It takes as input a `const uint16_t *__restrict strength` and `const uint16_t *__restrict orientation` arguments. These are gradient vectors (magnitude and strength) at each pixel.
To calculate strength gradient vector, I'm using `fcvMagnitudes16()` and to calculate orientation gradient vector, Im using `fcvPhases16()`. The input of both of these are gradient vectors in the X direction and gradient vector in the Y direction.
To calculate the gradient vector in the X and Y direction, Im using `fcvImageGradientSobelPlanars16()`.
I then plan to send the hogVector calculated by the fcvExtractHogu16 function to the fcvSVMPredict2Classf32() function.
My questions are as follows-
1. Is this the right way to do this? This seems like an awfully long process with several fcv api calls.
2. The output of fcvPhases16() gives me a uint8_t array. However, the fcvExtractHogu16() takes a uint16_t array. Is there an efficient way to convert the uint8_t array to a uint16_t array? Remember, I shall be calling these functions in the update method every time a camera preview frame is received. (That's about 30fps.)
3. Is there a reference, or a usage example for the svmPredict and extractHog apis? Unfortunately, the documentation is really poor.
Regards,
Rishabh
Hi rishtonbo:
Excuse me, I have one question.
Could you share me how to load SVM model in your code?
I know that there is an "fcvSVMPredict2Classf32" function in Qualcomm FastCV library. However, I don't know how to load SVM model in Qualcomm because there is no any function about "load" function in FastCV library.
Thanks
Evan
did you resolve this problem ?I dont know neither how to use this function?
fcvSVMPredict2Classf32
hi,
i m feeling difficulty in calculating x and y direction, could you please help me with it?