An ill-posed problem
In order to compute the scotopic luminosity accurately,
we need to know the light spectrum.
But from the color information from the image,
we cannot know the spectrum, and must make our best guess.