BoB robotics
The Brains on Board robotics library
BoBRobotics::Navigation::PerfectMemoryRotater< Store, RIDFProcessor > Class Template Reference
Inheritance diagram for BoBRobotics::Navigation::PerfectMemoryRotater< Store, RIDFProcessor >:
BoBRobotics::Navigation::PerfectMemory< PerfectMemoryStore::RawImage<> >

Public Member Functions

template<class... Ts>
 PerfectMemoryRotater (const cv::Size unwrapRes, Ts &&... args)
 
template<class... Ts>
const auto & getImageDifferences (const cv::Mat &image, ImgProc::Mask mask, typename PerfectMemory< Store >::Window window, Ts &&... args) const
 Get differences between current view with mask and stored snapshots within a 'window'. More...
 
template<class... Ts>
const auto & getImageDifferences (const cv::Mat &image, ImgProc::Mask mask, Ts &&... args) const
 Get differences between current view with mask and stored snapshots. More...
 
template<class... Ts>
const auto & getImageDifferences (const cv::Mat &image, Ts &&... args) const
 Get differences between current view and stored snapshots. More...
 
template<class... Ts>
auto getHeading (const cv::Mat &image, ImgProc::Mask mask, typename PerfectMemory< Store >::Window window, Ts &&... args) const
 Get an estimate for heading based on current view with mask and stored snapshots within a 'window'. More...
 
template<class... Ts>
auto getHeading (const cv::Mat &image, ImgProc::Mask mask, Ts &&... args) const
 Get an estimate for heading based on current view with mask and stored snapshots. More...
 
template<class... Ts>
auto getHeading (const cv::Mat &image, Ts &&... args) const
 Get an estimate for heading based on current view and stored snapshots. More...
 
- Public Member Functions inherited from BoBRobotics::Navigation::PerfectMemory< PerfectMemoryStore::RawImage<> >
 PerfectMemory (const cv::Size &unwrapRes, Ts &&... args)
 
void train (const cv::Mat &image, const ImgProc::Mask &mask=ImgProc::Mask{})
 
float test (const cv::Mat &image, const ImgProc::Mask &mask, const Window &window) const
 
float test (const cv::Mat &image, const ImgProc::Mask &mask=ImgProc::Mask{}) const
 
void clearMemory ()
 
size_t getNumSnapshots () const
 Return the number of snapshots that have been read into memory.
 
const cv::Mat & getSnapshot (size_t index) const
 Return a specific snapshot.
 
const std::pair< cv::Mat, ImgProc::Mask > & getMaskedSnapshot (size_t index) const
 Return a specific snapshot and mask associated with it.
 
const std::vector< float > & getImageDifferences (const cv::Mat &image, const ImgProc::Mask &mask, const Window &window) const
 Get differences between current view and all stored snapshots.
 
const std::vector< float > & getImageDifferences (const cv::Mat &image, const ImgProc::Mask &mask=ImgProc::Mask{}) const
 Get differences between current view and all stored snapshots.
 
Window getFullWindow () const
 
const cv::Size & getUnwrapResolution () const
 Get the resolution of images.
 

Additional Inherited Members

- Public Types inherited from BoBRobotics::Navigation::PerfectMemory< PerfectMemoryStore::RawImage<> >
typedef std::pair< size_t, size_t > Window
 
- Protected Member Functions inherited from BoBRobotics::Navigation::PerfectMemory< PerfectMemoryStore::RawImage<> >
float calcSnapshotDifference (const cv::Mat &image, const ImgProc::Mask &mask, size_t snapshot) const
 

Member Function Documentation

◆ getHeading() [1/3]

template<typename Store = PerfectMemoryStore::RawImage<>, typename RIDFProcessor = BestMatchingSnapshot>
template<class... Ts>
auto BoBRobotics::Navigation::PerfectMemoryRotater< Store, RIDFProcessor >::getHeading ( const cv::Mat &  image,
ImgProc::Mask  mask,
Ts &&...  args 
) const
inline

Get an estimate for heading based on current view with mask and stored snapshots.

Any additional parameters specifying rotation constraints are perfect-forwarded to InSilicoRotater::create. **NOTE**I wanted mask and window to be const references but for reasons that are beyond me, if it is a reference the second overload always gets selected

◆ getHeading() [2/3]

template<typename Store = PerfectMemoryStore::RawImage<>, typename RIDFProcessor = BestMatchingSnapshot>
template<class... Ts>
auto BoBRobotics::Navigation::PerfectMemoryRotater< Store, RIDFProcessor >::getHeading ( const cv::Mat &  image,
ImgProc::Mask  mask,
typename PerfectMemory< Store >::Window  window,
Ts &&...  args 
) const
inline

Get an estimate for heading based on current view with mask and stored snapshots within a 'window'.

Any additional parameters specifying rotation constraints are perfect-forwarded to InSilicoRotater::create. NOTE I wanted mask and window to be const references but for reasons that are beyond me, if it is a reference the second overload always gets selected

◆ getHeading() [3/3]

template<typename Store = PerfectMemoryStore::RawImage<>, typename RIDFProcessor = BestMatchingSnapshot>
template<class... Ts>
auto BoBRobotics::Navigation::PerfectMemoryRotater< Store, RIDFProcessor >::getHeading ( const cv::Mat &  image,
Ts &&...  args 
) const
inline

Get an estimate for heading based on current view and stored snapshots.

Any additional parameters specifying rotation constraints are perfect-forwarded to InSilicoRotater::create. **NOTE**I wanted mask and window to be const references but for reasons that are beyond me, if it is a reference the second overload always gets selected

◆ getImageDifferences() [1/3]

template<typename Store = PerfectMemoryStore::RawImage<>, typename RIDFProcessor = BestMatchingSnapshot>
template<class... Ts>
const auto & BoBRobotics::Navigation::PerfectMemoryRotater< Store, RIDFProcessor >::getImageDifferences ( const cv::Mat &  image,
ImgProc::Mask  mask,
Ts &&...  args 
) const
inline

Get differences between current view with mask and stored snapshots.

Any additional parameters specifying rotation constraints are perfect-forwarded to InSilicoRotater::create. NOTE I wanted mask and window to be const references but for reasons that are beyond me, if it is a reference the second overload always gets selected

◆ getImageDifferences() [2/3]

template<typename Store = PerfectMemoryStore::RawImage<>, typename RIDFProcessor = BestMatchingSnapshot>
template<class... Ts>
const auto & BoBRobotics::Navigation::PerfectMemoryRotater< Store, RIDFProcessor >::getImageDifferences ( const cv::Mat &  image,
ImgProc::Mask  mask,
typename PerfectMemory< Store >::Window  window,
Ts &&...  args 
) const
inline

Get differences between current view with mask and stored snapshots within a 'window'.

Any additional parameters specifying rotation constraints are perfect-forwarded to InSilicoRotater::create. NOTE I wanted mask and window to be const references but for reasons that are beyond me, if it is a reference the second overload always gets selected

◆ getImageDifferences() [3/3]

template<typename Store = PerfectMemoryStore::RawImage<>, typename RIDFProcessor = BestMatchingSnapshot>
template<class... Ts>
const auto & BoBRobotics::Navigation::PerfectMemoryRotater< Store, RIDFProcessor >::getImageDifferences ( const cv::Mat &  image,
Ts &&...  args 
) const
inline

Get differences between current view and stored snapshots.

Any additional parameters specifying rotation constraints are perfect-forwarded to InSilicoRotater::create. NOTE I wanted mask and window to be const references but for reasons that are beyond me, if it is a reference the second overload always gets selected


The documentation for this class was generated from the following file: