Open J6rry opened 3 years ago
Thank you for your comment. We are always grateful when people think about the code and offer us suggestions. I hope you find the ISET3d and ISETCam methods useful.
What would be most helpful for this question is this. Please check whether the code is performing as intended. The function sceneAdjustLuminance(), which you ask about, is supposed to take in a scene spectral radiance and return it after multiplying by a single scale factor so that the returned scene radiance (in ieObject) matches the meanLuminance parameter.
Does that fail? If so, please insert a code snippet showing the failure.
The function sceneCalculateLuminance does something a little different - it calculates the point by point luminance for the image. It would be very nice if you wrote a test to see whether that code is also working correctly, and if not then let us look into it.
Again, we very much appreciate suggestions. They are most helpful when accompanied by short code snippets that demonstrate there is a problem - or a new and interesting use case. Thinking there might be a problem from reading the code, and asking us to follow your thinking, is more time-consuming and potentially error prone because language is less precise than checking the code.
I run the first introduction demo, and found that the luminance of the sphere scene is calculated from energy, which is rendered by pbrt. However, the raw energy data is convert to phtons imediately, whereafter, all the energy data is convert from "photons" data. As photons data has already been converted to "human eye response" with the V-lambda curve, so it cannot be used to convert to the "original" energy data. Am I correct?
Below is the related code in
piDat2ISET.m
file: