Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6089913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:09:13+00:00 2026-05-23T12:09:13+00:00

I am working on Histogram of Oriented Gradient(HOG) features and I am trying to

  • 0

I am working on Histogram of Oriented Gradient(HOG) features and I am trying to implement the trilinear interpolation of histogram bins as described in Dalal’s PhD thesis. And he explains the interpolation process as cited below:

EDIT: Roughly speaking, HOG features are extracted from a 64×128 pixel window which is divided into blocks. Each block consists of 2×2 cells and a cell is 8×8 pixel area. Extraction starts with calculating first order derivatives of image, then orientation and magnitude of each pixel are calculated. An orientation histogram within the block for each 8×8 pixel cell is calculated where pixels contribute to the histogram with the magnitude value, based on the orientation of the pixel, and magnitude is interpolated between the neighbouring bin centres in both orientation and position. Histogram contains 9 bins represents 0-180 degrees with stride of 20 degrees. An overall depiction of the algorithm can be seen here: http://4.bp.blogspot.com/_7NBDeKCsVHg/TKBbldI8GmI/AAAAAAAAAG0/G-OXUz1ouPQ/s1600/a1.bmp

We first describe linear interpolation
in a one dimension space and then
extend it to 3-D. Let h be a histogram
with inter-bin distance(bandwidth) b.
h(x) denotes the value of the
histogram for the bin centred at x.
Assume that we want to interpolate a
weight w at point x into the
histogram. Let x1 and x2 be the two
nearest neighbouring bins of the point
x such that x1 ≤ x < x2. Linear
interpolation distributes the weight w
into two nearest neighbours as follows
linear interpolation

Let w at the 3-D point x = [x, y, z]
be the weight to be interpolated. Let
x1 and x2 be the two corner vectors of
the histogram cube containing x, where
in each component x1 ≤ x < x2. Assume
that the bandwidth of the histogram
along the x, y and z axis is given by
b = [bx, by, bz]. Trilinear
interpolation distributes the weight w
to the 8 surrounding bin centres as
follows:
trilinear interpolation formula

.

We compute histogram for cells and every pixel contributes with its magnitude value to the histogram. What I understand from the formulation is that x and y represents the location of the cells in the detection window and z is the bin number. In a 64×128 detection window, there are 8×16 cells and 9 orientation bins so that our histogram is represented as h(8,16,9). If above statements are correct, do (x1,y1) and (x2,y2) represent previous and letter cells respectively? Does z1 and z2 mean the previous and letter orientation bins? What about bandwidth b=[bx, by, bz]?

I’d be really appreciated if someone can clarify these issues.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:09:13+00:00Added an answer on May 23, 2026 at 12:09 pm

    Think of (x1, y1, z1) and (x2, y2, z2) as two points spanning a cube that surrounds the point (x,y,z) for which you want to interpolate a value of h.
    The set of eight points (x1, y1, z1), (x2, y1, z1), (x1, y2, z1), (x1, y1, z2), (x2, y2, z1), (x2, y1, z2), (x1, y2, z2), (x2, y2, z2) forms the complete cube. So trilinear interpolation between (x1, y1, z1) and (x2, y2, z2) actually means interpolation between the 8 points in the 3D histogram space surrounding the point you are interested in! Now to your questions:

    (x1, y1), (x2, y2) (and (x1,y2) and (x2, y1) represent the centers of bins in the (x,y) plane. In your case these would be the orientation vectors.

    z1 and z2 represent two bin levels in the orientation direction, as you say. Combined with the four points in the image plane this gives you a total of 8 bins.

    The bandwidth b=[bx, by, bz] is basically the distance between the centers of neighbouring bins in the x, y and z direction. In your case, with 8 bins in the x-direction and 64 pixels in that direction, 16 bins in the y direction and 128 pixels in the y direction:

    bx = 8 pixels
    by = 8 pixels
    

    This leaves bz, for which I actually need more data, because I don’t know the full range of your gradient (i.e. lowest to highest possible value) but if that range is rg then:

    bz = rg/9
    

    In general, the bandwidth in any direction equals the full available range in that direction divided by the number of bins in that direction.

    For a good explanation of trilinear interpolation with pictures look at the link in whoplisp’s answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working in Python 2.7. I'm trying to plot a histogram for the numbers generated
Working on a project at the moment and we have to implement soft deletion
Working with TCL and I'd like to implement something like the Strategy Pattern .
Working on calling a C function from my asm project. I'm trying to push
I am trying to create a 3D bar histogram in Python using bar3d() in
Good evening, I am trying to generalize the histogram filter localization to discrete environments
Working against jQuery 1.3.2 I'm looking for best practices that implement the typical '
I'm working on implementing a histogram, and one of the key points is the
I'm working with an image retrieval system using color histogram intersection in MATLAB. This
I am working on a camera based app. It is related to histogram. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.