Bukharitsyn / qt-opencv-multithreaded

Automatically exported from code.google.com/p/qt-opencv-multithreaded
0 stars 0 forks source link

Capture does not work in osx #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install in Mac OSX
2.
3.

What is the expected output? What do you see instead?
The problem is that the capture do not wait until next frame and always returns 
a frame (repeats frames)
So the calculated frame rate gets really high. The same code in linux works 
perfect. 

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by alalbiol...@gmail.com on 14 Jan 2013 at 12:05

GoogleCodeExporter commented 8 years ago
Is it just the frame rate calculation (i.e. display) which is not functioning 
correctly or is it capturing as a whole?

Unfortunately I do not have a OSX machine to reproduce this issue on - are you 
able to investigate this issue further?

Original comment by nickdad...@gmail.com on 14 Jan 2013 at 12:08

GoogleCodeExporter commented 8 years ago
Actually I found your code because I was also trying to capture video in 
separate threads using Qt in my project and it did not work either. My goal is 
to use different threads to capture so I can better syncronize stereo frames. 

I have checked my code and it is essentially the same as yours and have the 
same issue. 

The idea is that opencv grab frame should block the thread until a new frame is 
available, but in osx it does not block the thread and if there is no new frame 
it just repeats the last one

I think that at the high level the code is correct because it works perfectly 
in ubuntu
The problem is that I do not really know if this is a Qt or opencv problem (or 
the combination of the two)

Original comment by alalbiol...@gmail.com on 14 Jan 2013 at 12:20

GoogleCodeExporter commented 8 years ago
same problem with me... i'll see if i can find a solution

Original comment by WolframT...@googlemail.com on 27 Mar 2013 at 4:42

GoogleCodeExporter commented 8 years ago
This was an OpenCV bug, and I fixed it yesterday. Here's my pull request: 
https://github.com/Itseez/opencv/pull/1074
Please test it, and vote for it by adding comments, if you want it included in 
the next OpenCV release.

With this patch, version 1.21 works great. I don't know about newer versions.

Original comment by Frederic...@gmail.com on 4 Jul 2013 at 2:34

GoogleCodeExporter commented 8 years ago
Thank you for letting me know Frederic! Much appreciated.

Unfortunately I cannot test it as I don't have OSX - perhaps someone else can 
verify the fix?

PS: v1.3.1 is much improved over v1.21 and I highly recommend upgrading if you 
can - please see the Change Log for further details.

Original comment by nickdad...@gmail.com on 4 Jul 2013 at 2:40

GoogleCodeExporter commented 8 years ago
Great, I'm running a capture thread at constant 25fps currently and compare 
frames for similarity before accepting them currently... I'll add it ASAP and 
check if it works. Thanks a lot!!

Original comment by WolframT...@googlemail.com on 5 Jul 2013 at 1:17

GoogleCodeExporter commented 8 years ago
Would a Mac OS/X user be able to test the v1.3.2 release with the latest OpenCV 
release (2.4.6.1) and verify whether the bug has been fixed or not?

Many thanks.

Original comment by nickdad...@gmail.com on 4 Nov 2013 at 3:57