The image command creates image objects from files or data.
img:=image("/usr/local/share/giac/doc/logo.png") |
|
The command lines below create a simple noisy grayscale image with n× n pixels.
n:=200:; p:=(j,k)->round(max(0,min(255,1000*((j-n/2)^2+(k-n/2)^2)/n^2+randnorm(0,10)))):; data:=matrix(n,n,p):; img:=image(1,data) |
|
display(inv(img)) |
We are displaying the negative image (inv is applied) to have an impression of a square-shaped picture.