int sod_realnet_detect(sod_realnet *pNet, const unsigned char *zGrayImg, int width, int height, sod_box **apBox, int *pnBox);
Perform Real-Time detection on an input grayscale image or video frame. A RealNet detection model (one or more) must be registered before via sod_realnet_load_model_from_mem() or sod_realnet_load_model_from_disk(). If no models were registered, then this function is a noop. Pre-trained RealNet models can be downloaded from pixlab.io/downloads or trained via the RealNet training interfaces.
The detection process works only on grayscale images or video frames. To convert the colorspace of your input picture to the gray color model, simply call sod_grayscale_image(), sod_grayscale_image_3c() before or load your image from disk using the macro sod_img_load_grayscale(). Once the grayscale image or video frame captured, convert it to BLOB via sod_image_to_blob() as shown in the code snippet below.
If you are using OpenCV to capture video frames, call sod_img_load_cv_ipl(), sod_img_load_from_cv_stream(), sod_img_fill_from_cv_stream() or simply pass the raw grayscale pixels directly and make sure to compile SOD with the directive SOD_ENABLE_OPENCV defined.
const unsigned char *zGrayImg
The raw pixels (blobs), grayscale colorspace of the input image or video frame to be analyzed.
OUT: A pointer to an array of bounding boxes holding the coordinates, the score & class (name) for each detected object. Each entry of this array is represented by an instance of the sod_box structure.
OUT: Total number of extracted bounding boxes (apBox length).
SOD_OK is returned on success. Any other code indicates failure.