Commit 209d1f4c authored by Diego André Sant'Ana's avatar Diego André Sant'Ana 🤞
Browse files

retirando o import torch Gabor.py

parent e9720d21
......@@ -6,6 +6,44 @@
<list>
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
</list>
</option>
</inspection_tool>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7 (pynovisao)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/pynovisao.iml" filepath="$PROJECT_DIR$/.idea/pynovisao.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 2.7 (pynovisao)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>
\ No newline at end of file
This diff is collapsed.
import os
from os import listdir
from os.path import isfile, join
import cv2
import threading
def extractFrame( file,caminho):
print(caminho)
newDir="../dataset_20180816/dataframe/"+file.replace(".avi","")
print(newDir)
try:
print("Pasta criada:"+newDir)
os.mkdir(newDir)
except OSError:
print("Pasta existente:"+newDir)
print(caminho+"/"+file)
cap = cv2.VideoCapture(caminho)
counterFrame = 0;
while(counterFrame<5000):
print(counterFrame)
ret, img= cap.read()
if(ret == False):
return
cv2.imwrite(newDir+"/"+str(counterFrame)+".png", img)
counterFrame+=1
cap.release()
def exportFrame():
dir='../dataset_20180816/'
listaArquivo = [f for f in listdir(dir) if isfile(join(dir, f))]
print(listaArquivo)
for r, d, f in os.walk(dir):
for file in f:
if ".avi" in file:
t=threading.Thread(target=extractFrame,args=(file, os.path.join(r, file)))
t.start()
exportFrame()
......@@ -22,7 +22,6 @@ from skimage import feature
from skimage.filters import gabor_kernel
from skimage.util import img_as_float
import torch
class GABOR(Extractor):
......
This diff is collapsed.
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