python - Fixed-length HOG descriptor for variable sized images -
i'm working on object detection code, objects don't have fixed size, so;
skimage.feature.hog(obj) doesn't give me equal length vectors(since uses fixed sized cells), , hence can't utilize learning algorithms on them.
so, tried dynamically assigning pig feature length:
from __future__ import partition def describe_object(obj, div=8): width, height = obj.shape f = skimage.feature.hog(obj, normalise=true, pixels_per_cell=(height//div, width//div)) homecoming f but, mostly gives 2916 sized vectors, gives longer vectors (like 3402 elements long) too.
i believe happens when specific ratio between bin size , object's shape, don't know why exactly.
can help me?
you scale images fixed size, before calculating pig features.
python image-processing numpy feature-detection scikit-image
No comments:
Post a Comment