Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I get all features 0, i.e., hist in my example program are all 0.0

import cv2

image = cv2.imread("D:\skhan\research\data\face\test.2.jpg",cv2.IMREAD_COLOR)
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
winSize = (64,64)
blockSize = (16,16)
blockStride = (8,8)
cellSize = (8,8)
nbins = 9
derivAperture = 1
winSigma = 4.0
histogramNormType = 0
L2HysThreshold = 2.0000000000000001e-01
gammaCorrection = 0
nlevels = 64
hog=cv2.HOGDescriptor(winSize,blockSize,blockStride,cellSize,nbins,derivAperture,winSigma,histogramNormType,L2HysThreshold,gammaCorrection,nlevels)
winStride = (8,8)
padding = (8,8)
locations = ((10,20),)
hist = hog.compute(image,winStride,padding,locations)

I get all features 0, i.e., hist in my example program are all 0.0

import cv2

image = cv2.imread("D:\skhan\research\data\face\test.2.jpg",cv2.IMREAD_COLOR)
cv2.imread("D:\\skhan\\research\\data\\face\\test.2.jpg",cv2.IMREAD_COLOR) image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.COLOR_BGR2GRAY) winSize = (64,64)
(64,64) blockSize = (16,16)
(16,16) blockStride = (8,8)
(8,8) cellSize = (8,8)
(8,8) nbins = 9
9 derivAperture = 1
1 winSigma = 4.0
4.0 histogramNormType = 0
0 L2HysThreshold = 2.0000000000000001e-01
2.0000000000000001e-0 gammaCorrection = 0
0 nlevels = 64
hog=cv2.HOGDescriptor(winSize,blockSize,blockStride,cellSize,nbins,derivAperture,winSigma,histogramNormType,L2HysThreshold,gammaCorrection,nlevels)
64 hog=cv2.HOGDescriptor(winSize,blockSize,blockStride,cellSize,nbins,derivAperture,winSigma,histogramNormType,L2HysThreshold,gammaCorrection,nlevels) winStride = (8,8)
(8,8) padding = (8,8)
(8,8) locations = ((10,20),)
((10,20),) hist = hog.compute(image,winStride,padding,locations)

hog.compute(image,winStride,padding,locations)

I get all features 0, i.e., hist in my example program are all 0.0

import cv2

image = cv2.imread("D:\\skhan\\research\\data\\face\\test.2.jpg",cv2.IMREAD_COLOR)
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
winSize = (64,64)
blockSize = (16,16)
blockStride = (8,8)
cellSize = (8,8)
nbins = 9
derivAperture = 1
winSigma = 4.0
histogramNormType = 0
L2HysThreshold = 2.0000000000000001e-0
gammaCorrection = 0
nlevels = 64
hog=cv2.HOGDescriptor(winSize,blockSize,blockStride,cellSize,nbins,derivAperture,winSigma,histogramNormType,L2HysThreshold,gammaCorrection,nlevels)
winStride = (8,8)
padding = (8,8)
locations = ((10,20),)
hist = hog.compute(image,winStride,padding,locations)

I get all features 0, i.e., hist in my example program are all 0.0

import cv2

image = cv2.imread("D:\\skhan\\research\\data\\face\\test.2.jpg",cv2.IMREAD_COLOR)
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
winSize = (64,64)
blockSize = (16,16)
blockStride = (8,8)
cellSize = (8,8)
nbins = 9
derivAperture = 1
winSigma = 4.0
histogramNormType = 0
L2HysThreshold = 2.0000000000000001e-0
gammaCorrection = 0
nlevels = 64
hog=cv2.HOGDescriptor(winSize,blockSize,blockStride,cellSize,nbins,derivAperture,winSigma,histogramNormType,L2HysThreshold,gammaCorrection,nlevels)
winStride = (8,8)
padding = (8,8)
locations = ((10,20),)
hist = hog.compute(image,winStride,padding,locations)

image description