Skip to content

Instantly share code, notes, and snippets.

View yohann84L's full-sized avatar
🎯
Focusing

Yohann Lereclus yohann84L

🎯
Focusing
View GitHub Profile
Everything you ever wanted to know about alpha blending and more.
When doing alpha channels, few algorithms put in the extra effort for maximum flexibility. This is because there is always a battle between speed, memory and complexity. As we shall see, there are many different ways of doing alpha blending.
By far, the most common form of alpha channel is where you have a semi-transparent image that you want to apply over a static background. The semi-transparent image will contain red, green and blue channels as well as an alpha channel that specifies how transparent each pixel is. Each channel contains a series of values that range from 0 to 255 for 32bit images.
What this means is that an alpha channel of 255 would mean full intensity and an alpha value of 0 would mean that the background would show completely through. Any other value would be some percentage of the image and the inverse percentage of the background. For example, if an alpha channel is at 30%, then you'll see 70% of the background showi
@goodhamgupta
goodhamgupta / yolo_to_voc.py
Last active January 24, 2024 12:05
Convert yolo coordinates to VOC format
# Script to convert yolo annotations to voc format
# Sample format
# <annotation>
# <folder>_image_fashion</folder>
# <filename>brooke-cagle-39574.jpg</filename>
# <size>
# <width>1200</width>
# <height>800</height>
# <depth>3</depth>
for product in PhpStorm WebStorm DataGrip IntelliJIdea CLion PyCharm GoLand RubyMine; do
echo "Resetting evaluation period for $product..."
rm ~/Library/Application\ Support/JetBrains/$product*/eval/*.evaluation.key
rm ~/Library/Application\ Support/JetBrains/$product*/options/other.xml
done
rm ~/Library/Preferences/jetbrains.*