59 std::span<const float> frame,
60 uint32_t w, uint32_t
h);
102 static constexpr size_t k_slot_count = 11;
103 static constexpr size_t k_slot_cur = 0;
104 static constexpr size_t k_slot_nxt = 1;
105 static constexpr size_t k_slot_tmp = 2;
106 static constexpr size_t k_slot_dx = 3;
107 static constexpr size_t k_slot_dy = 4;
108 static constexpr size_t k_slot_ixx = 5;
109 static constexpr size_t k_slot_iyy = 6;
110 static constexpr size_t k_slot_ixy = 7;
111 static constexpr size_t k_slot_sxx = 8;
112 static constexpr size_t k_slot_syy = 9;
113 static constexpr size_t k_slot_sxy = 10;
115 std::array<Kakshya::DataVariant, k_slot_count>
m_slots;
116 uint32_t m_slot_w { 0 };
117 uint32_t m_slot_h { 0 };
124 void ensure_slots(uint32_t w, uint32_t
h);
129 [[nodiscard]] std::vector<float>&
slot_vec(
size_t i)
noexcept
131 return std::get<std::vector<float>>(m_slots[i]);
137 [[nodiscard]]
const std::vector<float>&
slot_vec(
size_t i)
const noexcept
139 return std::get<std::vector<float>>(m_slots[i]);
145 [[nodiscard]] Eigen::Map<const Eigen::ArrayXf>
slot_map(
size_t i, Eigen::Index n)
const noexcept
147 return { slot_vec(i).data(), n };
153 [[nodiscard]] Eigen::Map<Eigen::ArrayXf>
slot_map_mut(
size_t i, Eigen::Index n)
noexcept
155 return { slot_vec(i).data(), n };
176 [[nodiscard]]
const std::vector<float>& gaussian_kernel(
float sigma);
std::array< Kakshya::DataVariant, k_slot_count > m_slots
Eigen::Map< Eigen::ArrayXf > slot_map_mut(size_t i, Eigen::Index n) noexcept
Zero-copy mutable Eigen::Map<ArrayXf> over slot i.
const std::vector< float > & slot_vec(size_t i) const noexcept
Const reference to the vector<float> inside slot i.
std::vector< float > m_curr_gray_cache
std::vector< float > & slot_vec(size_t i) noexcept
Mutable reference to the vector<float> inside slot i.
std::unordered_map< uint32_t, std::vector< float > > m_kernel_cache
CpuVisionPass m_pass
Walk state for the current run: sequence position, geometry, working slot index, and the result under...
std::vector< Keypoint > m_prev_keypoints
Eigen::Map< const Eigen::ArrayXf > slot_map(size_t i, Eigen::Index n) const noexcept
Zero-copy read-only Eigen::Map<const ArrayXf> over slot i.
Stateful executor for a VisionSequence.
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.
Result of executing a VisionSequence on one frame.
Ordered sequence of VisionSteps describing a complete vision pipeline.