Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orb 1 #16

Merged
merged 3 commits into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions Day-Night-Classifier/DayNight_Blue_Thresholds.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
import numpy as np
import matplotlib.pyplot as plt

'''Training and Testing Data
The 92 day/night images are separated into training and testing datasets.

52 of these images are training images, for you to use as you create a classifier.
40 are test images, which will be used to test the accuracy of your classifier.
First, we set some variables to keep track of some where our images are stored'''

'''First, we set some variables to keep track of some where our images are stored:'''
image_dir_training = "day_night_images/training/"
Expand Down Expand Up @@ -70,20 +64,13 @@
print("Label [1 = day, 0 = night]: " + str(selected_label))


'''Feature Extraction
Create a feature that represents the brightness in an image.
We'll be extracting the average brightness using HSV colorspace.
Specifically, we'll use the V channel (a measure of brightness),
add up the pixel values in the V channel, then divide that sum
by the area of the image to get the average Value of the image.

'''
Find the average brightness using the V channel
This function takes in a standardized RGB image and returns
a feature (a single value) that represent the average level of
brightness in the image. We'll use this value to classify
the image as day or night.
'''

# Find the average Value or brightness of an image
def avg_brightness(rgb_image):
# Convert image to HSV
Expand Down
13 changes: 2 additions & 11 deletions Day-Night-Classifier/DayNight_Classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,9 @@
import matplotlib.pyplot as plt

''' 1. Classify day and night images
2. Visualize the misclassified imagess
'''


'''Training and Testing Data
The 92 day/night images are separated into training and testing datasets.

52 of these images are training images, for you to use as you create a classifier.
40 are test images, which will be used to test the accuracy of your classifier.
First, we set some variables to keep track of some where our images are stored'''

2. Visualize the misclassified imagess '''

'''First, we set some variables to keep track of some where our images are stored'''

# Image data directories
image_dir_training = "day_night_images/training/"
Expand Down
2 changes: 1 addition & 1 deletion Day-Night-Classifier/DayNight_HSV_AvgBr.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import matplotlib.pyplot as plt

'''
1. Show HSV channels for one day image'
1. Display HSV channels for one day image'
2. Testing average brightness levels'''


Expand Down
33 changes: 33 additions & 0 deletions Day-Night-Classifier/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

## Training and Testing Data
The 220 day/night images are separated into training and testing datasets.

120 of these images are training images to create a classifier.
100 are test images, which will be used to test the accuracy of classifier.

## Feature Extraction
Create a feature that represents the brightness in an image.
We extract the average brightness using HSV colorspace.
Specifically, we use the V channel (a measure of brightness),
add up the pixel values in the V channel, then divide that sum
by the area of the image to get the average Value of the image.

Find the average brightness using the V channel
This function takes in a standardized RGB image and returns
a feature (a single value) that represent the average level of
brightness in the image. We'll use this value to classify
the image as day or night.

## Day Night Image Classifier
* DayNight_HSV_AbgBr.py
1. Display HSV channels for one day image
2. Testing average brightness levels

* DayNight_Blue_Thresholds.py
1. Day Night Threshold
2. Blue channel Threshold

* DayNaight_Classifier.py
1. Classify day and night images
2. Visualize the misclassified imagess

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.