I was a bit sad about the fact that the default theme for wordpress needs different sizes of header images. and no border around them as before in the connections theme. but it looks good and that without big changes.
(and the blog works again, you might have noticed)
I did not want to reprocess all those images manually, to find a part of the image fitting to that size above that seems to be interesting. A way to find maybe the horizon or something interesting had to be found and then some arithmetric has to be done.
Current idea which has produced all those header images currently:
Take the standard deviation for each 10x10pixel square and plot it (entropy would maybe be a good alternative, but seems to be similar in the result and somehow i don’t trust it just on 100 pixel). Sum to each direction (green lines) and then look for the absolute maximum in the derivative of those sums (blue lines). Then you get the position of the white cross and this’ll be the center of the subsequently produced header image. simple, but it works.
The idea would be that the border between areas containing a lot of information (high entropy or here: higher standard deviation of pixels in the pixel cluster) and areas with less informations tend to be interesting parts of the image.
Anyone any better ideas? maybe to prevent suboptimal results like the following?