Filter Commonsware Cwac Image Android - android

I am wondering does anyone know how is the best way to implement filters using commonsware-cwac.
I want to update the camera preview each time the user chooses a different filter
Andrew

If you are looking to use filters, do not use the CWAC-Camera library. You are trying to write a real camera app, and that is not what my library is for. Quoting the README:
The targeted use case is an app that might otherwise have relied upon ACTION_IMAGE_CAPTURE, but needs greater reliablilty and somewhat greater control (e.g., capture images directly to internal storage).
If you are trying to write "a camera app" — an app whose primary job is to take pictures — this library may be unsuitable for you.
Please use the Camera2 (Android 5.0+) and Camera (Android 4.4 and older) APIs directly.

Related

Simple Camera2 API code in Android

I am developing an app to do some image processing operations on a captured image. I used camera2basic sample as a base to my project but it sometimes takes long time to capture and sometimes crashes which annoying me.
Is there a simple authentic code simpler than camera2basic to use camera2 API with opencv or can I use intent to use the Android camera.
There are a number of projects which aim to put a robust and simpler wrapper aoerund the Android Camera2 API, and they generally support the earlier camera API also.
The two most poplar at the moment seem to be:
https://github.com/Fotoapparat/Fotoapparat
https://github.com/wonderkiln/CameraKit-Android
They are not perfect - take a look at the issues lists and decide yourself.
I have used Fotoapparat and while I did see at least one issue, I found it simpler and more robust than the basic Camera2Basic example code.
If you just want an image to work with, you can use the standard Android image capture intent to get the default camera app to take a picture for you.
See "Taking Photos Simply" in the Android developer docs.

Pinch zoom in CWAC

I am using the CWAC library and wanted to implement a few functionalities on them.viz.
Is Pinch zoom possible?
I am using the camera as a part of the view pager and I am overriding setUserVisibleHint() to pause and resume the CameraView to reduce the memory footprint.Is there a better way of doing this?
Can touch to focus be implemented?
Is Pinch zoom possible?
Not via the library.
Is there a better way of doing this?
I have never tried this.
Your need for a camera would seem to well exceed my objectives for the library (and its eventual replacement). Quoting the documentation:
Library Objectives
The #1 objective of this library is maximum compatibility with hardware. As such, this library will not be suitable for all use cases.
The targeted use case is an app that might otherwise have relied upon ACTION_IMAGE_CAPTURE, but needs greater reliablilty and somewhat greater control (e.g., capture images directly to internal storage).
If you are trying to write "a camera app" — an app whose primary job is to take pictures — this library may be unsuitable for you.
I'll even go so far as to say: if camera functionality is more than 1% of the value of your app, do not use my libraries. Use the camera APIs directly.

Detecting screenshot on 4.0+ android devices

I have an application in which I want to be able to detect if a screenshot has been taken. The only way of doing this I could find involved utilizing a file observer. Is there any library which tackles this problem yet?
Alternatively, if I write my own library and use the file observer I need to be aware of the many different locations for screenshots on different devices. Is there a place where I can find a comprehensive list of these locations?
I am fully aware that this will not be 100% secure.

Are there any Android Camera components I could reuse / buy instead of coding from scratch?

I am in the middle of building my Camera based app for Android. I base my work on http://developer.android.com/guide/topics/media/camera.html and I do believe that handling all the Camera.Preferences has been done 100 times already and dozens of developers went through the path of
Check if the Flash is there
Check what are the Flash modes supported
Show those modes using fancy icons so user can select what she/he wants.
... and ... and ... and ... handle resolution differences for preview and final image
... and ... and ... and select what scene settings should be used ...
(which is closer to step 66) Finally, when you have all the user selections made - do take a photo, process data[] and take another one if you want
Rather than reinventing the wheel again (mine will be a semi-square one) I tried to find a component that will handle the UI piece and let me play with the takePhoto() and handle data[] coming from the camera when I need it.
After failing to find that ... I realized that in general I have problems finding components that one could reuse for free or buy for Android development.
So there are really two questions.
Are there any well established Camera components I can reuse for free or buy and add to my Android project.
What are the stores with components for Android development? Where / How to Google for them?
Thanks in advance for any help provided. Have a great weekend Folks!
You haven't described why you are trying to write a new camera app. The simplest way to reuse the existing camera features is to use an intent. You basically call up the existing camera application and have it return you a photo.
Android documentation for intents

Use Android phone camera to perform an action?

I would like to know if it is possible to register a movement close to the camera, and then perform some actions inside an app.
This was possible on Symbian, so it should be also on newer Android-powered phones. The problem is I can't find any resource to get started with.
Does anybody have any ideas on where I should start?
Looks like there's a library created over on Google Code: http://code.google.com/p/android-motion-detection/
If you want something a little more powerful, you can also run OpenCV on Android: http://opencv.org/android Don't think you will be able to do anything detecting the distance without another camera or a different type of sensor (like sonar) though.
As a bonus, depending on what your are trying to achieve, there's even a nice API doesn't involve anything additional to the Android SDK: http://developer.android.com/reference/android/media/FaceDetector.Face.html

Categories

Resources