Ask Your Question

amira's profile - activity

2013-11-05 08:00:52 -0600 received badge  Student (source)
2013-04-26 08:56:38 -0600 commented answer HOG descriptor (descripe shape and motion)

the last thing i want to ask about that ,i must compute the gradient of graysacle image using function [grad, angleOfs] = hog.computeGradient(im); before i passe it to descriptors = hog.compute(grad, 'Locations', {keypoints.pt}); or use image directly and passes it to hog.compute(image) function

2013-04-26 07:37:10 -0600 commented answer HOG descriptor (descripe shape and motion)

thanks for ur reply but i know the difference between but i want to implement HoF descriptor using implemented code of hog descriptor function but with different input parameter so i will passes the gradient of optical flow (result from 2 consective frame)to cv.hogdescriptor fuction (is this true or not ) as i mentioned in last line of my code .

2013-04-26 06:39:13 -0600 asked a question HOG descriptor (descripe shape and motion)

can anyone help me please,i use hog descriptor to descripe detected interest poins ,

hog descriptor steps:

  • take image and compute gradient of graysacle input image
  • then descripe it

How can i update it to compute HOF (histogram of optical flow)??

As the ouput of optical flow is gradient magnitudes from optical flow fields , so really i compute gradient for optical flow, so i don't need to compute gradient again in embeded code of HOG

keypoints = cv.FAST(im,'Threshold',30,'NonMaxSupression',1);
hog = cv.HOGDescriptor('WinSize',[16,16],'BlockSize',[8,8],'BlockStride',[4,4],'CellSize',[4,4] );
descriptors = hog.compute(im, 'Locations', {keypoints.pt});

first shape decriptor

prevIm = cv.cvtColor(imread('test\img1.jpeg'),'RGB2GRAY');
nextIm = cv.cvtColor(imread('test\img2.jpeg'),'RGB2GRAY');
flow = cv.calcOpticalFlowFarneback(prevIm, nextIm);
Fx=flow(:,:,1);
Fy=flow(:,:,2);

magnitudeImage   = (Fx.^2 + Fy.^2 ).^0.5;
descriptors2 = hog.compute(im2uint8(magnitudeImage) , 'Locations', {keypoints.pt});???????????/is this true

second motion descriptor