JavaCameraView slow and blurry and stutters on OpenCV above 2.4.3 (Bug #3033)
If Im running "OpenCV Tutorial 5 - CameraControl" which can be found in the samples from the OpenCV 2.4.3 release everything is fine, that means, the JavaCameraPreview is smooth and looks as good as the NativeCameraView or the standard app camera preview that comes with my phone to take pictures.
But if Im now running "OpenCV Tutorial 3 - CameraControl" which can be found in the samples from the OpenCV 2.4.5 release, the CameraPreview now looks horrible. Its slow and blury and it stutters and it hurts to see it.
Changing the preview resolution does not solve the problem.
Its the same problem with OpenCV 2.4.4
With my own developed code its the same behavior as with the OpenCV samples.
Changing CvCameraViewListener*2* to CvCameraViewListener also has no effect.
Xperia Mini St15i
ARMv7 Processor rev 2 (v71)
No error output on logcat
What is the version of OpenCV Manager is installed on you device? DO you install it manually from SDK or from Google Play? If you install it manually from SDK what hardware platform do you choose?
It looks like you install OpenCV Manager for armeabi (arm v5 and arm v6). It is much slower then arm v7 versions and preview fps can be less. Try to remove OpenCV Manager from your device and install it from Google Play. It intellects the most appropriate version. After that check preview quality.
- Target version set to 2.4.6
- Assignee changed from Alexander Smorkalov to Martin Grasser
I reinstalled OpenCV Manager directly from Google Play.
If I start OpenCV Manager it again says Im using ver 2.7.
Under Device Information it says: ARM v7 with Neon / Os version: Rel(4.04), API 15
I tested it in my code again and changed nothing but the OpenCV version in my project to build from 2.4.3 to 2.4.5.
BUT NOTHING CHANGED!!! Its still messed up with 2.4.5.
Please fix that bug.
I investigate your issue. In 2.4.5 automatic frame scaling is added to JavaCameraView and NativeCamera view classes. Check application logcat output for string "mStretch value: xxx". If xxx differs from 0 then application scales each frame for fitting View size. This behavior is enabled by setting android:layout_width and android:layout_height to "match_parent" value. Such behavior has been enabled by default in tuturial3 since OpenCV version 2.4.5.
Ticket canceled as not an issue.
- Status changed from Open to Cancelled
I dont agree to you.
I changed match_parent to wrap_content and the mStretch value changed from 1.0 to 0.0.
But this doesn't change the quality of the camera preview in any way.
In comparison to opencv 2.4.3 its the same huge quality loss that I described above.
It seems the quality changes can best be recognized in daylight scenarios with bright scenarios.
Hello, Martin Grasser!
I make several fixes in JavaCameraView, that can potentially fix your issue too. I attach tutorial-3 package with internal OpenCV build, that is not use OpenCV Manager. Could you, plese, install it on your device and check its performance. I cannot reproduce your issue on any device I have, so your help will be very useful.
- File example-tutorial-3-cameracontrol-debug.apk added
- HW Platform set to ARM
- Operating System set to Android
- Difficulty set to Medium
- Affected version changed from 2.4.5 (latest release) to 2.4.0 - 2.4.5