Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-208
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
0
Merge Requests
0
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
2021-208
2021-208
Commits
445c9090
Commit
445c9090
authored
Oct 11, 2021
by
dewmalFernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
V1.18
parent
64a584d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
imageEnhancement/VidToFrames.py
imageEnhancement/VidToFrames.py
+3
-10
No files found.
imageEnhancement/VidToFrames.py
View file @
445c9090
import
os
import
cv2
from
moviepy.video.io.VideoFileClip
import
VideoFileClip
from
imageEnhancement
import
CreateNewFolderForFrames
from
imageEnhancement
import
EnhaceFramesUsingGamma
from
imageEnhancement
import
EnhaceFramesUsingUnsharpMasking
from
imageEnhancement
import
FramesToVid
from
imageEnhancement
import
ContrastEdjustments
def
FrameCapture
(
path
):
...
...
@@ -14,6 +9,7 @@ def FrameCapture(path):
folderName
=
CreateNewFolderForFrames
.
createFolder
()
print
(
"This is the folder name: "
+
folderName
)
# Path to video file
vidObj
=
cv2
.
VideoCapture
(
path
)
...
...
@@ -29,7 +25,6 @@ def FrameCapture(path):
success
,
image
=
vidObj
.
read
()
# Saves the frames with frame-count
# cv2.imwrite("E:\\#ProgrammingWork\\Python\\VideoEnhance\\a\\frame%d.jpg" % count, image)
if
success
==
1
:
cv2
.
imwrite
(
"E:
\\
BACKBONE
\\
image_enhancement
\\
Frames
\\
"
+
folderName
+
"
\\
%
d.jpg"
%
count
,
image
)
...
...
@@ -37,7 +32,6 @@ def FrameCapture(path):
# loading video dsa gfg intro video
clip
=
VideoFileClip
(
path
)
.
subclip
(
0
,
10
)
# clip = VideoFileClip("E:\\#ProgrammingWork\\pyCharm\\imageEnhancement\\vid\\Video3.mp4").subclip(0, 10)
# getting frame rate of the clip
rate
=
clip
.
fps
...
...
@@ -46,7 +40,6 @@ def FrameCapture(path):
print
(
"FPS : "
+
str
(
rate
))
print
(
"folder name in Vid to frame : "
+
folderName
)
# EnhaceFramesUsingGamma.enhanceFrames(folderName, rate)
value
=
EnhaceFramesUsingUnsharpMasking
.
enhanceFrames
(
folderName
,
rate
)
value
=
ContrastEdjustments
.
adjustContrast
(
folderName
,
rate
)
return
value
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