From 1a2f615c2d28350ce178448c5c18afb180494a43 Mon Sep 17 00:00:00 2001 From: Saloni Jain Date: Mon, 16 Apr 2018 18:31:31 +0530 Subject: [PATCH] rectifying index in img to mat conversion --- src/OpenCV_ImagesSupport.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenCV_ImagesSupport.jl b/src/OpenCV_ImagesSupport.jl index d3ff1e4..9c973ce 100644 --- a/src/OpenCV_ImagesSupport.jl +++ b/src/OpenCV_ImagesSupport.jl @@ -26,7 +26,7 @@ function convertToMat(image) for j = 1:Base.size(img,2) # index row first (Mat is row-major order) for k =1:Base.size(img,1) # index column second # slow algorithm - will try to use pointer method (C++)! - pixset(mat, k, j, float(img[k,j,1].i)) + pixset(mat, k-1, j-1, float(img[k,j,1].i)) end end end