Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Image processing

Dear all, I have question about manipulating image in Sage. Here is some example.

import pylab img=pylab.imread(DATA+'lena.png')

Img is now array with float elements. But I want to add some shapes on this image like circle, rectangle, polygon etc, but c=Circle, b=Rectangle and a=Polygon are object of some clases so if I want to do something like this show(img+c) or show(img+b) it is not allowed. Another question is: How I can put circle on my position (position is corner of image) because Img is array so I don't know where new row start.

Is there some simple way to do this?

Thank you in advance

click to hide/show revision 2
No.2 Revision

Image processing

Dear all, I have question about manipulating image in Sage. Here is some example.

import pylab
img=pylab.imread(DATA+'lena.png')

img=pylab.imread(DATA+'lena.png')

Img is now array with float elements. But I want to add some shapes on this image like circle, rectangle, polygon etc, but c=Circle, b=Rectangle and a=Polygon are object of some clases so if I want to do something like this show(img+c) or show(img+b) it is not allowed. Another question is: How I can put circle on my position (position is corner of image) because Img is array so I don't know where new row start.

Is there some simple way to do this?

Thank you in advance