Hi,
I am trying to run a simple application of opening a Single Camera using edge_ai apps.
To do that I have changed CMakeList on apps_cpp/edgeai_app to:
cmake_minimum_required(VERSION 3.10.0)
project(openCamera)
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/common.cmake)
set(APP_EDGEAI_SRCS
src/openCamera.cpp)
build_app(${PROJECT_NAME} APP_EDGEAI_SRCS)
---------------------------------------------------------------------------------
I have also included
-> opencv_videoio
-> opencv_highgui
on library list of cmake/common.cmake
Finally, when I try to run:
cmake ..
and make
and then, run the application on bin/Release folder
I got this issue :
My code is the following:
#include <fstream>
using namespace std;
using namespace cv;
int main() {
VideoCapture cap1("v4l2src device=/dev/video2 timestamp=true ! videoconvert ! video/x-raw, format=BGR, width=640, height=480, framerate=30/1 ! videoconvert ! appsink sync=false", CAP_GSTREAMER);
VideoWriter writer;
writer.open("appsrc ! videoconvert ! video/x-raw , format=RGB, framerate=30/1 ! videoscale ! videoconvert ! kmssink sync=false driver-name=tidss ",0, 30, Size(1280,960),true);
while(true) {
Mat front_img;
if (!cap1.isOpened()) {
cout << "cannot open camera 1 - /dev/video2";
}
cap1.read(front_img); imshow("Top View FV+LV+RtV", front_img);
//waitKey(30);
//waitKey(1);
}
return 0;
}
Thank you in Advance!