Code Monkey home page Code Monkey logo

biagiocornacchia / parallelized-nearest-neighbor-upscaler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itm-unipi/parallelized-nearest-neighbor-upscaler

0.0 0.0 0.0 45.64 MB

University Project for "Computer Architecture" course (MSc Computer Engineering @ University of Pisa). Implementation of a Parallelized Nearest Neighbor Upscaler using CUDA.

License: Apache License 2.0

C++ 4.56% Python 0.95% C 92.34% Cuda 1.65% Makefile 0.50%

parallelized-nearest-neighbor-upscaler's Introduction

Parallelized Nearest Neighbor Upscaler

canva-logo

The aim of this project is to develop an image upscaler taking advantage of the parallelization capabilities of the modern CPU and GPU. Image upscaling is the process that allows to increase the resolution of an image, trying to minimize the loss in image quality. There are several possible algorithms and the one chosen for the project is the nearest neighbor interpolation. The nearest neighbor is the simplest upscaling method in which each pixel in the upscaled image is assigned the value of its nearest neighbor in the original image.

How to Run

The project consists of three main files:

  • Main: execute multiple upscales on CPU and GPU using different configurations.
  • ProfileMain: setup a profile scenario for Nvidia Nsight Compute through command line arguments.
  • Test: execute a specific configuration through command line arguments.

To compile on linux:

make mode=[debug/release] main=[main/profile/test]

To test the CPU upscaler:

make mode=release main=test
bin/upscaler IMAGE_NAME UPSCALE_FACTOR RESULTS_FILE "cpu" NUMBER_OF_THREADS REPETITIONS [WIDTH] [HEIGHT]

To test the GPU upscaler:

make mode=release main=test
bin/upscaler IMAGE_NAME UPSCALE_FACTOR RESULTS_FILE "gpu" UPSCALER_TYPE THREADS_PER_BLOCK PIXELS_HANDLED_BY_THREAD REPETITIONS [WIDTH] [HEIGHT]

The upscaler type can be:

  • 0: Upscale with Texture Object
  • 1: Upscale with Texture Object Optimized

Authors

parallelized-nearest-neighbor-upscaler's People

Contributors

matteoaba 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.