Sort image files based on luminance/brightness
<p>I have taken one of my photo and applied 30 different artist patterns through Neural Art (deepart.io). This step generated 30 different photos. I have sliced each photo into 30 pieces horizontally. Now I want to pick each slice based on the increasing luminance/brightness. How can I do it python or imagemagick?</p>