How to extract only frames from videos that have certain levels of luminosity / content?
Here's the gist of the ffmpeg method: use the blackframe filter to identify frames with a certain amount of non-black content. Use the metadata filter to pass through those frames and discard the rest.

Inspection:

ffmpeg -i in.mp4 -vf blackframe=amount=0:threshold=92 -f null -


The amount (0) in the blackframe parameters refers to the percentage of pixels that have to be below the threshold (92) for the filter to tag it as a black frame. The way we'll using it, it won't matter what the amount is, so keep it at 0.

You will get a readout like this:

[Parsed_blackframe_0 @ 0000000002be5aa0] frame:1 pblack:35 pts:1 t:0.040000 type:I last_keyframe:1
[Parsed_blackframe_0 @ 0000000002be5aa0] frame:2 pblack:35 pts:2 t:0.080000 type:I last_keyframe:2
[Parsed_blackframe_0 @ 0000000002be5aa0] frame:3 pblack:35 pts:3 t:0.120000 type:I last_keyframe:3
[Parsed_blackframe_0 @ 0000000002be5aa0] frame:4 pblack:35 pts:4 t:0.160000 type:I last_keyframe:4
[Parsed_blackframe_0 @ 0000000002be5aa0] frame:5 pblack:34 pts:5 t:0.200000 type:I last_keyframe:5
[Parsed_blackframe_0 @ 0000000002be5aa0] frame:6 pblack:34 pts:6 t:0.240000 type:I last_keyframe:6
[Parsed_blackframe_0 @ 0000000002be5aa0] frame:7 pblack:34 pts:7 t:0.280000 type:I last_keyframe:7
[Parsed_blackframe_0 @ 0000000002be5aa0] frame:8 pblack:34 pts:8 t:0.320000 type:I last_keyframe:8
[Parsed_blackframe_0 @ 0000000002be5aa0] frame:9 pblack:34 pts:9 t:0.360000 type:I last_keyframe:9
[Parsed_blackframe_0 @ 0000000002be5aa0] frame:10 pblack:34 pts:10 t:0.400000 type:I last_keyframe:10


The pblack value indicates that 35% of the pixels in frame 1 had a luminance value below 92 (out of 255, since I ran it on a video with 8-bit luma). 

With some trial and error, figure out what threshold and pblack values will identify the frames you want to discard/keep.

Extraction:

With those values, use  

ffmpeg -i in.mp4
       -vf "blackframe=amount=0:threshold=X,
            metadata=select:key='lavfi.blackframe.pblack':value=Y:function=less"
       -vsync 0 img%d.jpg


X is the threshold value you calibrated to identify black pixels, and determines the pblack value (out of 100) reported by the blackframe filter. The metadata filter then keeps those frames which have at most Y% of pixels that qualify as black. These frames are then saved as images.