From b2564a1cc0b41c16cc8faa16c8987f7d222ffe92 Mon Sep 17 00:00:00 2001 From: Ronan Collobert Date: Wed, 16 Oct 2013 13:44:41 +0200 Subject: qttorch: dok -> md --- doc/README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ dok/index.dok | 54 ------------------------------------------------------ 2 files changed, 55 insertions(+), 54 deletions(-) create mode 100644 doc/README.md delete mode 100644 dok/index.dok diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..e4315ea --- /dev/null +++ b/doc/README.md @@ -0,0 +1,55 @@ + +# QTTorch Package Reference Manual # + +Package `qttorch` declares two functions +that convert `torch.Tensor` to `QImage` and vice-versa. + +Loading this package automatically loads +packages [torch](..:torch:index) +and [qt](..:qt:index). + + + +### qt.QImage.fromTensor(tensor) ### + +`qt.QImage.fromTensor(tensor)` + +Return a new [QImage](..:qtgui:index#qimage) filled +with data from a torch [Tensor](..:torch:index#Tensor). + +Tensor `tensor` must have 2 or 3 dimensions. + * The first dimension defines the image width. + * The second dimension defines the image height. + * The third dimension size must be 1, 3, or 4 +for monochrome, rgb, and rgba images respectively. +Each component is a floating point number in range 0 to 1. + + + +### qimage:toTensor(arg) ### + +`qimage.toTensor(tensor)` + +Fill the [Tensor](..:torch:index#Tensor) `tensor` with data +from [QImage](..:qtgui:index#qimage) `qimage`. +Tensor `tensor` must have 2 or 3 dimensions. +The first two dimensions must be equal to the +image width and height respectively. +The third dimension must be 1, 3, or 4 +for monochromatic, rgb or rgba images. +The `qimage` data will be converted to the desired format +and stored into the tensor, each component being +represented by a floating point number in range 0 to 1. +This function returns the filled tensor. + +`qimage.toTensor(depth)` + +Create a tensor with data from image `qimage`. +Argument `depth` must be 1, 3, or 4 +for extracting monochromatic, rgb or rgba data. +When `depth` is one, this function returns a two-dimensional tensor. +Otherwise it returns a three-dimensional tensor with +the third dimension equal to `depth`. +The first two dimensions are always +the image width and height. + diff --git a/dok/index.dok b/dok/index.dok deleted file mode 100644 index cf6fc60..0000000 --- a/dok/index.dok +++ /dev/null @@ -1,54 +0,0 @@ -====== QTTorch Package Reference Manual ====== -{{anchor:qttorch.dok}} - -Package ''qttorch'' declares two functions -that convert ''torch.Tensor'' to ''QImage'' and vice-versa. - -Loading this package automatically loads -packages [[..:torch:index|torch]] -and [[..:qt:index|qt]]. - - -==== qt.QImage.fromTensor(tensor) ==== -{{anchor:qimagefromtensor}} - -''qt.QImage.fromTensor(tensor)'' - -Return a new [[..:qtgui:index#qimage|QImage]] filled -with data from a torch [[..:torch:index#Tensor|Tensor]]. - -Tensor ''tensor'' must have 2 or 3 dimensions. - * The first dimension defines the image width. - * The second dimension defines the image height. - * The third dimension size must be 1, 3, or 4 -for monochrome, rgb, and rgba images respectively. -Each component is a floating point number in range 0 to 1. - - -==== qimage:toTensor(arg) ==== -{{anchor:qimagetotensor}} - -''qimage.toTensor(tensor)'' - -Fill the [[..:torch:index#Tensor|Tensor]] ''tensor'' with data -from [[..:qtgui:index#qimage|QImage]] ''qimage''. -Tensor ''tensor'' must have 2 or 3 dimensions. -The first two dimensions must be equal to the -image width and height respectively. -The third dimension must be 1, 3, or 4 -for monochromatic, rgb or rgba images. -The ''qimage'' data will be converted to the desired format -and stored into the tensor, each component being -represented by a floating point number in range 0 to 1. -This function returns the filled tensor. - -''qimage.toTensor(depth)'' - -Create a tensor with data from image ''qimage''. -Argument ''depth'' must be 1, 3, or 4 -for extracting monochromatic, rgb or rgba data. -When ''depth'' is one, this function returns a two-dimensional tensor. -Otherwise it returns a three-dimensional tensor with -the third dimension equal to ''depth''. -The first two dimensions are always -the image width and height. -- cgit v1.2.3