Hi, I have generated matrix of RGB values form image. How I can use elements of same matrix in same program for further operations?

1 view (last 30 days)
Hi, with basic function, I have obtained pixel value in RGB format in matrix. I want to use different row values in same program.
  4 Comments
Simon
Simon on 18 Nov 2013
So the question is about xls reading/writing?
Actually, if you write and read again xls files, you should get the same data. Have you example files? Can you give your matlab code (only the part you have problems with) to reproduce what didn't work?
Shrikanth
Shrikanth on 18 Nov 2013
well not exactly in problem with reading xls files. it was a way i tried....
The code is as follows;
I = imread ('C:\work\xyz.jpg'); P = impixel(I)
_This returned matrix as below;_
P =
253 248 216
255 222 33
255 170 3
246 110 2
228 59 36
Now, i want to take just say values from very first row; i.e. r=253, g=248 & b=216 for comparision with other scaling unit.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 18 Nov 2013
Probably the easiest way, though some people don't like it, is to just declare your variable global in all functions that need to access it. There are more complicated ways though and they are in the FAQ.

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!