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

Miscellaneous camera controls, IMX582/IMX586 on-sensor HDR #972

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/Depthai/DepthaiDeviceSideConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "cee0e0be66ae6b1cce48fcbb75a83676aea5c5fc")
set(DEPTHAI_DEVICE_SIDE_COMMIT "01b465eceaef943349270c59fbc1633ba9b95024")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")
35 changes: 35 additions & 0 deletions include/depthai/pipeline/datatype/CameraControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,41 @@ class CameraControl : public Buffer {
*/
CameraControl& setCaptureIntent(CaptureIntent mode);

/**
* Set a miscellaneous control. The controls set by this function get appended
* to a list, processed after the standard controls
* @param control Control name
* @param value Value as a string
*/
CameraControl& setMisc(std::string control, std::string value);

/**
* Set a miscellaneous control. The controls set by this function get appended
* to a list, processed after the standard controls
* @param control Control name
* @param value Value as an integer number
*/
CameraControl& setMisc(std::string control, int value);

/**
* Set a miscellaneous control. The controls set by this function get appended
* to a list, processed after the standard controls
* @param control Control name
* @param value Value as a floating point number
*/
CameraControl& setMisc(std::string control, float value);

/**
* Clear the list of miscellaneous controls set by `setControl`
*/
void clearMiscControls();

/**
* Get the list of miscellaneous controls set by `setControl`
* @returns A list of <key, value> pairs as strings
*/
std::vector<std::pair<std::string, std::string>> getMiscControls();

// Functions to retrieve properties
/**
* Check whether command to capture a still is set
Expand Down
2 changes: 1 addition & 1 deletion shared/depthai-shared
17 changes: 17 additions & 0 deletions src/pipeline/datatype/CameraControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,23 @@ CameraControl& CameraControl::setCaptureIntent(CaptureIntent mode) {
return *this;
}

CameraControl& CameraControl::setMisc(std::string control, std::string value) {
cfg.miscControls.push_back(std::make_pair(control, value));
return *this;
}
CameraControl& CameraControl::setMisc(std::string control, int value) {
return setMisc(control, std::to_string(value));
}
CameraControl& CameraControl::setMisc(std::string control, float value) {
return setMisc(control, std::to_string(value));
}
void CameraControl::clearMiscControls() {
cfg.miscControls.clear();
}
std::vector<std::pair<std::string, std::string>> CameraControl::getMiscControls() {
return cfg.miscControls;
}

bool CameraControl::getCaptureStill() const {
return cfg.getCommand(RawCameraControl::Command::STILL_CAPTURE);
}
Expand Down
Loading