
The resulting mosaic of course heavily depends on the choice of the lego art set that you have available. The algorithm will only fill the object and can better distribute the available colors. You can then use "Ignore black regions" to exclude these background regions from processing. If background takes up a lot of space in your input image, consider replacing it with black (RGB 0,0,0) in an external program. A less saturated image will favor brightness differences instead of actual color differences. Sometimes it helps to desaturate the image to get better results. Brightness and contrast can be used to shift the image into a similar brightness scale as the available colors. Use the hue slider to adjust the overall color of your image and bring it closer to the available colors in the lego art set. Play with the color sliders and see how it affects the resulting mosaic. Therefore, you can replace the background with any plain color in an external image processing program. A homogenous background can be beneficial. It is worth trying a few different images and different zooms/crops of your subject. Good contrast and a similar color distribution as the parts in lego art set of choice helps to produce good results. The most critical part for a good result is the input image itself. This "brute force" calculation may take a while to finish, especially for larger mosaics. The swapping continues until no improvements can be made. In the second phase, individual parts are swapped with each other if this leads to a better joined color match.

If the best color is not available due to part limits, the next best color is chosen. First, the pixels are filled one-by-one with the best available color. The actual calculation of the mosaic happens in two phases. I have been experimenting with different color spaces, however, found that RGB works just fine. A color distance is calculated as the squared distance in RGB space. Next, the color of each individual pixel is compared to all available colors within the selected brick sets. A bit of random noise is added to the raw color values to break color ties later on. The first step in creating lego art from custom images, is resizing to the final mosaic size. Fill these regions with remaining bricks. In case the "Ignore black regions" option is chosen, ignored regions in the mosiac are labeled with "?" in the instruction.
Lego photo converter pdf#
When the calculation of the mosaic finished you can access your pdf with the "Download instructions (pdf)" button. The website can generate a pdf with building instructions for you. The progress of the computation is indicated. The calculation takes a few seconds to finish. The button is only active if the number of available parts in step 3 is larger than the number of required parts (step 2). Use the "Calculate" button to start the calculation of the mosaic. The number of available parts is displayed according to the user input. The website internally stores how many parts (and of which color) are present in the sets. Use the input elements to adjust how many of each set you would like to use for the mosaic.

Select the lego art sets for the mosaicĪvailable lego art sets are displayed in step 3. The number of parts required to build the mosaic is displayed below. You can choose any arbitrary mosaic size.

From two sets you can build a 64 x 64 mosaic. A lego art mosaic has a size of 48 x 48 studs.

Use the inputs to select the size of the mosaic. If your image has a black background (RGB=0,0,0), you can use the "Ignore black regions" option to focus the algorithm on the foreground object. Furthermore, sliders below the preview image allow for (optional) modifications of brightness, contrast, and color. You can choose to squeeze the image into the final mosaic size, or crop the middle region and keep the aspect ratio. Nothing will be uploaded! After opening the image, you will see a preview below the file input. The image will be processed entirely in the browser. Use the file selection tool to choose a file from your hard drive (or take a photo with your camera, if accessed from a phone).
