Skip to content

Commit

Permalink
fix 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinyu Li authored and Xinyu Li committed Jul 22, 2024
1 parent d571891 commit cef8c64
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion example/u3v_camera1_opencv/u3v_camera1_opencv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main(int argc, char *argv[])
Param("frame_sync", false),
Param("gain_key", FEATURE_GAIN_KEY),
Param("exposure_key", FEATURE_EXPOSURE_KEY),
Param("realtime_diaplay_mode", true),
Param("realtime_display_mode", true),
Param("enable_control", true)
);

Expand Down
4 changes: 2 additions & 2 deletions example/u3v_camera1_opencv/u3v_camera1_opencv.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
frame_sync = Param('frame_sync', 'false')
gain_key = Param('gain_key', feature_gain_key)
exposure_key = Param('exposure_key', feature_exposure_key)
realtime_diaplay_mode = Param('realtime_diaplay_mode', 'true')
realtime_display_mode = Param('realtime_display_mode', 'true')
enable_control = Param('enable_control', 'true')

# Add node and connect the input port to the node instance
node = builder.add('image_io_u3v_cameraN_u16x2')\
.set_iport([gain0_p, exposure0_p])\
.set_param([num_devices, frame_sync, gain_key, exposure_key, realtime_diaplay_mode, enable_control])
.set_param([num_devices, frame_sync, gain_key, exposure_key, realtime_display_mode, enable_control])

# Define Output Port
out_p = node.get_port('output')
Expand Down
2 changes: 1 addition & 1 deletion example/u3v_camera2_opencv/u3v_camera2_opencv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main(int argc, char *argv[])
Param("frame_sync", false),
Param("gain_key", FEATURE_GAIN_KEY),
Param("exposure_key", FEATURE_EXPOSURE_KEY),
Param("realtime_diaplay_mode", true),
Param("realtime_display_mode", true),
Param("enable_control", true)
);

Expand Down
4 changes: 2 additions & 2 deletions example/u3v_camera2_opencv/u3v_camera2_opencv.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
frame_sync = Param('frame_sync', 'false')
gain_key = Param('gain_key', feature_gain_key)
exposure_key = Param('exposure_key', feature_exposure_key)
realtime_diaplay_mode = Param('realtime_diaplay_mode', 'true')
realtime_display_mode = Param('realtime_display_mode', 'true')
enable_control = Param('enable_control', 'true')

# Add node and connect the input port to the node instance
node = builder.add('image_io_u3v_cameraN_u16x2')\
.set_iport([gain0_p, gain1_p, exposure0_p, exposure1_p, ])\
.set_param([num_devices, frame_sync, gain_key, exposure_key, realtime_diaplay_mode, enable_control])
.set_param([num_devices, frame_sync, gain_key, exposure_key, realtime_display_mode, enable_control])


