Skip to content
Snippets Groups Projects
Commit 1124e522 authored by Andrews Sobral's avatar Andrews Sobral
Browse files

fixed qt project, and fet.py for python3

parent 7dd1613c
No related branches found
No related tags found
No related merge requests found
etc/ etc/
build-*/
build_*/ build_*/
dataset_*/ dataset_*/
binaries*/ binaries*/
......
...@@ -11,6 +11,10 @@ import os ...@@ -11,6 +11,10 @@ import os
from os import listdir from os import listdir
from os.path import isfile, join from os.path import isfile, join
import sys
if sys.version_info >= (3, 0):
from six.moves import xrange
path_gt = 'GT/' path_gt = 'GT/'
path_fg = 'FG/' path_fg = 'FG/'
path_sc = 'SC/' path_sc = 'SC/'
...@@ -40,7 +44,7 @@ red = [0,0,255] # for FP ...@@ -40,7 +44,7 @@ red = [0,0,255] # for FP
white = [255,255,255] # for TP white = [255,255,255] # for TP
black = [0,0,0] # for TN black = [0,0,0] # for TN
print 'Processing' print('Processing')
k = 1 k = 1
for file_gt, file_fg in zip(files_gt, files_fg): for file_gt, file_fg in zip(files_gt, files_fg):
print(k, file_gt, file_fg) print(k, file_gt, file_fg)
...@@ -80,14 +84,14 @@ Recall = TP / (TP + FN) ...@@ -80,14 +84,14 @@ Recall = TP / (TP + FN)
Precision = TP / (TP + FP) Precision = TP / (TP + FP)
Fscore = 2*Precision*Recall/(Precision+Recall) Fscore = 2*Precision*Recall/(Precision+Recall)
print 'Score:' print('Score:')
print 'TP: ', TP print('TP: ', TP)
print 'FP: ', FP print('FP: ', FP)
print 'TN: ', TN print('TN: ', TN)
print 'FN: ', FN print('FN: ', FN)
print 'Recall: ', Recall print('Recall: ', Recall)
print 'Precision: ', Precision print('Precision: ', Precision)
print 'Fscore: ', Fscore print('Fscore: ', Fscore)
print '' print('')
##################################################################### #####################################################################
...@@ -7,3 +7,4 @@ binaries*/ ...@@ -7,3 +7,4 @@ binaries*/
Makefile* Makefile*
*.exe *.exe
*.dll *.dll
*.pro.user
...@@ -27,6 +27,8 @@ set(CMAKE_AUTOUIC ON) ...@@ -27,6 +27,8 @@ set(CMAKE_AUTOUIC ON)
# Find the Qt5Widgets library # Find the Qt5Widgets library
find_package(Qt5Widgets) find_package(Qt5Widgets)
# To fix the issue: https://stackoverflow.com/questions/38557755/cmake-cant-seem-to-find-needed-qt-cmake-files-even-though-ive-set-cmake-prefix
#find_package(Qt5Widgets CONFIG PATHS C:/Qt/5.11.1/msvc2017_64/lib/cmake NO_DEFAULT_PATH)
if(Qt5Widgets_FOUND) if(Qt5Widgets_FOUND)
message(STATUS "Qt5Widgets status:") message(STATUS "Qt5Widgets status:")
message(STATUS " version: ${Qt5Widgets_VERSION}") message(STATUS " version: ${Qt5Widgets_VERSION}")
......
...@@ -16,8 +16,13 @@ TEMPLATE = app ...@@ -16,8 +16,13 @@ TEMPLATE = app
#LIBS += -LC:/OpenCV3.1.0/build/x64/vc14/lib -lopencv_world310 #LIBS += -LC:/OpenCV3.1.0/build/x64/vc14/lib -lopencv_world310
# For Windows x64 + Visual Studio 2015 + OpenCV 3.2.0 # For Windows x64 + Visual Studio 2015 + OpenCV 3.2.0
INCLUDEPATH += C:/OpenCV3.2.0/build/include #INCLUDEPATH += C:/OpenCV3.2.0/build/include
LIBS += -LC:/OpenCV3.2.0/build/x64/vc14/lib -lopencv_world320 #LIBS += -LC:/OpenCV3.2.0/build/x64/vc14/lib -lopencv_world320
# For Windows x64 + Visual Studio 2017 + OpenCV 3.4.2
INCLUDEPATH += E:/OpenCV3.4.2/build/include
INCLUDEPATH += E:/OpenCV3.4.2/build/include/opencv
LIBS += -LE:/OpenCV3.4.2/build/x64/vc15/lib -lopencv_world342
# For Linux # For Linux
# INCLUDEPATH += /usr/local/include/opencv # INCLUDEPATH += /usr/local/include/opencv
...@@ -124,7 +129,8 @@ SOURCES += bgslibrary_gui.cpp\ ...@@ -124,7 +129,8 @@ SOURCES += bgslibrary_gui.cpp\
../package_bgs/VuMeter.cpp \ ../package_bgs/VuMeter.cpp \
../package_bgs/WeightedMovingMean.cpp \ ../package_bgs/WeightedMovingMean.cpp \
../package_bgs/WeightedMovingVariance.cpp \ ../package_bgs/WeightedMovingVariance.cpp \
../package_bgs/_template_/amber/amber.c ../package_bgs/_template_/amber/amber.c \
../package_bgs/CodeBook.cpp
HEADERS += mainwindow.h \ HEADERS += mainwindow.h \
qt_utils.h \ qt_utils.h \
...@@ -236,7 +242,8 @@ HEADERS += mainwindow.h \ ...@@ -236,7 +242,8 @@ HEADERS += mainwindow.h \
../package_bgs/ViBe.h \ ../package_bgs/ViBe.h \
../package_bgs/VuMeter.h \ ../package_bgs/VuMeter.h \
../package_bgs/WeightedMovingMean.h \ ../package_bgs/WeightedMovingMean.h \
../package_bgs/WeightedMovingVariance.h ../package_bgs/WeightedMovingVariance.h \
../package_bgs/CodeBook.h
FORMS += mainwindow.ui FORMS += mainwindow.ui
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment