Commit 0a516b25 authored by Davis King's avatar Davis King

Added a get_num_dimensions() method to the hog_image.

parent 2c4a4439
...@@ -91,6 +91,12 @@ namespace dlib ...@@ -91,6 +91,12 @@ namespace dlib
inline long nc ( inline long nc (
) const { return num_block_cols; } ) const { return num_block_cols; }
long get_num_dimensions (
) const
{
return block_size*block_size*num_orientation_bins;
}
inline const descriptor_type& operator() ( inline const descriptor_type& operator() (
long row, long row,
long col long col
......
...@@ -168,6 +168,15 @@ namespace dlib ...@@ -168,6 +168,15 @@ namespace dlib
- returns the number of columns in this HOG image - returns the number of columns in this HOG image
!*/ !*/
long get_num_dimensions (
) const;
/*!
ensures
- returns the number of dimensions in the feature vectors generated by
this object.
- In particular, returns the value block_size*block_size*num_orientation_bins
!*/
inline const descriptor_type& operator() ( inline const descriptor_type& operator() (
long row, long row,
long col long col
...@@ -180,7 +189,7 @@ namespace dlib ...@@ -180,7 +189,7 @@ namespace dlib
- returns the descriptor for the HOG block at the given row and column. This descriptor - returns the descriptor for the HOG block at the given row and column. This descriptor
will include information from a window that is located at get_block_rect(row,col) in will include information from a window that is located at get_block_rect(row,col) in
the original image given to load(). the original image given to load().
- The returned descriptor vector will have block_size*block_size*num_orientation_bins elements. - The returned descriptor vector will have get_num_dimensions() elements.
!*/ !*/
const rectangle get_block_rect ( const rectangle get_block_rect (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment