j143 commented on a change in pull request #959:
URL: https://github.com/apache/systemml/pull/959#discussion_r436278976
##########
File path: img_brightness.md
##########
@@ -0,0 +1,30 @@
+## `img_brightness`-Function
+
+The `img_brightness`-function is an image data augumentation function.
+It changes the brightness of the image.
+
+### Usage
+```r
+img_brightness(img_in = A, value = 128, channel_max = 255)
+```
+
+### Arguments
+| Name | Type | Default | Description |
+| :------ | :------------- | -------- | :---------- |
+| img_in | Matrix[Double] | --- | Input matrix/image |
+| value | Double | --- | The amount of brightness to be
changed for the image |
+| channel_max | Integer | --- | Maximum value of the brightness
of the image |
+
+### Returns
+| Name | Type | Default | Description |
+| :------ | :------------- | -------- | :---------- |
+| img_out | Matrix[Double] | --- | Output matrix/image |
+
+### Example
+```r
+import numpy as np
+
+A = np.random.random((500,500))
Review comment:
cc @h0901
In `dml` we could create a random matrix with `rand()`, let us take some
help from dml language
[guide](https://github.com/apache/systemml/blob/gh-pages/dml-language-reference.md#matrix-construction-manipulation-and-aggregation-built-in-functions).
A starting point
```r
# A is a matrix with 3x3 size, produces cells with values b/w 0 to 255
includes non-integers
A = rand (rows = 3, cols = 3, min = 0, max = 255)
# convert non-integers to integers
Y = round(A)
```
Result:
```console
-- Random Matrix A --
244.307 106.762 154.672
13.968 111.156 59.756
59.785 231.305 167.178
-- Y = Round the values of A to integers --
244.000 107.000 155.000
14.000 111.000 60.000
60.000 231.000 167.000
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]