Skip to main content

Image Problems Please Help !!!

3 replies [Last post]
mobeenkhan
Offline
Joined: 2007-07-24

Hi there,

I'm a newbie to this all J2ME, I am working on a project in which I'm using Sony Ericsson W810i. The project requires me to make an application which takes Pictures automatically after every second and keep the last 2 images in a buffered memory. Once the 2 images are obtained, it applies Sobel Filter on it for edge detection to determine whether the camera moved or not. I found this code for Sony Ericsson Z1010 from the following site,

http://developer.sonyericsson.com/site/global/techsupport/tipstrickscode...

This code, does take a picture and save it into some buffer memory, BUT im not sure how to save it in some JPEG format so that I could apply Sobel Filter on it. Please if anyone could help me with it, I will be extremely grateful, its very important that i finish this project in time. how can I change that image into JPEG image for applying Sobel Filter to it. Please help !!!

Another problem is that, the screen size of W810i is 176 x 220, but the image saved is almost half of the screen that i see, is there a way to save the image of the same size as that of the Viewer. Please Suggest something ... Really looking forward to seeing anyones reply soon. Sorry for asking questions in a weird way, im totally a newbie and trying a lot to complete this project.

Regards,
Mubin Khan

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
meetdeep
Offline
Joined: 2007-07-24

Hello,

VideoControl has a method, getSnapshot, that allows you to get a snapshot of the video is displaying. This is particularly useful when it is displaying live video from the phone’s camera, as it allows you to take a photo.

byte[]pngImageData=videoControl.getSnapshot(null);

All devices that support video playing will also support the ability to get snapshots in PNG format. You can also specify other formats if the device supports them, and give a width and height:

byte[]jpegImageData=videoControl.getSnapshot(“encoding=jpeg&width=120&height=90”);

Regards,
Deep Chauhan

Message was edited by: meetdeep

mobeenkhan
Offline
Joined: 2007-07-24

Thanks a lot Deep Chauhan, well I just want to know one thing, that once u apply,

byte[]jpegImageData=videoControl.getSnapshot(“encoding=jpeg&width=120&height=90”);

It encodes the image taken into JPEG and is there a way to save it into memory? Also, once the encoded image is obtained, only then can i apply different sort of Image Processing filters or can i also do it without the encoding part.

Thanks a lot for ur previous reply,
Regards,
Mubin Khan

foo shyn

Wow JPEG from the phone. Personally i don't know much about Sobel
Filter, but there would be a lot of memory issue running for JPEG
processing i reckon when u wanna resize the photo. U would need a JPEG
decoder like what is suggested to me earlier in this thread for JPEG
processing problem. Try to search em out.

HTH
FooShyn

meinterest@MOBILEANDEMBEDDED.ORG wrote:
> Hi there,
>
> I'm a newbie to this all J2ME, I am working on a project in which I'm using Sony Ericsson W810i. The project requires me to make an application which takes Pictures automatically after every second and keep the last 2 images in a buffered memory. Once the 2 images are obtained, it applies Sobel Filter on it for edge detection to determine whether the camera moved or not. I found this code for Sony Ericsson Z1010 from the following site,
>
> http://developer.sonyericsson.com/site/global/techsupport/tipstrickscode...
>
> This code, does take a picture and save it into some buffer memory, BUT im not sure how to save it in some JPEG format so that I could apply Sobel Filter on it. Please if anyone could help me with it, I will be extremely grateful, its very important that i finish this project in time. how can I change that image into JPEG image for applying Sobel Filter to it. Please help !!!
>
> Another problem is that, the screen size of W810i is 176 x 220, but the image saved is almost half of the screen that i see, is there a way to save the image of the same size as that of the Viewer. Please Suggest something ... Really looking forward to seeing anyones reply soon. Sorry for asking questions in a weird way, im totally a newbie and trying a lot to complete this project.
>
> Regards,
> Mubin Khan
> [Message sent by forum member 'mobeenkhan' (mobeenkhan)]
>
> http://forums.java.net/jive/thread.jspa?messageID=228053
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>
>
>
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".