Message Boards Message Boards


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

Posted 8 months ago
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:

 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


Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract