Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to get pixel intensity values of an image
Date: Mon, 25 Mar 2013 06:31:05 +0000 (UTC)
Organization: University of Peradeniya
Lines: 22
Message-ID: <kioqv9$har$1@newscl01ah.mathworks.com>
References: <hhrtvo$2g3$1@fred.mathworks.com> <hhs6qs$bvf$1@fred.mathworks.com> <df97e1ed-d029-4a4b-ae46-0b32c140497d@f5g2000yqh.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1364193065 17755 172.30.248.45 (25 Mar 2013 06:31:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 25 Mar 2013 06:31:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3980668
Xref: news.mathworks.com comp.soft-sys.matlab:791928

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <df97e1ed-d029-4a4b-ae46-0b32c140497d@f5g2000yqh.googlegroups.com>...
> -hendy-
> If you have an image, the image is in a numerical variable that is an
> array.  The elements of that array ARE your intensity values.
> 
> For example:
> 
> % Read in standard MATLAB demo image.
> grayImage = imread('cameraman.tif');
> imshow(grayImage, []);
> title('Original Grayscale Image');
> set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.
> 
> Let's say you want the intensity value at row 100, column 230.  Well
> then you'd just say
> intensityValue = grayImage(100, 230);
> 
> It's as simple as that.

Hi all, 
I want to retrieve the intensity value matrix of a ROI in a gray scale image into a given matrix, say "I[]". And to get the average intensity value of that particular ROI. How can I do this?
Thanks in advance