Questions tagged [histogram-of-oriented-gradients]
17 questions
5
votes
0 answers
What is the smallest image size a histogram of oriented gradient(HOG) descriptor take?
I am playing around with the SVM-HOG pipeline for pedestrian detection using OpenCV in python.
I have a lot of images of different sizes, some are small(e.g. 21×32), and some are larger(e.g. 127×264).
I first defined my HOG descriptor as hog =…

sensationti
- 195
- 1
- 9
5
votes
3 answers
Python Histogram of Oriented Gradients
I am trying to implement this version of Histogram of Oriented Gradients(HOG). My code is below. The only difference in my code is that I've used opencv to read the image and convert it to grayscale.
import cv2
import matplotlib.pyplot as plt
from…

Sibi
- 2,221
- 6
- 24
- 37
2
votes
1 answer
Finding distance between two Histogram of Oriented Gradients Features
I have two 4000 dimension HOG features, created by cv2.HOGDescriptor. I need to find distance between, this two vectors.
def getDistances(firstFace,secondFace):
EuclideanDistance = distance.euclidean(firstFace,secondFace)
print("Euclidean distance…

Alperen Enes Bayar
- 89
- 9
1
vote
0 answers
OpenCV HOGDescriptor() throws error vector is too long
I am trying to extract hog descriptors for some ROI on a given image (2D) using the implementation in OpenCV. I have attached some samples of the ROI that I have extracted. I am just using the hog descriptor with all the default…

tintin98
- 91
- 9
1
vote
1 answer
skimage hog returns no feature vector with length 0
I am trying to extract hog descriptors for some ROI on a given image (2D) using the implementation in skimage.feature. I have attached some samples of the ROI that I have extracted. I am just using the hog descriptor with all the default…

tintin98
- 91
- 9
1
vote
0 answers
clf.pred_proba used for Histogram Oriented Gradient predictions
I wrote this code several years ago. I am revisiting it only to find that some things have since changed in the useage of some statement. The code examines 99 images of Trucks, SUVs, and Sedans by converting them into histogram oriented…

thiirane
- 45
- 11
1
vote
1 answer
Google Colab [Errno 21] Is a directory: '/content/positive_images/.ipynb_checkpoints'
Please help me to solve this error. I need to take the images one by one into a loop to convert in gray and calculate the HOG feactures. But betore i need take the images one by one.
# define path to images:
pos_im_path =…

Gomes Ben
- 43
- 7
1
vote
0 answers
TIme complexity of HOG algorithm
could some help me what is the time complexity of HOG algorithm in OpenCV library ? How can it be calculated?
Thanks in advance.

Daniel Gemer
- 104
- 1
- 6
1
vote
2 answers
Histogram of Oriented Gradients- Explanation
How do I explain the Histogram of Oriented Gradients algorithm to a layman?

praxmon
- 5,009
- 22
- 74
- 121
0
votes
1 answer
How to use custom SVM detector with cv2.HOGDescriptor()?
I am following this tutorial and trying to use a custom SVM object detector instead of the cv2.HOGDescriptor_getDefaultPeopleDetector(). Following is the code for how to set an SVM detector:
hog =…

hafiz031
- 2,236
- 3
- 26
- 48
0
votes
0 answers
ValueError: The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (18, 2) + inhomogeneous part
i have 13 deer images and 5 non-deer images, i want to use HOG + SVM to detect deer in an image, i am trying the same using this code but getting an error i have understood why i get that error, but dont know how to remove it, can someone please…

AVIRAL TRIPATHI
- 1
- 1
0
votes
2 answers
ValueError: negative dimensions are not allowed (HOG)
I am implementing the HOG(Histogram of Oriented Gradient) with below code.
import io
from skimage.io import imread, imshow
from skimage.feature import hog
from skimage import exposure
from skimage import io
import matplotlib
img =…

Vivek Viradia
- 3
- 5
0
votes
0 answers
The function "hog.detectMultiScale(frame)" doesn't return any thing
I wrote this and it works. but the last function (hog.detectMultiScale) doesn't return any thing. I don't know why.
'''
import numpy as np
import cv2
hog =…

Fatemeh Bashiri
- 1
- 1
0
votes
1 answer
Python skimage.feature.hog function, meaning of parameter pixels_per_cell and cells_per_block
I'm having troubles using the hog function from skimage.feature. I couldn't find detailed documentation, nor useful blogs explaining the parameters pixels_per_cell and cells_per_block.
I use HOG to extract feature from MNIST dataset (all images are…

Dev-XYS
- 249
- 2
- 5
0
votes
0 answers
Patch wise feature vector comparison
I have a image of size of 64*64. I am trying to compute HOG features for the image. I have skimage for my implementation, with the following parameters:
fd1, hog_image = hog(image, orientations=9, pixels_per_cell=(8,8),
…

Minnie
- 67
- 6