Prev: how to train dynamic neural network on multiple sequences
Next: source code for iris normalization
From: Shamane on 22 Jan 2010 04:24 Hi all! :) In an image X, I have a grayscale pixel which has only 1 value: 200. I also know it's coordinate: (124,32) I have a rgb value: [0, 220, 255] with a variable name called Seed. I want to replace the grayscale pixel with this rgb value. And I tried using this: X(32,124)= Seed; I have this error: Assignment has more non-singleton rhs dimensions than non-singleton subscripts. I understand it's because I'm trying to write a matrix of 3 values into a space of 1. But how do I solve this error then? Will be so grateful if you guys can help me. :) Thank you!
From: ImageAnalyst on 22 Jan 2010 06:20 Make up your mapping of gray levels to color in an N by 3 matrix (the "colormap") and then call ind2rgb().
From: Shamane on 25 Jan 2010 02:12 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <2cb16122-81ff-4ff8-a94f-65323b463277(a)b9g2000yqd.googlegroups.com>... > Make up your mapping of gray levels to color in an N by 3 matrix (the > "colormap") and then call ind2rgb(). I apologise, I don't really get what you mean. Do you mean to say, convert my grayscale image to one with a colormap? However, I only want to change a particular grayscale pixel to a rgb pixel. The rest of the grayscale pixels still remain as it is.
|
Pages: 1 Prev: how to train dynamic neural network on multiple sequences Next: source code for iris normalization |