« Midnight sun in Luelå, Sweden | Main | Blast on London underground and buses »

Mowecam: Mobile Web Camera

July 04, 2005
Keywords:

Update
Visit the Mowecam support forum to ask any questions.

What is it
Mowecam is a J2ME experiment with a camera enabled mobile phone and a publicly accessible web server.

The application takes periodical snapshots from the mobile phone camera and posts them to a web server.

The latest image is then avaible for inclusion in a web site, for example a web log (blog).

The usages are the same as for a standard web camera and can include security, watching a party progress, weather, baby monitor and many more.

Mowecam enjoys the freedom of not being dependent on a computer, nor any hard wired Internet connection. If you are within GSM network reach you can start broadcasting photos from your location.

Requirements
A modern Java enabled mobile phone with a camera.

The mobile phone needs to support the Mobile Media API (and being able to take snap shots which excludes SonyEricsson T610 and T630).

Mowecam has been developed and tested on SonyEricsson K750. There will be problems on other mobile phone models but many of them can be worked out if you let me know.

Usage
First of all download the application to your computer and install it as you normally do. This may be via infrared, Bluetooth or similar. Certain phones require both the jad and the jar file, others require the jar file only.

Due to tighter security in the new J2ME version, you will be asked to confirm when the application is about to take a snapshot and when it is trying to connect to the internet. Check the manual of your phone to find out how to change the permission settings for Mowecam to "ask once only" (or else it will not be able to send images without you confirming it can go online).

Go to the settings page and enter a unique key. This will later be used to identify your image when you retrieve it via a browser. An email address is often unique and I recommend to use just that. If you are worried about the email address ending up somewhere where you don't want it (a spam data base), add a few letters or numbers to it. FYI, the unique keys are not stored anywhere, instead a hash is being used.

The other setting is URL endpoint which is where the mobile phone will post images. Use the provided URL: http://www.davidkaspar.com/mowecam/postimage.php (this is the default URL in the application). If you have your own web server you can instead upload the post image PHP script (below) to your own server and the postage images will stay there.

The refresh rate is in seconds. Please note that each image is around 5KB and will incur costs on your mobile bill unless you are on an unlimited data plan.

Use the following code to include the image in a HTML page: <img src="http://www.davidkaspar.com/mowecam/getimage.php? email=[unique_key_here]">. Replace [unique_key_here] with the unique key you have provided in the application settings.

License
This is the first version of the Mowecam and only binary code is provided (mainly due to the source code being in such a mess).

The code has been developed on Netbeans 4.1 and its excellent j2me development kit.

It is free to use and to distribute as long as this license notice is provided with the binary.

As always with free and beta software it is provide without any warranty and the developer(s) cannot be held responsible for any bad consequences of running the application.

Download latest version
Mowecam (This URL should also work for OTA, over the air, installation if you type in the URL in your XHTML capable mobile phone)

Mowecam: Post image PHP script v 1.0, released under GNU General Public License.

Credits
The application architecture is inspired by Midlog made by Rawsocket.
The application is using a hash algorithm from www.partow.net
The application is using Base64 code from kobjects.org



Related entries:

