shark::ImagePatches Class Reference

Given a set of images, draws a set of image patches of a given size. More...

#include <shark/Data/DataDistribution.h>

+ Inheritance diagram for shark::ImagePatches:

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...
 

Detailed Description

Given a set of images, draws a set of image patches of a given size.

Definition at line 403 of file DataDistribution.h.

Constructor & Destructor Documentation

◆ ImagePatches()

shark::ImagePatches::ImagePatches ( Data< RealVector >  images,
std::size_t  imageWidth,
std::size_t  imageHeight,
std::size_t  patchWidth,
std::size_t  patchHeight 
)
inline

Definition at line 405 of file DataDistribution.h.

Member Function Documentation

◆ draw()

void shark::ImagePatches::draw ( RealVector &  input) const
inlinevirtual

Generates a single pair of input and label.

Parameters
inputthe 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.


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