def main(): import scikits.image.io as io import sys if len(sys.argv) != 2: print "Usage: scivi <image-file>" sys.exit(-1) io.use_plugin('qt') io.imshow(io.imread(sys.argv[1]), fancy=True) io.show()
def main(): import scikits.image.io as io import sys if len(sys.argv) != 2: print "Usage: scivi <image-file>" sys.exit(-1) io.use_plugin("qt") io.imshow(io.imread(sys.argv[1]), fancy=True) io.show()
def main(): import scikits.image.io as io import sys if len(sys.argv) < 2: print "Usage: scivi <image-file> [<flip-file>]" sys.exit(-1) io.use_plugin('qt2') im = io.imread(sys.argv[1]) flip = None if len(sys.argv) > 2: flip = io.imread(sys.argv[2]) io.imshow(im, flip=flip, fancy=True) io.show()
def test_show(self): io.imshow([1, 2, 3], plugin_arg=(1, 2), plugin="test")
def test_show(self): io.imshow([1, 2, 3], plugin_arg=(1, 2), plugin='test')
if th <= np.pi/2 and th > 0: x1 = bn/np.cos(th); y1 = 0; x2 = 0; y2 = bn/np.sin(th); elif th <= 0 and th > -np.pi/2: x1 = bn/np.cos(th); y1 = 0; x2 = x1 + np.abs(y_max*np.tan(th)); y2 = y_max; else: th = th - np.pi/2; x1 = 0; y1 = bn/np.cos(th); x2 = (y_max-y1)/np.tan(th); y2 = y_max; pts.append([(x1,y1),(x2,y2)]); if img: img_pil = Image.fromarray(img); img_draw = ImageDraw.Draw(pil_img); y_max,x_max = img.shape; for o_o in range(len(pts)): img_draw.line(o_o,width=2,fill(255,0,0)); io.imshow(np.asarray(pil_img)); io.show();
import os import scikits.image as si import scikits.image.io as sio sio.use_plugin('matplotlib', 'imshow') sio.use_plugin('freeimage', 'imread') img = sio.imread(os.path.join(si.data_dir, 'color.png')) sio.imshow(img) sio.show()