Finalized lens work. Started initial unit tests.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
from displayarray.effects import crop
|
||||
from displayarray import display
|
||||
from examples.videos import test_video
|
||||
|
||||
# Move the mouse to move where the crop is from on the original image
|
||||
|
||||
display(test_video).add_callback(crop.Crop().enable_mouse_control()).block()
|
||||
@@ -0,0 +1,9 @@
|
||||
from displayarray.effects import lens
|
||||
from displayarray import display
|
||||
from examples.videos import test_video
|
||||
|
||||
# Move the mouse to center the image, scroll to increase/decrease barrel, ctrl+scroll to increase/decrease zoom
|
||||
|
||||
m = lens.Barrel(use_bleed=False)
|
||||
m.enable_mouse_control()
|
||||
display(test_video, callbacks=m, blocking=True)
|
||||
@@ -0,0 +1,7 @@
|
||||
from displayarray.effects import lens
|
||||
from displayarray import display
|
||||
from examples.videos import test_video
|
||||
|
||||
m = lens.Mustache()
|
||||
m.enable_mouse_control()
|
||||
display(test_video, callbacks=m, blocking=True)
|
||||
@@ -0,0 +1,13 @@
|
||||
from displayarray.effects import crop, lens
|
||||
from displayarray import display
|
||||
from examples.videos import test_video
|
||||
|
||||
# Move the mouse to center the image, scroll to increase/decrease barrel, ctrl+scroll to increase/decrease zoom
|
||||
|
||||
d = display(test_video) \
|
||||
.add_callback(crop.Crop()) \
|
||||
.add_callback(lens.Barrel().enable_mouse_control()) \
|
||||
.wait_for_init()
|
||||
|
||||
while d:
|
||||
print(d.frames[0].shape)
|
||||
@@ -0,0 +1,10 @@
|
||||
from displayarray.effects import crop, lens
|
||||
from displayarray import display
|
||||
from examples.videos import test_video
|
||||
|
||||
# Move the mouse to move where the crop is from on the original image
|
||||
|
||||
display(test_video) \
|
||||
.add_callback(crop.Crop()) \
|
||||
.add_callback(lens.Barrel().enable_mouse_control()) \
|
||||
.block()
|
||||
Reference in New Issue
Block a user