-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-real-colon-polyp-detection
- Loading branch information
Showing
18 changed files
with
101 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions
37
applications/aja_video_capture/tests/cpp_aja_capture.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
diff --git a/applications/aja_video_capture/cpp/aja_capture.cpp b/applications/aja_video_capture/cpp/aja_capture.cpp | ||
index 890ec9ab..8431555c 100644 | ||
--- a/applications/aja_video_capture/cpp/aja_capture.cpp | ||
+++ b/applications/aja_video_capture/cpp/aja_capture.cpp | ||
@@ -19,6 +19,11 @@ | ||
#include <holoscan/operators/holoviz/holoviz.hpp> | ||
|
||
#include <aja_source.hpp> | ||
+ | ||
+#include <holoscan/operators/video_stream_recorder/video_stream_recorder.hpp> | ||
+#include <holoscan/operators/video_stream_replayer/video_stream_replayer.hpp> | ||
+#include <holoscan/operators/format_converter/format_converter.hpp> | ||
+ | ||
class App : public holoscan::Application { | ||
public: | ||
void compose() override { | ||
@@ -30,6 +35,21 @@ class App : public holoscan::Application { | ||
|
||
// Flow definition | ||
add_flow(source, visualizer, {{"video_buffer_output", "receivers"}}); | ||
+ | ||
+ // Recorder to validate the video output | ||
+ std::shared_ptr<Operator> recorder_format_converter; | ||
+ recorder_format_converter = make_operator<ops::FormatConverterOp>( | ||
+ "recorder_format_converter", | ||
+ Arg("in_dtype", std::string("rgba8888")), | ||
+ Arg("out_dtype", std::string("rgb888"))); | ||
+ auto recorder = make_operator<ops::VideoStreamRecorderOp>( | ||
+ "recorder", | ||
+ Arg("directory", std::string(RECORDING_DIR)), | ||
+ Arg("basename", std::string(SOURCE_VIDEO_BASENAME))); | ||
+ add_flow(visualizer, recorder_format_converter, {{"render_buffer_output", "source_video"}}); | ||
+ add_flow(recorder_format_converter, recorder); | ||
+ visualizer->add_arg(Arg("enable_render_buffer_output", true)); | ||
+ visualizer->add_arg(Arg("allocator", make_resource<UnboundedAllocator>("allocator"))); | ||
} | ||
}; |
37 changes: 37 additions & 0 deletions
37
applications/aja_video_capture/tests/python_aja_capture.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
diff --git a/applications/aja_video_capture/python/aja_capture.py b/applications/aja_video_capture/python/aja_capture.py | ||
index 3d12ebda..7d43943f 100644 | ||
--- a/applications/aja_video_capture/python/aja_capture.py | ||
+++ b/applications/aja_video_capture/python/aja_capture.py | ||
@@ -20,6 +20,8 @@ import os | ||
from holoscan.conditions import CountCondition | ||
from holoscan.core import Application | ||
from holoscan.operators import HolovizOp | ||
+from holoscan.operators import VideoStreamRecorderOp, FormatConverterOp | ||
+from holoscan.resources import UnboundedAllocator | ||
|
||
from holohub.aja_source import AJASourceOp | ||
|
||
@@ -46,6 +48,23 @@ class AJACaptureApp(Application): | ||
visualizer = HolovizOp(self, name="holoviz", **self.kwargs("holoviz")) | ||
|
||
self.add_flow(source, visualizer, {("video_buffer_output", "receivers")}) | ||
+ recorder_format_converter = FormatConverterOp( | ||
+ self, | ||
+ name="recorder_format_converter", | ||
+ in_dtype="rgba8888", | ||
+ out_dtype="rgb888", | ||
+ pool=UnboundedAllocator(self, name="pool") | ||
+ ) | ||
+ recorder = VideoStreamRecorderOp( | ||
+ self, | ||
+ name="recorder", | ||
+ **self.kwargs("recorder") | ||
+ ) | ||
+ | ||
+ visualizer.add_arg(allocator=UnboundedAllocator(self, name="allocator")) | ||
+ | ||
+ self.add_flow(visualizer, recorder_format_converter, {("render_buffer_output", "source_video")}) | ||
+ self.add_flow(recorder_format_converter, recorder) | ||
|
||
|
||
def main(config_file): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters