Go to the documentation of this file.00001
00002
00003 from scipy.misc import imread, imresize, imsave
00004 import os, sys
00005 import subprocess
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 def rec_obj(image_path, image_folder):
00031 img = imread(image_path)
00032 y_size = img.shape[0]/2
00033 x_size = img.shape[1]/2
00034 window_size = 600
00035
00036 for i in range(0,2):
00037 bin = img[:, i*x_size:(x_size + (i*x_size)),:]
00038 imsave(image_folder + "bin.jpg", bin)
00039
00040
00041 if __name__ == '__main__':
00042
00043 path = '/home/meerahahn/Documents/classes/Mini-Projects/obj_rec/robot_things/'
00044
00045 rec_obj('/home/meerahahn/Documents/classes/Mini-Projects/obj_rec/robot_things/frame0001.jpg', path)
00046