This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How do I normalize an image?
I am working on the implementation of active contours with gradient vector flow. I need to normalize the input image in the interval from 0 to 1 Unfortunately, I do not know how to do this in JAVA or JAI. If you can help me with some of your code or some link which can me help, many thanks.
If you want to use an already existing library, I can recommend ImageJ, which has a good set of image processing algorithms. You can find more in this SO question.
If you want to implement it yourself, that's quiet easy. Find maximum and minimum of your image in a run, then run over it again, rescaling every point.
Related
This question already has answers here:
Playing an arbitrary tone with Android
(10 answers)
Closed 3 years ago.
So I'm trying to find out if its possible to create some sound waves that I can then manipulate using java, more specifically for the android platform. The Idea is to get integer values and using that, dynamically change pitch/pulse based on user input. I've looked into the soundpool class and it seems that that only handles sampled audio, I'm wondering if there is any way to actually generate it using code.
I'm assuming that if so, each wave generated would have to use it's own thread in order to manipulate them independently. Can someone confirm this?
Any help in the right direction is appreciated.
So I found this question whose highest voted answer is pretty much exactly what I was looking for. In any case, here's the link for reference:
Playing an arbitrary tone with Android
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am planning to implement a mobile guitar tuner app. I did an initial research and found out some commonly used methods for pitch detection such as fast Fourier transformation , autocorrelation ,etc.
I have also found out that FFT is not a very good mechanism to detect frequency.
Since there are 2 parts in this project which is detecting the frequency of a guitar string and matching that frequency with the frequency which the string should be in,i thought of using an already implemented class library for detecting the frequency of a string.
I currently have no idea how tough this project will be, so my question is which part of the project is tougher? Is it matching the 2 frequencies or detecting a frequency of a string ? Also is there a way to use the FFT but at the same time get the accurate frequency of the string.
Thank you for your time.
The TarsosDSP project, a java audio processing library, contains several pitch detection algorithms. You can test them using the provided pitch detection example, an see which one works best in your case. The source code can be found on the TarsosDSP github page
The library is open source and available on Android. I think it is a good match for your application.
To match a frequencies to a target frequencies, i would convert both to the absolute cents scale (or MIDI cents). 100 cents equals a semi-tone. You then can round up to the nearest 100 to get the assumed target tone. Consult this page to convert frequencies in hertz to cents
There are numerous libraries that can help you do this.
The phone mic should be able to detect the audible spectrum you want
Detecting frequency is the first part, FFT should be able to do this
Transferring frequency to pitch is something you'll have to think about
matching frequencies is just the second part
Here's a good start:
Frequency detection and pitch tracking in java
FFTW is the 'fastest fourier transform in the west', and has some Java wrappers:
FFT JAVA library
This question already has answers here:
How do I generate random integers within a specific range in Java?
(72 answers)
Closed 8 years ago.
i am wondering if you could help me in my project. I would to ask your opinion of what algorithm is best to used in generating random numbers that ranges from 1 to 9.. Its a game like "Sphere Break" a famous mini game of FFx-2.
Please refer to the picture for
Need Opinions Please!! Need Help Badly.
My problem is that i want a certain algorithm to generate random numbers from 1 - 9 like in the picture every gameplay = another set of random coins...
P.S. i am developing an android game using unity !! thx for the response
create a List<Integer> to hold 1-9 number and use Collections.shuffle() and render them
This question already has answers here:
Oval Gradient in Android
(5 answers)
Closed 9 years ago.
I want to perform a gradient effect that shines from bottom of the layout as appear in the following picture. Notice that it is not a regular tag with start colour and end colour because I tried those but I haven't reach to the required solution. Also I don't want to set the background with a picture because I’m concern of quality issues. Please help. Thank you.
You can't do this using XML drawables in Android. I recommend using images.
This question already has answers here:
Java OCR implementation [closed]
(5 answers)
Closed 9 years ago.
Hey guys is it possible to read text from an image, like how you go to submit a form and it ask you to fill in the text inside image. I want to know if it is possible to read the text inside it. If so, what language?
David Biga
EDIT:
I am not trying to read captcha I was just giving an example of an image with text in it.
It is possible to read text with Optical Character Recognition.
However, CAPTCHAs are designed to thwart this, in order to distinguish humans from computers.