Changes

Jump to: navigation, search

DPS921/ASCII

13 bytes added, 23:09, 11 December 2018
Group : NoName
=Group : NoNamePixels2=
===Team Members===
# [mailto:kyuriy@myseneca.ca?subject=DPS921 Alex]
[[File: chunk.png|150px]]
Once we have a single value we need to map its luminosity to a character we are going to replace it widthwith. The character templates are small images we have in our project folder (Pound.png, AT.png W.png etc.) These are small images 7 by 11 pixels only, and we read all images into 2D array. The dimensions of our character template determines the size of the chunk. We have experimented with different size templates and found that smaller font to be preferable. Once we know which character we want to print we will copy, pixel by pixel from our template into output array of unassigned chars of the same length as our original frame.
[[File:charTmpl.png|150px]]
Iterating over character template forms the second pair of inner-most loops. The pseudocode to do this is below. And while it may look like we have 4 nested loops the runtime complexity of our algorithm is O(N) since we are iterating over each pixel in an image exactly once. Because we are able to break down work into chunks, their processing can be done independently of each other. This problem can be classified as '''Embarrassingly parallel''' problem, however I prefer a new proposed term a '''perfectly parallel''' problem. (Source: [[Wikipediahttps://en.wikipedia.org/wiki/Embarrassingly_parallel|Wiki]])
[[File:codePxl.png|300px]]
120
edits

Navigation menu