Skip to content

Commit

Permalink
Merge branch 'release_2.20.2' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
themarpe committed Jan 31, 2023
2 parents fb87348 + 88af9a2 commit 4ff8608
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D HUNTER_ROOT=$HOME/.hun2_${{ matrix.flavor }} -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON -D DEPTHAI_TEST_EXAMPLES=ON
cmake --build build --parallel 4 --config Release
cd build
ctest -C Release --output-on-failure -L usb --no-tests=error
ctest -C Release --output-on-failure -L usb --no-tests=error --repeat until-pass:3
- name: Configure, Build and Test
if: matrix.os == 'linux'
Expand All @@ -67,4 +67,4 @@ jobs:
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D HUNTER_ROOT=$HOME/.hun2_${{ matrix.flavor }} -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON -D DEPTHAI_TEST_EXAMPLES=ON
cmake --build build --parallel 4 --config Release
cd build
ctest -C Release --output-on-failure -L usb --no-tests=error
ctest -C Release --output-on-failure -L usb --no-tests=error --repeat until-pass:3
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if(WIN32)
endif()

# Create depthai project
project(depthai VERSION "2.20.1" LANGUAGES CXX C)
project(depthai VERSION "2.20.2" LANGUAGES CXX C)
get_directory_property(has_parent PARENT_DIRECTORY)
if(has_parent)
set(DEPTHAI_VERSION ${PROJECT_VERSION} PARENT_SCOPE)
Expand Down
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 "f888710ca677ca662a4a83103e57c5a1ae2a5c7f")
set(DEPTHAI_DEVICE_SIDE_COMMIT "8c3d6ac1c77b0bf7f9ea6fd4d962af37663d2fbd")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ target_compile_definitions(calibration_load PRIVATE CALIB_PATH="${calib_v6}")
dai_add_example(rgb_camera_control ColorCamera/rgb_camera_control.cpp ON)
dai_add_example(rgb_preview ColorCamera/rgb_preview.cpp ON)
dai_add_example(rgb_video ColorCamera/rgb_video.cpp ON)
dai_add_example(rgb_isp_scale ColorCamera/rgb_isp_scale.cpp ON)

# EdgeDetector
dai_add_example(edge_detector EdgeDetector/edge_detector.cpp ON)
Expand Down
46 changes: 46 additions & 0 deletions examples/ColorCamera/rgb_isp_scale.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include <iostream>

// Includes common necessary includes for development using depthai library
#include "depthai/depthai.hpp"

int main() {
// Create pipeline
dai::Pipeline pipeline;

// Define source and output
auto camRgb = pipeline.create<dai::node::ColorCamera>();
auto xoutVideo = pipeline.create<dai::node::XLinkOut>();

xoutVideo->setStreamName("video");

// Properties
camRgb->setBoardSocket(dai::CameraBoardSocket::RGB);
camRgb->setResolution(dai::ColorCameraProperties::SensorResolution::THE_4_K);
camRgb->setIspScale(1, 2);
camRgb->setVideoSize(1920, 1080);

xoutVideo->input.setBlocking(false);
xoutVideo->input.setQueueSize(1);

// Linking
camRgb->video.link(xoutVideo->input);

// Connect to device and start pipeline
dai::Device device(pipeline);

auto video = device.getOutputQueue("video");

while(true) {
auto videoIn = video->get<dai::ImgFrame>();

// Get BGR frame from NV12 encoded video frame to show with opencv
// Visualizing the frame on slower hosts might have overhead
cv::imshow("video", videoIn->getCvFrame());

int key = cv::waitKey(1);
if(key == 'q' || key == 'Q') {
return 0;
}
}
return 0;
}

0 comments on commit 4ff8608

Please sign in to comment.