33 #include <Filter/StructureTensor.hh>
34 #include <Base/Image/ImageIO.hh>
35 #include <Base/Image/ImageConvert.hh>
44 #ifdef BUILD_IMAGE_INT
45 #define StorageType unsigned char
46 #define OutputImageType int
48 #define StorageType unsigned char
49 #define OutputImageType float
54 #define StorageType float
55 #define OutputImageType float
60 int main(
int argc,
char *argv[])
68 if (argc-argind<1 || argind<1){
69 cerr << argv[0] <<
" [parameter] <im1> <im2> [ <im3> ... ] \n";
76 for (
int i=argind; i<argc; i++){
78 BIASERR(
"error loading image "<<argv[i]);
81 cerr <<
"read "<<argv[i]<<endl;
85 BIASERR(
"error converting image "<<argv[i]);
91 name <<
"sgxx-"<<setw(4)<<setfill(
'0')<<i-argind<<
".ppm";
94 name <<
"sgxy-"<<setw(4)<<setfill(
'0')<<i-argind<<
".ppm";
97 name <<
"sgyy-"<<setw(4)<<setfill(
'0')<<i-argind<<
".ppm";
basic class for structure tensor calculation
int CalcStructureTensor(const Image< InputStorageType > &src, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
Calculates the gradients uses internal gradient class and calls CalcStructureTensor with these gradie...
static int ConvertST(const BIAS::ImageBase &source, BIAS::ImageBase &dest, ImageBase::EStorageType targetST)
Function to convert the storage type of images e.g.
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.
static int Load(const std::string &FileName, ImageBase &img)
first tries a call to Read MIP image and if that fails, tries to Import Image with all other availabl...
enum EStorageType GetStorageType() const