Halftoning using the BAYER's matrix for grayscale images.
Bayers Matrix size can be 2x2,4x4,8x8,16x16
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
-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.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.