Since my room can be turned into total darkness by a single power switch within my reach at my bench table while I'm working, I use this below method.
I like the idea of automation using script + ImageMagick, thanks.

The setup, once the camera's settings like position, zoom, exposure and etc are set perfectly, all I need is just to turn off the light with the remote at the other hand, and then push the camera IR remote to initiate the shot while in total darkness

, and turn the light back. Btw, that remote is cheap Chinese clone that cost me just $2.

/?action=dlattach;attach=22215;image)
The result example, cropped, resized and mildly processed to increase the contrast level.
/?action=dlattach;attach=22223;image)
These photos are originated from my previous post ->
HERE