The QCamera class provides interface for system camera devices.
Questions tagged [qcamera]
29 questions
5
votes
1 answer
Have two QCameraViewFinder for one QCamera
I create an app with the cross-platform Qt and on this app, I need to display the result of one QCamera on two different screens. This involve to link two QCameraViewFinder on the same QCamera.
My code is :
QCameraViewFinder* viewfinder = new…

tagry
- 63
- 7
3
votes
0 answers
How to exclude empty QEntity from bounding volume computation
My company uses Qt3D to display its CAD models. Wee tried to use the function QCamera::viewEntity(Qt3DCore::QEntity *entity) in order to compute the bounding sphere of a given entity and also to fit the entity to the screen.
Now, we stumbled across…

Aleph0
- 5,816
- 4
- 29
- 80
2
votes
2 answers
ffmpeg avcodec_send_packet/avcodec_receive_frame memory leak
I'm attempting to decode frames, but memory usage grows with every frame (more specifically, with every call to avcodec_send_packet) until finally the code crashes with a bad_alloc. Here's the basic decode loop:
int rfret = 0;
while((rfret =…

G Hamlin
- 21
- 1
- 4
1
vote
1 answer
Replace QCameraViewfinder with QVideoWidget in Qt 6
I am trying to port some code to Qt 6's reworked QtMultimedia framework and running into a lot of issues of disappearing APIs.
One of these is QCameraViewfinder, which as I understand it, is a simple viewer of the current QCamera image feed.
It used…

rubenvb
- 74,642
- 33
- 187
- 332
1
vote
0 answers
QT widget How to get RGB Buffer from QCamera
I am porting an video streamer application to QT (from HTML), I just had the webcam working using QT, and now I want to know How can I get the RGB Video buffer from a QT Camera? All the samples I can see is capturing image to a file.
I am using QT…

curiousJorgeXX
- 363
- 1
- 10
1
vote
1 answer
No viewfinder available while trying to display webcam with PySide2
I am working on Ubuntu 20.04 with Python3 and PySide2, Qt is version 5.
I wrote this simple Python script in order to test the ability to save webcam video for a larger project I will later work on.
Basically, I would like that this demo script at…

Jacquelyn.Marquardt
- 602
- 2
- 12
- 30
1
vote
1 answer
Change Camera pixel format from qml
Looking at the documentation of Qt5 it seems possible to change the pixel format of the camera. I need to create a QCameraViewfinderSettings set the new pixel format and set the new settings to the camera... like in this…

Elvis Dukaj
- 7,142
- 12
- 43
- 85
1
vote
1 answer
Using QCamera/QCameraInfo from a QThread
I have a Camera class that at the moment simply returns how many available cameras there are connected to the computer. A Camera object is created my PhotoProcessor class (QWidget) and then moved to another thread because I noticed some slight…

lachycharts
- 33
- 6
1
vote
1 answer
QCamera get resolution and raw frame
I would like to get the resolution of the selected camera and also get the raw frame in the videocapture but I have not found clearly at all how to do it. Could you help me!? Thanks in advance.
// Open camera for reading
cameraQt = new…

Arritmic
- 474
- 2
- 12
1
vote
2 answers
Why is QCameraImageCapture saving an image to the hard drive?
Part of an application I have written has the ability to capture pictures from the webcam. I am using a QCamera with a QCameraViewfinder to display the current view, and then when a shutter button is clicked, it snaps a picture with a…

SaintWacko
- 854
- 3
- 14
- 35
0
votes
1 answer
Increase frame rate for QCamera/QCameraViewfinder using PySide2 (Qt5)
I'm tying to create a simple application to monitor a webcam and taking pictures, basically following the Qt for Python Camera Example, which uses PySide6 (Qt6).
However, for my case, I must use PySide2 (Qt5) instead, as the embed computer for this…

kstenio
- 25
- 5
0
votes
0 answers
How to convert QVideoFrame from QCamera to QImage?
I tried using QVideoProbe to capture and send my camera video frames for processing (object detection) in another python process. The problem is that the conversion of the probed QVideoFrame into QImage fails.
Conversion to byte array using the…

ramiwi
- 902
- 2
- 10
- 28
0
votes
1 answer
QCamera cannot capture by for loop
For Some Reason, I need use pyqt to capture image instead of cv2.
My purpose is iterate cameras in my PC,
then take picture automatically.
The code below is work by manually change QComboBox, but fail by for loop.
I have tried many ways, like…

Kobe Nein
- 199
- 1
- 3
- 13
0
votes
2 answers
Save a captured image using QCameraImageCapture::capture() in PNG Format
this is literally my first question in a forum.
So I'm a Qt newbie and I'm stuck at this little detail.
I'm creating this application that takes pictures and saves them, but the issue is that it saves then in a "JPEG" format and i need them in "PNG"…

Hamza
- 1
- 1
0
votes
1 answer
How to setPixmap on a QLabel from QCamera image
I been trying an image to a Label via setPixmap() but to no avail...
In fact, i want that if i click to call the Methode def click_photo(self): to setthe image also
from PyQt5.QtWidgets import *
from PyQt5.QtMultimedia import *
from…

Janny MERN K.
- 1
- 3