Skip to content

Commit fddc779

Browse files
fabianschillingFabian Schilling
andauthored
Feature: horizontal and vertical image reverse (#41)
* Add horizontal/vertical inverse to reconfigure cfg * Add ReverseX/ReverseY with setProperty Co-authored-by: Fabian Schilling <[email protected]>
1 parent 9c00201 commit fddc779

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

spinnaker_camera_driver/cfg/Spinnaker.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ gen.add("image_format_x_binning", int_t, SensorLevels.RECON
127127
gen.add("image_format_y_binning", int_t, SensorLevels.RECONFIGURE_STOP, "Vertical Binning.", 1, 1, 8)
128128
gen.add("image_format_x_decimation", int_t, SensorLevels.RECONFIGURE_STOP, "Horizontal Decimation.", 1, 1, 8)
129129
gen.add("image_format_y_decimation", int_t, SensorLevels.RECONFIGURE_STOP, "Vertical Decimation.", 1, 1, 8)
130-
130+
gen.add("image_format_x_reverse", bool_t, SensorLevels.RECONFIGURE_STOP, "Horizontal Reverse.", False)
131+
gen.add("image_format_y_reverse", bool_t, SensorLevels.RECONFIGURE_STOP, "Vertical Reverse.", False)
131132

132133
# Image Color Coding: Format of the pixel provided by the camera.
133134
codings = gen.enum([gen.const("Mono8", str_t, "Mono8", ""),

spinnaker_camera_driver/src/camera.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,13 @@ void Camera::setNewConfiguration(const SpinnakerConfig& config, const uint32_t&
186186
// Image Size and Pixel Format
187187
void Camera::setImageControlFormats(const spinnaker_camera_driver::SpinnakerConfig& config)
188188
{
189-
// Set Binning and Decimation
189+
// Set Binning, Decimation, and Reverse
190190
setProperty(node_map_, "BinningHorizontal", config.image_format_x_binning);
191191
setProperty(node_map_, "BinningVertical", config.image_format_y_binning);
192192
setProperty(node_map_, "DecimationHorizontal", config.image_format_x_decimation);
193193
setProperty(node_map_, "DecimationVertical", config.image_format_y_decimation);
194+
setProperty(node_map_, "ReverseX", config.image_format_x_reverse);
195+
setProperty(node_map_, "ReverseY", config.image_format_y_reverse);
194196

195197
// Grab the Max values after decimation
196198
Spinnaker::GenApi::CIntegerPtr height_max_ptr = node_map_->GetNode("HeightMax");

0 commit comments

Comments
 (0)