featuresHOGGrayScale.m 929 B

1234567891011121314151617181920212223242526
  1. % function hogFeature = featuresHOGGrayScale( img, sbin );
  2. %
  3. % BRIEF:
  4. % Compute an array of extended HOG features for a given gray scale image.
  5. % Original implementation did not supported simply gray scale images.
  6. % Additionally, differs from the original implementation (featuresHOGorig.cc)
  7. % by not leaving a boundary of sbin pixels at the border of the image "unused".
  8. %
  9. % Advantage: k*sbin pixel result in k cells (orig: k-2)
  10. % Disadvantage: block normalization ill posed on boundary
  11. %
  12. % INPUT:
  13. % img -- (x,y) double array, input image
  14. % sbin -- double scalar, number of pixels each cell covers in x and y
  15. % direction
  16. %
  17. % OUTPUT:
  18. % hogFeature -- (x/sbin, y/sbin, 32) double array,
  19. % extracted hog array, last dim equals 0
  20. %
  21. % NOTE:
  22. % Don't miss to mex (compile) the .cc-file!
  23. %
  24. % author: Alexander Freytag
  25. % last update: 11-03-2014 ( dd-mm-yyyy )
  26. %