Part Number: TMDSSK3358
Tool/software:
Hi!
Im trying to connect a USB camera to the AM3359 and output the camera feed to a touch panel.
The feed works fine at a resolution of 360x240, but when I switch to 640x480, the video feed does not maintain the expected frame rate with any camera.
Additionally, some USB cameras do not output video at all. Im using UVC-compliant cameras.
Do I need to change the driver or kernel?
Furthermore, when I try to open the camera with cap.open, it sometimes takes several seconds.
Is this due to the CPU performance?
Current development environment:
・Yocto image file: tisdk-default-image (same issue with tisdk-base-image)
Below is a simple source code for video output. The output to the touch panel is working.
-------------------------------------------------------------------------------------------------------------
int main(int argc, char** argv)
{
cv::VideoCapture cap;
cv::Mat frame;
int key;
unsigned int cnt = 0;
cap.open(0);
if (!cap.isOpened())
{
printf("Error:OpenErr\n");
return -1;
}
cap.set(cv::CAP_PROP_FPS, 30);
cv::namedWindow("Webcam", cv::WINDOW_NORMAL);
cv::resizeWindow("Webcam", 720, 480);
while (1)
{
cap >> frame;
if (frame.empty())
{
printf("Error:FlameErr\n");
break;
}
if (!frame.empty())
{
cv::resize(frame, frame, cv::Size(720, 480));
cv::imshow("Webcam", frame);
}
else
{
printf("Error:EmptyErr\n");
}
}
cap.release();
cv::destroyAllWindows();
return 0;
}
-------------------------------------------------------------------------------------------------------------