# Find out the HOG descriptors of a set of images and save the vectors?

Posted 5 months ago
252 Views
|
0 Replies
|
0 Total Likes
|
 I have a questions which i am trying to solve.I would like to take a set of 2000 images, find out the HOG descriptors of the images and save the vectors in the form of a jpg for all the images. I have found the following sample which takes a single image and plots the descriptors on the image:  img=(*image*); dims = ImageDimensions[img]; dirs = ImageData[GradientOrientationFilter[img, 5]]; magnitudes = ImageData[GradientFilter[img, 5]]; orientations = MapThread[#1 {-Sin[#2], Cos[#2]} &, {magnitudes, dirs}, 2]; Show[img, ListVectorPlot[ MapIndexed[{{#2[[2]], dims[[2]] - #2[[1]]}, #1} &, orientations, {2}], VectorColorFunction -> (Yellow &)]] There are two problems with this, I would like to get an output of only the descriptors (without the image in the background) in the form of a jpg and also i would like to write a loop for 2000 images.The source of my example is wolfram documentation , Please see the Applications sectionhttp://reference.wolfram.com/language/ref/GradientOrientationFilter.htmlThanks