Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-169
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-169
2022-169
Commits
2c6fc075
Commit
2c6fc075
authored
Oct 10, 2022
by
Heshani H.U
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
1eca9508
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
image_processing.py
image_processing.py
+14
-0
No files found.
image_processing.py
0 → 100644
View file @
2c6fc075
import
numpy
as
np
import
cv2
minValue
=
70
def
func
(
path
):
frame
=
cv2
.
imread
(
path
)
gray
=
cv2
.
cvtColor
(
frame
,
cv2
.
COLOR_BGR2GRAY
)
blur
=
cv2
.
GaussianBlur
(
gray
,(
5
,
5
),
2
)
th3
=
cv2
.
adaptiveThreshold
(
blur
,
255
,
cv2
.
ADAPTIVE_THRESH_GAUSSIAN_C
,
cv2
.
THRESH_BINARY_INV
,
11
,
2
)
ret
,
res
=
cv2
.
threshold
(
th3
,
minValue
,
255
,
cv2
.
THRESH_BINARY_INV
+
cv2
.
THRESH_OTSU
)
return
res
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment