You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

73 lines
2.3 KiB

#pragma once
#include <fsdk/IRefCounted.h>
#include <fsdk/Types/Detection.h>
#include <fsdk/Types/Human.h>
#include <fsdk/Types/HumanLandmarks.h>
#include <fsdk/Types/Image.h>
#include <fsdk/Types/Ref.h>
#include <fsdk/Types/Span.h>
#include <cstddef>
namespace fsdk {
#ifndef DOXYGEN_SHOULD_SKIP_THIS
DECLARE_SMARTPTR(IHumanDetectionBatch);
#endif
/**
* @brief Human detection result batch interface.
* */
struct IHumanDetectionBatch : public IRefCounted {
/**
* @brief Returns size.
* */
virtual size_t getSize() const noexcept = 0;
/**
* @brief Returns size of the results for the target index.
* @param [in] imageIndex index of the image.
* */
virtual size_t getSize(size_t imageIndex) const noexcept = 0;
/**
* @brief Returns detected Human.
* @param [in] image source image.
* @param [in] imageIndex index of the image.
* @param [in] detectionIndex index of the detection.
* @return Detected Human.
* @see Human and Image for details.
* @note image format must be R8G8B8, @see Format.
* @note Result Human could be invalid if no humans were
* detected on the target image or parameters are invalid.
* */
virtual Human getHuman(const Image& image, size_t imageIndex, size_t detectionIndex) const noexcept = 0;
/**
* @brief Returns detection Span.
* @param [in] index index of the detections Span.
* @return Span of detections.
* @see Span and Detection for details.
* @note all spans should be based on user owned continuous collections.
* @note Result Span could be empty in two cases:
* 1. If no humans were detected in the target image.
* 2. If detection request didn't contain the DCT_BOX flag. @see HumanDetectionType.
* */
virtual Span<const Detection> getDetections(size_t index = 0) const noexcept = 0;
/**
* @brief Returns HumanLandmarks17 Span.
* @param [in] index index of the HumanLandmarks17 Span.
* @return Span of HumanLandmarks17.
* @note all spans should be based on user owned continuous collections.
* @see Span and HumanLandmarks17 for details.
* @note Result Span could be empty in two cases:
* 1. If no humans were detected in the target image.
* 2. If detection request didn't contain the DCT_POINTS flag. @see HumanDetectionType.
* */
virtual Span<const HumanLandmarks17> getLandmarks17(size_t index = 0) const noexcept = 0;
};
}