Jump to content


Img2Img hider


11 replies to this topic

#1 tuohirv

    Member

  • Members
  • PipPip
  • 33 posts

Posted 12 May 2010 - 02:00 PM

Posted Image


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?

#2 tobeythorn

    Valued Member

  • Members
  • PipPipPip
  • 189 posts

Posted 12 May 2010 - 02:24 PM

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.

#3 imerso

    Senior Member

  • Members
  • PipPipPipPip
  • 431 posts
  • LocationBrasil

Posted 12 May 2010 - 03:29 PM

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.

#4 TheNut

    Senior Member

  • Moderators
  • 1699 posts
  • LocationThornhill, ON

Posted 12 May 2010 - 06:48 PM

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?
http://www.nutty.ca - Being a nut has its advantages.

#5 tuohirv

    Member

  • Members
  • PipPip
  • 33 posts

Posted 13 May 2010 - 06:21 AM

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

#6 Nema

    New Member

  • Members
  • PipPip
  • 26 posts

Posted 14 May 2010 - 06:42 AM

nice & innovative! respect!
let's do business

#7 tuohirv

    Member

  • Members
  • PipPip
  • 33 posts

Posted 14 May 2010 - 07:20 AM

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 ;)

#8 tuohirv

    Member

  • Members
  • PipPip
  • 33 posts

Posted 16 May 2010 - 03:44 PM

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.co...s/50234138@N03/

Anyone has any ideas what imagehosting service i should use?

#9 tuohirv

    Member

  • Members
  • PipPip
  • 33 posts

Posted 19 May 2010 - 07:00 AM

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.



You should use 720p-resolution when watching..

#10 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2722 posts

Posted 19 May 2010 - 09:03 AM

its real spinny man, its like im seeing things. :)
this is the kinda thing i like to code for fun!
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#11 tuohirv

    Member

  • Members
  • PipPip
  • 33 posts

Posted 19 May 2010 - 09:08 AM

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! ;)

#12 roel

    Senior Member

  • Members
  • PipPipPipPip
  • 698 posts

Posted 16 July 2010 - 12:05 PM

I just saw this video:
That isn't you, is it?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users