Skip to content

Commit

Permalink
Merge pull request #126 from luxonis/nn_performance_fix
Browse files Browse the repository at this point in the history
Update FW with fix for resource allocation when depth is enabled; fix…
  • Loading branch information
SzabolcsGergely authored May 1, 2021
2 parents 8d08fd0 + c71fab7 commit 48c0dac
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
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 "d179193abd443eca5ca134232aabd874e5d78d18")
set(DEPTHAI_DEVICE_SIDE_COMMIT "a30a3c397f7daa4fc4b15ec8741763b76fe07e9a")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")
2 changes: 1 addition & 1 deletion examples/src/camera_preview_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main() {
dai::Device d;

cout << "Connected cameras: ";
for(const auto& cam : d.getConnectedCameras()){
for(const auto& cam : d.getConnectedCameras()) {
cout << static_cast<int>(cam) << " ";
}
cout << endl;
Expand Down
6 changes: 3 additions & 3 deletions examples/src/stereo_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int main() {
stereo->rectifiedRight.link(xoutRectifR->input);
}
stereo->disparity.link(xoutDisp->input);
if (outputDepth) {
if(outputDepth) {
stereo->depth.link(xoutDepth->input);
}

Expand Down Expand Up @@ -121,13 +121,13 @@ int main() {
if(outputRectified) {
auto rectifL = rectifLeftQueue->get<dai::ImgFrame>();
cv::Mat rectifiedLeftFrame = rectifL->getFrame();
//cv::flip(rectifiedLeftFrame, rectifiedLeftFrame, 1);
// cv::flip(rectifiedLeftFrame, rectifiedLeftFrame, 1);
cv::imshow("rectified_left", rectifiedLeftFrame);

auto rectifR = rectifRightQueue->get<dai::ImgFrame>();
cv::Mat rectifiedRightFrame = rectifR->getFrame();

//cv::flip(rectifiedRightFrame, rectifiedRightFrame, 1);
// cv::flip(rectifiedRightFrame, rectifiedRightFrame, 1);
cv::imshow("rectified_right", rectifiedRightFrame);
}
}
Expand Down
6 changes: 3 additions & 3 deletions examples/src/system_information_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ int main() {
// Connect to device
dai::Device device;

// Create 'sysinfo' queue
auto queue = device.getOutputQueue("sysinfo");

// Query device (before pipeline starts)
dai::MemoryInfo ddr = device.getDdrMemoryUsage();
printf("Ddr used / total - %.2f / %.2f MiB\n", ddr.used / (1024.0f * 1024.0f), ddr.total / (1024.0f * 1024.0f));
Expand All @@ -40,6 +37,9 @@ int main() {
// Start pipeline
device.startPipeline(pipeline);

// Create 'sysinfo' queue
auto queue = device.getOutputQueue("sysinfo");

while(1) {
auto sysInfo = queue->get<dai::SystemInformation>();
printSystemInformation(*sysInfo);
Expand Down
2 changes: 1 addition & 1 deletion src/device/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ void Device::init2(bool embeddedMvcmd, bool usb2Mode, const std::string& pathToM

// Starts pipeline if given
if(pipeline) {
if(!startPipeline(*pipeline)){
if(!startPipeline(*pipeline)) {
throw std::runtime_error("Couldn't start the pipeline");
}
}
Expand Down

0 comments on commit 48c0dac

Please sign in to comment.