Blur Image using OV9655 camera module on LPC1788 Board

Discussion in 'Technical Support' started by dharmendra_1989, Oct 11, 2013.

?

Blur Image using OV9655 camera module on LPC1788 Board

  1. 1

    0 vote(s)
    0.0%
  2. 2

    0 vote(s)
    0.0%
  1. dharmendra_1989

    dharmendra_1989

    Joined:
    Oct 11, 2013
    Messages:
    1
    Likes Received:
    0
    Hello,

    I'm developing a camera with Omnivsion OV9655 image sensor on LPC1788 Board. I am capturing 320x240 image got the image but image is not clear some blur is there in some portion of image.

    currently I am using following clock signals for OV9655.

    XCLK = 14 Mhz (XCLK is generated by PWM)
    PCLK(Pixel clock) = 417.4 KHz
    frame Rate : 30 fps.
    frame Type : VGA
    Output Formats(8-bits) : RGB565

    code flow :

    (1) Initialize pin configuration for OV9655
    (2) Initialize PWM for XCLK generation.
    (3) Initialize I2C with 1Khz clock speed.
    (4) Reset the OV9655 Camera module.
    (5) Configure register of OV9655 through I2C.
    (6) Start the Capture.
    (7) Capture the Image using polling method. For polling method I am following below steps.

    (i) wait till VSYNC be come High.
    (ii) wait till VSYNC be come LoW.
    (iii)Now, wait till HREF be come High
    (iv) Wait for rising edge of the PCLK
    (v) Read data from parallel data lines and stored into SDRAM.
    (vi) follow steps (iv) and (v) until HREF become LOW.
    (vii) follow steps (iii) to (vi) until VSYNC be come High.

    (8) Convert captured image output formats RGB565(16 bits) to RGB888(24 bits)
    (9) Send convert image to PC as .BMP

    On computer BMP image is not clear, blur is there in some portion of the image. But in my code if I repeat Camera register configuration 2 or 3 times then image became clear. I can't get this problem, please suggest me some solution for this blur image. Please see the attachment , I attached some images.

    Below are the OV9655 Registers settings:

    // Settings(VGA)320*240

    { 0x12, 0x80 },
    { 0x00, 0x00 },
    { 0x01, 0x80 },
    { 0x02, 0x80 },
    { 0x03, 0x02 },
    { 0x04, 0x03 },
    { 0x0b, 0x57 },
    { 0x0e, 0x61 },
    { 0x0f, 0x40 },
    { 0x11, 0x04 },
    { 0x12, 0x63 }, //62
    { 0x13, 0xc2 }, //c7
    { 0x14, 0x3a },
    { 0x15, 0x20 }, //added extra
    { 0x16, 0x24 },
    { 0x17, 0x18 },
    { 0x18, 0x04 },
    { 0x19, 0x01 },
    { 0x1a, 0x81 },
    { 0x1e, 0x04 },
    { 0x24, 0x3c },
    { 0x25, 0x36 },
    { 0x26, 0x72 },
    { 0x27, 0x08 },
    { 0x28, 0x08 },
    { 0x29, 0x15 },
    { 0x2a, 0x00 },
    { 0x2b, 0x00 },
    { 0x2c, 0x08 },
    { 0x32, 0x24 }, //
    { 0x33, 0x00 },
    { 0x34, 0x3f },
    { 0x35, 0x00 },
    { 0x36, 0x3a },
    { 0x38, 0x72 },
    { 0x39, 0x57 },
    { 0x3a, 0x8c }, //
    { 0x3b, 0x04 }, //
    { 0x3d, 0x99 },
    { 0x3e, 0x0e }, //
    { 0x3f, 0xc1 }, //
    { 0x40, 0xd0 },
    { 0x41, 0x01 }, //
    { 0x42, 0xc0 },
    { 0x43, 0x0a },
    { 0x44, 0xf0 },
    { 0x45, 0x46 },
    { 0x46, 0x62 },
    { 0x47, 0x2a },
    { 0x48, 0x3c },
    { 0x4a, 0xfc },
    { 0x4b, 0xfc },
    { 0x4c, 0x7f },
    { 0x4d, 0x7f },
    { 0x4e, 0x7f },
    { 0x4f, 0x98 },
    { 0x50, 0x98 },
    { 0x51, 0x00 },
    { 0x52, 0x28 },
    { 0x53, 0x70 },
    { 0x54, 0x98 },
    { 0x58, 0x1a },
    { 0x59, 0x85 },
    { 0x5a, 0xa9 },
    { 0x5b, 0x64 },
    { 0x5c, 0x84 },
    { 0x5d, 0x53 },
    { 0x5e, 0x0e },
    { 0x5f, 0xf0 },
    { 0x60, 0xf0 },
    { 0x61, 0xf0 },
    { 0x62, 0x00 },
    { 0x63, 0x00 },
    { 0x64, 0x02 },
    { 0x65, 0x20 },
    { 0x66, 0x00 }, //
    { 0x69, 0x0a },
    { 0x6b, 0x0a }, //5a
    { 0x6c, 0x04 },
    { 0x6d, 0x55 },
    { 0x6e, 0x00 },
    { 0x6f, 0x9d },
    { 0x70, 0x21 },
    { 0x71, 0x78 },
    { 0x72, 0x11 },
    { 0x73, 0x01 },
    { 0x74, 0x10 },
    { 0x75, 0x10 },
    { 0x76, 0x01 },
    { 0x77, 0x02 },
    { 0x7A, 0x12 },
    { 0x7B, 0x08 },
    { 0x7C, 0x16 },
    { 0x7D, 0x30 },
    { 0x7E, 0x5e },
    { 0x7F, 0x72 },
    { 0x80, 0x82 },
    { 0x81, 0x8e },
    { 0x82, 0x9a },
    { 0x83, 0xa4 },
    { 0x84, 0xac },
    { 0x85, 0xb8 },
    { 0x86, 0xc3 },
    { 0x87, 0xd6 },
    { 0x88, 0xe6 },
    { 0x89, 0xf2 },
    { 0x8a, 0x24 },
    { 0x8c, 0x80 },
    { 0x90, 0x7d },
    { 0x91, 0x7b },
    { 0x9d, 0x02 }, //
    { 0x9e, 0x02 }, //
    { 0x9f, 0x7a },
    { 0xa0, 0x79 },
    { 0xa1, 0x40 },
    { 0xa4, 0x50 },
    { 0xa5, 0x68 },
    { 0xa6, 0x4a },
    { 0xa8, 0xc1 },
    { 0xa9, 0xef },
    { 0xaa, 0x92 },
    { 0xab, 0x04 },
    { 0xac, 0x80 },
    { 0xad, 0x80 },
    { 0xae, 0x80 },
    { 0xaf, 0x80 },
    { 0xb2, 0xf2 },
    { 0xb3, 0x20 },
    { 0xb4, 0x20 },
    { 0xb5, 0x00 },
    { 0xb6, 0xaf },
    //{ 0xb6, 0xaf }, //repeat
    { 0xbb, 0xae },
    { 0xbc, 0x7f },
    { 0xbd, 0x7f },
    { 0xbe, 0x7f },
    { 0xbf, 0x7f },
    //{ 0xbf, 0x7f },//repeat
    { 0xc0, 0xaa },
    { 0xc1, 0xc0 },
    { 0xc2, 0x01 },
    { 0xc3, 0x4e },
    { 0xc6, 0x05 },
    { 0xc7, 0x81 },
    { 0xc9, 0xe0 },
    { 0xca, 0xe8 },
    { 0xcb, 0xf0 },
    { 0xcc, 0xd8 },
    { 0xcd, 0x93 },
    //{ 0x40, 0x10 }, //
     
    dharmendra_1989, Oct 11, 2013
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.