Example for the structure tensor
- Author
- MIP
#include <Filter/StructureTensor.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
using namespace BIAS;
using namespace std;
#define type 0
#if type == 0
#ifdef BUILD_IMAGE_INT
#define StorageType unsigned char
#define OutputImageType int
#else
#define StorageType unsigned char
#define OutputImageType float
#endif
#elif type == 1
#define StorageType float
#define OutputImageType float
#endif
int main(int argc, char *argv[])
{
int argind = 1;
if (argc-argind<1 || argind<1){
cerr << argv[0] << " [parameter] <im1> <im2> [ <im3> ... ] \n";
return -2;
}
for (int i=argind; i<argc; i++){
BIASERR("error loading image "<<argv[i]);
return -1;
} else {
cerr << "read "<<argv[i]<<endl;
}
BIASERR("error converting image "<<argv[i]);
}
ostringstream name;
name << "sgxx-"<<setw(4)<<setfill('0')<<i-argind<<".ppm";
name.str("");
name << "sgxy-"<<setw(4)<<setfill('0')<<i-argind<<".ppm";
name.str("");
name << "sgyy-"<<setw(4)<<setfill('0')<<i-argind<<".ppm";
}
return 0;
}