All Questions
Tagged with android-camera opencv
132 questions
0
votes
0
answers
78
views
In openCV, the inputFrame.rgba().size returns resolution of inputFrame or previewSize of the camera?
Can someone please confirm, in the openCV, the inputFrame.rgba().size() gives the resolution of the inputFrame or the previewSize of the camera?(https://github.com/touchlab-lab/OpenCVAndroidLib/blob/...
1
vote
0
answers
173
views
Convert YUV NV21 to RGB in VideoSink
Using the code bellow I manage to get NV21. So on output I get black and white image, it is possible that the chrominance (UV) data is not being handled correctly during rendering, leaving only the ...
0
votes
1
answer
474
views
OpenCV Android camera upside down ISSUE
i am working on face detection app in android.
i have used open cv 3.4.14 library and using front camera. the camera index is set to 1. but the streaming is upside down. i tried almost all of the ...
0
votes
0
answers
405
views
Converting YUV_420_888 To Base64 Android corrupted image
I am currently working on a project which uses OpenCV in background mode to detect faces while the app is playing videos .
I've managed to run OpenCV as a service and I am using an ImageReader ...
0
votes
0
answers
217
views
How can I access my android camera using an opencv python script on other network
I have tried the IP webcam software and it works with my code when my laptop and android phone is connected to the same network. But is there a way in which I can work with my laptop and phone ...
0
votes
0
answers
34
views
Dialog deforms when change the orientation Android
I have an app that works with an activity to take pictures which works with landscape orientation, when take the picture and return to the activity (this activity works with portrait orientation) to ...
2
votes
1
answer
814
views
How to get intrinsic and extrinsic parameter matrix of my camera using Google ARCore
I want to use Google ARCore to get the extrinsic and intrinsic parameter matrix of my mobile phone. So far, I only see documentation about getting the intrinsic parameter matrix but I don't see ...
2
votes
2
answers
3k
views
OpenCV - How to set a Full Screen Camera view in Android?
Background
As a novice in software, I am currently aiming to format my camerapreview to full screen, that would be identical to the camera preview on Snapchat. Right now, I am able to showcase my ...
3
votes
1
answer
783
views
Disabling automatic image stabilization on Android (Moto Z)?
I'm writing a custom app using OpenCV for computer vision on an Android phone (Moto Z). To complicate things even more, I have a fisheye add-on lens attached to the camera.
Now, I've noticed that ...
0
votes
0
answers
1k
views
OpenCV-Android: Storing image using JavaCameraView on click leads to very low quality image and wrong orientation
I am trying to use OpenCV in my android application.
What should happen is an image should be captured using OpenCV (JavaCameraView) on a button click and saved to SD Card. While the image which is ...
-1
votes
2
answers
3k
views
OpenCV DroidCam
With my previous laptop (Windows7) I was connecting to my phone camera via DroidCam and using videoCapture in OpenCV with Visual Studio, and there was no problem. But now I have a laptop with Windows ...
4
votes
0
answers
1k
views
auto focus on Android with OpenCV
I am writing an app using OpenCV. I have used the standard way to use the camera with OpenCV.
private CameraBridgeViewBase mOpenCvCameraView;
protected void onCreate(Bundle savedInstanceState) {
...
2
votes
0
answers
647
views
Android How to run pupil detection in background using OpenCV?
I'm developing a scientific Android App that uses OpenCV Library to detect the Eye pupil movement.
I've working on the code below which works fine on the App Activity. But the purpose of the
App is ...
2
votes
0
answers
256
views
Camera does not change FPS openCV JavaCameraView
Using Android Camera(1) I am trying to change to a specific FPS rate, therefore I read out the available FPS ranges that the device's camera supports and try to pick a range that should be displayed ...
0
votes
1
answer
62
views
Android, OpenCv: crop fails when crop occurs within function
I have a class which receives frames taken with a camera. It then passes the frame to a camera calculator, which does some processing and crops according to the camera calculator's aspect ratio ...
2
votes
2
answers
1k
views
Android, OpenCv, captured photo dimensions do not match preview
I have a JavaCameraView subclass which allows the user to take and save a photo. The issue is that the preview frame I receive via onCameraFrame() does not share the same dimensions as the photo that ...
2
votes
2
answers
5k
views
How to display OpenCV JavaCameraView front camera in mirror image (Android)?
I am currently experimenting with the openCV's java example on face detection in android. However, the view created by the camera is not in mirror imaging.I tried setting the android:screenOrientation ...
1
vote
0
answers
59
views
OpenCV gives previous frames
I am using OpenCVLibrary330 and I get frames through onCameraFrame function , I store it into an ArrayList by cloning (inputFrame.clone())current frame and convert it into jpg when ArrayList has at ...
-1
votes
2
answers
490
views
Checking if a person is in the correct posture using openCV?
I was playing around with openCV on Android and was wondering how I can implement this feature.
Let's say we have 2 images. One is the ideal image, and the other is an image of the user of this ...
0
votes
1
answer
924
views
Android steganography detection LSB
I am trying to do detection of LSB Steganography using real-time camera on mobile phone. So far i havent had much luck with detecting the LSB Steganography, whether on printed material or on the PC ...
0
votes
3
answers
2k
views
Droidcam not connecting to opencv
I am trying to connect the feed from droidcam from my phone to opencv for face detection. But i am not able to connect the camera to opencv
I am using this code
cap = cv2.VideoCapture('http://192....
2
votes
0
answers
1k
views
Disable automatic adjustments of android camera
I'm trying to subtract background of videostream by making cv::absdiff:
absdiff(rgbvs[i], bgs[i], diffs[i]);
The problem is that android camera makes automatic adjustments of brightness, exposure or ...
4
votes
0
answers
694
views
detecting multi color document with OpenCV4Android
I am new to OpenCv with Android.I am trying to make an application which auto detects documents using OpenCv - 2.4.13 . In my app, there is a functionality of detection documents (like a Scanbot app) ...
0
votes
1
answer
1k
views
google tango / opencv android camera app crashes/hangs
I am developing a prototype app, utilizing the tango depth camera for template matching. So far, I have been able to solve all problems with the help of already answered questions, documentation etc.
...
1
vote
1
answer
526
views
setPreviewSize in OpenCV
I'm working on an Android app that uses OpenCV 3.1.0 and displays the camera preview. Initially, we call setMaxFrameSize(640, 480) because the processing that is required is heavy and we don't need ...
2
votes
1
answer
1k
views
Android opencv Camera resolution low
So, I have implemented opencv to my android project, but when listing avaliable sizes for resolution I get the highest value of 1920x1080(im using Samsung Galaxy s6 Edge Plus). The highest resolution ...
2
votes
0
answers
763
views
Android JavaCameraView image preview distorted and not proportional
So, Im doing application that is using OpenCv library for recognizing images from a picture. Im using JavaCameraView and it works very well on most devices, but, on some devices, it does this:
Good ...
9
votes
4
answers
7k
views
Android camera2 output to ImageReader format YUV_420_888 still slow
I'm trying to get the Android camera2 running in the background service, then process the frame in the callback ImageReader.OnImageAvailableListener. I already use the suggested raw format YUV_420_888 ...
14
votes
3
answers
2k
views
Can an android.hardware.camera2.CaptureRequest be used with OpenCV?
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 ...
0
votes
0
answers
406
views
callback for each frame captured from camera on android
I found a project using opencv or something of the sorts to send video frame-by-frame for streaming purposes.
Unfortunately for me, newer examples which use camera2 rather than the deprecated Camera ...
1
vote
1
answer
869
views
Document detection using OpenCv forming performance degradation in Android
I am new to OpenCv with android .I am trying to make an application which auto detects documents using OpenCv - 2.4.13 . In my app, there is a functionality of detection documents (like Scanbot app) ...
2
votes
2
answers
3k
views
SurfaceView or TextureView which is better for Preview
Got stuck In a situation, where working on a Camera app for android. The Camera should be customized and
Customized Camera
and not just the built-in. That's fine. I want camera to detect the eyes, ...
1
vote
0
answers
387
views
Using android data to stitch multiple images
I am using gyroscope data from android phone to stitch two images. The image are placed as if they are flipped.
rotation matrix of camera from gyroscope-
double thetaOverTwo = ...
0
votes
1
answer
887
views
What format i should convert the frames to to be used in openCV
In my App, i open the native android camera and i render the preview on a TextureView, and what i want to do next is, to take each frame from the camera and perform some processing and operations ...
0
votes
1
answer
497
views
Hide camera preview in OpenCV android
I am building this application where I need to get video with the camera and process it with openCV as well as show a view with 3D graphics being renderered in it.I am using two fragments. One for ...
0
votes
1
answer
2k
views
NDK or OpenCV Camera crashing this app? Why?
I'm trying to use native code to process some images using JavaCameraView class. Everything seems fine but when I run the app, it crashes with the following message: " it seems that you device does ...
0
votes
0
answers
208
views
Set Rajawali surface view layout parameters equal to JavaCameraView
I am trying to put a 3d object over my JavaCameraView using Rajawali library. I have set the max frame size for JavaCameraView as follows:
javaCameraView.setMaxFrameSize(640,480);
I want my surface'...
0
votes
2
answers
987
views
Android: Fast rotate CameraPreview
I am building Face detection app using OpenCv. I am processing preview frame data received on callback onPreviewFrame. I am using camera in portrait mode, whereas onPreviewFrame returns me data in ...
7
votes
1
answer
3k
views
ClassNotFoundException: android.hardware.camera2.CameraAccessException with OpenCV 3.1.0
I am working in an android project with Android Studio 2.2 that uses OpenCV 3.1.0 library. I imported the library according to this answer. The situation is the following:
When I compile the project ...
1
vote
1
answer
1k
views
How to know if an image is too dark that it needs flash using OpenCv
I'm working in an Android project using OpenCV and I'm using a surface to implement my own camera, because I want to provide the user with feedback about the picture they are taking to help them ...
3
votes
1
answer
450
views
Image processing in onPreviewFrame
I am trying to find contours from the raw bytes received from onPreviewFrame.
These raw bytes received are not rotated when we do setDisplayOrientation(according to the android developer docs). It is ...
0
votes
1
answer
1k
views
Document contour detection using opencv
I am trying to render the largest contour on the preview frame of the camera. Here is my code:
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
previewSize = ...
1
vote
0
answers
260
views
Order of byte[] in onPreviewFrame android [duplicate]
I have a problem with onPreviewFrame of android Camera. I want to take the picture every frame, blur it and display it. I tried the onPreviewFrame method along with OpenCV, so I put the byte[] in a ...
0
votes
1
answer
3k
views
OpenCV Android Camera Not Fullscreen
I am making an OpenCV App for Android that does heavy image processing. To increase my frame rate, I limited my frame size to 640 x 480 like so:
private BaseLoaderCallback mLoaderCallback = new ...
2
votes
0
answers
525
views
Android - OpenCV template matching with camera picture
I'm trying to make an application which compares a pictures taken from the camera with others stored in the SD card.
If I try to compare two images stored in SD card it works fine, but when I try to ...
4
votes
2
answers
3k
views
Custom RectangleDetector using Vision API
How to create custom RectangleDetector like FaceDetector and BarcodeDetector in Mobile vision API? I need to detect rectangle shapes from camera frame. How can i achieve that?
1
vote
1
answer
790
views
Opencv's javacameraview failing to open camera on Android Marshmallow Devices
I've developed an android application which is using Opencv v2.4.10. I have used javacameraview in my capture activity and it is working fine on devices which has api level lower than 23. But ...
1
vote
0
answers
93
views
My application can't store the image taken with OpenCV Library
I am developping an android application for face recognition ,and when i press the button to store the picture , My app stopped !!
Here is my code the the Activity Add Picture :
public class ...
1
vote
1
answer
369
views
CameraBridgeViewBase get all supported resolution Android
I have an app which needs to know all the camera supported resolutions - how do i access that data?
any suggestions?
3
votes
2
answers
10k
views
Need to capture images inside the rectangular view using camera in android
Am creating a document scanning application in android, am using OpenCV and Scan library in my project for cropping,I have created a rectangle using drawrect in camera view, now I need to capture the ...