Comments

  1. Enzo Says:

    no gravatar

    Hallo
    What about you GPS Navigator application for J2ME mobile phones? Will be possible to install it on a Sony-Ericsson k750i?

    David says:

    Of course, the k750(i) supports all the necessary Bluetooth and PIM packages!

  2. CHli Says:

    no gravatar

    Hi David,

    Are you still planning on releasing your source code or not ? Thank your for this great application which could be used in a research project.

    David says:

    Hello Chli. Yes I am planning to release the source code as soon as it is releasable. I just messed it up with the motion detection algorithm.

    Serves me right for not having code that is decoupled enough.

    Stay tuned :-)

  3. Serkan Polat Says:

    no gravatar

    Hi David,
    i am a student and i am developing a small software for k750. but is it possible to control the auto focus and the flash functions ? i just want to take a shot and send it to the computer by bluetooth.. i really need to get a sample code and the documentations are really bad.. please help me..urgently i need help..

    David says:

    Currently it is not possible to control the flash nor the auto focus with j2me.

  4. Chad Says:

    no gravatar

    I recently obtained the J2ME SDK and am starting to develop utilities for personal use. I'm a coder of many years, but this is my first foray into the (mini)Mobile area, is there any good reading you can recommend?

    My Background is C/C++/VB/.Net

    Regards

    David says:

    Sun is often a good starting point: http://developers.sun.com/techtopics/mobility/learn/

  5. Luc Says:

    no gravatar

    I'm a trail runner and I would like to be able to send a web streaming video on my computer at home, so they can follow my displacements. Were I run I cannot have access to a cell phone. Is there a system that is on the market to allow me to send via GPS a signal at home ?

    Please respond at lvaive aaatt pcl dottt com

    Thank's
    Luc

  6. ram Says:

    no gravatar

    Sir,
    We are BE students ,doing a similar project like your "MoweCam".Can you please send me the source code of your project if it is ready by now, for reference.
    I will be really grateful to you if you do send me the code.

  7. Kaoru Says:

    no gravatar

    Hi David, I've been always interested in these kind of app.

    Unfortunately, in my country the network cost is high and I would have to limit my use of it.

    Is it possible instead of sending the pics to a server, keep them in my mobile and later to a computer?

    Thanks.

    David says:

    Hello Kaoru! The "save to mobile" function is only supported on a limited amount of devices.

    When I first included the function, the application stopped working on several devices. I wanted to support as many mobile phones as possible so I removed the function.

    I suspect that in near future majority of handsets will support this functionality (JSR-75, FileConnection API) and I will add it back into Mowecam.

  8. andrew Says:

    no gravatar

    hi, brief one and only because I thought it would be a cheaper alternative.

    it would be useful to have the option instead of uploading the image to send it via bluetooth to another computer. That way if you were at home, you could just send it to a machine in the house (which could then upload it) I saying this because this is what i do - was interested by your project because it allows the automation of the procedure for taking the pictures, currently my app just takes one and sends one (not flashy at all!)

    great work best wishes
    andrew

    David says:

    Hello Andrew,

    Bluetooth is fairly easy to develop with on the mobile but a client would be required on the computer.

    It would be a fair amount of work to develop such a client for different operating systems.

    At the moment I want to focus on J2me development!

  9. domingos Says:

    no gravatar

    how can i put my photos in the g2 galley like u , i am have problems. do you have a gallery like me... can u help me

  10. Gobilam Akanip Says:

    no gravatar

    If you add the MIDlet-Permissions:

    javax.microedition.io.Connector.file.read, javax.microedition.io.Connector.file.write

    Will the saving in memory stick work on a K750?

    David says:

    Hello Gobilam, the problem is that certain mobile phones do not support to the PIM profile required for saving photos locally so I have opted to exclude it from the application to support as many devices as possible.

    One alternative in the future would be to build several version to different mobile phones... but where is the time?

    :-)

  11. wayne Says:

    no gravatar

    Hi, can you teach me how to use byte array from getSnapshot operation for motion detection which relies only on RGB format. Thanks in advance.

    David says:

    Roughly:
    1. Calculate intensity for each pixel (there is a formula to go from RGB to intensity)
    2. Calculate difference in intensity between two snapshots for each pixel
    3. Mark pixels with more than a threshold change in intensity
    4. Group marked pixels into blobs
    5. If the size of one or more blobs is above a threshold, motion occurred

    roughly

  12. sarbjit Says:

    no gravatar

    hi David,
    It is a good application.I have suggestion to you that you can make more this program more productive by enabling support with IM chatting applications such as Yahoo! messenger on pc with bluetooth interface

  13. joost Says:

    no gravatar

    Hi David,
    Great app! I'm trying to build a J2ME app myself that captures pictures from the camera, but can't get it working on my K750i. So I'm really curious what your code looks like as MoweCam seems to work on my K750i! Could you please send me your source code (or the picture capturing part)? I would be really grateful!

    David says:

    I remember there being an annoying "feature" in the media API which prevented me innitially from taking pictures via j2me.

    Have you followed online image capturing examples? Especially the one on the SonyEricsson development site.

    My laptop was recently stolen and together with it the source code to a few personal projects that were not in a remote CVS :-(

  14. piero Says:

    no gravatar

    installed on Nokia N80. set lowest image size 120x160and 60 secs refresh rate. I get 960KB/picture to upload. Any suggestion ro reduce picture size ? Thank You, regards, P

    David says:

    The image size dialog is not being used. Instead the mobile phone default size is used when taking a snapshot.

    Unfortunately my laptop with the source code was recently stolen. If I don't find a back up of the source it is unlikely I will develop Mowecam any further.

  15. miguel ribeiro Says:

    no gravatar

    Hi, great sw! is it possible to send the full 2 mb image from k750 to the server? And is it possible to send it only on demand( instead of periodically, when the user clicks a button for instance?)
    Thank you

    David says:

    The latest version of Mowecam will capture an image with the DEFAULT resolution of the mobile phone. Different mobile phones have different resolution sizes.

    Mowecam will send a picture when you hit START so you can do START/STOP manually every time you want to send a picture.

  16. Jens Says:

    no gravatar

    Hi
    Did You ever found a backup of your Mowecam source code? I've just got a new SE phone and thinking of using the old K750i as a surveillance camera with motion detection and SMS support. This could be a great and cheap way to install a GSM alarm at home. You had similar ideas, did You ever go on with it?
    Great work
    Regards Jens

Post a Comment

 *

 *

 
Remember Me?

* (you may use HTML tags for style)