Add to Camera preview a frame showing position in Android - android

I need to add to user interface in Android application using Camera API a frame showing ID card position with specific dimension on the screen, when the user is taking a picture.
like this:
Any suggestion?
Thank you.

You will have to make your own camera and process each frame to find and highlight edges.
It's not an easy task :)
https://www.tensorflow.org/ or OpenCV might be of interest to you.

I think you cant use android API (Android.Camera) for doing that. You can use the OpenCV to do anything in your application.

Related

Could anyone tell the skill name is what?

I want to realise and implement a function. But I do not know what the skill name is what.
I reference the Gallery APP in android I found that Gallery have a function is when user browse the picture, the picture will display and dismiss automatically when it reach screen edge.
Just like the picture I draw, picture will show when it reach the screen edge.
It's called Horizontal ScrollView.I also reecomend this library to you: https://github.com/lucasr/twoway-view Have a look here too: https://www.airpair.com/android/horizontal-image-galleries-android-studio
There is a library on github may be also helpful: AndroidImageSlider

Access Android Camera Frames with no Preview

I want to do image processing on frames from Android Camera in real time with OpenCv, but all the OpenCv Android examples provide a preview of the image being captured. I really don't need previews of the frames , is there any way to get the frames without actually showing the preview ?
A quick/naive way would be to make onCameraFrame method returning null and set your CameraBridgeViewBase visibility to SurfaceView.INVISIBLE or SurfaceView.GONE.
I still would like to know if it worked for you, but meanwhile I found the solution that worked for me. As I feel grateful for the guy who wrote it, I'm sharing this (scroll down to answers section) with anyone who will have same problem in future.
In case the link vanished, here's his/her pro-tip:
You can set your preview (in this case a CameraBridgeViewBase)
transparent by setting the alpha value of the view, with 0 being
completely invisible.
mOpenCvCameraView.setAlpha(0);
This should make your preview "disappear".
I wonder how your solution works, because as you can read in the docs:
This method is invoked when delivery of the frame needs to be done.
The returned values - is a modified frame which needs to be displayed
on the screen.
Indeed, in my case it doesn't work but I desperately need such a functionality.

Apply EffectFactory Effects on CameraPreview

I am trying to make an Android application that lets the user take a picture with lomo effect. The thing is, I want to make the camera preview the image WITH the effect automatically, not take a picture then apply the effect.
I learned how to use CameraPreview on this link. I also found out about EfectFactory class here, which has the effect I want. The problem is, I don't know how to apply efectfactory class on a CameraPreview.
I googled this but didn't find the answer I was looking for.
For the code, I am using the same as how my first link provided.
Can anyone help me on this problem?
Thanks in advance
You can do below thing:
1) Get bitmap from captured image in GLS Surface view
and then
2) Apply effects using Effect Factory class.
More detail use this link.

Capture a certain part on a full screen camera

Lets say this picture below is a full screen custom camera, how could I capture a square photo from the inside of that red square?
I chose this approach on custom camera to avoid THIS kind of problem which results to a squashed preview for square camera. After the process the output should be like this :
I just want to try the solution that Instagram used to prevent that squashed-image-from-square-camera issue, I read it from the accepted answer of #xramos from THIS LINK also.
Here's what he said :
Please help me fellow prgrammers :) Thank you and have a good day :D

Finding subimage/template/object from mainImage/scene using opencv android

I want to find that does smalller image or subimage is part of larger image or not? and if it is part of it then want to know its coordinates.
For doing that, i was using template matching method of opencv. It was working fine if the size of subimage is exactly same as size of part of Main Image(where it matches). But if i change the size/scale the sub image then template matching is not able to do what i what i want to perform. Can anyone know other methods of how to do that and please if possible give me the code to find it. Any help will be appreciated.

Categories

Resources