# Define Output Port
Expand Down
26 changes: 13 additions & 13 deletions src/bb/image-io/bb.h
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ class U3VCamera1 : public ion::BuildingBlock<U3VCamera1<T, D>> {
BuildingBlockParam<bool> frame_sync{"frame_sync", false};
BuildingBlockParam<std::string> gain_key_ptr{"gain_key", "Gain"};
BuildingBlockParam<std::string> exposure_key_ptr{"exposure_key", "Exposure"};
BuildingBlockParam<bool> realtime_diaplay_mode{"realtime_diaplay_mode", false};
BuildingBlockParam<bool> realtime_display_mode{"realtime_display_mode", false};

Input<double> gain0{ "gain0" };
Input<double> exposure0{ "exposure0" };
Expand All @@ -740,7 +740,7 @@ class U3VCamera1 : public ion::BuildingBlock<U3VCamera1<T, D>> {
std::memcpy(exposure_key_buf.data(), exposure_key.c_str(), exposure_key.size());

std::vector<ExternFuncArgument> params{
static_cast<bool>(frame_sync), static_cast<bool>(realtime_diaplay_mode),
static_cast<bool>(frame_sync), static_cast<bool>(realtime_display_mode),
gain0, exposure0,
id_buf, gain_key_buf, exposure_key_buf
};
Expand All @@ -752,7 +752,7 @@ class U3VCamera1 : public ion::BuildingBlock<U3VCamera1<T, D>> {
Func camera1_frame_count;
{
Buffer<uint8_t> id_buf = this->get_id();
camera1_frame_count.define_extern("ion_bb_image_io_u3v_camera1_frame_count",{camera1, 1, static_cast<bool>(frame_sync), static_cast<bool>(realtime_diaplay_mode), id_buf}, type_of<uint32_t>(), 1);
camera1_frame_count.define_extern("ion_bb_image_io_u3v_camera1_frame_count",{camera1, 1, static_cast<bool>(frame_sync), static_cast<bool>(realtime_display_mode), id_buf}, type_of<uint32_t>(), 1);
camera1_frame_count.compute_root();
frame_count(_) = camera1_frame_count(_);
}
Expand All @@ -773,7 +773,7 @@ class U3VCamera2 : public ion::BuildingBlock<U3VCamera2<T, D>> {
BuildingBlockParam<bool> frame_sync{"frame_sync", false};
BuildingBlockParam<std::string> gain_key_ptr{"gain_key", "Gain"};
BuildingBlockParam<std::string> exposure_key_ptr{"exposure_key", "Exposure"};
BuildingBlockParam<bool> realtime_diaplay_mode{"realtime_diaplay_mode", false};
BuildingBlockParam<bool> realtime_display_mode{"realtime_display_mode", false};

Input<double> gain0{ "gain0" };
Input<double> gain1{ "gain1" };
Expand Down Expand Up @@ -802,7 +802,7 @@ class U3VCamera2 : public ion::BuildingBlock<U3VCamera2<T, D>> {
std::memcpy(exposure_key_buf.data(), exposure_key.c_str(), exposure_key.size());

std::vector<ExternFuncArgument> params{
static_cast<bool>(frame_sync), static_cast<bool>(realtime_diaplay_mode),
static_cast<bool>(frame_sync), static_cast<bool>(realtime_display_mode),
gain0, gain1, exposure0, exposure1,
id_buf, gain_key_buf, exposure_key_buf
};
Expand All @@ -814,7 +814,7 @@ class U3VCamera2 : public ion::BuildingBlock<U3VCamera2<T, D>> {

Func camera2_frame_count;{
Buffer<uint8_t> id_buf = this->get_id();
camera2_frame_count.define_extern("ion_bb_image_io_u3v_camera2_frame_count", { camera2, 2, static_cast<bool>(frame_sync), static_cast<bool>(realtime_diaplay_mode), id_buf}, type_of<uint32_t>(), 1);
camera2_frame_count.define_extern("ion_bb_image_io_u3v_camera2_frame_count", { camera2, 2, static_cast<bool>(frame_sync), static_cast<bool>(realtime_display_mode), id_buf}, type_of<uint32_t>(), 1);
camera2_frame_count.compute_root();
frame_count(_) = camera2_frame_count(_);
}
Expand All @@ -831,7 +831,7 @@ class U3VCameraN : public ion::BuildingBlock<U3VCameraN<T, D>> {
public:
BuildingBlockParam<int32_t> num_devices{"num_devices", 2};
BuildingBlockParam<bool> frame_sync{"frame_sync", false};
BuildingBlockParam<bool> realtime_diaplay_mode{"realtime_diaplay_mode", false};
BuildingBlockParam<bool> realtime_display_mode{"realtime_display_mode", false};

BuildingBlockParam<bool> enable_control{"enable_control", false};
BuildingBlockParam<std::string> gain_key_ptr{"gain_key", "Gain"};
Expand Down Expand Up @@ -873,7 +873,7 @@ class U3VCameraN : public ion::BuildingBlock<U3VCameraN<T, D>> {
std::vector<ExternFuncArgument> params{
id_buf,
static_cast<bool>(frame_sync),
static_cast<bool>(realtime_diaplay_mode),
static_cast<bool>(realtime_display_mode),
static_cast<bool>(enable_control),
gain_key_buf, exposure_key_buf
};
Expand Down Expand Up @@ -909,7 +909,7 @@ class U3VCameraN : public ion::BuildingBlock<U3VCameraN<T, D>> {
Buffer<uint8_t> id_buf = this->get_id();
std::vector<ExternFuncArgument> params{
cameraN, static_cast<int32_t>(num_devices), static_cast<bool>(frame_sync),
static_cast<bool>(realtime_diaplay_mode), id_buf
static_cast<bool>(realtime_display_mode), id_buf
};

device_info.resize(num_devices);
Expand All @@ -933,7 +933,7 @@ class U3VCameraN : public ion::BuildingBlock<U3VCameraN<T, D>> {
Buffer<uint8_t> id_buf = this->get_id();
std::vector<ExternFuncArgument> params{
cameraN, static_cast<int32_t>(output.size()), static_cast<bool>(frame_sync),
static_cast<bool>(realtime_diaplay_mode), id_buf
static_cast<bool>(realtime_display_mode), id_buf
};
cameraN_fc.define_extern("ion_bb_image_io_u3v_multiple_camera_frame_count" + std::to_string(output.size()), params, type_of<uint32_t>(), 1);
cameraN_fc.compute_root();
Expand All @@ -952,7 +952,7 @@ class U3VGenDC : public ion::BuildingBlock<U3VGenDC> {
public:
BuildingBlockParam<int32_t> num_devices{"num_devices", 2};
BuildingBlockParam<bool> frame_sync{"frame_sync", false};
BuildingBlockParam<bool> realtime_diaplay_mode{"realtime_diaplay_mode", false};
BuildingBlockParam<bool> realtime_display_mode{"realtime_display_mode", false};

BuildingBlockParam<bool> enable_control{"enable_control", false};
BuildingBlockParam<std::string> gain_key_ptr{"gain_key", "Gain"};
Expand Down Expand Up @@ -993,7 +993,7 @@ class U3VGenDC : public ion::BuildingBlock<U3VGenDC> {
std::vector<ExternFuncArgument> params{
id_buf,
static_cast<bool>(frame_sync),
static_cast<bool>(realtime_diaplay_mode),
static_cast<bool>(realtime_display_mode),
static_cast<bool>(enable_control),
gain_key_buf, exposure_key_buf
};
Expand Down Expand Up @@ -1032,7 +1032,7 @@ class U3VGenDC : public ion::BuildingBlock<U3VGenDC> {
Buffer<uint8_t> id_buf = this->get_id();
std::vector<ExternFuncArgument> params{
u3v_gendc, static_cast<int32_t>(num_devices), static_cast<bool>(frame_sync),
static_cast<bool>(realtime_diaplay_mode), id_buf
static_cast<bool>(realtime_display_mode), id_buf
};

device_info.resize(num_devices);
Expand Down

0 comments on commit cef8c64

Please sign in to comment.