GithubHelp home page GithubHelp logo

mwarzynski / uw_greymap Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.22 MB

Converting pix map to grey map with assembler.

Makefile 2.27% Assembly 16.85% C 80.89%
assembler pixmap ppm pbm university-of-warsaw

uw_greymap's Introduction

Grey map and assembler

Input image (ppm format). Output image (pgm format).

Description

A picture in the form of a pixel matrix is given. The color of each pixel is stored as 24 bits, 8 bits for each color (RGB). Write the procedure in Assembler which will convert the image into a grayscale using the weighted average.

Because the human eyes differently react to the colors, the coefficients for individual components cannot be the same, it is usually assumed:

  • 77 for red
  • 151 for green
  • 28 for blue

The coefficients sum up to 256.

The arguments of the procedure:

  • address to the matrix
  • matrix sizes: number of rows and columns.

It would be nice to be able to change the value of the color coefficients from the main program.

Additionally

Write the main program (in C) which will load the PPM file and convert it to the appropriate matrix (you can use a library, as long as it does not contain errors ;-)). Then, you should trigger asm procedure. The resulting matrix should be converted back to a PGM file.

uw_greymap's People

Contributors

mwarzynski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.