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

Change opencv imread flag to IMREAD_UNCHANGED

parent a5f42002
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 #38577 failed
......@@ -30,7 +30,7 @@
namespace Aidge {
class StimuliImpl_opencv_imread : public StimuliImpl {
public:
StimuliImpl_opencv_imread(const std::string& dataPath="", int colorFlag=cv::IMREAD_COLOR) :
StimuliImpl_opencv_imread(const std::string& dataPath="", int colorFlag=cv::IMREAD_UNCHANGED) :
mDataPath(dataPath),
mColorFlag(colorFlag) {}
virtual ~StimuliImpl_opencv_imread() {};
......
......@@ -14,7 +14,7 @@ using namespace Aidge;
TEST_CASE("Stimuli creation", "[Stimuli][OpenCV]") {
SECTION("Instanciation & load an image") {
// Load image with imread
cv::Mat true_mat = cv::imread("/data1/is156025/tb256203/dev/eclipse_aidge/aidge/user_tests/train-images-idx3-ubyte[00001].pgm");
cv::Mat true_mat = cv::imread("/data1/is156025/tb256203/dev/eclipse_aidge/aidge/user_tests/train-images-idx3-ubyte[00001].pgm", cv::IMREAD_UNCHANGED);
REQUIRE(true_mat.empty()==false);
// Create Stimuli
......
......@@ -15,7 +15,7 @@ TEST_CASE("StimuliImpl_opencv_imread creation", "[StimuliImpl_opencv_imread][Ope
SECTION("Instanciation & load an image") {
// Load image with imread
// cv::Mat true_mat = cv::imread("/data1/is156025/tb256203/dev/eclipse_aidge/aidge/user_tests/Lenna.png");
cv::Mat true_mat = cv::imread("/data1/is156025/tb256203/dev/eclipse_aidge/aidge/user_tests/train-images-idx3-ubyte[00001].pgm");
cv::Mat true_mat = cv::imread("/data1/is156025/tb256203/dev/eclipse_aidge/aidge/user_tests/train-images-idx3-ubyte[00001].pgm", cv::IMREAD_UNCHANGED);
REQUIRE(true_mat.empty()==false);
// Create StimuliImpl_opencv_imread
......
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