You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# Guide to contributing to ADCompVision
2
2
3
-
Some pointers:
3
+
Some pointers:
4
4
* OpenCV uses Mat objects for images. They are written as a 'smart-pointer' class, meaning that they are passed
5
5
by-reference by default. Because of this, make sure to pass the image into the function with (Mat &img).
6
6
* The plugin works by calling functions in a helper library. If you wish to add an additional function for a more specific use case that the plugin does not support, follow the steps below.
7
7
8
8
## Adding a new CV function
9
9
10
-
There are two primary ways to add a new CV function to ADCompVision to customize the plugin.
10
+
There are two primary ways to add a new CV function to ADCompVision to customize the plugin.
11
11
12
12
### Implementing user_function
13
13
@@ -25,12 +25,12 @@ This is a more complicated process than simply implementing the user_function, a
25
25
To add a new CV function there are several files you will need to edit. First, in the NDCV.template file, find the record titled "CompVisionFunctionN", where N is an integer from 1 to 3. These are the three sets of supported functions, and generally follow the rule:
26
26
* Function set 1 contains basic OpenCV image processing functions
27
27
* Function set 2 contains more complex functions that are still general and with many use cases
28
-
* Function set 3 contains functions for specific use cases and custom implementations.
28
+
* Function set 3 contains functions for specific use cases and custom implementations.
29
29
30
-
Decide which of these sets your new function falls under, and add it to the Input and Output records.
30
+
Decide which of these sets your new function falls under, and add it to the Input and Output records.
31
31
32
32
33
-
Next, in the `NDPluginCVHelper.h` file, change the `N_FUNC_#` value to take into account the new number of functions in the `CompVisionFunction#` PV you add your function to.
33
+
Next, in the `NDPluginCVHelper.h` file, change the `N_FUNC_#` value to take into account the new number of functions in the `CompVisionFunction#` PV you add your function to.
34
34
Next, you will need to edit the `NDPluginCVHelper.cpp` and `NDPluginCVHelper.h` files. In `NDPluginCVHelper.h`, find the definition of `ADCVFunction_t` and add:
35
35
```
36
36
// Some basic flag types
@@ -54,7 +54,7 @@ Make sure to add your function type in the appropriate position, this is importa
* Function that sets the I/O descriptions for YOURFUNCTION
99
-
*
99
+
*
100
100
* @params[out]: inputDesc -> array of input descriptions
101
101
* @params[out]: outputDesc -> array of output descriptions
102
102
* @params[out]: description -> overall function usage description
@@ -125,7 +125,7 @@ ADCVStatus_t NDPluginCVHelper::get_YOURFUNCTION_description(string* inputDesc, s
125
125
```
126
126
python3 createIOmanual.py
127
127
```
128
-
This will create a manual (in docs/manual.html) describing the inputs and outputs of each of the functions including your new custom function along with a description of each function as provided in the comments.
128
+
This will create a manual (in docs/manual.html) describing the inputs and outputs of each of the functions including your new custom function along with a description of each function as provided in the comments.
129
129
130
130
Next, you must edit the `getFunctionDescription` function in `NDPluginCVHelper.cpp`. Add a case to the switch statement as follows:
131
131
```
@@ -146,4 +146,4 @@ This will tell ADCompVision which function to process when your function is requ
146
146
147
147
Finally, the last remaining thing you must do, is to make sure that your function is thread safe. If it is not, you must add it to the array in `NDPluginCV.h` called `nonThreadSafeFunctions`. Note that in this case, multiple threads will not affect the performance of the plugin when such a function is selected.
148
148
149
-
Your function should now be implemented into ADCompVision and is ready to be tested.
149
+
Your function should now be implemented into ADCompVision and is ready to be tested.
An [EPICS](http://www.aps.anl.gov/epics/)[areaDetector](https://github.com/areaDetector/areaDetector/blob/master/README.md) plugin that allows for general integration of OpenCV based computer vision routines with detector data.
4
-
5
-
Supported Functions:
6
-
* Gaussian blur
7
-
* Median blur
8
-
* Binary thresholding
9
-
* Laplacian
10
-
* Sharpening filter
11
-
* Canny Edge Detection
12
-
* Consecutive image subtraction (ex. for dual thresholding)
An [EPICS](http://www.aps.anl.gov/epics/)[areaDetector](https://github.com/areaDetector/areaDetector/blob/master/README.md) plugin that allows for general integration of OpenCV based computer vision routines with detector data.
4
+
5
+
Supported Functions:
6
+
* Gaussian blur
7
+
* Median blur
8
+
* Binary thresholding
9
+
* Laplacian
10
+
* Sharpening filter
11
+
* Canny Edge Detection
12
+
* Consecutive image subtraction (ex. for dual thresholding)
0 commit comments