09-22-2024, 08:13 AM
Ok, so the question you are asking is a typical one for computer vision, so maybe you should learn Python (which is very easy if you already have programming experience) and check the openCV library.
With Gimp, I would try this:
With Gimp, I would try this:
- The color selection can use a RGB color but also tint, hue, saturation, lightness, or any of the RGB channels, all with a threshold.
- From a selection you can obtain a path. This will rarely be exactly 4 points in a square, even if the shape is rectangular
- From the path anchors you can determine corners (extremums on X/Y)
- From these 4 corners you can create a selection a bucket-fill a layer
- From the initial path you can obtain a selection and bucket-fill another layer
- You put the top layer in Difference mode and merge the layer. The resulting layer is a map of the differences
- With the histogram function you can have the pixel count of the difference and see how big that is relative to the square