Comments (3)
OK, I figured it out myself, although it took me time. The issue is caused by a bug in Doxa::PNM::WriteP4
, your function that outputs the image as PBM. Line:
const int paddedWidth = image.width + 8 - (image.width % 8);
assumes that all widths have to be padded to a full byte. But in my case, the width is 1320, which is already divisible by 8, so it doesn't need any padding. This scenario has been overlooked, it seems. The correct line is:
const int paddedWidth = image.width % 8 == 0 ? image.width : image.width + 8 - (image.width % 8);
P.S. You might also want to check Doxa::PNM::Read1BitBinary
for the same bug.
from doxa.
Thank you! I will try to get this fixed as soon as possible.
from doxa.
Your solution has been implemented, with unit test coverage. Thanks again!
from doxa.
Related Issues (17)
- version of c++ HOT 3
- std::get on Mac OS HOT 5
- Using on Windows HOT 5
- building with Pybind11 on Windows HOT 11
- specifying binarization method in python HOT 3
- Any plan to support pip install for the Python binding HOT 11
- [Feature request] AdOtsu, adaptive Otsu's method HOT 9
- Documentation - Parameter Defaults HOT 1
- skewed large images HOT 3
- GPU Support (CUDA) HOT 1
- Wan algorithm is slowly if window size more than 17? HOT 1
- pseudo F-measure, single metrics in Doxapy, and `eps` for numerical stability? HOT 9
- `#include "Morphology.hpp"` is missing from `Wan.hpp` HOT 1
- Thank you HOT 1
- Fast implementation of Sauvola-alike methods without integral images HOT 8
- Incorrect binarization algorythm in Demo Application HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doxa.