forked from luxonis/depthai-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
938 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,8 +62,8 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-11, windows-latest, ubuntu-latest] | ||
cmake: ['3.10.x', ''] # Older version (Ubuntu 18.04) and newest | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
cmake: ['3.10.x', '3.29.x'] # Older version (Ubuntu 18.04) and newest | ||
exclude: | ||
- os: windows-latest | ||
cmake: '3.10.x' | ||
|
@@ -185,6 +185,8 @@ jobs: | |
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.29.x' | ||
|
||
- name: Configure ${{ matrix.build-type }}, shared ${{ matrix.shared }}, ${{ matrix.platform }} | ||
run: cmake -S . -B build -D BUILD_SHARED_LIBS=${{ matrix.shared}} -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install ${{ env.CMAKE_ARGS }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: Depthai Python CI/CD | ||
|
||
# Added to main to allow workflow_dispath on v3 branches | ||
on: | ||
workflow_dispatch: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#include <depthai/depthai.hpp> | ||
#include <opencv2/opencv.hpp> | ||
|
||
constexpr int SHAPE = 300; | ||
|
||
int main() { | ||
dai::Pipeline p; | ||
|
||
auto camRgb = p.create<dai::node::ColorCamera>(); | ||
auto nn = p.create<dai::node::NeuralNetwork>(); | ||
auto rgbOut = p.create<dai::node::XLinkOut>(); | ||
auto cast = p.create<dai::node::Cast>(); | ||
auto castXout = p.create<dai::node::XLinkOut>(); | ||
|
||
camRgb->setPreviewSize(SHAPE, SHAPE); | ||
camRgb->setInterleaved(false); | ||
|
||
nn->setBlobPath(BLOB_PATH); | ||
|
||
rgbOut->setStreamName("rgb"); | ||
castXout->setStreamName("cast"); | ||
|
||
cast->setOutputFrameType(dai::ImgFrame::Type::BGR888p); | ||
|
||
// Linking | ||
camRgb->preview.link(nn->input); | ||
camRgb->preview.link(rgbOut->input); | ||
nn->out.link(cast->input); | ||
cast->output.link(castXout->input); | ||
|
||
dai::Device device(p); | ||
auto qCam = device.getOutputQueue("rgb", 4, false); | ||
auto qCast = device.getOutputQueue("cast", 4, false); | ||
|
||
while(true) { | ||
auto inCast = qCast->get<dai::ImgFrame>(); | ||
auto inRgb = qCam->get<dai::ImgFrame>(); | ||
|
||
if(inCast && inRgb) { | ||
cv::imshow("Blur", inCast->getCvFrame()); | ||
cv::imshow("Original", inRgb->getCvFrame()); | ||
} | ||
|
||
if(cv::waitKey(1) == 'q') { | ||
break; | ||
} | ||
} | ||
|
||
return 0; | ||
} |
Oops, something went wrong.