Patches IvolutionTemplate to display images even after install on Ubuntu. Not perfect but better solution still to be found. Also updates MANIFEST.in, tests install and corrects some typos. Discovered that clicking on red cross while processing blocks everything

This commit is contained in:
test
2012-09-01 18:56:22 +02:00
parent fb6bbcf77b
commit c16bed942c
5 changed files with 17 additions and 13 deletions

View File

@@ -1,4 +1,3 @@
recursive-include log *
recursive-include doc/build *
include LICENSE
include README*
@@ -6,5 +5,4 @@ include AUTHORS
include CHANGES
recursive-include ivolution/data/haarcascades *
recursive-include ivolution/data/samples *
recursive-include ivolution/data/ui *
recursive-include ivolution/data/media *

View File

@@ -49,6 +49,7 @@ class FaceParams(object):
cascade_name = training_types.simple_set[training_type] + ".xml"
# Setting up some default parameters for Face Detection
print xml_folder
self.face_cascade = cv.Load(os.path.join(xml_folder, cascade_name))
# To be defined more precisely

View File

@@ -10,6 +10,8 @@
import wx
import wx.xrc
import wx.aui
import os
from .. import get_data # used to load images and files
inputid = 1000
settingsid = 1001
@@ -25,6 +27,7 @@ class IvolutionTemplate ( wx.Frame ):
def __init__( self, parent ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 416,471 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
img_fo = os.path.join("", get_data("media"))
self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
@@ -61,18 +64,18 @@ class IvolutionTemplate ( wx.Frame ):
self.toolbar.SetMinSize( wx.Size( -1,30 ) )
self.toolbar.SetMaxSize( wx.Size( -1,35 ) )
self.toolbar.AddTool( inputid, u"Input", wx.Bitmap( u"ivolution/data/media/folder_add_48.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
self.toolbar.AddTool( inputid, u"Input", wx.Bitmap( os.path.join(img_fo, 'folder_add_48.png'), wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
self.toolbar.AddTool( settingsid, u"Settings", wx.Bitmap( u"ivolution/data/media/spanner_48.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
self.toolbar.AddTool( settingsid, u"Settings", wx.Bitmap( os.path.join(img_fo, 'spanner_48.png'), wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
self.toolbar.AddSeparator()
self.toolbar.AddTool( startid, u"Go!", wx.Bitmap( u"ivolution/data/media/accepted_48.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
self.toolbar.AddTool( startid, u"Go!", wx.Bitmap( os.path.join(img_fo, 'accepted_48.png'), wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
self.toolbar.AddTool( stopid, u"Stop!", wx.Bitmap( u"ivolution/data/media/cancel_48.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
self.toolbar.AddTool( stopid, u"Stop!", wx.Bitmap( os.path.join(img_fo, 'cancel_48.png'), wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
self.toolbar.AddSeparator()

View File

@@ -27,7 +27,7 @@ from ..util.Notifier import Observable
from IvolutionTemplate import IvolutionTemplate
from SettingsWindow import SettingsWindow
#from os.path import expanduser # for real home directory
class IvolutionWindow(IvolutionTemplate, Observer, Observable):
"""
Main Window of the Ivolution application
@@ -53,10 +53,12 @@ class IvolutionWindow(IvolutionTemplate, Observer, Observable):
self.process_running = False
self.facemovie = None
self.inputtextbox.SetLabel(self.in_fo) # sets label to default input folder
self.SetIcon(wx.Icon('ivolution/data/media/vitruve.ico', wx.BITMAP_TYPE_ICO)) # Sets icon
img_fo = os.path.join(self.root_fo, get_data("media"))
self.Show(True) # Finally show the frame
self.inputtextbox.SetLabel(self.in_fo) # sets label to default input folder
self.SetIcon(wx.Icon(os.path.join(img_fo, 'vitruve.ico'), wx.BITMAP_TYPE_ICO)) # Sets icon
self.Show(True) # Finally shows the frame
def get_default_parameters(self):
"""
@@ -70,8 +72,8 @@ class IvolutionWindow(IvolutionTemplate, Observer, Observable):
self.speed = 1 # Speed of the movie
self.param = "frontal_face" # type of face profile to be searched for
self.out_fo = os.path.join(self.home_dir, "Videos/") # default output folder
self.in_fo = os.path.join(self.home_dir, "Pictures/") # default input folder
self.out_fo = os.path.join(self.home_dir, "Videos") # default output folder
self.in_fo = os.path.join(self.home_dir, "Pictures") # default input folder
# Overriding event handling methods
def on_settings(self, event):

View File

@@ -130,7 +130,7 @@ class SettingsTemplate ( wx.Frame ):
modeRadioBoxChoices = [ u"Conservative", u"Crop" ]
self.modeRadioBox = wx.RadioBox( self.advancedPage, wx.ID_ANY, u"Available modes", wx.DefaultPosition, wx.DefaultSize, modeRadioBoxChoices, 1, wx.RA_SPECIFY_ROWS )
self.modeRadioBox.SetSelection( 0 )
self.modeRadioBox.SetSelection( 1 )
gSizer7.Add( self.modeRadioBox, 0, wx.ALL, 5 )
modeSizer.Add( gSizer7, 1, wx.EXPAND, 5 )