First Create venv:
python -m venv /path/to/new/virtual/environment
This is a project where we are going to prove different methods to process different Hyperespectral images
To activate the venv on windows we should use: .\hipercubo\Scripts\Activate.ps1 (my case)
now run: pip install -r requirements.txt
Once you have this done you are able to run the colab notebooks where you can interact with the hole project.
For documentation I recomend this video: https://www.youtube.com/watch?v=BWIrhgCAae0&t=227s&ab_channel=LearnProgrammingwithJoel
This Python code allows you to load and analyze hypercube data.
Here are the methods used to reduce the noise in the data provided it is in a different folder because it is not necessary for you to use it in order to prove different types of preproccess.
In this file you will find different types of neural networks which are used to classify the different types of materials.
you will find this methods:
Before running the code, ensure that you have the following dependencies installed:
- Python 3.x
- NumPy
- Matplotlib
- Tensorflow
- Clone the repository or download the
hypercube_analysis.py
file. - Install the required dependencies using pip:
pip install numpy matplotlib
-
Import the necessary modules and classes:
import os import sys import matplotlib from matplotlib import pyplot as plt import numpy as np
-
Create an instance of the
Hypercube
class:hipercubo = Hypercube()
-
Load a hypercube file using the
Load()
method:hipercubo.Load("path/to/hypercube.bin")
-
Perform analysis and visualization on the loaded hypercube. Here are some example methods you can use:
PlotDimLine(dim_a_visualizar)
: Plots the values along a specific dimension as a line graph.PlotDimHist(dim_a_visualizar)
: Plots the values along a specific dimension as a histogram.PlotIMG(dim_a_visualizar)
: Displays the image of a given dimension.
Example usage:
hipercubo.PlotDimLine(150) hipercubo.PlotIMG(150)
-
Run the script with the hypercube file as a command-line argument:
python hypercube_analysis.py path/to/hypercube.bin
This project is licensed under the MIT License. See the LICENSE
file for more information.
- This code was developed as part of a hypercube analysis project.
- Thanks to the contributors of NumPy and Matplotlib for their fantastic libraries.