Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/image.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicholas-leonard <nick@nikopia.org>2014-10-08 09:04:17 +0400
committernicholas-leonard <nick@nikopia.org>2014-10-08 09:04:17 +0400
commita2e99d358ef1df5f8fd790031814d39d9abbaa3a (patch)
treed1d329721a0e86bcc5dd3fc7b538f88b7e755690 /README.md
parentffb50ef6880551425d64e7805969620d17acba48 (diff)
doc for save/load
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
index 01b2055..829e7c8 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,29 @@
+# Image Package Reference Manual #
+
+ * saving and loading images
+
+## [tensor] image.load(filename, depth, tensortype) ##
+Loads an image located at path `filename` having `depth` channels (1 or 3)
+into a [Tensor](https://github.com/torch/torch7/blob/master/doc/tensor.md#tensor)
+of type `tensortype` (*float*, *double* or *byte*). The last two arguments
+are optional.
+
+The image format is determined from the `filename`'s
+extension suffix. Supported formats are:
+ * [JPEG](https://en.wikipedia.org/wiki/JPEG)
+ * [PNG](https://en.wikipedia.org/wiki/Portable_Network_Graphics)
+ * [PPM and PGM](https://en.wikipedia.org/wiki/Netpbm_format)
+
+The returned `tensor` has size `nChannel x height x width` where `nChannel` is
+1 (greyscale) or 3 (usually [RGB](https://en.wikipedia.org/wiki/RGB_color_model)
+or [YUV](https://en.wikipedia.org/wiki/YUV).
+
+## image.save(filename, tensor) ##
+Saves Tensor `tensor` to disk at path `filename`. The format to which
+the image is saved is extrapolated from the `filename`'s extension suffix.
+The `tensor` should be of size `nChannel x height x width`.
+
+
## Dependencies:
Torch7 (www.torch.ch)