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

read of bgr image in GenerateImages.py #287

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion DataCollection/GenerateImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def _decay_value_radically_norm(x, centers, max_value, min_value, dev):
cv2.imwrite(savePath, flip)

# Changing brightness out an image
for num in range (0, 5):
for num in range (0, 6):
gamma = float(decimal.Decimal(random.randrange(10, 1000))/100)
invGamma = 1.0 / gamma
table = np.array([((i / 255.0) ** invGamma) * 255
Expand Down Expand Up @@ -243,6 +243,12 @@ def _decay_value_radically_norm(x, centers, max_value, min_value, dev):
i += 1
cv2.imwrite(savePath, median)

# BGR image
image=cv2.imread(path)
savePath = output + str(i) + ".png"
i += 1
cv2.imwrite(savePath, image)

# Bilateral Filtering
blur = cv2.bilateralFilter(image,9,75,75)
savePath = output + str(i) + ".png"
Expand Down
439 changes: 372 additions & 67 deletions DataCollection/ImageAugmentation.ipynb

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
numpy==1.19.2
matplotlib==3.3.2
numpy==1.22.0
matplotlib==3.6.3
sklearn==0.0
torch==1.6.0
torchvision==0.7.0
opencv-contrib-python==4.3.0.36
opencv-python==4.3.0.36
scikit-image==0.17.2
scikit-learn==0.23.2
scipy==1.5.2
Pillow==7.2.0
pyflakes==2.2.0
torch==1.13.1
torchvision==0.14.1
opencv-contrib-python==4.7.0.68
opencv-python==4.7.0.68
scikit-image==0.19.3
scikit-learn==0.24.2
scipy==1.10.0
Pillow==9.0.1
pyflakes==2.5.0