File Exchange

image thumbnail

Halftoning and dithering

version 1.0 (1.45 KB) by

small code for half toning of gray scale images. please give your feedback about it.



View License

Halftoning using the BAYER's matrix for grayscale images.

Bayers Matrix size can be 2x2,4x4,8x8,16x16


Comments and Ratings (4)


DGM (view profile)

There are vastly simpler ways to do an ordered dither. I like that the coefficient matrix size is parametric, but why calculate all of them first? Why not only calculate the one that's selected?

Also, everything after the user input and matrix generation can be replaced with two lines: replication of the coefficient matrix (and trimming), and then a relational comparison.

Also, cat() doesn't work like that... but that's okay, because the nonsensical RGB image 'out' is never used anyway. /shrug

Pan Ou

Pan Ou (view profile)

Will Reeves

Sean de

Sean de (view profile)

-malware script that begins with clear all; clc
-imreads an image we don't have
-uses four nested for-loops
-doesn't run anyway
-no help/description/h1 line/comments etc.
-function name is misspelled after its perceived function.

This script as written is completely useless.

MATLAB Release
MATLAB 7.7 (R2008b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video