Skip to content

Commit

Permalink
add rotation filter to python
Browse files Browse the repository at this point in the history
  • Loading branch information
noacoohen committed Nov 14, 2024
1 parent c0dc22e commit 52de0e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/media/ros/ros_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright(c) 2019 Intel Corporation. All Rights Reserved.

#include "proc/decimation-filter.h"
#include "proc/rotation-filter.h"
#include "proc/threshold.h"
#include "proc/disparity-transform.h"
#include "proc/spatial-filter.h"
Expand Down Expand Up @@ -513,6 +514,7 @@ namespace librealsense
RETURN_IF_EXTENSION(block, RS2_EXTENSION_HOLE_FILLING_FILTER);
RETURN_IF_EXTENSION(block, RS2_EXTENSION_HDR_MERGE);
RETURN_IF_EXTENSION(block, RS2_EXTENSION_SEQUENCE_ID_FILTER);
RETURN_IF_EXTENSION(block, RS2_EXTENSION_ROTATION_FILTER);

#undef RETURN_IF_EXTENSION

Expand Down
3 changes: 3 additions & 0 deletions src/rscore-pp-block-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "rscore-pp-block-factory.h"

#include "proc/decimation-filter.h"
#include "proc/rotation-filter.h"
#include "proc/disparity-transform.h"
#include "proc/hdr-merge.h"
#include "proc/hole-filling-filter.h"
Expand All @@ -27,6 +28,8 @@ rscore_pp_block_factory::create_pp_block( std::string const & name, rsutils::jso

if( rsutils::string::nocase_equal( name, "Decimation Filter" ) )
return std::make_shared< decimation_filter >();
if( rsutils::string::nocase_equal( name, "Rotation Filter" ) )
return std::make_shared< rotation_filter >();
if( rsutils::string::nocase_equal( name, "HDR Merge" ) ) // and Hdr Merge
return std::make_shared< hdr_merge >();
if( rsutils::string::nocase_equal( name, "Filter By Sequence id" ) // name
Expand Down
1 change: 1 addition & 0 deletions wrappers/python/pyrs_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void init_processing(py::module &m) {
return new rs2::filter(filter_function, queue_size);
}), "filter_function"_a, "queue_size"_a = 1)
.def(BIND_DOWNCAST(filter, decimation_filter))
.def( BIND_DOWNCAST( filter, rotation_filter ) )
.def(BIND_DOWNCAST(filter, disparity_transform))
.def(BIND_DOWNCAST(filter, hole_filling_filter))
.def(BIND_DOWNCAST(filter, spatial_filter))
Expand Down

0 comments on commit 52de0e3

Please sign in to comment.