Go to the documentation of this file.00001
00002 import roslib; roslib.load_manifest('laser_camera_segmentation')
00003
00004 print 'TEST script!!!'
00005
00006
00007 try:
00008 import psyco
00009 psyco.full()
00010 print "Psyco loaded"
00011 except ImportError:
00012 pass
00013
00014 import laser_camera_segmentation.processor as processor
00015 import laser_camera_segmentation.configuration as configuration
00016
00017 import time
00018
00019 def getTime():
00020 return '['+time.strftime("%H:%M:%S", time.localtime())+']'
00021
00022
00023 def generate_train_save():
00024
00025
00026
00027 pc.load_data(id)
00028 print getTime(), 'train_and_save_Classifiers...'
00029 pc.train_and_save_Classifiers()
00030
00031 def print_test():
00032 print getTime(), 'testing:',pc.feature_type,'k=',pc.feature_neighborhood,'r=',pc.feature_radius
00033
00034
00035
00036 print getTime(), 'start'
00037
00038
00039 cfg = configuration.configuration('/home/martin/robot1_data/usr/martin/laser_camera_segmentation/labeling')
00040
00041 pc = processor.processor(cfg)
00042
00043 id = '2009Oct30_162400'
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 labels, testresults = pc.load_classifier_and_test_on_dataset('all_post', id)
00058 print 'testresults', testresults
00059 import numpy as np
00060 print np.shape(labels)
00061 print labels
00062
00063 import sys
00064
00065
00066
00067
00068
00069 print getTime(), 'done'
00070
00071
00072
00073