Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanJuranek committed Jun 16, 2020
1 parent ce9cc9c commit 6961232
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Whats new in **v0.9.8**
* Removed `set_num_threads`/`get_num_threads`. Threading is controlled by `num_threads` parameter in `find_line_segment_groups`.

### Whats new in **v0.9.7**
* Thread safety in RANSAC improved
* `release_line_segments` takes ptr to `LineSegment*` and sets the pointer to 0 after delete
Expand Down
18 changes: 2 additions & 16 deletions doc/cpp_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,28 +110,13 @@ These search space constraints are important for

## Interface

### `set_num_threads`

```c++
void set_num_threads(int t);
```
Sets the number of threads used by the library. This setting does not affect OpenMP number of threads. Internally, it only sets a variable used by parallel regions. Setting `t` to negative value (or to `1`) disables threading altogether. Setting to `0` forces global OpenMP number of threads (as set by `omp_set_num_threads`). Setting any positive value sets the number of threads (capped by `omp_max_threads`).
### `get_num_threads`
```c++
int get_num_threads();
```

Returns the internal number of threads. Default value is `0`.

### `find_line_segment_groups`

```c++
LineSegment * find_line_segment_groups(
InputPixelType * buffer, int width, int height, int stride,
float min_length, bool refine,
int num_threads,
int * n_lines);
```
Expand All @@ -142,6 +127,7 @@ Detect line segment in an image. The format of the image buffer is defined in th
* **stride** - Step between rows in `float` elements
* **min_length** - Minimal length of detected line
* **refine** (experimental) - Line refinement - connect close lines
* **num_threads** - Number of threads to use
* **n_lines** - Output parameter for the number of lines.
The function returns an allocated array of `LineSegment` structures. The number of lines in stored in `n_lines`. These lines can be freely modified or filtered. The array must be released by `release_line_segments`.
Expand Down

0 comments on commit 6961232

Please sign in to comment.