Ask Your Question

Alexander Smorkalov's profile - activity

2019-01-21 21:22:33 -0600 received badge  Good Answer (source)
2017-12-31 11:59:51 -0600 received badge  Nice Answer (source)
2017-10-17 13:45:57 -0600 received badge  Good Answer (source)
2017-08-29 15:30:10 -0600 received badge  Civic Duty
2017-08-15 10:38:43 -0600 received badge  Good Answer (source)
2016-09-04 12:21:53 -0600 received badge  Nice Answer (source)
2016-01-19 03:34:45 -0600 received badge  Nice Answer (source)
2015-03-03 21:24:45 -0600 received badge  Nice Answer (source)
2014-12-29 09:49:32 -0600 received badge  Good Answer (source)
2014-10-13 05:54:22 -0600 received badge  Nice Answer (source)
2014-09-28 04:11:09 -0600 received badge  Good Answer (source)
2014-09-26 10:26:29 -0600 commented answer OpenCV .so library for Android

If you link against OpenCV statically, you do not need this call. Everything that is needed has been already added by linker.

2014-07-10 09:16:37 -0600 received badge  Nice Answer (source)
2014-06-28 12:02:11 -0600 commented answer VideoCapture::set() memory leak

Fill free to contribute your fix to OpenCV via pull request on Github: http://code.opencv.org/projects/opencv/wiki/How_to_contribute.

2014-06-15 04:59:12 -0600 edited question Question about using VideoCapture API on specifc

I used VideoCapture API on android to grab frame. I think that this API is working well on JellyBean device(android version 4.1.2) But there is crash problem kitkat device(android version 4.4.2 GalaxyS4) I don't know exactly cause of problems Can you check my log when having crash?


06-12 19:03:26.103: W/ApplicationPackageManager(24037): getCSCPackageItemText()
06-12 19:03:26.184: I/Adreno-EGL(24037): <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build:  (CL3869936)
06-12 19:03:26.184: I/Adreno-EGL(24037): OpenGL ES Shader Compiler Version: 17.01.11.SPL
06-12 19:03:26.184: I/Adreno-EGL(24037): Build Date: 01/17/14 Fri
06-12 19:03:26.184: I/Adreno-EGL(24037): Local Branch: 
06-12 19:03:26.184: I/Adreno-EGL(24037): Remote Branch: 
06-12 19:03:26.184: I/Adreno-EGL(24037): Local Patches: 
06-12 19:03:26.184: I/Adreno-EGL(24037): Reconstruct Branch: 
06-12 19:03:26.294: D/OpenGLRenderer(24037): Enabling debug mode 0
06-12 19:03:26.314: W/ContextImpl(24037): Implicit intents with startService are not safe: Intent { act=org.opencv.engine.BIND } android.content.ContextWrapper.bindService:529 org.opencv.android.AsyncServiceHelper.initOpenCV:24 org.opencv.android.OpenCVLoader.initAsync:64 
06-12 19:03:26.444: D/OpenCVManager/Helper(24037): Service connection created
06-12 19:03:26.444: D/OpenCVManager/Helper(24037): Trying to get library path
06-12 19:03:26.554: D/OpenCVManager/Helper(24037): Trying to get library list
06-12 19:03:26.614: D/OpenCVManager/Helper(24037): Library list: ""
06-12 19:03:26.614: D/OpenCVManager/Helper(24037): First attempt to load libs
06-12 19:03:26.614: D/OpenCVManager/Helper(24037): Trying to init OpenCV libs
06-12 19:03:26.614: D/OpenCVManager/Helper(24037): Trying to load library /data/app-lib/org.opencv.engine-2/libopencv_java.so
06-12 19:03:26.614: D/dalvikvm(24037): Trying to load lib /data/app-lib/org.opencv.engine-2/libopencv_java.so 0x42a28018
06-12 19:03:26.924: D/dalvikvm(24037): Added shared lib /data/app-lib/org.opencv.engine-2/libopencv_java.so 0x42a28018
06-12 19:03:26.924: D/OpenCVManager/Helper(24037): OpenCV libs init was ok!
06-12 19:03:26.924: D/OpenCVManager/Helper(24037): First attempt to load libs is OK
06-12 19:03:26.924: I/OpenCVManager/Helper(24037): General configuration for OpenCV 2.4.9 =====================================
06-12 19:03:26.924: I/OpenCVManager/Helper(24037):   Version control:               2.4.9
06-12 19:03:26.924: I/OpenCVManager/Helper(24037):   Platform:
06-12 19:03:26.924: I/OpenCVManager/Helper(24037):     Host:                        Linux 3.2.0-56-generic x86_64
06-12 19:03:26.924: I/OpenCVManager/Helper(24037):     Target:                      Linux 1 armv7-a
06-12 19:03:26.924: I/OpenCVManager/Helper(24037):     CMake:                       2.8.12.1
06-12 19:03:26.924: I/OpenCVManager/Helper(24037):     CMake generator:             Ninja
06-12 19:03:26.924: I/OpenCVManager/Helper(24037):     CMake build tool:            /usr/local/bin/ninja
06-12 19:03:26.924: I/OpenCVManager/Helper(24037):     Configuration:               Release
06-12 19:03:26.924: I/OpenCVManager/Helper(24037):   C/C ...
(more)
2014-06-14 16:30:59 -0600 received badge  Good Answer (source)
2014-06-04 12:51:08 -0600 answered a question OpenCV video writer changes video on save

