Path: news.mathworks.com!not-for-mail
From: "Sadik " <sadik.hava@gmail.com>
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$1@newscl01ah.mathworks.com>
References: <jg7oha$v8$1@newscl01ah.mathworks.com> <jg7qit$6le$1@newscl01ah.mathworks.com>
Reply-To: "Sadik " <sadik.hava@gmail.com>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1327984451 7835 172.30.248.35 (31 Jan 2012 04:34:11 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 31 Jan 2012 04:34:11 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: news.mathworks.com 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.

Best.