How to use dl_image.hpp ?

GOT666
Posts: 6
Joined: Sun Nov 27, 2022 5:04 pm

How to use dl_image.hpp ?

Postby GOT666 » Sun Nov 27, 2022 5:26 pm

Hello,
i want to try some image manipulation and i find dl_image.hpp in sdk folder (2.0.5).
I m stuck whith (all the lib):

Code: Select all

        /**
         * @brief resize an image to the target shape.
         * 
         * @param image the input image Tensor
         * @param target_shape the target shape of the resized image.
         * @param resize_type one of IMAGE_RESIZE_BILINEAR or IMAGE_RESIZE_MEAN or IMAGE_RESIZE_NEAREST
         * @return Tensor<uint8_t>* the pointer of the resized image Tensor
         */
        Tensor<uint8_t> *resize_image(Tensor<uint8_t> &image, std::vector<int> target_shape, resize_type_t resize_type);
I don t understand ,
Tensor<uint8_t> ?? A multi dimensional arrey wtf ??
std::vector<int> arget_shape ?
resize_type_t resize_type ?? found 0 to 2 nearest to bilinear

And how to use it in easy format code ?

Merci

lbernstone
Posts: 635
Joined: Mon Jul 22, 2019 3:20 pm

Re: How to use dl_image.hpp ?

Postby lbernstone » Mon Nov 28, 2022 1:12 pm


GOT666
Posts: 6
Joined: Sun Nov 27, 2022 5:04 pm

Re: How to use dl_image.hpp ?

Postby GOT666 » Fri Dec 02, 2022 12:29 pm

lbernstone wrote:
Mon Nov 28, 2022 1:12 pm
https://github.com/espressif/esp-dl

Thanks bro ...
So now, I know what is a Tensor but nothing more .
My new code:

Code: Select all

Use another fonction !!
I use:

Code: Select all

crop_and_resize()
Don t know if it s slower but i manage to do what I want.

Bisous

Who is online

Users browsing this forum: PepeTheGreat and 49 guests