Most of video compressing encoders process video in YUV color space, but not in RGB. Also video compression in most cases is loosy compression. It means that encoder changes pixel values to decrease data entropy and adopt frames for better compression. It is normal behavior.

2014-06-04 12:42:13 -0600 commented answer OpenCV build options, big difference in speed after android library linking

No, It's not. Also such performance improvements can be result of TBB usage and some compiler flags that turn on automatic vectorization or some other indirect improvements.

2014-06-01 03:41:35 -0600 answered a question OpenCV build options, big difference in speed after android library linking

There is special OpenCV version targeted for Tegra SoC. It is closed source, provided by NVIDIA and distributed via OpenCV Manager. OpenCV for Tegra is optimized version of OpenCV and looks like OpenCV Manager provides it to you. In case of self-built binary you use general OpenCV code, no NVIDIA specific optimizations. Here is NVIDIA page about TADP and OpenCV for Tegra included.

2014-05-06 23:35:37 -0600 received badge  Guru (source)
2014-05-06 23:35:37 -0600 received badge  Great Answer (source)
2014-05-04 11:20:59 -0600 answered a question Android Application Programming with OpenCV - HEAP MEMORY CORRUPTION

The failure is a bug in OpenCV Native camera implementation for Android. Native camera is experimental api for camera access for native code without Java API. You have two ways to fix the issue

  1. Switch to Java camera. The solution is applicable for Java apps only. Replace 'NativeCameraView' on 'JavaCameraView'.

  2. Update OpenCV for Android up to 2.4.9.

2014-04-14 04:42:04 -0600 commented answer libnative_camera compilation

It is folder with libraries libbinder.so, libutils.so, etc for each platform.

2014-04-12 03:10:52 -0600 received badge  Nice Answer (source)
2014-04-01 06:35:51 -0600 received badge  Nice Answer (source)
2014-03-27 23:53:05 -0600 answered a question unsatisfied link error in cascadeclassifier

It looks like you try to use OpenCV (construct CascadeClassifier object) before loading native library libopencv_java.so

2014-03-27 23:13:01 -0600 edited question Segmentation fault on loading opencv_java248

