Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 4c83e37

Browse files
some fixes to include SuperpixelSLIC and SuperpixelLSC correctly + added some docs
1 parent 9b08201 commit 4c83e37

File tree

9 files changed

+74
-7
lines changed

9 files changed

+74
-7
lines changed

cc/modules/ximgproc/SuperpixelLSC.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#ifdef HAVE_XIMGPROC
22

3-
#if OPENCV_MINOR_VERSION > 0
4-
53
#include "SuperpixelLSC.h"
64

5+
#if CV_MINOR_VERSION > 0
6+
77
Nan::Persistent<v8::FunctionTemplate> SuperpixelLSC::constructor;
88

99
NAN_MODULE_INIT(SuperpixelLSC::Init) {

cc/modules/ximgproc/SuperpixelLSC.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "Mat.h"
33
#include "macros.h"
44

5-
#if OPENCV_MINOR_VERSION > 0
5+
#if CV_MINOR_VERSION > 0
66

77
#ifndef __FF_SUPERPIXELLSC_H__
88
#define __FF_SUPERPIXELLSC_H__

cc/modules/ximgproc/SuperpixelSLIC.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#ifdef HAVE_XIMGPROC
22

3-
#if OPENCV_MINOR_VERSION > 0
4-
53
#include "SuperpixelSLIC.h"
64

5+
#if CV_MINOR_VERSION > 0
6+
77
Nan::Persistent<v8::FunctionTemplate> SuperpixelSLIC::constructor;
88

99
NAN_MODULE_INIT(SuperpixelSLIC::Init) {

cc/modules/ximgproc/SuperpixelSLIC.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "Mat.h"
33
#include "macros.h"
44

5-
#if OPENCV_MINOR_VERSION > 0
5+
#if CV_MINOR_VERSION > 0
66

77
#ifndef __FF_SUPERPIXELSLIC_H__
88
#define __FF_SUPERPIXELSLIC_H__

cc/modules/ximgproc/ximgproc.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
#include "ximgproc.h"
44
#include "SuperpixelSEEDS.h"
5+
6+
#if CV_MINOR_VERSION > 0
57
#include "SuperpixelSLIC.h"
68
#include "SuperpixelLSC.h"
9+
#endif
710

811
NAN_MODULE_INIT(XImgproc::Init) {
912
SuperpixelSEEDS::Init(target);
10-
#if OPENCV_MINOR_VERSION > 0
13+
#if CV_MINOR_VERSION > 0
1114
SuperpixelSLIC::Init(target);
1215
SuperpixelLSC::Init(target);
1316
#endif

doc/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ Missing some function bindings? No problem! - <a href="https://github.com/justad
212212
* <a href="./ximgproc/ximgproc.md"><b>ximgproc</b></a>
213213
* <a href="./ximgproc/SuperpixelSEEDS.md"><b>SuperpixelSEEDS</b></a>
214214
* <a href="./ximgproc/SuperpixelSEEDS.md#iterate">iterate</a>
215+
* <a href="./ximgproc/SuperpixelSLIC.md"><b>SuperpixelSLIC</b></a>
216+
* <a href="./ximgproc/SuperpixelSLIC.md#iterate">iterate</a>
217+
* <a href="./ximgproc/SuperpixelLSC.md"><b>SuperpixelLSC</b></a>
218+
* <a href="./ximgproc/SuperpixelLSC.md#iterate">iterate</a>
215219
* <a href="./objdetect/objdetect.md"><b>objdetect</b></a>
216220
* <a href="./objdetect/CascadeClassifier.md"><b>CascadeClassifier</b></a>
217221
* <a href="./objdetect/CascadeClassifier.md#detectMultiScale">detectMultiScale</a>

doc/ximgproc/SuperpixelLSC.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SuperpixelLSC
2+
3+
## Accessors
4+
``` javascript
5+
{
6+
img: Mat,
7+
labels: Mat,
8+
labelContourMask: Mat,
9+
regionSize: Int,
10+
ratio: Number,
11+
numCalculatedSuperpixels: Int
12+
}
13+
```
14+
15+
<a name="constructors"></a>
16+
17+
## Constructors
18+
``` javascript
19+
SuperpixelLSC : new SuperpixelLSC(Mat img, Int regionSize = 10, Number ratio = 10)
20+
```
21+
22+
## Methods
23+
24+
<a name="iterate"></a>
25+
26+
### iterate
27+
``` javascript
28+
lsc.iterate(Uint iterations = 10)
29+
```

doc/ximgproc/SuperpixelSEEDS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{
66
img: Mat,
77
labels: Mat,
8+
labelContourMask: Mat,
89
numSuperpixels: Int,
910
numLevels: Int,
1011
prior: Int,

doc/ximgproc/SuperpixelSLIC.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SuperpixelSLIC
2+
3+
## Accessors
4+
``` javascript
5+
{
6+
img: Mat,
7+
labels: Mat,
8+
labelContourMask: Mat,
9+
algorithm: Int,
10+
regionSize: Int,
11+
ruler: Number,
12+
numCalculatedSuperpixels: Int
13+
}
14+
```
15+
16+
<a name="constructors"></a>
17+
18+
## Constructors
19+
``` javascript
20+
SuperpixelSLIC : new SuperpixelSLIC(Mat img, Int algorithm, Int regionSize = 10, Number ruler = 10)
21+
```
22+
23+
## Methods
24+
25+
<a name="iterate"></a>
26+
27+
### iterate
28+
``` javascript
29+
slic.iterate(Uint iterations = 10)
30+
```

0 commit comments

Comments
 (0)