CoolFace
Apppublic

syubraj/oxygen_level_intensity_mapper

sourceHugging Faceupdated 2y agoView on Hugging Face
3likes
App README

Oxygen Level Heatmap Generator

This Python script processes an image to generate a heatmap representing oxygen levels based on the intensity of the image. The image is divided into a 32x32 grid, and the intensity of each grid cell is calculated, normalized, and mapped to oxygen levels using a provided mapping table.

Features

  • —Divide an image into a 32x32 grid.
  • —Calculate the intensity of each grid cell.
  • —Normalize the intensity values.
  • —Map the normalized intensities to oxygen levels based on a provided table.
  • —Generate and save a heatmap showing the oxygen levels.

Requirements

  • —Python 3.x
  • —NumPy
  • —Pillow
  • —Matplotlib
  • —SciPy

Installation

You can install the required Python libraries using pip:

bash
pip install -r requirements.txt 

Usage

  1. 1.Prepare the image: Place your image file in the Raw_Images directory or any directory of your choice.
  1. 1.Run the script: Update the image_path variable in the script to point to your image file and run the script.
  1. 1.Output: The generated heatmap will be saved in the Heatmap_Images directory with the filename {image_name}_heatmap.jpg.

Run Script

To run the script you can just run following command in terminal;

python
python main.py

Make sure the current working directory shall be the Folder named 'Oxygen-Level-Intensity-Mapper/'