Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir55 authored Mar 8, 2018
1 parent a3a0927 commit 02ab98b
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ These is example of the output produced from the current code.
# Dependencies
* OpenCV: 3.0 or newer.

# Build
# Usage as an exe
```Console
mkdir build
cd build
cmake ..
make
```
# Usage
```Console
./Image2Lines the_path_to_the_img
```
the output will be:
Expand All @@ -45,11 +42,34 @@ the output will be:
* 'Final_lines.jpg' : representing the final lines drawn on the original image.
* 'Contours.jpg' : represnting the detected contours.

# TODO
* Improve detecting peaks and valleys function.
* Use a better binarization technique than the currrently used. (I will use my other repository named Binarization".
# Usage in your code
You should add LineSegmentation.cpp and LineSegmentation.hpp to your project.
```C++
#include "LineSegmentation.hpp"

// Create an object from LineSegmentation and give to it the image path
LineSegmentation line_segmentation(img_path);

// Run segment() method to segment lines. The output will be a vector of CV::Mat each representing a line.
vector<cv::Mat> lines = line_segmentation.segment();

```
**NOTE** You should link correctly OpenCV in your working project. if you use CMake see CMakeLists.txt file to see how to add opencv.
## Database used
IAM database.
# Development
# Build
```Console
mkdir build
cd build
cmake ..
make
```
# Current issues
* Finding peaks and valleys can cause in some cases the lines to be falsely segmented. If you can improve that problem, feel free to make a pull request.

# TODOs
* Improve detecting peaks and valleys function.
* Use a better binarization technique than the currrently used (OTSU) in order to get better binarization in case of camera images. (I will use my other repository named Binarization).

## Database used
IAM database (Educational use permit).

0 comments on commit 02ab98b

Please sign in to comment.