Hello,
I'm trying to implement in opencv The Diamond Square algorithm, but something is not working. I think I didn't understand exactly the algorithm.
https://en.wikipedia.org/wiki/Diamond-square_algorithm
1. When I initialize first the four corners, they must have the same color ? Or different ones ? In my algorithm they have different colors.
2. Then I calculate the midpoint of the square by averaging the square corners(The diamond step). So the midpoint will have a color...let's say red.
3. After this, the corners from the square step (the third image from the link) will be averaged and the value will be contained by the midpoint. But the midpoint will not be the same for the square and for the diamond ? So the final color will be that one from the square step ? What is the point by performing the diamond step ? I'm very confused to be honestly.
I tried to search on the internet, but I didn't understand from other websites. It would be nice if someone would explain more clearly, what the colors of the pixels would be.
Thank you!