In Visionworks samples and demos, I’ve seen that I can add the option
--source="device:///v4l2?index=0"
to get the first V4L2 camera input.
Then what should I type in or modify to change the streaming resolution?
Thank you :D
In Visionworks samples and demos, I’ve seen that I can add the option
--source="device:///v4l2?index=0"
to get the first V4L2 camera input.
Then what should I type in or modify to change the streaming resolution?
Thank you :D
Hi,
You can use the setConfiguration() function in nvxio::FrameSource.
For example,
Modify file demos/feature_tracker/main_feature_tracker.cpp
//
// Create a NVXIO-based frame source
//
std::unique_ptr<nvxio::FrameSource> source(
nvxio::createDefaultFrameSource(context, sourceUri));
+++ nvxio::FrameSource::Parameters config;
+++ config.frameWidth = 1920;
+++ config.frameHeight = 720;
+++ config.fps = 30;
+++ source->setConfiguration(config);
if (!source || !source->open())
{
std::cerr << "Error: Can't open source URI " << sourceUri << std::endl;
return nvxio::Application::APP_EXIT_CODE_NO_RESOURCE;
}
More detail, please refer to the FrameSource.hpp, which located at ‘/usr/include/NVXIO’
Thank you AastaLLL :)
That works for almost all camera devices except the magewell PCIe HDMI capture card.
Guess now I should work on the capture card not the Visionworks.