[Q] overlay text on camera feed - Android Q&A, Help & Troubleshooting

Hi,
I was wondering if someone knows if it would be doable to write text as an overlay to a video feed... My main goal would be to add GPS data (speed, direction, etc) to the feed.
A similar question was asked over a year ago, but never got any feedback: http://forum.xda-developers.com/showthread.php?t=758936
Maybe today's knowledge will enable us to do this?

palloquin said:
Hi,
I was wondering if someone knows if it would be doable to write text as an overlay to a video feed... My main goal would be to add GPS data (speed, direction, etc) to the feed.
A similar question was asked over a year ago, but never got any feedback: http://forum.xda-developers.com/showthread.php?t=758936
Maybe today's knowledge will enable us to do this?
Click to expand...
Click to collapse
Yes, you can.
Regarding your original post, you don't even need to record video. You just need to prepare a layout w/ a FrameLayout containing a Canvas/SurfaceImage where you will output the video from the Camera, and a TextView (or a more complex view depending on your particular needs) where you will output GPS data (or any other text).
Job done.
If you want to record it as a video, it will require more work, because you'll have to overlay the video feed with the text, then re-encode the feed. I haven't yet dealt with video recording, I made a simple (private) app which overlaps the current date and time on the captured image from the Camera. Since you're creating new images, you need to be sure your device has enough RAM to do the processing (or scale the image to be smaller and require less RAM).

That sounds rather simple (even though I have never build an Android App in my life, I have built for other platforms.)
But, this way you 'just' build an app that shows your video this way. What if I would want to change the video feed so any application (android camera app, Skype, etc..) will get this feed with the added overlay... Would THAT be doable?

Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A

palloquin said:
But, this way you 'just' build an app that shows your video this way. What if I would want to change the video feed so any application (android camera app, Skype, etc..) will get this feed with the added overlay... Would THAT be doable?
Click to expand...
Click to collapse
In order to accomplish that, you'd need to rewrite the (internal) code which talks to the camera. Either at kernel level, or at android API level.
So either with a custom kernel or a custom ROM. No other way.

It's 2016, is there a built in way to recording a phone's video feed with a PNG still image or animated overlay?

Related

[Q] Advanced Camera Controls

Does anyone know if there's a program that lets you take more control over the HD2s camera?
I'm not even asking for shutter speed and aperture settings (although that would be awesome ;-).....I just sometimes wish I had some simple controls like exposure value (EV) to control the...well...exposure of the image. And I'm not talking about the "brightness"-setting which is just digital....
Am I the only one there?
I don't expect my HD2 to replace my SLR but it would certainly make many pictures better to have this kind of control...
Hope you guys know something!!!
cheers,
borg
The problem is HTC haven't publicly (i.e. accessible to programmers) made available any way of interacting with their camera driver libraries. All you have access to in programming code is the ability to 'ask' it to prompt the user to take a picture (and then do something with the taken pic afterwards). There's no way of interacting with the way the camera takes the picture.
This is also why we've not got any augmented reality apps etc. on the hd2 as there is no straight-forward way of accessing the camera live feed from code (without some serious hacking) all you can access is pictures taken by it.
Thanks for the info!
That's a real pity....do you think there's any chance, they're gonna release an api or something anytime in the future???

Photo time stamping just not an option?

