Fix uglies in Descriptor.h

This commit is contained in:
2019-03-04 11:44:46 +01:00
parent e21e957dee
commit f5ede23bbb
+3 -7
View File
@@ -42,7 +42,6 @@ public:
ssize_t n = 8;
ssize_t m = 8;
Pixels view(*img);
int numpixels = (int)(n*m);
int chan = (int)img->channels(); //should be 1, just intensity
const Quantum *p = view.getConst(0, 0, n, m); //entire image
bitset<64> retval(0);
@@ -52,7 +51,7 @@ public:
Pixels conview(*newimg);
Quantum *c = conview.get(0, 0, n, m); //entire converted image
double converted[64];
static double converted[64];
double* q = converted;
for (ssize_t j = 0; j < m; j++) {
for (ssize_t i = 0; i < n; i++) {
@@ -263,8 +262,6 @@ public:
ssize_t n = 8;
ssize_t m = 8;
Pixels view(*local_image);
int intensity = 0;
int numpixels = (int)(n*m);
int chan = (int)local_image->channels();
const Quantum *p = view.getConst(0, 0, n, m); //entire image
bitset<64> retval(0);
@@ -310,7 +307,6 @@ public:
ssize_t n = 8;
ssize_t m = 8;
Pixels view(*local_image);
int numpixels = (int)(n*m);
int chan = (int)local_image->channels();
const Quantum *p = view.getConst(0, 0, n, m); //entire image
bitset<64> retval(0);
@@ -345,7 +341,7 @@ public:
//Uses an adaptive thresholding algorithm on an 8*8
//images. Re-calculates the threshold for each 2*2
//neighbourhood and stores it in a LTR map
class DCTPearson: public Descriptor {
class DCTPearson : public Descriptor {
public:
bitset<64> feature(Image* img) {
Image* local_image = new Image(*img);
@@ -406,4 +402,4 @@ public:
string ToString() {
return "DCTMedian";
}
};
};