title: oxygen_level_intensity_mapper
app_file: app.py
sdk: gradio
sdk_version: 4.36.1
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
:
pip install -r requirements.txt
Usage
Prepare the image: Place your image file in the
Raw_Images
directory or any directory of your choice.Run the script: Update the
image_path
variable in the script to point to your image file and run the script.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 main.py
Make sure the current working directory shall be the Folder named 'Oxygen-Level-Intensity-Mapper/'