What is dithering?

  • Updated

This chapter introduces the basic principles of laser engraving and how to simulate grayscale transitions using dynamic laser power and "Dithering" techniques. It also discusses that LaserPecker Design Space software supports the use of Dithering technology to process images with color transitions.

 

Laser engraving is a processing method that uses a high-density energy laser beam to irradiate the surface of a material, causing it to be instantly heated, melted, vaporized, or ablated, thus achieving the engraving effect. After laser engraving, the background color presented differs from the color of the material surface. This engraving effect is commonly referred to as filled engraving or can be described as a "black-and-white" engraving effect.

动画-8.gif

However, if the image to be engraved itself contains color or grayscale variations, how can we achieve a color transition effect during engraving?

左1.png右1.png

Laser engraving typically cannot directly produce colored engravings, but we can effectively simulate color depth and transition effects using the following two methods:

  • Dynamic Laser Power: The laser power affects the engraving depth. By dynamically adjusting the laser power during the engraving process, the depth of the engraving corresponds to the grayscale values in the image—higher power for darker areas (resulting in deeper engraving) and lower power for lighter areas (resulting in shallower engraving). This creates a natural grayscale transition, similar to mixing black and white pigments in varying proportions to achieve different shades of gray.
Dynamic Laser Power.png

 

  • Dithering: This is a technique used to convert the image into a pixelated pattern, with denser dots in darker areas and sparser dots in lighter areas. Even though only black and white dots are used, it can present rich shading and contrast, creating a visual effect similar to color transitions. Laser engraving can use this technique to simulate a grayscale transition effect.
Dithering.png

 

It is worth noting that the LaserPecker Design Space software supports the use of Dithering to process images with color transitions.

1. The Working Principle of Dithering

This chapter introduces the principles of Dithering technology, common Dithering algorithms, and their applicable scenarios. Then concludes with an overview of the Dithering algorithm used in LaserPecker Design Space and the process of implementing this effect.

 

Dithering is an image processing algorithm that was first applied in the early days of computer graphics display. In the 1980s, many computer screens or printers could only display black and white or a limited range of colors (such as 2, 4, or 16 colors), making it impossible to reproduce the rich colors of real images. Due to the limited number of colors, the image may exhibit noticeable color blocks and banding (known as "color bands"), making it appear unnatural. For example, when a color image is reduced to only black and white, the result would look like the image below.

对比.png

 

To solve this problem, the Dithering technique was developed. It works by arranging dots of varying colors (such as black and white dots) in a regular pattern within the image, creating a "blended color" visual effect when viewed from a certain distance. The core idea of Dithering is to simulate grayscale transitions through the arrangement and density variation of the dots, thus achieving a visual color transition effect. The image below demonstrates how Dithering simulates grayscale transitions through changes in dot density.

灰度图.png

Common dithering algorithms include:

 

Ordered
ordered.png
Ordered Dithering is suitable for images with uniform color areas or strong contrast, such as icons, logos, and simple illustrations. Since it produces a regular grid pattern, it is not ideal for images that require delicate transitions or fine details.
Sierra
sierra.png
Sierra Dithering is suitable for images that need to retain image details, especially those with high contrast or grayscale images. It may produce visible noise in images with less fine detail.
Atkinson
Atkinson左.png
Atkinson Dithering is suitable for images that require high contrast and simple structures, particularly simple graphics, black-and-white illustrations, or high-contrast images. It is not well-suited for processing complex color transitions or images with rich details.
Jarvis
Jarvis右.png
Jarvis Dithering is suitable for images that require high color fidelity and detail preservation, especially grayscale images or those with noticeable color transitions. It creates a more natural effect in the gradient areas of the image without producing obvious grid patterns.
Stucki
Stucki左.png
Stucki Dithering helps preserve image details, reduces blurriness, and restores grayscale transitions more naturally. It avoids color blocks or abrupt changes, making it particularly suitable for processing fine images like photographs, with smoother and more realistic engraving results.
Floyd
Floyd右.png
Floyd Dithering works well for images with simpler details or less complex transitions, but it is not ideal for images with a lot of intricate details, as it may create a subtle wavy pattern on the image.

 

In LaserPecker Design Space, the Dithering effect utilizes the Stucki algorithm, which was specifically chosen for its versatility and reliability across a wide range of image types. The software first converts the color image into a grayscale image. The converted image consists of pixels with different grayscale values, including the darkest black, the brightest white, and various shades in between. The Stucki dithering algorithm ensures that the grayscale transitions are smooth and consistent, making it ideal for a broad spectrum of images.

