Find_hog on Nicla Vision

Hello,

I am trying to run the HOG feature extraction example from the OpenMV Examples on the Nicla Vision device.

Here the hog.py, it is quite simple:

import sensor, image, time

sensor.reset()
sensor.set_contrast(1)
sensor.set_gainceiling(8)
sensor.set_framesize(sensor.QVGA)
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.skip_frames(time = 2000)

clock = time.clock() # Tracks FPS.
while (True):
    clock.tick()
    img = sensor.snapshot()
    img.find_hog()
    print(clock.fps())

But I am getting this error a the line where find_hog function is executed:

Traceback (most recent call last):
  File "<stdin>", line 22, in <module>
OSError: This function is unavailable on your OpenMV Cam.
MicroPython: v1.18-omv-r6 OpenMV: v4.3.1 HAL: v1.9.0 BOARD: NICLAV-STM32H747
Type "help()" for more information.
>>> 

Documentation says that find_hog method is not available for OpenMV Cam M4 (docs), but Nicla Vision has a H7 core.

Am I missing something on the configuration?

Thanks in advance for your replies

It’s disabled for the Nicla. We can’t fit everything onto all cameras anymore sine the library is so big.

We might be able to re-enable in the future however. Alternatively, you can compile a custom firmware with the feature turned on. However, you will have to turn something else off.

1 Like

Clear. Thanks!