Wand stereogram() function in Python
Stereogram Effect is the effect that generates image inside image. A stereogram is a picture within a picture. Hidden inside each image is an object which appears in 3D when viewed correctly.
stereogram() function takes two Image instances (one for each eye), and creates a 3d image by separating the Red & Cyan.
Syntax :
wand.image.stereogram(left, right)
Parameters :
Parameter |
Input Type |
Description |
left |
wand.image.Image() |
Left-eye image. |
right |
wand.image.Image() |
Right-eye image. |
Source Image:
Example 1:
from wand.image import Image
with Image(filename = "koala.jpeg" ) as leftimg:
with Image(filename = "koala.jpeg" ) as rightimg:
with Image.stereogram(left = leftimg, right = rightimg) as img:
img.save(filename = "fx-stereogram.jpg" )
|
Output:
Source Image:
Example 2:
from wand.image import Image
with Image(filename = "koala.jpeg" ) as leftimg:
with Image(filename = "koala.jpeg" ) as rightimg:
with Image.stereogram(left = leftimg, right = rightimg) as img:
img.save(filename = "fx-stereogram.jpg" )
|
Output:
Last Updated :
08 May, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...