mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
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:
parent
6758fcdca7
commit
997c485a35
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <zxing/common/Array.h>
|
||||
#include <zxing/ReaderException.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace zxing {
|
||||
namespace oned {
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <zxing/common/Array.h>
|
||||
#include <zxing/ReaderException.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
|
||||
namespace zxing {
|
||||
namespace oned {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "OneDReader.h"
|
||||
#include <zxing/ReaderException.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
|
||||
namespace zxing {
|
||||
namespace oned {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue