Answer the question
In order to leave comments, you need to log in
Algorithm for finding monochromatic places in a picture?
I'm making an application to overlay text on an image.
I need to determine the places where I can overlay text.
At the moment, I can only determine if nearby pixels are similar, using this - https://stackoverflow.com/questions/1725505/findin...
Can someone advise in which direction to move? What algorithms to look at?
Thank you.
Answer the question
In order to leave comments, you need to log in
As already said on SO. The difference between a set of pixels is RMSE. It is also the Minkowski distance with p=2. You can p (degrees) by others. This will change the "sensitivity" to differences. Experiment.
https://ru.wikipedia.org/wiki/%D0%A0%D0%B0%D1%81%D...
width = 0
height = 0
Take image[i][j] pixel, compare with those around the edges image[i][j + 1] image[i][j - 1] if they are similar, then add to heigth = heigth + n, the number of pixels that are similar around. Then you repeat the same for these same pixels that are similar, if there is where to go, you add again.
When widthXheigth = appropriate for the text size, then you've found the right place.
In general, I think something in this direction is needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question