The script `extract_features.py` extracts the RGB values from an example image ([`figures/examples_from_dataset/banana.jpg`](../figures/examples_from_dataset/banana.jpg)).
### 💻 Usage
### 💻 Usage
```bash
```bash
python extract_features.py
python extract_features.py
```
```
### 📊 Outputs
### 📊 Outputs
This will extract the RGB values from the image [`figures/examples_from_dataset/banana.jpg`](../figures/examples_from_dataset/banana.jpg) and create the following files:
Each run of the script will create the following files:
-`features-banana.txt` :arrow_right: contains the features (RGB values) of the image
-`features-banana.txt` :arrow_right: contains the features (RGB values) of the image
-`features-banana-flattened.txt` :arrow_right: contains the flattened features (RGB values) of the image
-`features-banana-flattened.txt` :arrow_right: contains the flattened features (RGB values) of the image
-`features-banana-resized.txt`:arrow_right: contains the features (RGB values) of the banana image after resizing it to 50x50 pixels
-`features-banana-resized.txt`:arrow_right: contains the features (RGB values) of the banana image after resizing it to 50x50 pixels
...
@@ -38,13 +41,15 @@ This will extract the RGB values from the image [`figures/examples_from_dataset/
...
@@ -38,13 +41,15 @@ This will extract the RGB values from the image [`figures/examples_from_dataset/
## `apply_filters.py`
## `apply_filters.py`
The script `apply_filters.py` applies several filters to an example image ([`figures/examples_from_dataset/banana.jpg`](../figures/examples_from_dataset/banana.jpg)).
### 💻 Usage
### 💻 Usage
```bash
```bash
python apply_filters.py
python apply_filters.py
```
```
### 📊 Outputs
### 📊 Outputs
This will apply the following filters to the image [`figures/examples_from_dataset/banana.jpg`](../figures/examples_from_dataset/banana.jpg) and create the following files in the folder [`figures/examples_from_dataset/`](../figures/examples_from_dataset/):
Each run of the script will create the following files in the folder [`figures/examples_from_dataset/`](../figures/examples_from_dataset/):
-`banana-edges.jpg` :arrow_right: contains the image with applied Canny edge detection filter
-`banana-edges.jpg` :arrow_right: contains the image with applied Canny edge detection filter
-`baanan-sobel.jpg` :arrow_right: contains the image with applied Sobel filter
-`baanan-sobel.jpg` :arrow_right: contains the image with applied Sobel filter