Plugin to reverse effect of mosaic filter?

Comments and discussions about 8bf plugins which can be use in various applications like Photoshop, Paint Shop Pro or Photo-Paint
Plugin Newbie
Plugin Newbie
Posts: 1
Joined: Mon Sep 22, 2003 3:39 pm
Location: UK

Plugin to reverse effect of mosaic filter?

Postby BrynB » Mon Sep 22, 2003 3:43 pm

Hello all,

I've been sent a picture by a friend that has had a mosaic/pixelation effect
applied to it.
As a personal challenge, I'd like to try and reverse this and surprise them
so I've been looking for a way to do this.
Searching on google, I cam across an article that discussed the issue in a
wider context but it included this tantalising snippet:

When an original picture is covered with a 'grey area', or pixellated, the
software actually uses a mathematical equation to produce the effects.
This means the underlying picture is still not changed, but a layer is added
to it.
If a person knows the software and the algorithm used to mask the picture,
he need only take the published picture, then very easily remove the layer
of pixellation, and extract the original image.
'Unless this mosaic or cover-up has been specially designed, it can be
removed easily,' said an IT expert here. 'You just need the right software.'

So, what I am asking is, does anyone know of a plugin or stand-alone
software that is capable of doing this sort of thing?

Any help or advice would be greatly appreciated.


Plugin Guru
Plugin Guru
Posts: 3344
Joined: Fri Mar 08, 2002 1:00 am
Location: The Plugin Site

Postby HaraldHeim » Thu Sep 25, 2003 2:17 pm

I guess you mean the mosaic filter that covers the image with large uniform colored square blocks. It actually removes image information in a way that is very similar to sizing down photos. You can't add again the image information that was lost.

The only thing you can do is the following:

1. Zoom into the image and see of how many pixels wide or high each block is.

2. Size down the image by that value. E.g. if each block is 4 pixel wide and high, resize to 25%, if it is 8 pixels wide or high, resize to 12.5%. Use the Nearest Neighbor method for doing that.

3. Now you have the original resolution of the image, because each pixel has its unique color value. The size of the blocks has been reduced to one pixel.

4. What you could do now is to size up the image again with the Bicubic method. That won't add the original information again, but will try to estimate some of the original image information. I would only recommend to size it up by 400%, otherwise the image will get too blurry.

I hope this helps.


Postby Guest » Thu Sep 25, 2003 6:53 pm

Thanks for the suggestion.
I tried your instructions and it does improve the look of the picture slightly.
I've also tried a simple Gaussian blur which has largely the same effect with less blockiness retained.

As I've thought about what the mosaic function does to a picture, I was becoming more and more convinced that it ought to be reversible to an extent.
The example picture that I was sent has had a mosaic effect of 10 applied which I assume means 100 pixels (10x10) have been averaged out to one colour shade.
As I know the original picture exists, I know that there is one combination of 100 pixels that will match the original picture exactly.
I know that with a colour palette of millions of colours, the possible combinations for just one of those averaged 'size 10' pixels is huge, but with computers being as powerful as they are these days, I'd have thought that some sort of application of a brute force technique would be feasible, albeit slow. (working on only a small section of a larger image maybe.)

I certainly don't have the skills or knowledge to try and create a program to do this but I found it interesting to think about.

Thanks again,

Plugin Guru
Plugin Guru
Posts: 3344
Joined: Fri Mar 08, 2002 1:00 am
Location: The Plugin Site

Postby HaraldHeim » Thu Sep 25, 2003 10:37 pm

Bryn, if you would come up with a solution for that problem and patent it, you would surely become a multi-millionair!

A lot of people would say that it isn't possible. But if you a human can look at it and reconstruct the image in his mind, why shouldn't a computer be able to do it someday. Of course as computers aren't even as sophsticated as the brain of a fly, it could take quite a while until a computer with the capability of the human brain is invented. Or how about inventing a device that scans your brain and outputs a digital image of the image in your mind :-)?



Postby littlesheba » Wed Oct 01, 2003 1:57 am


Return to “Photoshop-compatible Plugins”

Who is online

Users browsing this forum: No registered users and 4 guests