Announcement

Collapse
No announcement yet.

Hex Jpeg Data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hex Jpeg Data

    Hi everyone!
    I've been trying to do a LabView software for uCAm-II, but i am new to image processing.
    So first thing, this what i need for my project:

    Image - JPEG......................... AA 01 00 07 03 05
    WHERE:
    07 = JPEG
    05 = 320 * 240

    Pkg size - 512 bytes............... AA 06 08 00 02 00
    WHERE:
    02 00 = 512 (dec)

    /* SO FAR SO GOOD AS Data Sheet 7.4.1 */

    After Get picture i get the acknowledge AA 0E 04 xx 00 00

    As soon as i receive the Data size: (AA 0A 05 E0 1A 00)
    WHERE:
    E0 1A 00 = 14,686,720
    SO:
    Number of packages = Image size / (Package size – 6)
    Number of packages = 14,686,720/(512 - 6)
    Number of packages = 29,025 pkgs (is this right?, does this means i have to acknowledge 29k packages?)

    As soon after i send the Acknowledge for the package ID 0000h (wich i don't know what is Package ID)

    AA 0E 00 00 00 00



    but, in uCam-II Demo, Data Size is diferent by a couple of bytes. WHY?

    Synced on attempt 8
    ACK [AA 0E FF 00 00 00]
    Initial [AA 01 00 07 09 05] <AA 0E 01 01 00 00>
    Set Pkg size [AA 06 08 00 02 00] <AA 0E 06 02 00 00>
    Get Picture [AA 04 05 00 00 00] <AA 0E 04 03 00 00 AA 0A 05 DE 18 00>
    ACK [AA 0E 00 00 00 00]
    (Camera Data received)
    ACK [AA 0E 00 00 01 00] ...


    This is to begin, Thanks!

  • #2
    The data size is the other way around, i.e 001ae0 (or 6880 bytes).

    Almost every different picture will have a different size due to the jpeg compression
    Mark

    Comment


    • #3
      Great! That makes sense!

      Now with 6880/(512-6) = 13
      That means that i have to acknowledge 13 packages for that picture, right?

      now,after doing this, i will receive 13 packages of HEX data, am i supposed to receive 6880 bytes at the end of transmission?

      Comment


      • #4
        Yep, that will be plus the package overheads, of course
        Mark

        Comment

        Working...
        X