can add a camera component and a face recognition component?

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
niedian
Posts: 105
http://meble-kuchenne.info.pl
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Flowcode v10 can add a camera component and a face recognition component?

Post 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.

niedian
Posts: 105
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

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

Post by niedian »

Seek advice again.Could you please add a camera module and facial recognition component?

mnfisher
Valued Contributor
Posts: 1133
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 114 times
Been thanked: 596 times

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

Post 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

mnfisher
Valued Contributor
Posts: 1133
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 114 times
Been thanked: 596 times

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

Post 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

Post Reply