MRPT
1.9.9
|
#include <CTraitsTest.h>
#include <gtest/gtest.h>
#include <mrpt/img/CImage.h>
#include <mrpt/img/TColor.h>
#include <mrpt/io/CMemoryStream.h>
#include <mrpt/math/CMatrixDynamic.h>
#include <mrpt/random.h>
#include <mrpt/serialization/CArchive.h>
#include <mrpt/system/filesystem.h>
#include <mrpt/system/memory.h>
#include <test_mrpt_common.h>
#include <mrpt/3rdparty/do_opencv_includes.h>
Go to the source code of this file.
Functions | |
static void | fillImagePseudoRandom (uint32_t seed, mrpt::img::CImage &img) |
static bool | expect_identical (const mrpt::img::CImage &a, const mrpt::img::CImage &b, const std::string &s=std::string()) |
TEST (CImage, CtorDefault) | |
static void | CtorSized_gray (unsigned int w, unsigned int h) |
TEST (CImage, CtorSized) | |
TEST (CImage, GetSetPixel) | |
TEST (CImage, CopyMoveSwap) | |
TEST (CImage, ExternalImage) | |
TEST (CImage, ConvertGray) | |
TEST (CImage, CtorRefOrGray) | |
TEST (CImage, HalfAndDouble) | |
TEST (CImage, getChannelsOrder) | |
TEST (CImage, ChangeCvMatCopies) | |
TEST (CImage, ScaleImage) | |
TEST (CImage, Serialize) | |
TEST (CImage, KLT_response) | |
TEST (CImage, LoadAndComparePseudoRnd) | |
TEST (CImage, LoadAndSave) | |
TEST (CImage, DifferentAccessMethodsColor) | |
TEST (CImage, DifferentAccessMethodsGray) | |
Variables | |
const auto | tstImgFileColor |
|
static |
Definition at line 71 of file CImage_unittest.cpp.
References mrpt::img::CH_GRAY, and EXPECT_EQ().
Referenced by TEST().
|
static |
Definition at line 48 of file CImage_unittest.cpp.
References mrpt::img::CImage::at(), EXPECT_EQ(), mrpt::img::CImage::getHeight(), and mrpt::img::CImage::getWidth().
Referenced by TEST().
|
static |
Definition at line 32 of file CImage_unittest.cpp.
References mrpt::img::CImage::at(), mrpt::img::CImage::getHeight(), mrpt::random::getRandomGenerator(), mrpt::img::CImage::getWidth(), and mrpt::random::Randomize().
Referenced by TEST().
TEST | ( | CImage | , |
CtorDefault | |||
) |
Definition at line 63 of file CImage_unittest.cpp.
References mrpt::img::CImage::isColor().
TEST | ( | CImage | , |
CtorSized | |||
) |
Definition at line 82 of file CImage_unittest.cpp.
References mrpt::img::CH_RGB, CtorSized_gray(), EXPECT_EQ(), and EXPECT_TRUE().
TEST | ( | CImage | , |
GetSetPixel | |||
) |
Definition at line 99 of file CImage_unittest.cpp.
References mrpt::img::CH_GRAY, EXPECT_EQ(), and EXPECT_NEAR().
TEST | ( | CImage | , |
CopyMoveSwap | |||
) |
Definition at line 131 of file CImage_unittest.cpp.
References mrpt::img::CImage::at(), mrpt::img::CH_GRAY, mrpt::img::CH_RGB, mrpt::img::DEEP_COPY, EXPECT_EQ(), mrpt::img::CImage::makeDeepCopy(), mrpt::img::SHALLOW_COPY, and mrpt::img::CImage::swap().
TEST | ( | CImage | , |
ExternalImage | |||
) |
Definition at line 207 of file CImage_unittest.cpp.
References EXPECT_EQ(), mrpt::img::CImage::setExternalStorage(), and tstImgFileColor.
TEST | ( | CImage | , |
ConvertGray | |||
) |
Definition at line 226 of file CImage_unittest.cpp.
References EXPECT_EQ(), EXPECT_TRUE(), mrpt::img::CImage::grayscale(), mrpt::img::CImage::loadFromFile(), and tstImgFileColor.
TEST | ( | CImage | , |
CtorRefOrGray | |||
) |
Definition at line 241 of file CImage_unittest.cpp.
References mrpt::img::CH_GRAY, EXPECT_EQ(), EXPECT_TRUE(), mrpt::img::FAST_REF_OR_CONVERT_TO_GRAY, mrpt::img::CImage::loadFromFile(), and tstImgFileColor.
TEST | ( | CImage | , |
HalfAndDouble | |||
) |
Definition at line 266 of file CImage_unittest.cpp.
References mrpt::img::CH_GRAY, EXPECT_EQ(), mrpt::img::IMG_INTERP_NN, mrpt::img::CImage::scaleDouble(), and mrpt::img::CImage::scaleHalf().
TEST | ( | CImage | , |
getChannelsOrder | |||
) |
Definition at line 292 of file CImage_unittest.cpp.
References mrpt::img::CH_GRAY, EXPECT_EQ(), EXPECT_TRUE(), mrpt::img::CImage::loadFromFile(), and tstImgFileColor.
TEST | ( | CImage | , |
ChangeCvMatCopies | |||
) |
Definition at line 307 of file CImage_unittest.cpp.
References mrpt::img::CH_GRAY, mrpt::img::DEEP_COPY, EXPECT_EQ(), and mrpt::img::SHALLOW_COPY.
TEST | ( | CImage | , |
ScaleImage | |||
) |
Definition at line 349 of file CImage_unittest.cpp.
References EXPECT_EQ(), EXPECT_TRUE(), mrpt::img::CImage::grayscale(), mrpt::img::IMG_INTERP_LINEAR, mrpt::img::IMG_INTERP_NN, mrpt::img::CImage::loadFromFile(), mrpt::img::CImage::makeDeepCopy(), mrpt::img::CImage::scaleDouble(), mrpt::img::CImage::scaleHalf(), mrpt::img::CImage::scaleImage(), and tstImgFileColor.
TEST | ( | CImage | , |
Serialize | |||
) |
Definition at line 428 of file CImage_unittest.cpp.
References mrpt::serialization::archiveFrom(), EXPECT_EQ(), EXPECT_TRUE(), mrpt::img::CImage::loadFromFile(), mrpt::io::CMemoryStream::Seek(), and tstImgFileColor.
TEST | ( | CImage | , |
KLT_response | |||
) |
Definition at line 451 of file CImage_unittest.cpp.
References mrpt::img::CH_GRAY, and EXPECT_GT().
TEST | ( | CImage | , |
LoadAndComparePseudoRnd | |||
) |
Definition at line 468 of file CImage_unittest.cpp.
References mrpt::img::CH_GRAY, expect_identical(), EXPECT_TRUE(), fillImagePseudoRandom(), and mrpt::img::CImage::loadFromFile().
TEST | ( | CImage | , |
LoadAndSave | |||
) |
Definition at line 486 of file CImage_unittest.cpp.
References mrpt::img::CH_GRAY, expect_identical(), EXPECT_TRUE(), fillImagePseudoRandom(), mrpt::format(), mrpt::system::getTempFileName(), and mrpt::img::CImage::loadFromFile().
TEST | ( | CImage | , |
DifferentAccessMethodsColor | |||
) |
Definition at line 520 of file CImage_unittest.cpp.
References EXPECT_EQ(), EXPECT_TRUE(), mrpt::img::CImage::loadFromFile(), and tstImgFileColor.
TEST | ( | CImage | , |
DifferentAccessMethodsGray | |||
) |
Definition at line 551 of file CImage_unittest.cpp.
References EXPECT_EQ(), EXPECT_TRUE(), mrpt::img::CImage::loadFromFile(), and tstImgFileColor.
const auto tstImgFileColor |
Definition at line 28 of file CImage_unittest.cpp.
Referenced by TEST().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020 |