Skip to content
Snippets Groups Projects
Commit b227ffee authored by Thibault Allenet's avatar Thibault Allenet
Browse files

Replace Stimuli -> Stimulus

parent d627b1d8
No related branches found
No related tags found
2 merge requests!10Update backend_opencv with modifications from aidge_core,!4Change tensorimpl opencv `future_std::span<cv::Mat>` to `cv::Mat`
Pipeline #38931 failed
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#ifndef LOAD_H_
#define LOAD_H_
#include <cstring>
#include <memory>
#include <iostream>
#include "opencv2/core.hpp"
#include <opencv2/imgcodecs.hpp>
#include "aidge/data/Data.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/backend/StimuliImpl.hpp"
#include "aidge/stimuli/Stimuli.hpp"
#include "aidge/backend/opencv/data/TensorImpl.hpp"
#include "aidge/backend/opencv/utils/Utils.hpp"
namespace Aidge {
class StimuliImpl_opencv_imread : public StimuliImpl {
public:
StimuliImpl_opencv_imread(const std::string& dataPath="", int colorFlag=cv::IMREAD_UNCHANGED) :
mDataPath(dataPath),
mColorFlag(colorFlag) {}
virtual ~StimuliImpl_opencv_imread() {};
std::shared_ptr<Tensor> load() override;
static std::unique_ptr<StimuliImpl_opencv_imread> create(const std::string& dataPath) {
return std::make_unique<StimuliImpl_opencv_imread>(dataPath);
}
protected:
/// Stimuli data path
std::string mDataPath;
int mColorFlag;
};
namespace {
static Registrar<Aidge::Stimuli> registrarStimuliImpl_opencv_png(
{"opencv", "png"}, Aidge::StimuliImpl_opencv_imread::create);
static Registrar<Aidge::Stimuli> registrarStimuliImpl_opencv_pgm(
{"opencv", "pgm"}, Aidge::StimuliImpl_opencv_imread::create);
} // namespace
} // namespace Aidge
#endif /* LOAD_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment