22 std::vector<Keypoint>,
23 std::vector<TrackResult>>;
75 [[nodiscard]] std::span<const float>
as_span() const noexcept
77 const auto* v = std::get_if<std::vector<float>>(&
pixel_image);
80 return { v->data(), v->size() };
101template <
typename Handle>
183 return static_cast<size_t>(
w) *
h;
197 return at < steps.size() ? &steps[at] :
nullptr;
223 [[nodiscard]]
const Handle*
memo(
size_t key,
const Handle&
input)
const
228 return &it->second.output;
Core::GlobalInputConfig input
Connected component labelling on normalised float masks.
Gradient and edge detection on normalised float image spans.
Sparse optical flow via Lucas-Kanade tracker.
Declarative description of a Kinesis::Vision processing sequence.
std::variant< std::vector< double >, std::vector< float >, std::vector< uint8_t >, std::vector< uint16_t >, std::vector< uint32_t >, std::vector< std::complex< float > >, std::vector< std::complex< double > >, std::vector< glm::vec2 >, std::vector< glm::vec3 >, std::vector< glm::vec4 >, std::vector< glm::mat4 > > DataVariant
Multi-type data storage for different precision needs.
std::variant< std::monostate, GradientResult, ComponentResult, std::vector< Contour >, std::vector< Keypoint >, std::vector< TrackResult > > StructuredOutput
VisionStatus
Whether a run carried the sequence to its end.
Result of connected component labelling.
Gradient maps produced by Sobel and Scharr operators.
void begin(const VisionSequence &seq, uint32_t width, uint32_t height)
Reset the walk band for a fresh run.
std::vector< Keypoint > prev_keypoints
const VisionStep & step() const noexcept
size_t plane_size() const noexcept
const VisionStep * behind(size_t offset=1) const noexcept
Op at offset steps back, or nullptr before the start.
const VisionStep * ahead(size_t offset=1) const noexcept
Op at offset steps ahead, or nullptr past the end.
const Handle * memo(size_t key, const Handle &input) const
Memoised output for key when it was produced from input.
std::unordered_map< size_t, Completed > completed
void set_geometry(uint32_t width, uint32_t height) noexcept
const VisionSequence * sequence
void forget()
Discard retained cross-run state.
State threaded through one execution of a VisionSequence.
std::shared_ptr< Core::VKImage > debug_labels
std::vector< SnapshotEntry > snapshots
Kakshya::DataVariant pixel_image
bool is_ready() const noexcept
True when the sequence reached its end and this result may be consumed, cached, or broadcast.
StructuredOutput structured
std::shared_ptr< Core::VKImage > debug_contours
std::span< const float > as_span() const noexcept
Zero-copy float span into pixel_image storage.
Result of executing a VisionSequence on one frame.
std::vector< VisionStep > steps
Ordered sequence of VisionSteps describing a complete vision pipeline.
One step in a VisionSequence: an op and its parameters.