How to define number of cells of an image to extract HOG features?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
D Aghor
am 8 Mai 2019
Bearbeitet: D Aghor
am 9 Mai 2019
I have a dataset of 245 images of varying sizes. I am going to classify the images using SVM to which I have to apply HOG feature vector as one of the features input to SVM. I'm using the 'extractHOGFeatures' function. As the images are of varying sizes the HOG feature vector generated is also of different length for the images. Can we fix the number of cells for every image so that feature vector length will be same for all images? i.e. keeping number of cells constant for all images and having varying 'cellsize' and varying 'blocksize' for every image.
0 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 8 Mai 2019
One Way: If you do the imrezise before apply the Hog features, its return the features having same length,
As below example, here im1 and im2 both images having different sizes, but hog features sizes are same.
im1=rgb2gray(imread('test.jpg'));
[rows colm]=size(im1);
im2=rgb2gray(imread('R1.jpg'));
im3=imresize(im1,[rows colm]);
hog_im1=extractHOGFeatures(im1);
hog_im3=extractHOGFeatures(im3);
I have tried with same CellSize and block size, but didnot get the feature vector having same length.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Feature Detection and Extraction finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!