Fixed the C++ port to compile on a Linux system.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1211 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
ralf.kistner@gmail.com 2010-02-15 17:00:07 +00:00
parent 6758fcdca7
commit 997c485a35
6 changed files with 13 additions and 3 deletions

View file

@ -33,6 +33,11 @@ LocalBlockBinarizer::LocalBlockBinarizer(Ref<LuminanceSource> source) :
LocalBlockBinarizer::~LocalBlockBinarizer() {
}
Ref<BitArray> LocalBlockBinarizer::estimateBlackRow(int y, Ref<BitArray> row) {
//TODO: implement
return Ref<BitArray>();
}
// Calculates the final BitMatrix once for all requests. This could be called once from the
// constructor instead, but there are some advantages to doing it lazily, such as making
// profiling easier, and not doing heavy lifting when callers don't expect it.

View file

@ -31,8 +31,10 @@ public:
virtual ~LocalBlockBinarizer();
virtual Ref<BitMatrix> estimateBlackMatrix();
Ref<BitArray> estimateBlackRow(int y, Ref<BitArray> row);
private:
void calculateThresholdForBlock(const unsigned char* luminances, int subWidth, int subHeight,
int stride, const unsigned char* averages, const unsigned char* types, BitMatrix& matrix);
void sharpenRow(unsigned char* luminances, int width, int height);

View file

@ -23,6 +23,7 @@
#include <zxing/common/Array.h>
#include <zxing/ReaderException.h>
#include <math.h>
#include <string.h>
namespace zxing {
namespace oned {

View file

@ -23,6 +23,7 @@
#include <zxing/common/Array.h>
#include <zxing/ReaderException.h>
#include <math.h>
#include <limits.h>
namespace zxing {
namespace oned {

View file

@ -21,6 +21,7 @@
#include "OneDReader.h"
#include <zxing/ReaderException.h>
#include <math.h>
#include <limits.h>
namespace zxing {
namespace oned {

View file

@ -240,12 +240,12 @@ int main(int argc, char** argv) {
int lresult = 1;
if (outfolder == string("-")) {
//gresult = test_image_global(image, "");
gresult = test_image_global(image, "");
lresult = test_image_local(image, "");
} else {
replace(infilename.begin(), infilename.end(), '/', '_');
string prefix = string(outfolder) + string("/") + infilename;
//gresult = test_image_global(image, prefix + ".g");
gresult = test_image_global(image, prefix + ".g");
lresult = test_image_local(image, prefix + ".l");
}