I just emailed HTC about it. I even had to send a photo I took with my Hero with time stamping enabled to show them what I meant. The only thing they can tell me is that it just isn't an option on the Evo 3D. They also told me to look on the market for an app that'll let me add that functionality. Is there such a thing?
I'm adding the same example photo I sent to HTC in this post, so everyone will know what I mean by time/date stamping.
I really don't get why it isn't a standard option.
I was going to add a poll to see how many of you out there think this should be an option added to the camera app, but I can't seem to figure out how to add a poll. lol
Isn't the timestamp simply part of the metadata tags built into the image file?
saltorio said:
Isn't the timestamp simply part of the metadata tags built into the image file?
Click to expand...
Click to collapse
...what he said. Unless you actually want an old school red/orange timestamp on top of your photo? Might find an app for that on the Market, who knows?
dumasauce said:
Unless you actually want an old school red/orange timestamp on top of your photo? Might find an app for that on the Market, who knows?
Click to expand...
Click to collapse
the sample photo he posted above contains a text colored timestamp on the bottom right hand corner.
i do think it is very odd the camera app does not provide an option for a timestamp and i too have used this feature in the past and think its a good idea.
odd they didn't add that feature. i hadn't noticed until i read this post and checked my camera app .. def no option to put a timestamp on the lower right corner of the photo.
joeykrim said:
the sample photo he posted above contains a text colored timestamp on the bottom right hand corner.
i do think it is very odd the camera app does not provide an option for a timestamp and i too have used this feature in the past and think its a good idea.
odd they didn't add that feature. i hadn't noticed until i read this post and checked my camera app .. def no option to put a timestamp on the lower right corner of the photo.
Click to expand...
Click to collapse
But again, how is a time stamp on the actual photo a benefit over including the time stamp in the image file metadata?
Back when photos were on film, burning the time stamp into the photo itself was the only way to know when it was taken. But these things are digital. Metadata is a much more elegant way to track all sorts of information (like geo tags) associated with a photo, and it's how all the information is stored in the photos the EVO 3D (and pretty much every other digital camera device) takes. Most photo organization software (like most MP3 software) makes extensive use of meta tags for sorting and searching your files. And it doesn't muddy up your images to boot.
saltorio said:
But again, how is a time stamp on the actual photo a benefit over including the time stamp in the image file metadata?
Back when photos were on film, burning the time stamp into the photo itself was the only way to know when it was taken. But these things are digital. Metadata is a much more elegant way to track all sorts of information (like geo tags) associated with a photo, and it's how all the information is stored in the photos the EVO 3D (and pretty much every other digital camera device) takes. Most photo organization software (like most MP3 software) makes extensive use of meta tags for sorting and searching your files. And it doesn't muddy up your images to boot.
Click to expand...
Click to collapse
to illustrate the otherside of the viewpoint you've expressed and address your question.
i guarantee not every android user understands metadata, nor knows how to use/where to find it. i find it comical imaging my parents trying to locate the metadata of a picture they took on their phone.
for those people who still print out their images and want to scrapbook/put in photo albums, they might prefer having the time/date stamped on the front of the image itself.
some people prefer timestamps printed on their photos and some people do not. having or not having timestamps on photos is a matter of personal preference and is a legit request as an option, especially given i've had the option of printing timestamps on the images i've taken with previous android phones.
joeykrim said:
to illustrate the otherside of the viewpoint you've expressed and address your question.
i guarantee not every android user understands metadata, nor knows how to use/where to find it. i find it comical imaging my parents trying to locate the metadata of a picture they took on their phone.
for those people who still print out their images and want to scrapbook/put in photo albums, they might prefer having the time/date stamped on the front of the image itself.
some people prefer timestamps printed on their photos and some people do not. having or not having timestamps on photos is a matter of personal preference and is a legit request as an option, especially given i've had the option of printing timestamps on the images i've taken with previous android phones.
Click to expand...
Click to collapse
Well then go to the official HTC Community forums and make the request.
My X10 didn't have the ability to print time stamps on the photos, neither does my wife's text messaging phone. I'm not even sure if either of our digital cameras (a Digital Rebel, and a Canon point-and shoot) have that capability. All I'm saying is people have to move with the march of technology.
And on a related note: can you imagine your parents even having an EVO 3D?
Here's something. Wouldn't it be possible to just take the setting from the most recent Sense before Sense 3 and add it to the settings in our present camera app?
I'm no programmer, (or I'd just attempt it myself, lol). Just putting it out there so maybe someone will consider it.
The reason for time/date stamping ON the photo in addition to the metadata is the fact that most people, at least in my opinion, when attempting to retrieve the date of a certain photo on the internet, would rather just see it printed right on the photo than have to download the image and look for it in the image info.
Now I'm not sure if I'm just missing it when attempting this or not, but I went to a random site, right clicked on an image and went to View Image Info, and didn't see anything at all about a date or time the image was taken. Only when I actually download the image then go to Properties>Details do I see an actual date/time.
I didn't mean for this to be a debate or anything. Just feel it's wrong not to even give the option anymore. It's not like something like that takes up a lot or space or processing power, or even time processing the photo.
I think It's cool when you need to provide a day and time for a pic that you want to upload online.
johnequickiii said:
Here's something. Wouldn't it be possible to just take the setting from the most recent Sense before Sense 3 and add it to the settings in our present camera app?
I'm no programmer, (or I'd just attempt it myself, lol). Just putting it out there so maybe someone will consider it.
The reason for time/date stamping ON the photo in addition to the metadata is the fact that most people, at least in my opinion, when attempting to retrieve the date of a certain photo on the internet, would rather just see it printed right on the photo than have to download the image and look for it in the image info.
Now I'm not sure if I'm just missing it when attempting this or not, but I went to a random site, right clicked on an image and went to View Image Info, and didn't see anything at all about a date or time the image was taken. Only when I actually download the image then go to Properties>Details do I see an actual date/time.
I didn't mean for this to be a debate or anything. Just feel it's wrong not to even give the option anymore. It's not like something like that takes up a lot or space or processing power, or even time processing the photo.
Click to expand...
Click to collapse
i didn't want a debate either so i stopped replying as it was clearly off topic.
copying the settings file from a previous sense version of camera which supports the time/stamp, *could* work, assuming the current camera.apk supports time/stamping and they just forget/intentionally didnt add it to the options menu inside the camera.apk.
i dont have a previous sense phone, like the EVO, handy to pull the camera settings file from /data/data ..
on the EVO3D the settings file is: /data/data/com.android.camera/shared_prefs/com.android.camera_preferences.xml
an example adb pull command to copy it to the local computer:
adb pull /data/data/com.android.camera/shared_prefs/com.android.camera_preferences.xml c:\com.android.camera_preferences.xml
i do wonder how adding time stamping to the picture would work in 3d mode ... i wonder if that presented an issue so they scrapped it ... just speculating!
joeykrim said:
i do wonder how adding time stamping to the picture would work in 3d mode ... i wonder if that presented an issue so they scrapped it ... just speculating!
Click to expand...
Click to collapse
Ya know, I never thought of that as a potential reason for leaving it out. That's probably it too, not that we could get an official answer to it though, so speculation will have to do, but I do think you have it right.
I DID hear early on in the threads that it was possible that panorama and burst mode, among other things, weren't acting right for one reason or another, and those functions were pulled right before release. Makes sense that panorama or burst wouldn't work right either in 3D, so it stands to reason.
Still though, it would've been nice to have those options for 2D pictures. It's a shame they couldn't figure out how to disable those options when the 3D switch was flipped, if any of this is really the case even. lol
Sent from my PG86100 using XDA App

[Q] Business phone apps recommendation needed

Hi there. I need to recommend some apps for my friend. He's a senior businessman, has been using Symbian phone for a while but now it's outdated, and he wants to replace it with new and shiny. Why not Android phone then?
So, the main features that he needs are:
- larger fonts everywhere (maybe some kind of the accessability app).
- "spoof" app that would generate ambient sounds during conversation ("sorry, I'm in an airport, cant hear you... what?... ").
- app for recording conversation, both caller and owner side, without any discernable signs of it being recorded (it could be unpleasant for the caller to know about recording).
- good blacklisting app, for obvious reasons (calls, SMS, etc.).
Few of them may sound quite weird, but, well, that's what he's asking for.
I'd be digging the Market also for these, but first I want to know of any 'tried-and-true' examples, if you can recommend them.
I'm not sure iOS have apps for such purposes, but if any of Apple fans would see this topic - you may recommend them also. It's a bit easier to use, after all. Not trying to start a holywar
Please use the Q&A Forum for questions Thanks
Moving to Q&A

[Q] Looking for developers for a small project?

Hi Everyone!
My names Mike, and I'm an artist working in the UK. I've had an idea for an art project for quite some time now, and in the process of working through the details I believe a component of it could be solved using an Android Application. The idea for the application would be to have a camera that is always at the ready and will snap a picture every time a certain level of audio input is reached. Now, this will be slightly different to your average 'Audio Trigger' in the sense that the camera will have to be able to take pictures at an incredibly fast pace. Two, three, four or more a second if possible.
Obviously, Ive done a bit of research to see if there are any applications available that could do the job without any alterations. There are a few apps that come close.
The first is 'Fast Burst Camera'
This is an amazingly quick camera application capable of taking photos in the region of 30fps at 1280x720. (I'm guessing this uses some sort of modified video camera function?) Setting this to Full Manual mode allows for amazing capture speed, taking photos as fast as you can hit the shutter button. Perfect!
The second is 'Sensor Camera'
This app has perfect control over the sound meter levels for the 'Audio Trigger'. Allowing you to set a watch value at 10db increments. The only drawback is the use of full resolution shots, making the capture rate far to low.
I'm wondering if it would be possible to combine the two functionalities into one application? Whether this would be possible in terms of processor speed and hardware?
I know the commercial appeal for this functionality would be almost non-existent, but for the use in this project it would be perfect! I've emailed the respective developers of each application, without much interest.
If anyone is interested please let me know. This is for a non-profit art project, so it would be great if people wanted to donate their time, but I would also be happy to pay. The app would not be used commercially at my end, only for the work in the project.
If you've made it this far, thank you for your time
Mike.
Hey your app sound cool let's do some Mindstorm:
Problems I see for the app: If you hit a loud sound and you don't want to take a picture. (Ex. Train passes nearby and the phone it's locked in your pocket).
Functioning diagram: In the java we implement a action listener that hear the sound and this will return in a action (making a photo). The ui must not be so complex only a force photo button and maybe some preview.
It's a great app and it's easy. Maybe I can analyze if it's too difficult to make it but now I'm in holidays and I don't have too much time... I'll say something, what can be great it's to have the eclipse project of those two apps if they are opensource, specially the sound hearing one.
Sent from my RK29 tab...
---------- Post added at 09:33 PM ---------- Previous post was at 08:43 PM ----------
I said previously I'm on holidays and i don't know if I'm interested in the project yet.
SferaDev said:
package org.sferadev.audiot;
Working on source of a simple photo picker. Next get audio listener and then combine it.
Click to expand...
Click to collapse
Sent from my RK29 tab...
Hey SferaDev!
Thanks a lot for the detailed reply, sounds like you've definitely got some headway with this one.
On the subject of unwanted sounds triggering a shot, for this project, that wont actually be a problem! As long as its possible to adjust the trigger using some sort of incremental value (in db?) it should be perfect. I'll probably be using a separate audio source fed through the headset line-in as the trigger.
Thanks again for your interest.
Oh, and they're both commercial apps, so I doubt there's much chance of getting to the project files
Yeah I deserve the camera app it's not as difficult as it seems. We are not working from the API, w are just requesting to the camera app a photo. What it's difficult because I never worked with audio recording apps within the source it's to listen the balance of the dB...
Hope I helped but we need more exp devs, because all my Android apps are related to internet usage not to media usage, but I'm quickly learning...
Sent from my RK29 tab...
No worries SferaDev! I really appreciate the information so far. I'm totally determined to see this through so hopefully there's someone who can help
Project continues here: http://forum.xda-developers.com/showthread.php?t=1840300
Sent from my RK29 tab...

[Q] How to use frontcamera, for building in a App

Goodday all,
Could someone tell me how to build something like this.
I'm building a native app, don't ask it was very difficult, animated gif, swf don't show, you have to put several formats of video otherwise they don't show on mobile devices.
There is no good resolution, so that it show well on all mobile devices, so for now i use standard resolution, mobile first and then we will see.
I can now build everything on html5 base, great!!!
And till now i've got what i want.
except for one thing, i try to post a picture so you got a better picture........
I want 1 screen and in the corner i want the user to see him/her self just like a mirror, nothing more nothing less.
they don't have to record themselfs or make a picture, just like a mirror.
I know that i have to use 'call camera function' probably with java or something.
Most of the scripts on the internet, uses a full screen camera with 'take a picture'function.
But that is not what i need.
Do you have a sollution????????
Hope that it works it is on one drive from hotmail, here is the link to a picture of how it should look.
Copy paste please i am new, i may not post outside links.
onedrive.live.com/redir?resid=4E29E7043A04AB32!273&authkey=!AOssHS6-1X7nnTc&ithint=folder%2cpng
Hope you will have 'THE' answer for me, thanx in advance.

Categories

Resources