Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GIFT-Grab compatible image renderer #3

Open
1 of 6 tasks
dzhoshkun opened this issue Apr 24, 2018 · 6 comments
Open
1 of 6 tasks

Add GIFT-Grab compatible image renderer #3

dzhoshkun opened this issue Apr 24, 2018 · 6 comments

Comments

@dzhoshkun
Copy link
Owner

dzhoshkun commented Apr 24, 2018

  • Can use the builder design pattern to separate the design from dependency.

  • Can use PyGame.

The following are the core parameters of this renderer, related to GIFT-Grab video frames:

  • color space
  • dimensions

The following is a useful control parameter:

@dzhoshkun
Copy link
Owner Author

  • add a simple demo application to verify the implementation

@dzhoshkun
Copy link
Owner Author

  • remove sample app from Travis

dzhoshkun pushed a commit that referenced this issue Apr 24, 2018
dzhoshkun pushed a commit that referenced this issue Apr 24, 2018
…eve only video file path not the file itself
dzhoshkun pushed a commit that referenced this issue Apr 24, 2018
dzhoshkun pushed a commit that referenced this issue Apr 24, 2018
dzhoshkun pushed a commit that referenced this issue Apr 24, 2018
dzhoshkun pushed a commit that referenced this issue Apr 24, 2018
@dzhoshkun
Copy link
Owner Author

  • The following is the current state of the local copy:
diff --git a/vydemo/app/__init__.py b/vydemo/app/__init__.py
index adbc045..379ee3e 100644
--- a/vydemo/app/__init__.py
+++ b/vydemo/app/__init__.py
@@ -1,8 +1,27 @@
 import os.path
 from pkg_resources import resource_filename
+from vydemo.giftgrab import ColourSpace
 
 
 def let_the_sun_shine():
     filepath = resource_filename(__name__,
                                  os.path.join('data', 'sunny-river.mp4'))
     print('Let the sun shine on {}'.format(filepath))
+    video_reader = LocalVideoReader(filepath)
+    gui_director = GuiDirector()
+    gui_director.builder = PygameGuiBuilder()
+
+    gui_director.construct_gui(color=ColourSpace.BGRA,
+                               dims=(480, 720),
+                               frame_rate=10)
+    display = gui_director.builder.get_gui()
+
+    # configure processing pipeline
+    if display:
+        display.start()
+
+    while True:
+        image = video_reader.read()
+        display.update(image)
+
+    display.stop()

@dzhoshkun
Copy link
Owner Author

PyGame example that could be useful to what we're trying to achieve here.

@dzhoshkun
Copy link
Owner Author

Or maybe this file example.

@dzhoshkun
Copy link
Owner Author

dzhoshkun commented Apr 24, 2018

dzhoshkun pushed a commit that referenced this issue Apr 25, 2018
dzhoshkun pushed a commit that referenced this issue Apr 25, 2018
dzhoshkun pushed a commit that referenced this issue Apr 26, 2018
dzhoshkun pushed a commit that referenced this issue Apr 26, 2018
dzhoshkun added a commit that referenced this issue Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant