|
From: | Terry Duell |
Subject: | Re: How to save matrix as image? [SOLVED] |
Date: | Mon, 12 Sep 2011 14:19:25 +1000 |
User-agent: | Opera Mail/11.51 (Linux) |
Hullo All,On Mon, 12 Sep 2011 11:06:42 +1000, Terry Duell <address@hidden> wrote:
[snip]
I have a matrix (D1, 1209x1559x2) which I want to save out as a greyscale image using,'imwrite(mat2gray(D1),'results/D1_concatderiv.jpg');' which gives me the error;'error: mat2gray: mx_el_lt: nonconformant arguments (op1 is 1209x1559x2, op2 is 1x1x2)'I thought I had done this on other occasions, but obviously not. What am I missing?
As is often the case, the solution becomes apparent immediately after you post a question :-)
One has to reference the layer/channel... imwrite(mat2gray(D1(:,:,1)),'results/D1_concatderiv.jpg Cheers, -- Regards, Terry Duell
[Prev in Thread] | Current Thread | [Next in Thread] |