407 std::size_t imageWidth, std::size_t imageHeight,
408 std::size_t patchWidth, std::size_t patchHeight
410 , m_imageWidth(imageWidth)
411 , m_imageHeight(imageHeight)
412 , m_patchWidth(patchWidth)
413 , m_patchHeight(patchHeight)
414 ,m_numImages(m_images.numberOfElements()){}
416 void draw(RealVector& input)
const{
426 input.resize(m_patchWidth * m_patchHeight);
427 std::size_t rowStart = m_startY * m_imageWidth + m_startX;
428 for (
size_t y = 0; y < m_patchHeight; ++y){
429 for (
size_t x = 0; x < m_patchWidth; ++x){
430 input(y * m_patchWidth + x) = image(rowStart+x);
432 rowStart += m_imageWidth;