From: "Sadik " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to pass a 2-D image to a function
Date: Tue, 31 Jan 2012 04:34:11 +0000 (UTC)
Organization: University of North Carolina
Lines: 3
Message-ID: <jg7r03$7kr$>
References: <jg7oha$v8$> <jg7qit$6le$>
Reply-To: "Sadik " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1327984451 7835 (31 Jan 2012 04:34:11 GMT)
NNTP-Posting-Date: Tue, 31 Jan 2012 04:34:11 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: comp.soft-sys.matlab:756230

Yes, I reproduced the problem. The matrix multiplication can result in values much larger than 255 [the uint8 max], so even if you use casting to double, you may want to make a decision about how to proceed with values outside the 0-255 range.