Yes, HOG (Histogram of Oriented Gradients) can be used to detect any object, like on a computer, the image is a bunch of pixels, and you can extract functions regardless of their contents. Another issue, however, is its effectiveness in doing so.
HOG, SIFT , and other such feature extractors are methods used to extract relevant information from an image in order to describe it in a more meaningful way. When you want to detect an object or face in an image with thousands (and possibly millions) of pixels, it is inefficient to simply pass a vector with millions of numbers to a machine learning algorithm like
- It takes a long time to complete.
- There will be a lot of noisy information (background, blur, lightning and rotation changes), which we do not want to consider as important
The HOG algorithm, in particular, creates histograms of edge orientation from specific patches in images. A patch can come from an object, a person, a meaningless background, or something else, and this is just a way to describe an area using edge information. As mentioned earlier, this information can then be used to provide a machine learning algorithm, such as classic vector media machines, to train a classifier that can distinguish one type of object from another.
The reason HOG was so successful at detecting pedestrians is because the person can vary greatly in color, clothing, and other factors, but the overall edges of the pedestrian remain relatively constant, especially around the leg area. This does not mean that it cannot be used to detect other types of objects, but its success may vary depending on your specific application. The HOG document details how these descriptors can be used for classification.
It is worth noting that for several applications, the results obtained by HOG can be significantly improved using the pyramidal scheme. This works as follows: instead of extracting one HOG image from an image, you can sequentially divide the image (or patch) into several sub-images, extracting a separate HOG vector from each of these smaller divisions. Then the process can be repeated. In the end, you can get the final descriptor by combining all the HOG vectors into one vector, as shown in the following image.

This has the advantage that, on a larger scale, HOG functions provide more global information, while on a smaller scale (that is, in small units) they provide finer-grained detail. The disadvantage is that the final descriptor vector increases, so it takes more time to extract and learn using this classifier.
In short : Yes, you can use them.