Skip to content

Commit 4ed506d

Browse files
made a neon glow effect functions for opencv
1 parent 6df9575 commit 4ed506d

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
#### Functions for other Libraries may also be added in the future, Currently These libraries are planned to have utility-functions written for them.
88

99
`opencv-python`
10-
`os`
10+
1111

networking/networking.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def download_file(url:str,file_name:str,overwrite_file=False):
3232
overwrite_file: replace the file if a file of the same name exists
3333
3434
"""
35-
3635

3736
if overwrite_file == False:
3837
if basic_functions.file_exists(file_name):
@@ -43,4 +42,9 @@ def download_file(url:str,file_name:str,overwrite_file=False):
4342
urllib.request.urlretrieve(url=url,filename=file_name)
4443

4544
def open_url(url:str):
45+
""" opens a url on the users default webbrowser
46+
Arguments:
47+
url: url to open the site
48+
"""
4649
webbrowser.open(url=url)
50+

opencv/cv_utility.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import cv2
2+
3+
4+
def add_glow_to_image(frame,glow_intensity:float,glow_radius:int):
5+
"""Returns a Frame with glow
6+
7+
Arguments:
8+
frame: a Opencv frame which you want to add a glow to
9+
glow_intensity: The intensity of the glow. Can be a float value
10+
glow_radius: radius of the glow. Must be a Integer
11+
"""
12+
13+
img_blurred = cv2.GaussianBlur(frame, (glow_radius, glow_radius), 1)
14+
img_blended = cv2.addWeighted(frame, 1, img_blurred, glow_intensity, 0)
15+
16+
return img_blended
17+
18+

0 commit comments

Comments
 (0)