16struct GpuBufferHandle;
25 std::vector<Keypoint>,
26 std::vector<TrackResult>>;
55 std::shared_ptr<Portal::Graphics::GpuBufferHandle>
meta;
56 std::shared_ptr<Portal::Graphics::GpuBufferHandle>
points;
57 std::shared_ptr<Portal::Graphics::GpuBufferHandle>
area_perim;
74 std::shared_ptr<Portal::Graphics::GpuBufferHandle>
tracks;
75 std::shared_ptr<Portal::Graphics::GpuBufferHandle>
keypoints;
76 std::shared_ptr<Portal::Graphics::GpuBufferHandle>
labels;
101 std::shared_ptr<Core::VKImage>
sobel;
103 std::shared_ptr<Core::VKImage>
canny;
104 std::shared_ptr<Core::VKImage>
erode;
106 std::shared_ptr<Core::VKImage>
open;
107 std::shared_ptr<Core::VKImage>
close;
141 std::shared_ptr<Core::VKImage>
flow;
159 std::shared_ptr<Core::VKImage>
gray;
205 [[nodiscard]] std::span<const float>
as_span() const noexcept
207 const auto* v = std::get_if<std::vector<float>>(&
pixel_image);
208 if (!v || v->empty())
210 return { v->data(), v->size() };
231template <
typename Handle>
313 return static_cast<size_t>(
w) *
h;
327 return at < steps.size() ? &steps[at] :
nullptr;
353 [[nodiscard]]
const Handle*
memo(
size_t key,
const Handle&
input)
const
358 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.
std::shared_ptr< Portal::Graphics::GpuBufferHandle > labels
std::shared_ptr< Portal::Graphics::GpuBufferHandle > tracks
ContoursBufferView contours
std::shared_ptr< Portal::Graphics::GpuBufferHandle > keypoints
Live device views of the GPU-resident export buffers, one named slot per exporting op,...
Result of connected component labelling.
std::shared_ptr< Portal::Graphics::GpuBufferHandle > points
std::shared_ptr< Portal::Graphics::GpuBufferHandle > meta
std::shared_ptr< Portal::Graphics::GpuBufferHandle > area_perim
Live device view of FindContours' traced contours, when FindContoursParams::export_contours_buffer is...
Gradient maps produced by Sobel and Scharr operators.
std::shared_ptr< Core::VKImage > scharr
std::shared_ptr< Core::VKImage > filter_separable
std::shared_ptr< Core::VKImage > close
std::shared_ptr< Core::VKImage > confine
std::shared_ptr< Core::VKImage > threshold_adaptive
std::shared_ptr< Core::VKImage > flow_visualization
OpticalFlowDense::visualize.
std::shared_ptr< Core::VKImage > threshold_otsu
std::shared_ptr< Core::VKImage > contour_image
FindContours::as_image.
std::shared_ptr< Core::VKImage > rgba_to_hsv
std::shared_ptr< Core::VKImage > open
std::shared_ptr< Core::VKImage > gaussian_blur
std::shared_ptr< Core::VKImage > threshold
std::shared_ptr< Core::VKImage > harris_response
std::shared_ptr< Core::VKImage > normalize_range
std::shared_ptr< Core::VKImage > downsample_2x
std::shared_ptr< Core::VKImage > component_colors
ConnectedComponents::with_colors.
std::shared_ptr< Core::VKImage > sobel
std::shared_ptr< Core::VKImage > dilate
std::shared_ptr< Core::VKImage > normalize_inplace
std::shared_ptr< Core::VKImage > erode
std::shared_ptr< Core::VKImage > canny
std::shared_ptr< Core::VKImage > gray_to_rgba
std::shared_ptr< Core::VKImage > morph_gradient
One image slot per VisionOp that produces an image, populated only for whichever of these ops ran in ...
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 > flow
Dense optical flow field from OpticalFlowDense, or null.
std::vector< BoundingBox > component_boxes
One BoundingBox per component from a ConnectedComponents step in this sequence, label 1....
std::vector< SnapshotEntry > snapshots
Kakshya::DataVariant pixel_image
std::shared_ptr< Core::VKImage > gray
Output of a RgbaToGray step in this sequence, or null.
BufferOutputs buffers
GPU-resident export buffers, one named slot per exporting op.
bool is_ready() const noexcept
True when the sequence reached its end and this result may be consumed, cached, or broadcast.
StructuredOutput structured
float motion_energy
Mean per-pixel intensity change from OpticalFlowDense's own frame-to-frame comparison,...
ImageOutputs images
Image output of whichever image-producing ops ran in this sequence, one named slot per op.
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 VisionSteps and the backend chosen to execute them.
One step in a VisionSequence: an op and its parameters.