The reason Stucki is preferred over other dithering algorithms is its ability to produce high-quality results for both simple and highly detailed images. Whether the design is a simple graphic or a finely detailed portrait, Stucki dithering provides excellent visual consistency and depth.

original和graysale对比.png

Then, using the Stucki algorithm, the image is transformed into one composed solely of black and white dots.

graysale和stucki对比.png

2. What Images are Suitable for Dithering

This chapter introduces two common types of images: Bitmap and Vector graphics. It advises that Dithering effects are suitable for bitmaps with rich color or grayscale levels, and also clarifies why black-and-white effects are more appropriate than Dithering for black-and-white images or images with simpler color contrasts.

 

After understanding the basic principles of the Dithering mode, the next step is to introduce two common types of images: Bitmaps and Vector images.

  • Bitmaps, also known as raster images, are made up of many individual "pixels", with each pixel representing the color of a specific position in the image. Common bitmap formats include JPG, PNG, and BMP. The LDS PC version supports importing JPG, PNG, and BMP formats, while the mobile version supports importing JPG and PNG formats.
  • Vector images represent images using geometric shapes (such as lines, curves, circles, rectangles, etc.). These images use mathematical formulas (such as coordinates, angles, curvature, etc.) to describe the shapes, meaning they can be scaled up or down without losing image quality or detail. Common vector formats include SVG, AI, and EPS. Both the LDS PC and mobile versions support importing SVG vector images.
pixel和vector对比.png

Normally, the Dithering effect is suitable for bitmap images with color or grayscale transitions.

狗狗左.png狗狗右.png

A black-and-white image is also a type of bitmap, where each pixel only contains either black or white. If the imported image is a black-and-white image, it is recommended to select the Black and White effect to simplify the engraving process and improve efficiency.

However, if Dithering is selected, the software will perform more complex processing, and the engraving will take longer. (In the below screenshot, Fill represents Black and White effect and Picture represents Dithering effect. )

填充狗狗.png图片狗狗.png

If the image only contains two or three colors with high contrast between adjacent colors, the Black and White effect is also a good choice. This is suitable for scenarios such as simple logos, cartoon images, or line drawings.

 

彩黑小人.png
彩线条小人.png

3. How to Use Dithering Effect in LDS

This chapter explains how to use the Dithering effect in LDS and details the parameter adjustment options provided by the software. Particularly when working with dark materials, the Invert Color function can make the engraving results closer to the original image.

 

  • Importing an Image: Using the PC version as an example, when you import JPG, PNG, or BMP format images, the software will automatically set the image effect to Dithering.
导入图片.png
  • Switching Image Effects: For imported images, you can adjust their image effects within the software, switching from the default Dithering effect to other effects.
切换图片效果.gif
  • Contrast: Adjust the difference between light and dark areas of the image. Increasing contrast will make the bright areas brighter and the dark areas darker, enhancing the sharpness of the image.
Contrast.gif
  • Brightness: Adjust the overall lightness or darkness of the image. Increasing brightness will lighten the entire image, while decreasing it will darken the image.
brightness.gif
  • Invert Color: This function inverts the colors of the image, which is useful for engraving on darker materials or achieving special visual effects.
invert color.gif

 

For materials with a darker surface color, the color itself already corresponds to the shadow areas in the image. However, during the engraving process, the darker parts of the image will have denser engraving dots. If the material becomes lighter after engraving, this can result in the opposite effect. By inverting the colors, the engraving points in the darker areas become more sparse, allowing more of the material's original color to be preserved and aligning better with the shadow areas of the image.

Original picture:

原图.png

Engraving results in darker material:

结果.png

For black aluminum cards, inverting color is required before starting the engraving. The following image shows the engraving result, with LP4 1064nm, 4K resolution, 5 power, and 3 depth.

小女孩1.png

For corrugated paper, inverting color is not necessary. The following image shows the engraving result, with LP4 450nm, 2K resolution, 6 power, and 1 depth.

小女孩2.png

4. Summary

Dithering is a commonly used image processing technique that simulates color transitions within a limited color range using dot patterns, creating a richer range of light and dark layers. This technique is especially suitable for images with color transitions, such as portraits and landscapes. It is also applicable in the field of laser engraving. In LaserPecker Design Space, it is recommended to use the Dithering effect for images with color transitions, as it effectively helps preserve the integrity of engraving details.

Was this article helpful?

2 out of 2 found this helpful