I configured and compiled the OpenCV 2.4.8 distribution on RHEL 6.4. The configuration and compilation appears to have worked fine (after some struggling). However, when I load the library I get a segmentation fault. I've setup two different projects (in NetBeans and Eclipse) and I get exactly the same result. Here's the crash report: The error appears to be in the libpthread.so library. How should I approach debugging this?

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000003daea0c170, pid=31221, tid=140356986955520
#
# JRE version: 7.0_21-b11
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.21-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libpthread.so.0+0xc170]  pthread_spin_lock+0x0
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x00007fa764007800):  JavaThread "main" [_thread_in_native, id=31227, stack(0x00007fa768496000,0x00007fa768597000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000000

Registers:
RAX=0x0000000000000000, RBX=0x00007fa7539036b0, RCX=0x000000000000001e, RDX=0x00007fa753960c80
RSP=0x00007fa7685945f8, RBP=0x00007fa768594720, RSI=0x00007fa753960c80, RDI=0x0000000000000000
R8 =0x00007fa764193d50, R9 =0x0000000000000001, R10=0x00007fa768594380, R11=0x0000003daea0c170
R12=0x00007fa76415b210, R13=0x00007fa76415b210, R14=0x00007fffa26b50e0, R15=0x0000000000000000
RIP=0x0000003daea0c170, EFLAGS=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000006
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007fa7685945f8)
0x00007fa7685945f8:   00007fa752ac9938 0000000000000001
0x00007fa768594608:   0000000000000000 0000000000002b41
0x00007fa768594618:   00007fa752ac9abf 0000000000000001
0x00007fa768594628:   00007fa753960c80 0000000000003dcb
0x00007fa768594638:   00007fa752ac7777 00007fa753960c80
0x00007fa768594648:   00007fa768594670 0000000000006114
0x00007fa768594658:   00007fa752aca5c0 00007fa7539f8960
0x00007fa768594668:   00007fa753960c80 00007fa753960c80
0x00007fa768594678:   00007fa764193d50 0000000000000001
0x00007fa768594688:   00007fa7539036b0 00007fa768594720
0x00007fa768594698:   00007fa752acabde 0000000000000001
0x00007fa7685946a8:   00007fa7539f8960 0000000000004762
0x00007fa7685946b8:   00007fa75317c3d6 0000000000000001
0x00007fa7685946c8:   00007fa7539f8960 000000000000244c
0x00007fa7685946d8:   00007fa753182f4f 0000000000000000
0x00007fa7685946e8:   000000010000ffff 00007fa753903780
0x00007fa7685946f8:   00007fa7531830eb 00007fa76415b210
0x00007fa768594708:   00007fa7533bf3a6 00007fa7523e1a38
0x00007fa768594718:   0000000000000006 00007fffa26b50a8
0x00007fa768594728:   00007fa7527e4f0b 0000003d00000000
0x00007fa768594738:   0000003dada0e535 00000000000921c0
0x00007fa768594748:   0000000000000001 0000000000000000
0x00007fa768594758:   00007fa752487a28 0000000b00000002
0x00007fa768594768:   00007fa768594970 00007fa76415b210
0x00007fa768594778:   0000000000000046 00007fa76415b4c8
0x00007fa768594788:   00007fa764189360 0000000000000001
0x00007fa768594798:   0000003dada12c25 0000000000000040
0x00007fa7685947a8:   00000000f16045e8 00007fa7685947b0
0x00007fa7685947b8:   00000000cef91fcb 8000000168594840
0x00007fa7685947c8:   0000003dadc21160 ffffffff80000001
0x00007fa7685947d8:   00007fa768594970 0000000000000000
0x00007fa7685947e8:   00007fa768594828 00007fa768594888 

Instructions: (pc=0x0000003daea0c170)
0x0000003daea0c150:   01 f6 83 e0 fd 09 c6 31 c0 89 37 f3 c3 90 90 90
0x0000003daea0c160:   31 c0 c3 90 90 90 90 90 90 90 90 90 90 90 90 90
0x0000003daea0c170:   f0 ff 0f 75 0b 31 c0 c3 0f 1f 84 00 00 00 00 00
0x0000003daea0c180:   f3 90 83 3f 00 7f e9 eb f7 90 90 90 90 90 90 90 

Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x00007fa7539036b0: <offset 0x156f6b0> in /home/developer/NetBeansProjects/OpenCV/lib/libopencv_java248.so at 0x00007fa752394000
RCX=0x000000000000001e is an unknown value
RDX=0x00007fa753960c80: <offset 0x15ccc80> in /home/developer/NetBeansProjects/OpenCV/lib/libopencv_java248.so at 0x00007fa752394000
RSP=0x00007fa7685945f8 is pointing into the stack for thread: 0x00007fa764007800
RBP=0x00007fa768594720 is pointing into the stack for thread: 0x00007fa764007800
RSI=0x00007fa753960c80: <offset 0x15ccc80> in /home/developer/NetBeansProjects/OpenCV/lib/libopencv_java248 ...
(more)
2014-03-18 02:35:31 -0600 answered a question Change the resolution of a picture in JavaCamera

JavaCamera view has android:layout_width="match_parent" android:layout_height="match_parent" attributes that ask view to scale image from camera to fit view. You just need to change sizing policy.

2014-03-17 02:32:48 -0600 commented answer libopencv_java cannot be loaded anymore

Remove LOCAL_SHARED_LIBRARIES := opencv_java line from your Android.mk.

2014-03-16 10:07:32 -0600 answered a question libopencv_java cannot be loaded anymore

*.apk file is just a zip archive. You can extract it and check is there libopencv_java.so or not.

2014-03-14 09:09:39 -0600 received badge  Necromancer (source)
2014-03-14 07:45:46 -0600 answered a question Initializing static cv::Mat with cv::Mat::zeros causes segmentation fault

I've created an issue on code.opencv.org.

2014-03-14 07:29:03 -0600 commented answer Using OpenCV in GNU Octave

Unfortunately I have never use Matlab bindings, so I cannot help with it.

2014-02-26 05:51:17 -0600 received badge  Nice Answer (source)
2014-02-25 22:59:56 -0600 received badge  Nice Answer (source)
2014-01-25 12:07:47 -0600 commented answer Which Android phones support CUDA

There are some devices based on Quallcomm S800 that supports OpenCL, but there is is some issue here. This SoC supports OpenCL 1.1 Embedded Profile. Ocl module in OpenCV is designed for full profile and mostly does not work on S800 SoC. You have to make some customizations to use OpenCV ocl module.

2014-01-25 08:20:05 -0600 received badge  Nice Answer (source)
2014-01-19 06:29:51 -0600 commented answer Open CV support for WinRT and Windows Phone8

The script uses Ninja tool for building. Try to install Ninja build tool or change build tool. You need to edit cmake_winrt.cmd and change project generator from -GNinja to -G "NMake Makefiles"

2014-01-19 06:26:01 -0600 edited answer Open CV support for WinRT and Windows Phone8

I find this page opencv/wiki/WindowsRT but I can't build anything. The path to VS 11 is wrong and when I have correct that and other little errors I got this:

C:\opcv\opencv\platforms\winrt\build_winrt_arm>cmake.exe -GNinja -DCMAKE_BUILD_TYPE=Release -DENABLE_WINRT_MODE=ON -DWITH_FFMPEG=OFF -DWITH_MSMF=OFF -DWITH_DSHOW=OFF -DWITH_VFW=OFF -DWITH_OPENEXR=OFF -DWITH_CUDA=OFF -DBUILD_opencv_gpu=OFF -DBUILD_opencv_python=OFF -DBUILD_opencv_java=OFF -DCMAKE_TOOLCHAIN_FILE=..\winrt\arm.winrt.toolchain.cmake   ..\..\..
CMake Error: CMake was unable to find a build program corresponding to "Ninja".
 CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file: C:/opcv/opencv/platforms/winrt/build_winrt_arm/CMakeFiles/2.8.12.1/CMakeCXXCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file: C:/opcv/opencv/platforms/winrt/build_winrt_arm/CMakeFiles/2.8.12.1/CMakeCCompiler.cmake
-- Configuring incomplete, errors occurred!

I don't know enought how to use CMake so I'm be halted by this. So I can't tell you how well this thing go.

2014-01-19 06:23:38 -0600 answered a question Which Android phones support CUDA

The only mobile processor that supports CUDA right now is NVidia Tegra K1. As I know, there is no consumer device with the SoC right now, engineering boards only.

2014-01-16 09:10:43 -0600 received badge  Nice Answer (source)
2014-01-10 00:19:45 -0600 answered a question AVI file created by OpenCV 2.4.6 not always valid when app exits

There were some synchronization issue in OpenCV 2.4.6 and may be earlier releases. It had been fixed in 2.4.7 or 2.4.8 release, but we did not get response from issue author. Could you update OpenCv up to 2.4.8 and check the issue status. If it`s fixed, I close the issue.

2014-01-09 23:59:59 -0600 commented answer What Android 4.1.3 or newer device did you use to test OpenCV 2.4.7?

Do you install OpenCV Manager from SDK? You need to use OpenCV Manager 2.16.

2014-01-04 02:04:53 -0600 answered a question How to start learning android application using opencv

I recommend you to start from this tutorial. There are java binding for most of functions and classes. Here is reference manual for them.

2013-12-30 02:22:14 -0600 answered a question Cross compile opencv raspberry pi

You've built OpenCV as a shared library. So, you need to install it on device to run your app. Cross compilation is rather faster then native compilation on RPi.

2013-12-30 01:45:06 -0600 answered a question OpenCV .so library for Android

Yes, it is possible. Add OPENCV_LIB_TYPE:=STATIC before including OpenCV.mk in your Android.mk. This string enables static linkage with OpenCV. Linker removes all unused classes and functions automatically. You cannot build the singe shared library for all architectures. If you set target architecture to all in Application.mk you've got one shared library per architecture.

2013-12-30 01:41:27 -0600 answered a question Odroid hardware acceleration

OpenCV uses popular video decoding/encoding libraries for video i/o support. If you use Linux it can be FFMPEG, GStreamer, Xine, etc. If you want to use hardware acceleration you need hardware accelerated version of video library. For example, if you have somw plug-in for GStreamer, install it and build OpenCV with GStreamer support.

2013-12-29 05:39:05 -0600 commented answer What Android 4.1.3 or newer device did you use to test OpenCV 2.4.7?

The problem was cased some issue in private Tegra optimizations. Right now, the issue has been fixed and tested on several Samsung devices with Android 4.3.

2013-12-29 05:37:15 -0600 answered a question Trying to run OpenCV samples on Samsung Galaxy S4: dark screen

OpenCV4Android 2.4.8 SDK with the issue fix has been already published. You can install fixed Manager apks from SDK or beta testing package from Google Play. OpenCV team uses this feature to publish new packages. The new version of Manager is published as beta for developers first. If there is no issues, we publish it in production in a week or two. It is done to decrease impact of any regressions for end application users.