SOD C/C++ API - Convolutional/Recurrent Neural Networks (CNN/RNN)

Syntax

int sod_cnn_get_network_size(sod_cnn *pNet, int *pWidth, int *pHeight, int *pChannels);

Description

Query a CNN for its input dimensions. Your input images/video frames must be resized to the appropriate dimension before passing them to the CNN. This is usually done via sod_cnn_prepare_image() before invoking sod_cnn_predict().

Parameters

sod_cnn    *pNet

A pointer to a valid sod_cnn object obtained from a prior successful call to sod_cnn_create().

int    *pWidth

OUT: Network expected input image width.

int    *pHeight

OUT: Network expected input image height.

int    *pChannels

OUT: Network expected input image color channels.

Return Value

SOD_OK is returned on success Any other code indicates failure.

Example

Checkout the introduction course, the C/C++ samples on the download page or refer to the SOD Github Repository.

See also

sod_cnn_createsod_cnn_configsod_cnn_predictsod_cnn_destroysod_img_load_from_filesod_cnn_prepare_image.



Back