Lasse D Posted May 5, 2011 Posted May 5, 2011 I am creating my own LEGO mosaic software, but development has sadly been dormant for a couple of years. I want to make a program that is better than all others out there, and I think the key to success is through nearly instant preview of the final mosaic when you change settings, and through superior algorithms (methods) for computing the mosaics. So far I have tried to achieve this by using Floyd-Steinberg's algorithm for dithering, while allowing the user to change hue, saturation, brightness, gamma and other controls before applying the dithering algorithm. Here is a screenshot: Santa In order to stretch the limits on how good pictures I could generate, I decided to use the program to make a mosaic of Santa drinking for the side of my coke truck. This is a challenge because of the small size of the picture. This was the best mosaic I could come up with this way: Let's take a closer look: Sure you can kinda make out that it is Santa drinking a coke, and I did use this on my truck. But it isn't really good enough IMO. See if you can find it among the originals: Better Santa I am sure this can be done better, so I used the picture from above and found the color regions which should be separated. This was done manually: When I had the color regions, I could go on and add depth by adding different colors, This is very much like how the mosaic software applies dithering. This is the result: (This is only a minor change in the trailer, so it will not have a separate topic) It i now much easier to see what the picture depicts. What I want to do now is to make this manual process automatic, and a part of how the program makes mosaics. But before I go on, I have to formalize what I did, and I want to ask the community: Do you agree with me that this way of making a mosaic is better than the original? And do you have any other ideas of how to improve mosaic software? Quote
kibosh Posted May 5, 2011 Posted May 5, 2011 [quote name='Lasse D' date='05 May 2011 - 01:36 PM' timestamp='1304617016' post='982428'} It i now much easier to see what the picture depicts. What I want to do now is to make this manual process automatic, and a part of how the program makes mosaics. But before I go on, I have to formalize what I did, and I want to ask the community: Do you agree with me that this way of making a mosaic is better than the original? And do you have any other ideas of how to improve mosaic software? Wow. I am very impressed with your results. Great job. This is probably a stupid question, but can you change the orientation of the bricks that comprise the mosaic? For example, you're images show a 1x1 plate stud up. Can it be switched to a simple 1x1 stud out layout? Quote
Matanuilover Posted May 5, 2011 Posted May 5, 2011 Have you tried the PicToBrick mosaic software? Yeah, and I am using it for a project. but the problem with pictobrick is that is doesn't update dynamically, and, MUCH worse, it doesnt allow you to go back and change the previous settings (for example, once you've chosen the size you want the mosaic to be, and then go and choose all the options, and click apply, then you have a picture with not enough definition, you have to start a whole new mosaic if you want to change the size) Quote
hga09 Posted May 5, 2011 Posted May 5, 2011 Especially if you are working at very low resolution (e.g. few tens of studs in each direction) it may be a good idea to pre-process the image to "cartoonify" it before converting it to mosaic. http://www.photoshopcstutorial.com/photo-effects-tutorials/cartoon-drawing-tutorial.php Quote
Lasse D Posted May 5, 2011 Author Posted May 5, 2011 Wow. I am very impressed with your results. Great job. This is probably a stupid question, but can you change the orientation of the bricks that comprise the mosaic? For example, you're images show a 1x1 plate stud up. Can it be switched to a simple 1x1 stud out layout? Thanks. Yes. That is what the button with the plate seen from the side is for. It can also build using SNOT techniques. Have you tried the PicToBrick mosaic software? My main competitor. This is what I'm trying to beat. Everyone in my lug prefers this software, and the guys who made it are great guys, but I want to see if we can do better. Yeah, and I am using it for a project. but the problem with pictobrick is that is doesn't update dynamically, and, MUCH worse, it doesnt allow you to go back and change the previous settings (for example, once you've chosen the size you want the mosaic to be, and then go and choose all the options, and click apply, then you have a picture with not enough definition, you have to start a whole new mosaic if you want to change the size) All these problems are not present in my software, but they also have a key feature I don't have yet: Printing. Quote
Aanchir Posted May 5, 2011 Posted May 5, 2011 I like that you've got the official LEGO color names for this. That will certainly make it easier to order the parts you need off of Pick-A-Brick. And it looks like the program also allows you to select which colors you use, which makes it a lot easier to limit yourself to PaB parts or parts from your own collection if you so chose. Nevertheless, I'm sure there are some people who would rather use Bricklink color names, especially for older, more obscure colors that they're not likely to find in huge quantities in their own collections or able to order from PaB. Perhaps if you had an option to switch between different naming systems (TLG/Bricklink/Peeron)? For all I know, you might already have this, but I'm just throwing that receommendation out there. The problem with that idea would be that certain Bricklink colors correspond to more than one LEGO color (I'm sure the same problem exists with Peeron and other databases, of course). Thankfully, this mostly applies to metallic colors which people aren't likely to be using in mosaics (and most of which don't exist as 1x1 plates even). But nevertheless, know in advance that a 1:1 color conversion table isn't going to be totally reliable for this sort of thing as long as there are colors like 221 Bright Purple and 22 Medium Reddish Violet (both of which Bricklink identifies as Dark Pink). Overall, though, I'm very impressed with your ambitions for this software, and I hope you continue to find solutions for the problems that remain! Quote
Lasse D Posted May 5, 2011 Author Posted May 5, 2011 The program works with unique color identifiers internally, and I will make sure you can choose whose naming you prefer in the settings. The program downloads the Peeron color list and uses it to connect all the colors. But this is all minor stuff that is easy to do compared to an algorithm that is really good at drawing. I'm also looking into different ways of substituting colors in the pixels in order to have less noise... and I'm open for all ideas. Quote
DLuders Posted May 7, 2011 Posted May 7, 2011 If you need some motivation, see this Brickshelf gallery of this atrractive mosaic "96 studs wide and 320 plates high making it 32000 pieces total." Quote
Lasse D Posted May 8, 2011 Author Posted May 8, 2011 That's a great example of the other thing I want to improve upon: Artifacts. Look at the red spots on her nose, which come from the dithering algorithm trying to compensate for a 'lack of red'. Unfortunately it's over-compensating visually by doing this. I want to create an algorithm that is more gentle when trying to find colors (or pigmentation) to compensate. Quote
DLuders Posted May 11, 2011 Posted May 11, 2011 @ Lasse D: Have you seen Maarten Steurbaut's Mosaic Conversion Program? Quote
Lasse D Posted May 11, 2011 Author Posted May 11, 2011 Yes. He claims to use Floyd-Steinberg as well. He also appears to have some aversion fro gray bricks. Do you see any ideas or problems from his project worth pointed out? Quote
vmln8r Posted May 14, 2011 Posted May 14, 2011 This might just be throwing a spanner into the works, but I think that automating the process that mahjqa describes here would blow the competition out of the water. Quote
mahjqa Posted May 14, 2011 Posted May 14, 2011 (edited) Some examples of said mosaics: However, even though the computer does most of the grunt work, all of these have had a lot of manual tweaking before they're good enough. I hope your program supports some kind of editing after the software has had a go at it. Edited May 14, 2011 by mahjqa Quote
Lasse D Posted May 14, 2011 Author Posted May 14, 2011 Yes. My program can do that too, hence the Coke logo in OP. You can save in .ldr or a variety of bitmap formats if you want to do post editing. I'm looking for better algorithms, so there should be as little post editing as possible. Quote
mahjqa Posted May 14, 2011 Posted May 14, 2011 At some point better algorithms won't help anymore. The human eye and brain have got millions of years of evolution, and there's simply no software that will replicate it anytime soon. If you'd compare the mosaics I make, and the pictures they're made from, you'd see that they're not completely accurate. I've exaggerated edges, lines and fine details so they'd stand out, or completely rework eyes and hands so they work better given the limitations of the bricks. Any idea if you'll include mosaics with multiple orientations? Quote
Lasse D Posted May 16, 2011 Author Posted May 16, 2011 (edited) At some point better algorithms won't help anymore. The human eye and brain have got millions of years of evolution, and there's simply no software that will replicate it anytime soon. If you'd compare the mosaics I make, and the pictures they're made from, you'd see that they're not completely accurate. I've exaggerated edges, lines and fine details so they'd stand out, or completely rework eyes and hands so they work better given the limitations of the bricks. Any idea if you'll include mosaics with multiple orientations? You are probably right, but I don't think algorithms are good enough to say that they can't be improved further. This exaggeration of detail that you do, could perhaps be done automatically to some extend if we can identify the important features. I have seen a presentation where they have done something similarly when editing pictures for different aspect ratios in Disney films. And I already have the multiple direction feature in the software, hence the coke logo in OP. Edited May 16, 2011 by Lasse D Quote
Matanuilover Posted May 21, 2011 Posted May 21, 2011 You are probably right, but I don't think algorithms are good enough to say that they can't be improved further. This exaggeration of detail that you do, could perhaps be done automatically to some extend if we can identify the important features. I have seen a presentation where they have done something similarly when editing pictures for different aspect ratios in Disney films. And I already have the multiple direction feature in the software, hence the coke logo in OP. Hmm...perhaps at the beginning of a mosaic, you could ask the user for the "type" of image, so your program would exagerate black lines if they chose "cartoon," or something along those lines. Quote
Lasse D Posted May 22, 2011 Author Posted May 22, 2011 That is a good place to start. When I get the time, I can try to do this and see what I can learn from that. Perhaps the general case isn't as hard to figure out as it might seem. Quote
legolijntje Posted May 28, 2011 Posted May 28, 2011 I just found a program to make lego mosaics called "Bricksaic". It can be found HERE. I never tried it myself, but it looks good. Maybe you can get some inspiration of it? Quote
Calabar Posted May 28, 2011 Posted May 28, 2011 A feature I'd love would be to create a lxf or ldr file, so that I could have my "virtual" mosaic in 3D. Quote
legolijntje Posted May 28, 2011 Posted May 28, 2011 (edited) A feature I'd love would be to create a lxf or ldr file, so that I could have my "virtual" mosaic in 3D. The program I posted above can do that (a ldr file) Edited May 28, 2011 by legolijntje Quote
DLuders Posted May 28, 2011 Posted May 28, 2011 Is there digital mosaic software that can model 1x1 round plates centered on 2x2 round plates? Behold this BIG Lego mosaic of actress Halle Barry (photographed at the TwinLUG table at SpringCon 2011, and posted on Garth Danielson's Flickr photostream): Quote
Lasse D Posted May 28, 2011 Author Posted May 28, 2011 The program I posted above can do that (a ldr file) It seem like it's just using Floyd-Steinberg like all the other programs. See the posts in this thread. And outputting .ldr files is easy, other programs, such as the one in OP can do that too. >DLuders I think you should ask Garth Danielson's. Doing a mosaic this way gives you only 20% of the resolution that a plates-from-the-side would give. Quote
legolijntje Posted May 29, 2011 Posted May 29, 2011 It seem like it's just using Floyd-Steinberg like all the other programs. See the posts in this thread. And outputting .ldr files is easy, other programs, such as the one in OP can do that too. It has more options for dithering: -Floyd Steinberg -Stucki -Sierra -Jarvis, Judice & Ninke -Stevenson & Arche -Burkes -Nearest color Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.