Giter Club home page Giter Club logo

binarization's Introduction

Hello! I'm Caio Almeida, senior full-stack software engineer with 20 years of experience, primarily working with Ruby On Rails and JavaScript for the last 15 years, and React.JS since 2016. Over the years, I've been working for companies in Brazil, Canada, England - and mostly in the United States for the last 13 years, most of the time in the social tech space. I'm a Certified Ruby Programmer, I hold bachelor's and master's degrees in computer science from the Federal University of Bahia, Brazil, and I'm currently a special student in the PhD program at the same university. In 2018, I was one of the five software developers selected to join Data4Change, a data visualization workshop on human rights in the Middle East that took place in Beirut, Lebanon. I'm currently ranked as the Top 1 Ruby developer in Brazil and Top 10 in the world, according to CodersRank. I also created and maintain some open source projects and collaborate as a developer on other open source projects. Other than that, I have presented my work at national and international conferences, both technical (particularly about Ruby) and academic. Technical conferences include RubyConf (Portugal), Rubyfuza (South Africa), WrocLove.rb (Poland), Mexico on Rails (Mexico), RubyConf Brazil, JSDay, International Free Software Forum, among others. Academic conferences include SIBGRAPI (Peru), PROPOR (Portugal), WebMedia, W3C Web Conference, International Free Software Workshop, among others.

Want to get in touch? Send an email to [email protected] or visit https://ca.ios.ba :)

GitHub Streak GitHub Stats

binarization's People

Contributors

caiosba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

binarization's Issues

where is "binary"

hello, I cannot find the binary file, can you pass it to me? Thank you!

argument error

Upon executing the bash file "run" I am getting the following error. Kindly have a look.

jhmapoorva@inspiron-3558:/data/tools/binarization$ sh run
g++ -c -m32 -pipe -g -I/usr/local/include/opencv -I/usr/local/include -lcv -lstdc++ -lcxcore -lcv -lhighgui -lcvaux -o main.o main.cpp
main.cpp: In function ‘void executeClusteringAndBinarization(IplImage*, IplImage*, cv::Mat)’:
main.cpp:181:32: error: no matching function for call to ‘cv::Mat::Mat(IplImage*&)’
cv::Mat contrast = cv::Mat(im);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:925:14: note: candidate: cv::Mat::Mat(const cv::cuda::GpuMat&)
explicit Mat(const cuda::GpuMat& m);
^
/usr/local/include/opencv2/core/mat.hpp:925:14: note: no known conversion for argument 1 from ‘IplImage* {aka IplImage*}’ to ‘const cv::cuda::GpuMat&’
/usr/local/include/opencv2/core/mat.hpp:922:37: note: candidate: template cv::Mat::Mat(const cv::MatCommaInitializer
<Tp>&)
template explicit Mat(const MatCommaInitializer
<Tp>& commaInitializer);
^
/usr/local/include/opencv2/core/mat.hpp:922:37: note: template argument deduction/substitution failed:
main.cpp:181:32: note: mismatched types ‘const cv::MatCommaInitializer
<_Tp>’ and ‘IplImage* {aka IplImage*}’
cv::Mat contrast = cv::Mat(im);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:918:37: note: candidate: template cv::Mat::Mat(const cv::Point3
<Tp>&, bool)
template explicit Mat(const Point3
<Tp>& pt, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:918:37: note: template argument deduction/substitution failed:
main.cpp:181:32: note: mismatched types ‘const cv::Point3
<_Tp>’ and ‘IplImage* {aka IplImage*}’
cv::Mat contrast = cv::Mat(im);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:914:37: note: candidate: template cv::Mat::Mat(const cv::Point
<Tp>&, bool)
template explicit Mat(const Point
<Tp>& pt, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:914:37: note: template argument deduction/substitution failed:
main.cpp:181:32: note: mismatched types ‘const cv::Point
<_Tp>’ and ‘IplImage* {aka _IplImage*}’
cv::Mat contrast = cv::Mat(im);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:910:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:910:51: note: template argument deduction/substitution failed:
main.cpp:181:32: note: mismatched types ‘const cv::Matx<_Tp, m, n>’ and ‘IplImage* {aka _IplImage*}’
cv::Mat contrast = cv::Mat(im);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:906:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:906:44: note: template argument deduction/substitution failed:
main.cpp:181:32: note: mismatched types ‘const cv::Vec<_Tp, m>’ and ‘IplImage* {aka _IplImage*}’
cv::Mat contrast = cv::Mat(im);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:902:37: note: candidate: template cv::Mat::Mat(const std::vector<_Tp>&, bool)
template explicit Mat(const std::vector<_Tp>& vec, bool copyData=false);
^
/usr/local/include/opencv2/core/mat.hpp:902:37: note: template argument deduction/substitution failed:
main.cpp:181:32: note: mismatched types ‘const std::vector<_Tp>’ and ‘IplImage* {aka _IplImage*}’
cv::Mat contrast = cv::Mat(im);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:884:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
Mat(const Mat& m, const Range* ranges);
^
/usr/local/include/opencv2/core/mat.hpp:884:5: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:874:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&)
Mat(const Mat& m, const Rect& roi);
^
/usr/local/include/opencv2/core/mat.hpp:874:5: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:864:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
^
/usr/local/include/opencv2/core/mat.hpp:864:5: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:852:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
^
/usr/local/include/opencv2/core/mat.hpp:852:5: note: candidate expects 5 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/mat.hpp:3396:0,
from /usr/local/include/opencv2/core.hpp:59,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.inl.hpp:425:1: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
^
/usr/local/include/opencv2/core/mat.inl.hpp:425:1: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:394:1: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t)
Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
^
/usr/local/include/opencv2/core/mat.inl.hpp:394:1: note: candidate expects 5 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:375:1: note: candidate: cv::Mat::Mat(const cv::Mat&)
Mat::Mat(const Mat& m)
^
/usr/local/include/opencv2/core/mat.inl.hpp:375:1: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::Mat&’
/usr/local/include/opencv2/core/mat.inl.hpp:366:1: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&)
Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:366:1: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:358:1: note: candidate: cv::Mat::Mat(int, const int*, int)
Mat::Mat(int _dims, const int* _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:358:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:349:1: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&)
Mat::Mat(Size _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:349:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:332:1: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&)
Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:332:1: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:341:1: note: candidate: cv::Mat::Mat(cv::Size, int)
Mat::Mat(Size _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:341:1: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:324:1: note: candidate: cv::Mat::Mat(int, int, int)
Mat::Mat(int _rows, int _cols, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:324:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:318:1: note: candidate: cv::Mat::Mat()
Mat::Mat()
^
/usr/local/include/opencv2/core/mat.inl.hpp:318:1: note: candidate expects 0 arguments, 1 provided
main.cpp:182:28: error: no matching function for call to ‘cv::Mat::Mat(IplImage*&)’
cv::Mat gray = cv::Mat(gr);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:925:14: note: candidate: cv::Mat::Mat(const cv::cuda::GpuMat&)
explicit Mat(const cuda::GpuMat& m);
^
/usr/local/include/opencv2/core/mat.hpp:925:14: note: no known conversion for argument 1 from ‘IplImage* {aka IplImage*}’ to ‘const cv::cuda::GpuMat&’
/usr/local/include/opencv2/core/mat.hpp:922:37: note: candidate: template cv::Mat::Mat(const cv::MatCommaInitializer
<Tp>&)
template explicit Mat(const MatCommaInitializer
<Tp>& commaInitializer);
^
/usr/local/include/opencv2/core/mat.hpp:922:37: note: template argument deduction/substitution failed:
main.cpp:182:28: note: mismatched types ‘const cv::MatCommaInitializer
<_Tp>’ and ‘IplImage* {aka IplImage*}’
cv::Mat gray = cv::Mat(gr);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:918:37: note: candidate: template cv::Mat::Mat(const cv::Point3
<Tp>&, bool)
template explicit Mat(const Point3
<Tp>& pt, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:918:37: note: template argument deduction/substitution failed:
main.cpp:182:28: note: mismatched types ‘const cv::Point3
<_Tp>’ and ‘IplImage* {aka IplImage*}’
cv::Mat gray = cv::Mat(gr);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:914:37: note: candidate: template cv::Mat::Mat(const cv::Point
<Tp>&, bool)
template explicit Mat(const Point
<Tp>& pt, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:914:37: note: template argument deduction/substitution failed:
main.cpp:182:28: note: mismatched types ‘const cv::Point
<_Tp>’ and ‘IplImage* {aka _IplImage*}’
cv::Mat gray = cv::Mat(gr);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:910:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:910:51: note: template argument deduction/substitution failed:
main.cpp:182:28: note: mismatched types ‘const cv::Matx<_Tp, m, n>’ and ‘IplImage* {aka _IplImage*}’
cv::Mat gray = cv::Mat(gr);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:906:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:906:44: note: template argument deduction/substitution failed:
main.cpp:182:28: note: mismatched types ‘const cv::Vec<_Tp, m>’ and ‘IplImage* {aka _IplImage*}’
cv::Mat gray = cv::Mat(gr);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:902:37: note: candidate: template cv::Mat::Mat(const std::vector<_Tp>&, bool)
template explicit Mat(const std::vector<_Tp>& vec, bool copyData=false);
^
/usr/local/include/opencv2/core/mat.hpp:902:37: note: template argument deduction/substitution failed:
main.cpp:182:28: note: mismatched types ‘const std::vector<_Tp>’ and ‘IplImage* {aka _IplImage*}’
cv::Mat gray = cv::Mat(gr);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.hpp:884:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
Mat(const Mat& m, const Range* ranges);
^
/usr/local/include/opencv2/core/mat.hpp:884:5: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:874:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&)
Mat(const Mat& m, const Rect& roi);
^
/usr/local/include/opencv2/core/mat.hpp:874:5: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:864:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
^
/usr/local/include/opencv2/core/mat.hpp:864:5: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:852:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
^
/usr/local/include/opencv2/core/mat.hpp:852:5: note: candidate expects 5 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/mat.hpp:3396:0,
from /usr/local/include/opencv2/core.hpp:59,
from /usr/local/include/opencv2/opencv.hpp:46,
from main.cpp:7:
/usr/local/include/opencv2/core/mat.inl.hpp:425:1: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
^
/usr/local/include/opencv2/core/mat.inl.hpp:425:1: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:394:1: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t)
Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
^
/usr/local/include/opencv2/core/mat.inl.hpp:394:1: note: candidate expects 5 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:375:1: note: candidate: cv::Mat::Mat(const cv::Mat&)
Mat::Mat(const Mat& m)
^
/usr/local/include/opencv2/core/mat.inl.hpp:375:1: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::Mat&’
/usr/local/include/opencv2/core/mat.inl.hpp:366:1: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&)
Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:366:1: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:358:1: note: candidate: cv::Mat::Mat(int, const int*, int)
Mat::Mat(int _dims, const int* _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:358:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:349:1: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&)
Mat::Mat(Size _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:349:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:332:1: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&)
Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:332:1: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:341:1: note: candidate: cv::Mat::Mat(cv::Size, int)
Mat::Mat(Size _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:341:1: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:324:1: note: candidate: cv::Mat::Mat(int, int, int)
Mat::Mat(int _rows, int _cols, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:324:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:318:1: note: candidate: cv::Mat::Mat()
Mat::Mat()
^
/usr/local/include/opencv2/core/mat.inl.hpp:318:1: note: candidate expects 0 arguments, 1 provided
Makefile:49: recipe for target 'main.o' failed
make: *** [main.o] Error 1
run: 6: run: Bad substitution

IOS Implementation

I need best code for tesseract (text recognition) on IOS.

So i implement successfully that codes with very hard work. :)
https://github.com/caiosba/binarization/blob/master/main.cpp

Im just using auxBinarization on scaled Image (1920x1080)

cv::Mat final = auxBinarization(input, niblack, winx, winy, optK, 128, "s");
//cv::Mat final = executeClusteringAndBinarization(grayImage, structuralContrastImage, niblack);

Im happy with my new OCR results. But recognition process takes too long time.

What can i do for faster solution. Can you help me for that issue?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.