class simulation: physicsClient = p.connect(p.GUI) p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.setGravity(0, 0, -9.8) planeId = p.loadURDF("plane.urdf") #shapeID = p.createCollisionShape(shapeType=p.GEOM_SPHERE, radius=0.05) handID = p.loadURDF( "Hand-Assem-By-Part-URDF.SLDASM/urdf/Hand-Assem-By-Part-URDF.SLDASM.urdf", basePosition=[0, 0, 0], useFixedBase=True, flags=p.URDF_USE_SELF_COLLISION) #p.createMultiBody(baseMass=1, baseCollisionShapeIndex=shapeID, basePosition=[0.5, 0.5, 0.5]) shapeID = p.loadURDF( "Hand-Assem-By-Part-URDF.SLDASM/urdf/Example Sphere.urdf") for i in range(p.getNumJoints(handID)): p.enableJointForceTorqueSensor(handID, i) resizeObj = resize.Resize(range(3, 20, 2)) while True: p.configureDebugVisualizer(p.COV_ENABLE_SINGLE_STEP_RENDERING) resizeObj.iterate() shapeID = p.loadURDF( "Hand-Assem-By-Part-URDF.SLDASM/urdf/Example Sphere.urdf") jointValues.getJointValues(handID) p.stepSimulation() time.sleep(1. / 240.) p.disconnect()
def new_frame5(): top4 = Toplevel() top4.title("RESIZE THE IMAGE") top4.geometry("500x500") top4.config(bg='cyan') l10 = Label(top4,text = "Enter the location where image file is located : ",font=("TIMES",20)) l11 = Label(top4,text = "Enter the location where you want to store the image : ",font=("TIMES",20)) l12 = Label(top4,text = "Enter the width of the image : ",font=("TIMES",20)) l13 = Label(top4,text = "Enter the height of the image : ",font=("TIMES",20)) l10.grid(column = 0,row = 0,sticky = W,padx = 10, pady = 10) l11.grid(column = 0,row = 1,sticky = W,padx = 10, pady = 10) l12.grid(column = 0,row = 2,sticky = W,padx = 10, pady = 10) l13.grid(column = 0,row = 3,sticky = W,padx = 10, pady = 10) l10.config(bg = 'black',fg = 'yellow') l11.config(bg = 'black',fg = 'yellow') l12.config(bg = 'black',fg = 'yellow') l13.config(bg = 'black',fg = 'yellow') x4 = StringVar() y4 = StringVar() w = IntVar() h = IntVar() #GIVE THE PATH OF IMAGE e10 = ttk.Entry(top4,textvariable = x4) #GIVE PATH TO SAVE THE IMAGE IN DESIRED LOCATION e11 = ttk.Entry(top4,textvariable = y4) #GIVE THE WIDTH TO RESIZE THE IMAGE e12 = ttk.Entry(top4,textvariable = w) #GIVE THE HEIGHT TO RESIZE THE IMAGE e13 = ttk.Entry(top4,textvariable = h) e10.grid(column = 1,row = 0,padx = 10, pady = 10) e11.grid(column = 1,row = 1,padx = 10, pady = 10) e12.grid(column = 1,row = 2,padx = 10, pady = 10) e13.grid(column = 1,row = 3,padx = 10, pady = 10) #CREATING A BUTTON WITH NAME "RESIZE", ON CLICKING THIS BUTTON WILL INVOKE THE FUNCTION WITH NAME "Resize" AND PERFORM RESIZING OPERATION B = ttk.Button(top4, text ="RESIZE",width = 50, command = lambda:rz.Resize(x4.get(),y4.get(),w.get(),h.get())) B.grid(row = 4,column =3,padx = 10, pady = 10)
import resize files = ['cone.scad', 'cylinder.scad', 'ellipse.scad', 'rectangularPrism.scad'] test = resize.Resize(files[1], range(3, 20, 2)) test.iterate() test.iterate() test.iterate() test.iterate() print(test.scad_file)
import configparser import resize import sys from flask import request if __name__ == '__main__': config = configparser.ConfigParser() #configFilePath = r'/home/shreyak/projects/SaralGSTImageProcessing/config/config.ini' configFilePath = sys.argv[1] print(configFilePath) config.read(configFilePath) print(config) print(config['DEFAULT']['output_height']) obj = resize.Resize(config) #obj.resize_simple() new_list = obj.return_img() print("new_list",new_list) for i in new_list: obj.resize_image(i)
#coding=utf-8 import sys sys.path.insert(0, '.') sys.path.insert(0, './pypackages') import pdf2png import resize import img2pdf pdf2png.ToPng() resize.Resize() img2pdf.ToPdf()