Trying to capture QImage of video frame
-
Please be more precise. "Not working" doesn't say much. What are you getting ? A blank image ? A black image ? Funny colours ?
-
Please be more precise. "Not working" doesn't say much. What are you getting ? A blank image ? A black image ? Funny colours ?
-
Aren't you getting a .png file ?
-
wrote on 27 Feb 2017, 06:23 last edited by
yes i am getting .png but i want data in rgb format. because raw data format is only allowed on my frame buffer to display.
-
You do realise that if you load your image again in a QImage, you'll get a RGB image ?
If you really want to save an RGB image then go for bitmap but beware, it's uncompressed.
-
wrote on 28 Feb 2017, 05:06 last edited by
oh yes thank you. this will solve my problem partially. but what about new frame capture.? can you please help me out where I am lacking or what i am missing? why I am getting the same frame every time?If I'll get updated frame my task will be almost on final stage.please solve this.and again thank you.
-
You always take the same image from the list, check that your counter increments properly and that you indeed update the list.
On a side note, you should pass const reference to QImage parameters. That will save useless copies.
-
wrote on 14 Mar 2017, 05:36 last edited by
Thank you for reply and sorry for late response. Yes probably i am incrementing the counter properly. and sir I couldn't understand what you said about const reference to QImage parameter?
-
Use:
const QImage &image
as parameter -
wrote on 16 Mar 2017, 07:06 last edited by
K let me try it