MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ compute_key()

template<ComputeData InputType = std::shared_ptr<Kakshya::SignalSourceContainer>, ComputeData OutputType = InputType>
float MayaFlux::Yantra::VisionSorter< InputType, OutputType >::compute_key ( size_t  index,
const VisionAnalysis analysis 
) const
inlineprivate

Definition at line 263 of file VisionSorter.hpp.

264 {
265 if (m_key_fn)
266 return m_key_fn(index, analysis);
267 if (!analysis.frame.boxes.empty())
268 return key_for_box(analysis.frame.boxes[index]);
269 if (!analysis.frame.contours.empty())
270 return key_for_contour(analysis.frame.contours[index]);
271 return 0.F;
272 }
float key_for_box(const Kinesis::Vision::BoundingBox &box) const
float key_for_contour(const Kinesis::Vision::Contour &contour) const

References MayaFlux::Yantra::DetectionSummary::boxes, MayaFlux::Yantra::DetectionSummary::contours, MayaFlux::Yantra::VisionAnalysis::frame, MayaFlux::Yantra::VisionSorter< InputType, OutputType >::key_for_box(), MayaFlux::Yantra::VisionSorter< InputType, OutputType >::key_for_contour(), and MayaFlux::Yantra::VisionSorter< InputType, OutputType >::m_key_fn.

Referenced by MayaFlux::Yantra::VisionSorter< InputType, OutputType >::apply_operation_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: