Jump to content

EXCLUSIVE: Managed API for Camera on HTC Devices launched!


Recommended Posts

Guest Paul [MVP]
Posted

Fellow MVP and top chap Neil Cowburn writes on his blog:

Camera phones are becoming more and more prevalent these days. In fact, I doubt a carrier would want to ship a phone without a camera because of the potential for increased ARPU (average revenue per user). The Smartphone devices built by HTC have had a camera (in one form or another) since the early days of the original SPV (remember that plug-in camera? I still have one somewhere). This metamorphosed into an integrated camera in the HTC Voyager (SPV E200) and HTC Himalaya device (XDA II/MDA II, etc). A rather cool thing about these two devices is that the software used for taking pictures uses the same underlying API, which means it is theoretically possible to write a wrapper which will work on both the Himalaya Pocket PC Phone Edition and on the Voyager Smartphone. Well, I've done just that.  

Below is a link to a Zip archive containing the source for the wrapper as well as samples in C# and in VB.NET for the XDA II and SPV E200 (these are the devices I've tested this on).

On the SPV E200, the configuration options are limited by the hardware to the following:

Image capture is limited to:

JPEG file format

VGA/QVGA/QQVGA resolutions

Landscape orientation

Video capture is limited to:

AVI file format

QCIF/QQCIF resolutions

Landscape orientation

Any attempt to use options other than these on the SPV E200 will not result in successful capture.

Comments, suggestions for improvements, etc. can be directed to me via email. Also, I'd love to know how you plan on using the code.

You can download the library and view the full blog post here.

Enjoy!

:)

P

Guest beersoft
Posted

cool!!!

now i have to learn c#/.net stuff :)

later

Owen

Guest arunhallan
Posted

I dont get the significance?

Cant we just use the software on the phone?

Guest kevlar
Posted

This needs more explaining, I'm thinking the same as arunhallan atm, why?

Kevlar

Guest londonlad
Posted

its more one for them, in that one app will work on both e200 and xda2, so increases revenue.

But now that the underlying API has been discovered (with examples provided) can someone make a...

:idea: Bluetooth webcam :idea:

Guest ajb3000
Posted

Why are we limited to AVI capture only? Any ideas? Seems strange when the c500 supposedly has the same exact camera and can capture in 3GP.

Guest NeilC_MVP
Posted

I don't have a C500 to test on. That's why.

edit:

Also capturing to H263 format isn't supported on the E200.

Guest NeilC_MVP
Posted
... the underlying API has been discovered ...

I'm not using any of the underlying APIs as they are hidden and undocumented AFAIK.

Guest ajb3000
Posted
Also capturing to H263 format isn't supported on the E200.

That's what I was asking, how can the e200 be limited by hardware to only record in AVI format, when the c500 which uses the same camera hardware can record in H263. Any file format differences would surely be in software?

Guest NeilC_MVP
Posted

I'm not aware of the capabilities or the hardware in the C500, so my original statement stands, given the hardware and software I have at my disposable.

Guest Peter Foot
Posted

That's what I was asking, how can the e200 be limited by hardware to only record in AVI format, when the c500 which uses the same camera hardware can record in H263. Any file format differences would surely be in software?

Neil's code doesn't work directly with the camera hardware, as already noted the API is not documented. Instead it interfaces with the camera capture software on the device - on camera equipped HTC devices this is built by IA (who are now owned by HTC). Therefore any new formats supported by the C500 are within this IA Camera software (The E200 has v 2.0, I'm not sure what version ships on the C500). So while the camera hardware may be exactly the same, the software is what takes the raw data from the sensor and writes it into an image/video file.

Which means that technically this code could be altered to support new formats on the C500, with a little bit of information about the format identifiers and a C500 device to test on.

Peter

Guest Paul [MVP]
Posted

I'll be working with Neil to ensure the C500 features are fully supported... at least until someone donates him a phone!

He he...

P

Posted from my SmartPhone!

Guest Animefan
Posted

Okay I dont get this, what is it for if we cant use it to anything? :roll:

I may be a hopless newbie but what is the big use of this thing?

Pls tell me..

Does it mean we can use 4xzoom on 640x480 pics? :roll:

Guest NeilC_MVP
Posted

This is a way for developers to captures images and video using the integrated camera from a .NET Compact Framework application. That's all it is.

Guest www.msmobiles.com
Posted
This is a way for developers to captures images and video using the integrated camera from a .NET Compact Framework application. That's all it is.

yeah, it can spawn some interesting applications! I myself have seen (sample, not commercial) applications for MS Smartphone that were making a photo of a bar code and then recognizing it to a number, and that number can be pushed to internet to read some additional information. For example you make a photo of a barcode of a DVD and the program recognizes this DVD and connects to Internet page with additional informaiton about this DVD... etc etc etc... many applications possible but of course it all depends on willingness of developers to use this library to make some interesting software.

Posted

So Paul let us know when you have set something up to take donations from us towards a C500 for Neil to test on, I'm in

(and so MoDaCo the software company was born) :)

Guest a_rebel_spy
Posted

So who's workin on a webcam for the e200? :P :)

-arebelspy

  • 1 month later...
Posted

or - even better, at least in my case :) - for the c500?

It must be possible. I've tried using the MS Mobile Powertools ActiveSync Remote Display as a videostream source, but it's just too much of a hassle. Besides, it's too slow.

It really would be handy to be able to use my phone as a webcam on occasion.

Oh well, perhaps I should just buy one *sigh*

  • 3 weeks later...
Posted

Hi people.. still no developments in a camera API for the c500??

This would be really intersting as Im planning to port my augmented reality application (for pocketpc) to smartphone.

Guest Peter Foot
Posted
Hi people.. still no developments in a camera API for the c500??

This would be really intersting as Im planning to port my augmented reality application (for pocketpc) to smartphone.

This code works with the C500, it just doesn't have the constants in there to support new formats introduced with the version of the camera software on the C500 (v2.5) - MPEG-4 and H.263 video

Peter

  • 5 months later...
Guest Wizzle
Posted (edited)

Hi guys,

I have a problem with the use of Neil Cowburn's library. In fact when I launch the sample code for smartphone on my SPV E200, I get an error "Warning! Please check the options you have configured for the camera." when the capture is done and the program tries to go back to the main application.

Since it is the sample code given with the Cowburn.Imaging library, just get it here.

I think it is because the camera application is not closed properly, because there is a display bug then I leave the sample application. Display looks like in 16 color mode and some pictures in the photo album have transparent areas that let me see camera is active, that is to say, when I move the E200, I can see the camera is still in action

and draw what it sees in the "transparent" areas of the screen.

It's not really easy to describe the phenomenon, but I hope that you

have understood my problem.

Since I have no idea how the API of the IA Camera application works, it is really difficult for me to fix the problem, and I hope that some of you can help :D

Thanks

Edited by Wizzle
Guest Wizzle
Posted

after some tests it seems that the wrapper doesn't configure well the Camera application of the smartphone and that makes display's bugs when the camera application is closed. Does somebody have clues about IA Camera application API so I can correct this problem?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.