imageimage-processingblur

How to find(figure out) pixelated part of image


I want to find pixelated part of image.
for example,

example image

enter image description here

then, I want to find "AREA" of pixelation by bounding box.
At first, I think that R-CNN might be helpful, but later after that, I think using only traditional method is also possible for this problem such as finding difference of image entropy.. etc..

Are there any method for solving this problem?


Solution

  • Just thinking aloud really... the pixellated areas are regions of solid colour so they will have a very low variance and standard deviation, so, we can try some experiments with ImageMagick which is included in most Linux distros and is available for macOS and Windows.

    If we take your image, and go to greyscale, then calculate the standard deviation in a 7x7 area around each pixel, then invert so that the areas with lowest standard deviation are bright, then normalise to the full black-white range and threshold the very brightest pixels:

    convert p.png -colorspace gray -statistic standarddeviation 7x7  -negate -normalize -threshold 99.99% result.png
    

    enter image description here

    Changing the numbers a bit:

    convert p.png -colorspace gray -statistic standarddeviation 3x3  -negate -normalize -threshold 99.9% result.png
    

    enter image description here