Functions to compute histogram of orientations (HOGs) More...
#include "mipa_orientation_histogram.h"
#include <vcl_cmath.h>
#include <vnl/vnl_math.h>
#include <vcl_cassert.h>
Go to the source code of this file.
Defines | |
#define | vaip_orientation_histogram_txx_ |
#define | MIPA_ORIENTATION_HISTOGRAM_INSTANTIATE(srcT, sumT) |
Functions | |
template<class srcT , class sumT > | |
void | mipa_orientation_histogram (const vil_image_view< srcT > &src, vil_image_view< sumT > &hog_image, unsigned n_angles, unsigned cell_size, bool full360, bool bilin_interp) |
Generate an image containing histograms of oriented gradients (HOG). |
Functions to compute histogram of orientations (HOGs)
Definition in file mipa_orientation_histogram.txx.
#define MIPA_ORIENTATION_HISTOGRAM_INSTANTIATE | ( | srcT, | |
sumT | |||
) |
template void mipa_orientation_histogram(const vil_image_view<srcT >& src, \ vil_image_view<sumT >& hog_image, \ unsigned n_angles, \ unsigned cell_size, \ bool full360, \ bool bilin_intrep)
Definition at line 122 of file mipa_orientation_histogram.txx.
#define vaip_orientation_histogram_txx_ |
Definition at line 2 of file mipa_orientation_histogram.txx.
void mipa_orientation_histogram | ( | const vil_image_view< srcT > & | src, |
vil_image_view< sumT > & | hog_image, | ||
unsigned | n_angles, | ||
unsigned | cell_size, | ||
bool | full360, | ||
bool | bilin_interp | ||
) |
Generate an image containing histograms of oriented gradients (HOG).
At each pixel in src, compute angle and quantise into n_angles. If full360, then angle range is 0-360, else it is 0-180. hog_image is set to have n_angles planes. hog_image(i,j,k) gives the weighted sum of pixels with angle k in cell (i,j), corresponding to the i,j-th cell_size square block.
The corner of cell(0,0) is at src(1,1), to ignore border pixels.
Number of cells (size of hog_image) chosen so every cell entirely within src. Thus hog_image.ni()=(src.ni()-2)/cell_size.
Definition at line 25 of file mipa_orientation_histogram.txx.