Page 1 of 1

can add a camera component and a face recognition component?

Posted: Wed Jan 17, 2024 5:39 am
by niedian
Hello, is it possible to add a camera component and face recognition component? I saw in the ESP32 documentation that it has face recognition capability.

Re: can add a camera component and a face recognition component?

Posted: Sun Jun 23, 2024 2:49 am
by niedian
Seek advice again.Could you please add a camera module and facial recognition component?

Re: can add a camera component and a face recognition component?

Posted: Sun Jun 23, 2024 7:45 am
by mnfisher
I posted a bit about using the camera a while ago (see viewtopic.php?f=3&t=1679&hilit=Camera -)

Yesterday I finally managed to add a component to a flowcode program the espressif way - though it is not for the faint of heart..

I am using the espressif tools v5.1.1

Create a FC program and compile it to create the directory structure.

Open a esp cmd prompt. Cd to your program directory (so if your program is test.fcfx this will be cd test)

With the component there will be a "idf. py add-dependency component" copy this and run at the command prompt.

Next add to your program supplementary code #import <component.h> - you'll need to find the correct header file name (look in the examples)

Now force a recompile - at your command prompt do idf.py fullclean and then recompile from fc.. (this needs to be a full rebuild of the program)

Now you should be able to use the component with a little C glue code - take a look at the examples and in a code block use the appropriate functions. Use long ints and casts for pointers
For example;

FCV_PTR = (mx_uint32) initialise(params)

It is (fairly) easy to write some interface functions (most will be a few lines of C) though it depends on the component.

Note that some components also add to the config (the camera will do this) - look using idf.py menuconfig

See https://components.espressif.com/ for available components

Good luck

Martin

Re: can add a camera component and a face recognition component?

Posted: Sun Jun 23, 2024 10:31 am
by mnfisher
I created an example 'camera'

Compile

cd camera
idf.py add-dependency "espressif/esp32-camera^2.0.9"

add #include "esp_camera.h" to supplementary code (and save)

idf.py fullclean

re-compile

You should find a 'managed_components' directory (including examples)

idf.py menuconfig
-- components -> camera (select camera model(s) etc)

Martin