How to combine features

5 views (last 30 days)
hajer jon
hajer jon on 2 Jul 2019
Commented: Sai Bhargav Avula on 29 Jul 2019
I write a code that detect people in crowed and I tray to use SURF , MSERF and HOG Features my quistion how can i combine this features ???
points1 = detectSURFFeatures(grayI)
[feature, valid_points] = extractFeatures(grayI, points1);
[regions,dd] = detectMSERFeatures(grayI);
[features2, valid_points] = extractFeatures(grayI,regions);
[featureVector,hogVisualization] = extractHOGFeatures(grayI);

Accepted Answer

Sai Bhargav Avula
Sai Bhargav Avula on 17 Jul 2019
To get the combined feature vector use
combinedVector = [feature( : ), features2 ( : ), featureVector( : )];
  2 Comments
hajer jon
hajer jon on 28 Jul 2019
I have got this error
"Dimensions of arrays being concatenated are not consistent"
Sai Bhargav Avula
Sai Bhargav Avula on 29 Jul 2019
It is because features extracted are of different length. Check for the lengths of each feature vector and pad accordingly to combine them. I would suggest you to go through the following link that combines matrices of different sizes.
Hope this helps.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!