Answer the question
In order to leave comments, you need to log in
Algorithm for replacing individual pixels from a graphic image?
Change everything in the image to white except for "gnome".
Interested in the algorithm itself - not the formula.
I did not find anything else, except for examples for opencv and ImageMagic - with ready-made functions (which do not reveal the essence).
Preferably perl GD, or PHP, C++, C .
Answer the question
In order to leave comments, you need to log in
Removing noise on an image using php?
1. You need to find rectangular areas with a continuous contour.
And those areas (that cluster) that will occupy the maximum (by area) size - these will be the letters of the inscription.
2. You can find the maximum number of black pixels that are on one straight line.
Then, find the boundaries of the inscription by determining the period (letter spacing).
1) find an object consisting of touching black pixels
2) find an enclosing frame (X range, Y range)
3) remove small objects (paint white)
There is an Image Processing toolbox in MatLab, the regionprops function .
(it is possible that it is desirable to invert the colors first, since black is usually considered a background)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question