Nithya, "actual luminance" is a bit hard to pinpoint in this sense, but perhaps the closest you can get to the "definition of luminance" is:
cform = makecform('srgb2xyz');
xyz = applycform(rgb,cform);
lum = xyz(:,:,2);
This is a "relative luminance." That is, it is a luminance with respect to a reference white. The reference white can be adjusted by using the 'WhitePoint' parameter to makecform.
12 Nov 2013
Simple utility to view all color planes, grayscale, and colorspace conversions of an RGB image.