Getting info of camera devices.
-
Hello all,
I tried to get the name of camera devices in Qt referring the sample camera example.
Their i can see the names of camera with their names in readable form but when i
use the same code in my program i get a long value with the names how can i separate the info to get the short names.
Sample code:std::cout<<"Entering camera function \n"; QList<QCameraInfo> cameras = QCameraInfo::availableCameras(); foreach (const QCameraInfo &cameraInfo, cameras) // QVariant::fromValue(cameraInfo.deviceName()); qDebug()<< "device:"<< QVariant::fromValue(cameraInfo.deviceName()); std::cout<<"Exiting camera function \n";
Output:
device: QVariant(QString, "@device:pnp:\\?\usb#vid_04f2&pid_b5a7&mi_00#6&fea6f4d&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global")
device: QVariant(QString, "@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Basler GenICam Source")
device: QVariant(QString, "@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Basler GenICam Source 2")
device: QVariant(QString, "@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Basler GenICam Source 3")
device: QVariant(QString, "@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Basler GenICam Source 4")Also, i have only 2 cameras connected. But in the output i can see multiple cameras.
-
Hi,
That because your camera is seen through different interfaces. The GenICam standard does offer different ways to access your camera which might not correspond to the number of device.
-
@sabra said in Getting info of camera devices.:
pylon Basler camera
Have you tried using the pylon camera suite free software?
i need to support this camera
You may want to tell what make/model your camera is.
In addition, what connection type is (USB, IP, etc.)
The above mentioned framework provides some tools (viewer, configurator) that may also help you. -
@Pablo-J-Rogina I used that software, actually i want to use Basler integrated in qt but first I need to get a list of Basler connected to the system, select one of them then get the frame from Basler then give that frame to OpenCV for process
-
Hi,
Then you need to use the SDK provided with pylon. There's everything there to enumerate the cameras connected to your system as well as grab images from them.