Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hogpp

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hogpp

Fast computation of rectangular histogram of oriented gradients (R-HOG) features using integral histogram

  • 0.1.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

HOGpp

Linux macOS Windows codecov Documentation Status PyPI - Version

This repository contains an implementation of the rectangular histogram of oriented gradients feature descriptor (R-HOG) using integral histograms. The integral histogram representation allows to quickly compute HOG features in subregions of an image in constant time. This is particularly useful if the features in an image must be computed repeatedly, e.g., in a sliding window manner.

Features

  • C++ templated implementation
  • Python support for 32, 64, and 80 bit floating point precision
  • Unrestricted input size (e.g., OpenCV as of version 4.5.5 requires the input to be a multiple of the block size)
  • Support for arbitrary integer (8 bit to 64 bit, both signed and unsigned) and floating point input (e.g., OpenCV requires 8-bit unsigned integer input)
  • Masking support (i.e., spatial exclusion of gradient magnitudes from contributing to features)

For a complete summary of differences between HOGpp and existing implementations, refer to the feature matrix.

Getting Started

In Python:

from hogpp import IntegralHOGDescriptor

desc = IntegralHOGDescriptor()
# Load image
image = # ...
# Precompute the gradient histograms. This needs to be done only once for each image.
desc.compute(image)
# Extract the feature descriptor of a region of interest. The method can be
# called multiple times for different subregions of the above image. Note the
# use of matrix indexing along each axis opposed to Cartesian coordinates.
roi = (0, 0, 128, 64) # top left (row, column) size (height, width)
X = desc(roi)

License

HOGpp is provided under the Apache License 2.0.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc