Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
DelphiShowcase

FotoMorsaicos: A Magnificent Mosaic Generator Is Created With Delphi

fotomorsaicosdev2

FotoMorsaicos is a Windows application built in Delphi that can generate a photomosaic from a given image. According to the developer, “The software has three subsystems, a photomosaic generator, a final image (jpg) generator, and finally a program to build an image library index. My first approach to the subject of photomosaics was the movie The Truman Show, which had a poster showing the face of the protagonist (Jim Carrey) made with small photos, all of them taken from the film itself. It was clear that this work had been done with some program and I soon discovered that Robert Silvers was the author of this image. How did he do it? For some time I thought about the algorithm behind the photomosaics. I finally figured out what to do and got down to business. The basic idea is that a photomosaic program makes a mosaic filter but instead of using solid colors, it uses photographs whose average color is close to the solid color that should go in each region of the mosaic. So I wrote a program in Delphi that made a basic photomosaic. It used a collection of about 6,000 high definition photographs. (Actually in archive.org the reader can find lots of public domain collections of high resolutions photographs, for using with the software). However, over time I realized that a good photomosaic program should contemplate more features: use different image libraries, be able to tell the system if I want there to be repeated regions or not, that is, if the same photo should be put or you have to make more variety of them. Likewise, the idea of merging the original image in a percentage with the generated mosaic “softened” the final result, making it visually much better. The original development was published in the now defunct Dr Dobbs Journal (https://www.drdobbs.com/understanding-photomosaics/184404848). A researcher, Thiadmer Riemersma, published a paper studying the way humans see colors (“Color metric.” CompuPhase. May 26, 2008. http://www.compuphase.com/cmetric.htm). I used his approach and the software improved more visually. It was actually T. Riemersma himself who wrote to me about it after reading my article. Today the software allows: 1.Use diverse collections of images (up to 100,000 photographs); 2. Blending between the original photo and the generated mosaic so that both merge in a certain percentage; 3. Allow to repeat consecutive images or not. A photomosaic with non-repeating images is much more visually acceptable. At https://sourceforge.net/projects/fotomorsaicos/ you will find all the source code and complete documentation of the project, written entirely in Delphi and publicly released on Delphi’s 26th birthday.”

Screenshot Gallery

fotomorsaicos1

fotomorsaicos2

fotomorsaicos3

fotomorsaicos4

fotomorsaicos5

fotomorsaicos6

david i photomosaic 6246956

fotomorsaicosdev1

Submit your own showcase app to the Delphi 26th Birthday Showcase Challenge!

See What's New in 12.2 Athens See What's New in 12.2 Athens Dev Days of Summer 2-24

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES