Img2Img hider

316cf5620d41dfc55bf42e879a52f457
0
tuohirv 101 May 12, 2010 at 14:00

10-05-11.jpg

Description
Since I am spending my holiday currently I finally have time for my own tests. Few days ago I got an idea about hiding images inside other images (I thought about some old paintings that I have saw which achieved similar effect) and wrote a software trying to do that. Here is a collection of images from my tests with the software. The images have been cut from MUCH larger original images (the background images must be large to get enough possibilities) but no other hand-manipulation has been made.

Basically I just give the software a background-image and another image which should be hidden. The software seeks through the images and tries to find a best possible position for the image to be blit. The actual blitting uses some interesting techniques as well; it calculates the errors between target/source colors and manipulates the final pixel according to that (lightness, color, local-contrast, etc. )… I’m not sure what this technique is called, maybe it has no name. I just call it “natural blend” :)

What do you think?

11 Replies

Please log in or register to post a reply.

A77e71b962cd6c7c3b885f0488452f1f
0
tobeythorn 101 May 12, 2010 at 14:24

i think that is really cool. in the two middle and the upper right images, the blending is quite natural looking and a bit creepy. good job.

17ba6d8b7ba3b6d82970a7bbba71a6de
0
vrnunes 102 May 12, 2010 at 15:29

The two right upper images are very nicely blended. They have depth and volume, merging perfectly with the environment. Great results, indeed.

The other images could be reproduced in seconds with photoshop.

6837d514b487de395be51432d9cdd078
0
TheNut 179 May 12, 2010 at 18:48

There were a couple games I use to play where you are given a task to find several items within an image. Some of them are so well blended that you could spend minutes trying to find it. Having an algorithm to automate that would be interesting. Do you brute force the possibilities or is there something more intelligent?

316cf5620d41dfc55bf42e879a52f457
0
tuohirv 101 May 13, 2010 at 06:21

Thanks for feedback. I’m currently visiting some relatives and can’t work with my main computer, i don’t know if i can improve the program before weekend… The main function of the program is to find perfect spot for other image to be blended, i understand that once the spot is selected, … any graphic-guy can do the blending better manually. I couldn’t do that myseld ;) … Before i left yesterday, i took some pictures from my neighborhood and used them as a background with improved place-select/blend algorithm.

I managed to upload some fullscale images to bayimg. There you can see the size of the originals (the ones i used for these first images, are even larger).

links:
// cutted

http://bayimg.com/image/gamjfaacj.jpg

http://bayimg.com/image/iamjhaacj.jpg

http://bayimg.com/image/kamjjaacj.jpg

http://bayimg.com/image/kamjoaacj.jpg

// full scale

http://bayimg.com/image/lamjdaacj.jpg

http://bayimg.com/image/lamjfaacj.jpg

http://bayimg.com/image/lamjiaacj.jpg
http://bayimg.com/image/lamjjaacj.jpg’

And TheNut, i indeed use “brute-force” to seek minimum error within the image. However, I use some performance-tricks; the resolution of the image to be hidden determines “size_div”, which is used to downscale both images before the first stage. Typically the small-scale is 10-16 times smaller in both resolution components. This small-scale check determines the area of full-resolution scan which fine-tunes the position for the blit.

When i return to home, i’m planning to add rotation to the image. This gives exponentially more good possibilities to the blit.

Thanks for the feedback again :)

Tuomo

Ce3204dfe3e6e78f35fcf26e6b06ca83
0
Nema 101 May 14, 2010 at 06:42

nice & innovative! respect!

316cf5620d41dfc55bf42e879a52f457
0
tuohirv 101 May 14, 2010 at 07:20

Quick update, .. I finished adding the rotation-support for the system. With few fast tests, looks good. Also, i got to take some dancing pictures with my own copyright and I’m planning to use them as soon as i get back home (this night).

// cutted version

http://bayimg.com/image/jamogaack.jpg

I really have some difficulties programming with my wifes laptop and i will wait until i get to use my own equipment before testing more :)


Btw. Interestingly, about the rotation, it scannes 16 different angles but only with low-resolution-versions. It didn’t slow down the operation nearly as much as i thought it would… Hmmm… maybe scaling wouldnt be bad idea either ;)

316cf5620d41dfc55bf42e879a52f457
0
tuohirv 101 May 16, 2010 at 15:44

Here are some more test with rotation… I’m currently improving the performance (and adding more variables than angle .. ). I got bored uploading the images one by one (for some reason, the bayimg.com’s archive upload didn’t work (returned empty page every time)) so i used flicr for now.

http://www.flickr.com/photos/50234138@N03/

Anyone has any ideas what imagehosting service i should use?

316cf5620d41dfc55bf42e879a52f457
0
tuohirv 101 May 19, 2010 at 07:00

I finally managed to record a video … Oh my there were difficulties trying to get non-standard-resolution OGV to work with youtube :) … Well, it works now… Check it, i think it’s really cool.

http://www.youtube.com/watch?v=fJBYvOj-PNI

You should use 720p-resolution when watching..

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 19, 2010 at 09:03

its real spinny man, its like im seeing things. :)
this is the kinda thing i like to code for fun!

316cf5620d41dfc55bf42e879a52f457
0
tuohirv 101 May 19, 2010 at 09:08

Thanks Rouncer! .. This is the kind of thing i like to do also in my spare-time. Small, compact, minimum additional decencies, results something everyone can understand (not just the programmers) … We should always remember why we are programmers in the first place; for fun. At the beginning, now and forever! ;)

6aa952514ff4e5439df1e9e6d337b864
0
roel 101 Jul 16, 2010 at 12:05

I just saw this video: http://www.youtube.com/watch?v=rvrHa1ZZP2g
That isn’t you, is it?