It is possible that all of the values are small and so black might be appropriate. You can experiment with.
imagesc(rgb2gray(hdr)); colormap(gray(256))
You cannot get "actual" luminance values from RGB values without photometric calibration. rgb2gray() will give you relative luminance, subject to a number of assumptions (assumptions about linearity of the detector, assumptions about relative intensity of spectral bands, assumptions about the lens being linear out to the edge... The assumption of linearity of the detector is especially problematic at low light levels.)
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Explore similar technical troubleshooting questions and verified MATLAB solutions: