Skip to content

PierreBhs/img-proc-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Image Processor

Web-based application designed for applying and benchmarking image processing algorithms.

The entire application runs locally, served from a localhost address, with a separation between the backend (web serving and image processing) and the frontend (user interface).

image info

Current Features

  • Web Interface: Single-page application for all user interactions.
  • Image Upload: Users can upload local images (PNG, JPG, etc.) for processing.
  • Processing Modes: Supports processing images in both Grayscale and full Color (RGB).
  • Core Algorithms:
    1. Invert: A pointwise operation that inverts image colors.
    2. Gaussian Blur: A convolution operation with an adjustable sigma (blurriness) parameter.
    3. Histogram Equalization: A technique to improve global image contrast.
  • Performance Benchmarking: For each algorithm, the application benchmarks and displays the execution time of multiple implementations:
    • Single-Threaded: A baseline implementation running on a single CPU core.
    • Parallel (Rayon): A multi-threaded implementation that leverages data-parallelism using the rayon crate to utilize all available CPU cores.
    • SIMD (for Gaussian Blur): A version accelerated with SIMD for processing data in chunks.
  • Ranked Results: The frontend displays a ranked list of the benchmark results, showing which implementation was the fastest and by what factor.

How to Build and Run

Prerequisites

  1. Rust Toolchain: Install Rust via rustup from rust-lang.org. The stable toolchain is sufficient.

Step 1: Clone and Build the Project

First, get the source code and build the Rust application in release mode for optimal performance.

cargo build --release

Step 2: Run the Backend Server

All commands should be run from the root directory of the project (rust-image-processor/).

The backend server is the only process you need to run. It handles both the API logic and serving the frontend file

cargo run -p backend --release

Step 3: Use the Application

Open your web browser and navigate to http://127.0.0.1:3000.

About

Image processing in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published