×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 22

Thread: Autofocus

  1. #1
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    470

    Smile Autofocus

    Hi,

    At this site, devices section I went through the details regarding many s40 6th edition phones. In the Java api section, most of them have support for AMMS FocusControl. But the camera section doesn't have support for autofocus. I find this confusing. Does this then refers to the support for macro mode ? I want to take picture of barcodes as part of my application. To get a clear picture, is autofocus a must or is macro mode enough ? Or macro mode works only if camera has autofocus ?

    Regards,
    Jaak

  2. #2
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    470

    Smile Re: Autofocus

    Hi,

    Any info ? Can I use S40 6th edition devices for developing barcode reader applications ? I'am using the Zxing package for barcode reading. The api works provided it gets a clear image taken using macro mode.

    Regards,
    Jaak

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: Autofocus

    Jaak,

    You can get the snapshots from the vedioControl on Camera as a suorce and at quick interval showing the viewfinder on the screen which user is suppose to focus on the barcode. Now keep passing these byte arrays (snapshot's) to Zxing decoder till it decodes with sucess and your task is done.
    All barcode reders work in this way only, you dont need to depend on 1 single clear picture to decode.

    thanks,
    ~Amitabh

  4. #4
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    470

    Smile Re: Autofocus

    Hi,

    Thanks for the reply. You mean, call the takeSnapshot method, pass the byte array to Zxing repeatedly until Zxing gives the correct result ? Can you give some more detail ? But does this method works even if the image is taken without macro mode ? I need to decode 1D barcodes. I tried Zxing with N73 without any success. But I took only a single snapshot. Have you any info regarding my original question regarding S40 6th edition and macro mode.

    Regards,
    Jaak

  5. #5
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    470

    Smile Re: Autofocus

    Hi Amitabh,

    Please can you describe the method you mentioned in more detail.

    Regards,
    Jaak

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: Autofocus

    Not sure for 1D barcodes, but it works in case of 2D barcodes.

    thanks,
    ~Amitabh

  7. #7
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    470

    Smile Re: Autofocus

    Hi Amitabh,

    Thanks for the reply. I think, for 2D barcodes it works even if the image is not taken using closeup mode. But as I see 1D barcodes is working only if the image is very clear. But do you know if s40 6th edition devices support autofocus or macro mode ? I went through the devices section. Most of them don't have autofocus camera. But they do support the AMMS FocusControl api. That is what confused me. The only functionality I find in FocusControl is setting macro mode or autofocus. Since autofocus is not supported, I assume that they have macro mode support. But am I correct in assuming that ? If you have any links regarding that I will be very thankful.

    Regards,
    Jaak

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: Autofocus

    Ref to device spec's of this S40 6th edition device

    http://www.forum.nokia.com/devices/6303i_classic/
    PHP Code:
    Java Technology JSR 139 ConnectedLimited Device Configuration (CLDC1.1
    JSR 118 MIDP 2.1
    JSR 248 Mobile Service Architecture Subset 
    for CLDC
    JSR 75 FileConnection 
    and PIM API
    JSR 82 Java™ APIs 
    for Bluetooth 1.1
    JSR 135 Mobile Media API 1.1
    JSR 172 J2ME™ Web Services Specification 
    (RPC package)
    JSR 172 J2ME™ Web Services Specification (XML Parser package)
    JSR 177 Security and Trust Services API for J2ME™ (SATSA-APDU package)
    JSR 177 Security and Trust Services API for J2ME™ (SATSA-CRYPTO package)
    JSR 179 Location API for J2ME™ 1.0
    JSR 184 Mobile 3D Graphics API 
    for J2ME™ 1.1
    JSR 205 Wireless Messaging API 2.0
    JSR 211 Content Handler API
    JSR 226 Scalable 2D Vector Graphics API
    JSR 234 Advanced Multimedia Supplements 1.1 
    (audio3d)
    [
    B]JSR 234 Advanced Multimedia Supplements 1.1 (camera)[1][/B]
    JSR 234 Advanced Multimedia Supplements 1.1 (music)
    Nokia UI API 1.1   
    Java API Access Permissions Java API Access Permissions   
    Certificates UTI Root   
    [B]Notes 1 ContainsCameraControlSnapshotControlFlashControlFocusControl and ZoomControl  [/B
    The camers supports full AutoFocus see the link: http://europe.nokia.com/find-product...otos_and_video


    thanks,
    ~Amitabh

  9. #9
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    470

    Smile Re: Autofocus

    Hi,

    Thanks for posting the link. But it doesn't use the word autofocus. It does use the word full focus. Does it means autofocus is supported ?
    Forgive my ignorance.

    Regards,
    Jaak

  10. #10
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    208

    Re: Autofocus

    Yes the camera supports Autofocus.

  11. #11
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    470

    Smile Re: Autofocus

    Hi,

    Thanks for the response. One final question. In the api section, most of the series 40 6th edition devices supports FocusControl from JavaME. Is it safe in assuming that these phones also have autofocus cameras ? The device details section doesn't explicitly say so.

    Regards,
    Jayakrishnan.M

  12. #12
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: Autofocus

    No its not safe to assume that all these phones will have Autofocus Camera in build, some of them which show FullFocus might be Fixed Focus camera's that might fail in macro mode.

    Full Focus cam's based on Fixed Focus Lens camera's are very low in cost as compared to Auto Focus Camera's which will continue to come in high end devices at higher rates.

    thanks,
    ~Amitabh


    thanks,
    ~Amitabh

  13. #13
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    470

    Smile Re: Autofocus

    Hi Amitabh,

    I bought a 6303i classic phone. From the java application, I get the value for focusControl.isAutoFocusSupported() as true indicating that autofocus is supported. Macro mode is not supported. The following is the code I use

    private void performAutoFocus(Player player) {

    FocusControl focusControl = (FocusControl) getControl(player, "javax.microedition.amms.control.camera.FocusControl");

    if (focusControl != null) {

    try {

    if (focusControl.isMacroSupported()) {

    focusControl.setMacro(true);
    }

    if (focusControl.isAutoFocusSupported()) {

    focusControl.setFocus(FocusControl.AUTO);

    try {

    Thread.sleep(750L);

    } catch (InterruptedException ie) {
    // continue
    }

    focusControl.setFocus(FocusControl.AUTO_LOCK);

    }

    } catch (MediaException me) {


    }

    }
    }

    When I try to use FocusControl.AUTO_LOCK it throws an exception saying that the value is not supported. When I set the value AUTO, nothing happens. Am I doing something wrong here in the code ? I expected the barcode to be more clear like in the case of s60 devices. I wonder then, what is the purpose of the FocusControl class in this phone ?

    Regards,
    Jaak

  14. #14
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: Autofocus

    When I set the value AUTO, nothing happens.
    This device Nokia 6303i C has a fullfocus camera which is fixed lens -- http://www.forum.nokia.com/devices/6303i_classic/

    it says -- Device Description:
    The Nokia 6303i classic is a tri-band EGSM 900/1800/1900 phone. Main features are Series 40 6th Edition Developer Platform, WebKit Open Source Browser, Nokia Maps 2.0, 3.2 Mpix Full Focus (EDOF) camera with dual LED flash, FM RDS Stereo Radio, Flash Lite 3.0, Nokia messaging 2.0, Bluetooth 2.1 +EDR and MIDP Java 2.1 with additional Java APIs.

    The API supports - JSR 234 (JSR 234 Advanced Multimedia Supplements 1.1 (camera))-- but as its a fixed focus camera - FocusControl controls is of no use.

    And you also do not have any support for macro mode.... so this device will not be of much use for barcode reading as you need it to perform.

    thanks,
    ~Amitabh

  15. #15
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    470

    Red face Re: Autofocus

    Hi Amitabh,

    Thanks for your reply. If this had come somtimes earlier I wouldn't have been in a difficult position. One of the earlier posters said it supports autofocus. So I suggested this phone to my client anf my company. Both of them bought the phone and I'am responsible. I didn't have any other source of information than these forums. Now I have to tell them that I'am mistaken. Please pray for me.

    I wonder why they support the FocusControl if that is not of any use. Just to say that they support it ? They don't support it on S60 devices which has autofocus and macro mode and support it on S40 devices which don't have autofocus and macro mode. Strange thinking isn't it ? Somebody from Nokia should answer this. But the isAutoFocusSupported function returns true. Now I get the feeling that J2me is not going to get any attention on S60.

    Regards,
    Jaak

Similar Threads

  1. Autofocus & video capture
    By jascco in forum Symbian Media (Closed)
    Replies: 12
    Last Post: 2010-01-20, 14:39
  2. Autofocus S60 3rd ed FP1 to FP2
    By Christophe.A in forum Symbian Media (Closed)
    Replies: 9
    Last Post: 2008-09-10, 13:30
  3. EIKCOCTL 8 when autofocus
    By Christophe.A in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-06-24, 15:42
  4. brightness probleme with the autofocus camera exemple
    By abbet.c in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2008-03-14, 14:53
  5. Issues with the new Camera Autofocus API
    By jcollomosse in forum Symbian Media (Closed)
    Replies: 19
    Last Post: 2007-12-22, 00:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •