How to do HDR capture based on HAL3? - camera

I want to do HDR capture based on HAL3, but i have two problem now.
Problem 1: We know that HDR need to snapshot three image. It can be realized by sending three capture requests, but i don't think it's a good idea. So do you know how to solve this problem?
Problem 2: The HDR need different exposure time to the three image, one image must take a short exposure time, one image must take a middle exposure time and the last one must take a long exposure time. I want to know how to achieve this effect.
If you have some experience in android camera in HAL3, or you have some example code, can you tell me? I am in troble in this for a long time. Thank you very much!

Related

Oxyplot: IsValidPoint on realtime LineSerie

I've been using oxyplot for a month now and I'm pretty happy with what it delivers. I'm getting data from an oscilloscope and, after a fast processing, I'm plotting it in real time to a graph.
However, if I compare my application CPU usage to the one provided by the oscilloscope manufacturer, I'm loading a lot more the CPU. Maybe they're using some gpu-based plotter, but I think I can reduce my CPU usage with some modifications.
I'm capturing 10.000 samples per second and adding it to a LineSeries. I'm not plotting all that data, I'm decimating it to a constant number of points, let's say 80 points for a 20 secs measure, so I have 4 points/sec while totally zoomed out and a bit more detail if I zoom in to a specific range.
With the aid of ReSharper, I've noticed that the application is calling a lot of times (I've 6 different plots) the IsValidPoint method (something like 400.000.000 times), which is taking a lot of time.
I think the problem is that, when I add new points to the series, it checks for every point if it is a valid point, instead of the added values only.
Also, it spends a lot of time in the MeasureText/DrawText method.
My question is: is there a way to override those methods and to adapt it to my needs? I'm adding 10.000 new values each second, but the first ones remain the same, so there's no need for re-validate them. Also, the text shown doesn't change.
Thank you in advance for any advice you can give me. Have a good day!

What does the value at setVolume in AVAudioPlayer do/mean?

I am working in Xcode 4.5.1 and developing for the iPhone.
I am using AVAudioPlayer to play sound. I am playing two sounds and want to make a ratio of their average volume relative to each other.
I gather the relevant information using averagePowerForChannel: in combination with NSTimer, checking the volume of both sound files at an interval. However, I have come to the discovery that, regardless of the value I input at setVolume, a specific sound file will always return the same average volume, for example -20,0. I conclude that it does not take into account any volume changes you apply using setVolume.
You can enter values 0-1 at setVolume. Is there a way to convert these values to something meaningful that I can apply to the volume information which I have gathered using averagePowerForChannel:? I am assuming that I can't simply multiply my average volume value with the setVolume value. I have looked in the class reference, but I could not find anything useful.
Please point me in the right direction. Any input is appreciated.

Objective C - detect sound

How can I detect sound on the iPhone?
I currently have it somewhat working using the method described in this article http://mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/
However, as mentioned in that article, in noisy rooms for example, the method won't work.
So in a way, I'm looking for methods that I can use to separate background noise from actual noise intended?
There probably won't be an existing code on the internet, but if someone can point me to the right direction, it would be very appreciated.
Thank you,
Tee
It's definitely not a great solution, but you could determine a baseline amplitude (ambient sound) and trigger your events when you determine that the amplitude is a certain amount greater for a set amount of time.

Location manager, not accurate even after setting kCLLocationAccuracyBest

Hi there
I am using location manager and mapkit, i am able to get the curernt location, but its not accurate enough - This is my problem
My current location on the map is for example 3.0856333888778926, 101.67204022407532, but location manager's location only returns +3.08370327, +101.67506444; which is short of a few decimal numbers
This is resulting in the wrong location (about 1 KM away) when i try to show directions
I have already set location to be kCLLocationAccuracyBest -
Any suggestions?
Where do you try it? Inside, the accuracy of GPS is inherently limited (usually not to 1km, though. But within big cities, reflections from buildings are possible). Ahh, and another thing: is the measurement done inside the simulator? I'm not sure how the location is determined within it. But in my tests, I'm also usually quite off my actual position.
It may be related on how you have setup your locationmanager.
Could you please post it here for us to check? Maybe this could help.
Are you on wifi? This happens to me if I am on wifi. When I switch to edge/3g, everything turns to normal. Just try with standard map application if it also shows you wrong.
the highest possible accuracy and combine it with additional sensor data.
kCLLocationAccuracyBestForNavigation
This level of accuracy is intended for use in navigation applications that require precise position information at all times and are intended to be used only while the device is plugged in.

Timeline graph - how to handle "time gaps"?

I've been working with Google chart API and annotated timeline. Drawing graphs is fine. I have no problem.
However, I need to draw a timeline graph for share prices. And as you may know, share prices are meaningful only between certain times (e.g. from 10AM to 4PM, when the market opens and closes).
How do I change the Google timeline graph so that on X-Axis, the range is from 10AM-4PM? Right now, it just draws a long constant line between 4PM till 10AM next day before prices start to move again.
Man, I hope that makes sens. (Google finance chart seems to do it).
Thank you SO much for whoever can answer. You are a CHAMPION!
It is apparently now possible if you use the new AnnotationChart API: https://code.google.com/p/google-visualization-api-issues/issues/detail?id=25#c43
You could also use other, similar solutions, like dygraphs for example.
I had the same problem.
After giving it a little though I found workaround. Just fill the missing values with 0 (or null) values. It will do the job