MATLAB Answers


How to convert an image from rgb to lab by pixel by pixel matrix???

Asked by pritha Das on 20 Oct 2013
Latest activity Commented on by Image Analyst
on 26 Oct 2013
like i have image...i have to read it in matlab...then if i want to change the rgb values of the image to lab values...then what will b its steps.... i mean L* A* B* values

  1 Comment

What do you mean by lab values? Can you please explain?

Sign in to comment.

2 Answers

Answer by Matt Kindig on 25 Oct 2013

You can convert rgb to L*A*B colorspace using the makecform() and applycform() functions. From the documentation:
cform = makecform('srgb2lab');
lab_IMG = applycform(IMG,cform);


i mean to say....for rgb image we can plot matrix from 0-255...then if we convert rgb to L*a*b then we can get another matrix from the image of converted L*a* i want to know how to do that?i mean i how to plot matrix of a image...then how we can change that matrix to its correspond l*a*b values using coding in matlab
look what u have provided it is directly converts a rgb image to its L*a*b color space value... bt if want to the same thing in matrix form then what will b the coding
Matt already answered this. See his last comment. There is no difference between an image and a matrix, if that is what you are wondering.

Sign in to comment.

Answer by Jan
on 25 Oct 2013

This is a perfect question for an internet research: Asking e.g. Google for "Matlab rgb lab" and you will find e.g.:


Sign in to comment.