OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
voting.hpp
Go to the documentation of this file.
1
6#ifndef OPENEV_EVPROC_VOTING_HPP
7#define OPENEV_EVPROC_VOTING_HPP
8
10#include <array>
11#include <type_traits>
12
13namespace ev {
14[[maybe_unused]] constexpr bool USING_VOTING_HPP = true;
15
17namespace detail {
18template <typename T>
19std::array<T, 4> bilinearVoting(Event_<T> event);
20
21template <typename T>
22std::array<AugmentedEvent_<T>, 4> bilinearVoting(AugmentedEvent_<T> event);
23} // namespace detail
25
26template <typename T>
27inline std::array<T, 4> bilinearVoting(Event_<T> event) {
28 static_assert(std::is_floating_point_v<T>, "ev::bilinearVoting: the coordinate type must be floating point, otherwise every weight collapses to zero or one.");
29 return detail::bilinearVoting(event);
30}
31
32template <typename T>
33inline std::array<AugmentedEvent_<T>, 4> bilinearVoting(AugmentedEvent_<T> event) {
34 static_assert(std::is_floating_point_v<T>, "ev::bilinearVoting: the coordinate type must be floating point, otherwise every weight collapses to zero or one.");
35 return detail::bilinearVoting(event);
36}
37
38} // namespace ev
39
40#endif // OPENEV_EVPROC_VOTING_HPP
This class extends Event to include: weigth, depth, and stereo.
Definition types.hpp:277
This class extends cv::Point_<T> for event data. For more information, please refer here.
Definition types.hpp:86
Basic event-based vision structures based on OpenCV components.