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:
Diffstat (limited to 'init.lua')
-rwxr-xr-xinit.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 6c54281..330aa56 100755
--- a/init.lua
+++ b/init.lua
@@ -61,7 +61,7 @@ local function todepth(img, depth)
if img:nDimension() == 2 then
-- all good
elseif img:size(1) == 3 or img:size(1) == 4 then
- img = image.rgb2y(img:narrow(1,1,3))[1]
+ img = image.rgb2y(img:narrow(1,1,3))[1]
elseif img:size(1) == 2 then
img = img:narrow(1,1,1)
elseif img:size(1) ~= 1 then
@@ -1468,7 +1468,7 @@ function image.rgb2y(...)
local outputY = output[1]
-- convert
- outputY:zero():add(0.299, inputRed):add(0.587, inputGreen):add(0.114, inputBlue)
+ input.image.rgb2y(input, outputY)
-- return YUV image
return output