Commit 445c9090 authored by dewmalFernando's avatar dewmalFernando

V1.18

parent 64a584d0
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment