opencv4android

Can an android.hardware.camera2.CaptureRequest be used with OpenCV?

那年仲夏 提交于 2021-02-18 20:26:55
问题 I've worked on this for days now. I have an OpenCV/JavaCameraView-based project I am trying to integrate with an Android android.hardware.camera2.CaptureRequest object I use to control the camera's sensitivity to light. The CameraBridgeViewBase.CvCameraViewListener2/JavaCameraView project works (I can see an image on the screen), and the CaptureRequest project works (see this, too), but combining the two technologies in a single project has proved a big problem. Has anyone gotten these two

Can an android.hardware.camera2.CaptureRequest be used with OpenCV?

。_饼干妹妹 提交于 2021-02-18 20:26:05
问题 I've worked on this for days now. I have an OpenCV/JavaCameraView-based project I am trying to integrate with an Android android.hardware.camera2.CaptureRequest object I use to control the camera's sensitivity to light. The CameraBridgeViewBase.CvCameraViewListener2/JavaCameraView project works (I can see an image on the screen), and the CaptureRequest project works (see this, too), but combining the two technologies in a single project has proved a big problem. Has anyone gotten these two

OutOfMemoryError generated due to camera preview

限于喜欢 提交于 2021-02-04 20:47:30
问题 I managed to open the Android camera using opencv. but when i use the code that fixes the camera orientation -"see the code mentioned below in the onCameraFrame(..) method"- the App crashes after few seconds and the logcat generates the belwo posted messages in the "logcat section". To solve this issue: i tried to use SystemClock.sleep to force the App to dely for a while but this was not a good solution because it delays the camera preview i tried to minimize the frame size as much as i can,

OpenCV using static libraries for Android application

陌路散爱 提交于 2020-07-23 06:17:05
问题 I have integrated OpenCV 4.3.0 in my Android Studio 4.0 application. I have to install the OpenCV Manager on my target Android device to make my application work. I have followed below link to integrate the OpenCV: https://android.jlelse.eu/a-beginners-guide-to-setting-up-opencv-android-library-on-android-studio-19794e220f3c As per the above link, I have the static OpenCV libraries in my Android application. In my code, I just open the camera preview for testing. My application fails to load

OpenCV using static libraries for Android application

一笑奈何 提交于 2020-07-23 06:16:49
问题 I have integrated OpenCV 4.3.0 in my Android Studio 4.0 application. I have to install the OpenCV Manager on my target Android device to make my application work. I have followed below link to integrate the OpenCV: https://android.jlelse.eu/a-beginners-guide-to-setting-up-opencv-android-library-on-android-studio-19794e220f3c As per the above link, I have the static OpenCV libraries in my Android application. In my code, I just open the camera preview for testing. My application fails to load

OpenCV using static libraries for Android application

荒凉一梦 提交于 2020-07-23 06:15:33
问题 I have integrated OpenCV 4.3.0 in my Android Studio 4.0 application. I have to install the OpenCV Manager on my target Android device to make my application work. I have followed below link to integrate the OpenCV: https://android.jlelse.eu/a-beginners-guide-to-setting-up-opencv-android-library-on-android-studio-19794e220f3c As per the above link, I have the static OpenCV libraries in my Android application. In my code, I just open the camera preview for testing. My application fails to load

Reading values in opencv_face.LBPHFaceRecognizer.getHistograms()

坚强是说给别人听的谎言 提交于 2020-06-23 13:22:23
问题 I am trying to work with the open_cv library in android. I have never worked on it before, so this may be a very basic question. I have an opencv_face.LBPHFaceRecognizer object in my Recognizer Activity. My requirement is to read the histogram values for previously-stored faces. opencv_face.LBPHFaceRecognizer mFaceRecognizer = = createLBPHFaceRecognizer(2, 8, 8, 8, 95); File file = new File(RegisterActivity.getFilePath(mContext)); mFaceRecognizer.load(file.getAbsolutePath()); opencv_core

android: smooth out edges of random shape bitmap

大兔子大兔子 提交于 2020-05-28 09:25:40
问题 I have an random shape bitmap cut out by user. I want to fade out its borders i.e. contours, so as to make it appear smooth. What should I do? To get the borders and color of every pixel in bitmap, I am traversing it pixel by pixel. It takes long time, still I am ok with it. Is openCV my only option? If yes, can anybody point me towards any tutorial or suggestion for logical approach? 回答1: You can just run a smoothing filter on your shape. In opencv you can use the blur fnnction or

Creating BackgroundSubtractorMOG2 in Android by OpenCV 3.0 RC1

99封情书 提交于 2020-01-24 18:49:26
问题 I'm trying to do background subtraction with MOG2 in OpenCV 3.0 on my android phone. However, it seems that there are no suitable constructor to create a new BackgroundSubtractorMOG2 in version 3.0. My code lies down here. @Override public void onCameraViewStarted(int width, int height) { mFrame = new Mat(height, width, CvType.CV_8UC4); mFgMaskMOG = new Mat(height, width, CvType.CV_8UC1); pMOG2 = new BackgroundSubtractorMOG2(); } With these codes Android studio reminds me that the constructor

Getting RGB Value Live Camera, Error NullPointerException

℡╲_俬逩灬. 提交于 2020-01-14 10:10:00
问题 [UPDATE]: Screenshot has been added. I was following basic tutorial tutorial-1-camerapreview from opencv-3.4.1-android-sdk_4. I want to click on screen and get RGB Color of that x y position. I got help from HERE (Retrieve exact RGB value from touch event in camera preview) : Getting x y coordinates: @SuppressWarnings("deprecation") @Override public boolean onTouchEvent(MotionEvent event) { x = (int)event.getX(); y = (int)event.getY(); return super.onTouchEvent(event); } onCameraFrame as: