Message Boards Message Boards

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


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:

 dims = ImageDimensions[img];
    dirs = ImageData[GradientOrientationFilter[img, 5]];
    magnitudes = ImageData[GradientFilter[img, 5]];
    orientations = 
        MapThread[#1 {-Sin[#2], Cos[#2]} &, {magnitudes, dirs}, 2];
        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 section


POSTED BY: Pushkar D
4 days ago

Group Abstract Group Abstract