My goal is to filter out images that are likely in the golden ratio; by accident, because I take frames from a video that was taken without the intent of having the images in the golden ratio.
My approach - that I implemented - is
- Iterate through the image, x and y only left half (till width/1.618)
- Iterate through the image, x and y only upper right half
- Iterate through the image, x and y only lower right half
Each time find the average color and determine the euclidian distances of other colors within that area. Create the average distance by using a moving average. Save it in a List.
So I have three values. If one is significantly higher than the two other ones, it is likely to be in the golden ratio(granted, the golden ratio could be flipped and rotated).
So if one field has a high contrast whereas the others have - both - low contrast, I presume it to be in the golden ratio.
Is that a good approach or is there a better one?
Aucun commentaire:
Enregistrer un commentaire