I am looking for a blur algorithm for an android app. The algorithm I found here Fast Bitmap Blur For Android SDK doesn't work in an AsyncTask.
I receive data from a sensor over a long time (one until two houres). Depending on the data an image must be blurred more or less. All pure java code I found is not fast enough wherefore I want to access native C code over jni. Is there anybody could give a hint?
Thanks anko
Related
I'm developing an Android application to match two images using ORB feature detection .
The processing and matching logic is called in java using JNI functions.
The problem is that the feature detections works well for some images, but fails in some images and some cases.
Here is an example of images that fails in some unknown conditions
After some thoughts and discussions, I figured out that the problem is that the problem is the lack of features that's why the program fails. Someone in the opencv community tried this image and it gave him 60 keypoints which all of them doesn't survive the RobustMatcher tests.
So I need to enhance to features in this image in order to make the matching work.
In addition to equalizeHist, what can I do ?
I hope you can help me with some suggestions and maybe some examples guys.
One way is to enhance the edges of the image. Do a Laplacian filter for example and multiply the result to the original image. This job makes the features (edge) more salient. Of course before everything convert the image to a float type and at the end, normalize your image.
I'm working on an android project that requires Real time Image Recognition feature. I'm a newbie and don't have too much knowledge of image processing. I have to detect only one image by the application, that is nothing more than a logo. Logo is in the shape of circle.
Please suggest appropriate solution.
Thank you.
I recommend to use OpenCV library. It will allow you to learn your application to recognize diffrent things. For example I've made my application to recognize cars based on the size and shape of the object.
there is a lot of examples for OpenCV how to recognize a logo or similar things
for detection of specific object you can follow some basic techniques of object localization such as Normalized Cross-correlation in other words its also known as template matching, you have to prepare a template of your log and just use it as a convolution mask, and convolve your input image with this mask, ideally at the location of the desired object, response of convolution will quite high, so you can further fine tune the process to localize your object.
For how to use template matching in opencv you can refer to its document page http://docs.opencv.org/doc/tutorials/imgproc/histograms/template_matching/template_matching.html
OR
As you have mentioned in your question, that your region of interest is circular in shape, you can use some shape measures after initial segmentation of your image.
hai i need to find the integer values from the image using image processing i go through some image processing alogorith like edge dectection but did not get a solution can any one show some example of dectecting the integer values from a image ?
Well for image recognition and stuff like that in general we use Neural Networks. Implementing a basic neural network is not hard, but there are countless implementations out there in the wild (native C/C++ and Java as well).
How ever I would strongly recommend to use the OpenCV library which is somehow complex but would allow you to do far more advance things.
Note: there is a port for Android and you can find it here: OpenCV 4 Android
I'm trying to create a camera activity for taking photos to be OCR'd. Here's what I wish to accomplish:
A resizable box in the middle of the camera preview to indicate which particular area will be created into a Bitmap and processed by the OCR engine.
Continuous autofocus (done)
I'm using tesseract btw.
If anyone would care to point me to some reference / examples / tutorials, that would be great.
There's a viewfinder rectangle here:
https://github.com/rmtheis/android-ocr/blob/master/android/src/edu/sfsu/cs/orange/ocr/CaptureActivity.java
I've been doing something similar. Right now, I'm just sending the whole photo to a webservice and processing it with OCRfeeder, which will perform segmentation on the image and send each part with text in it to tesseract. I've been getting much better accuracy that way. In addition, you might want to perform some preprocessing to clean up the image first.
There can be two general approaches.
You can resize the image before sending it to OCR engine. Keep in mind that Tesseract engine you use has some kind of feature - it requires some space between characters and image borders, sometimes more than expected.
The second approach is to use field-level recognition, when you specify coordinates of the text block and send the full image to OCR engine. Have a look at http://www.ocrsdk.com, it's a cloud OCR SDK with web api recently launched by ABBYY, it's in beta, so for now it's free to use. It has a field level recognition methods and Android code samples. I work # ABBYY and can provide additional info on our products if necessary
In a gist this is what I want to do:
I want to load a 100x100 region (any part) of a 5mega pixel Image into a Android Bitmap class so that I can draw it onto a canvas element
Its that simple. Thats all I want to do. Thats it. Nothing more. Nothing less. Sounds simple enough. So before you have a smirk on your face, read on further down.
I understand that this question has been asked a million times already. And I have also done my homework, researching it. Unfortunately I have hit a dead end from all sides. Maybe I need to make my question clear enough.
There is a limit on the amount of heap the Android VM lets you allocate. So loading a large bitmap, even the one from its own camera (I own a Nexus S) is not possible by using the following function.
BitmapFactory.decodeStream(InputStream is)
Yes I could scale it by using BitmapFactory.Options, but how then should I zoom in?
Now I am trying to design an image viewer which can smoothly zoom in/out from the image. Obviously that's not possible if I can't even load the image.
In gingerbread we have a new class BitmapRegionDecoder , but I am designing my app for Froyo. All these classes have hooks into the native api which use the Skia 2D Graphics Library. The Android NDK does not give access to these api's also. Maybe there is a way to manually build Skia and use it to load a java bitmap. But I am not sure how?
It seems to have been solved already (http://blog.javia.org/how-to-work-around-androids-24-mb-memory-limit/) in this app - https://market.android.com/details?id=image.viewer by using the memory allocated in the native C code using malloc/new. But I cant figure out how?
So make things clearer what I want is something that can zoom in/out of an image to full resolution. If possible it should be smooth or atleast it can be done in a separate thread.
If I need to use OpenGL, then please give me a sample code also.
I figured this out on my own. :)
Its not the best way, but it works wonderfully.
I created the bitmap in native code and accessed subset of its region using the Skia graphics library. (Which would mean that I am accessing private API's and its functionality could easily break with newer Android Versions).
http://code.google.com/p/skia/
I had to link against this lib in my C++ code and access this functionality through JNI.