def refZoom(): #print("Crossreferencing %s images" % screenshot) ref(outFolder, otherInputs[0], otherInputs[1], otherInputs[2], basepath, **kwargs) #print("downsampling %s images" % screenshot) zoom(outFolder, otherInputs[0], otherInputs[1], otherInputs[2], basepath, **kwargs)
def refZoom(): needsThumbnail = index + 1 == len(saveGames) #print("Crossreferencing %s images" % screenshot) ref(outFolder, timestamp, surface, daytime, args.basepath, args) #print("downsampling %s images" % screenshot) zoom(outFolder, timestamp, surface, daytime, args.basepath, needsThumbnail, args) if jindex == len(latest) - 1: print("zooming renderboxes", timestamp) zoomRenderboxes(daytimeSurfaces, workfolder, timestamp, Path(args.basepath, firstOutFolder, "Images"), args)
def refZoom(): needsThumbnail = index + 1 == len(savenames) #print("Crossreferencing %s images" % screenshot) ref(outFolder, otherInputs[0], otherInputs[1], otherInputs[2], basepath, **kwargs) #print("downsampling %s images" % screenshot) zoom(outFolder, otherInputs[0], otherInputs[1], otherInputs[2], basepath, needsThumbnail, **kwargs) if jindex == len(latest) - 1: print("zooming renderboxes", timestamp) zoomRenderboxes( daytimeSurfaces, workfolder, timestamp, os.path.join(basepath, firstOutFolder, "Images"), **kwargs)
def magnify_touch( self, touch ): # Clear the magnifier. clear_magnifier( self ) # Store the image of the magnifier lens to the path 'magnifier_lens.png'. self.lens_image = str( touch.time_update ) + '.png' # Take a screenshot of this widget and the tree rooted at this widget. self.export_to_png( self.lens_image ) # Magnify (zoom and crop) the screenshot centered at touch.pos. zoom_scale = 10 crop_radius = 512 magnifier_image = crop( zoom( self.lens_image, world_to_photo( self.pos, touch.pos ), zoom_scale ), crop_radius ) magnifier_image.save( self.lens_image ) # Render the magnification photo and a magnifier outline to self.canvas. d = 128 + 64 OFFSET = d/2 + 10 self.lens = ( Color( 1,1,1,1 ), Ellipse( texture=load_texture( self.lens_image ), pos=(touch.x-d/2, touch.y-d/2 + OFFSET), size=(d,d) ), Line( circle=(touch.x, touch.y + OFFSET, d/2) ) ) for instr in self.lens: self.canvas.after.add( instr )
def upscaleby2(src): return zoom(src, 2, order=5, mode='wrap') newshape = [ s * 2 for s in src.shape] x = numpy.array(numpy.unravel_index(range(len(src.flat) * 8), newshape)).T xs = numpy.array(numpy.unravel_index(range(len(src.flat)), src.shape)).T return trilinearinterp(x * 0.5, xs, src.ravel(), dims=src.shape, mode='wrap').reshape(newshape)
# If any change is detected, let's then zoom in the transient areas print( "Zooming in the detected transient with window-second window..." ) nzoom = 0 window = 300 #in unit of second if len(ta) > 0: interval = window / resolution # set window size nzoom, zooms, dp, zoom_amplitude, zoom_start_time = zoom( reduced_time, smooth_signal, x, signal, sampling_freq, tai, taf, ta, amp, interval, resolution, zooms, save_dir, show=False, save=False) nplot = np.append(nplot, nzoom) dp_list += dp.tolist() zoom_amp_list += zoom_amplitude.tolist() zoom_start_list += zoom_start_time # record the computation time