Example #1
0
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()
Example #2
0
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()
Example #3
0
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()
Example #4
0
 def test_show(self):
     io.imshow([1, 2, 3], plugin_arg=(1, 2), plugin="test")
Example #5
0
 def test_show(self):
     io.imshow([1, 2, 3], plugin_arg=(1, 2), plugin='test')
Example #6
0
        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();
Example #7
0
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()