Given a set of images, draws a set of image patches of a given size. More...
#include <shark/Data/DataDistribution.h>
Public Member Functions | |
ImagePatches (Data< RealVector > images, std::size_t imageWidth, std::size_t imageHeight, std::size_t patchWidth, std::size_t patchHeight) | |
void | draw (RealVector &input) const |
Generates a single pair of input and label. More... | |
Public Member Functions inherited from shark::DataDistribution< RealVector > | |
virtual | ~DataDistribution () |
Virtual destructor. More... | |
RealVector | operator() () |
UnlabeledData< RealVector > | generateDataset (std::size_t size, std::size_t maximumBatchSize) const |
Generates a data set with samples from from the distribution. More... | |
UnlabeledData< RealVector > | generateDataset (std::size_t size) const |
Generates a data set with samples from from the distribution. More... | |
Given a set of images, draws a set of image patches of a given size.
Definition at line 403 of file DataDistribution.h.
|
inline |
Definition at line 405 of file DataDistribution.h.
|
inlinevirtual |
Generates a single pair of input and label.
input | the generated input |
Implements shark::DataDistribution< RealVector >.
Definition at line 416 of file DataDistribution.h.
References shark::random::discrete(), shark::Data< Type >::element(), and shark::random::globalRng.