Ask Your Question

Inverse image transform

asked 2018-03-19 13:50:10 -0500

MathMan42 gravatar image

Does Sage have an inverse image transform?

By that, I mean is there a function where, given an image $X$, and function $f$, it generates an image $Y$, such that pixel $p$ of $Y$ is assigned the color of $f(p) \in X$?

Note that for convenience, you can also say what rectangle the input and output image represent. (I.e. you could say that pixels in $Y$ correspond to points in $[-1,1] \times [-1,1]$.

For reference, here is mathematica's version is called ImageTransformation.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-03-21 08:16:31 -0500

slelievre gravatar image

The Python Image Library is shipped by Sage in the form of the PIL package.

Then your question becomes how to do image transformation with PIL.

A quick web search:


where there is a link to:

Using certain functions in PIL might require the presence of a jpeg library in your system, otherwise you might get error messages such as "decoder jpeg not available". See

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-03-19 13:50:10 -0500

Seen: 37 times

Last updated: Mar 21