Loading ...
Sorry, an error occurred while loading the content.

Re: Volumetric data, using the temporal redundancie

Expand Messages
  • Mathieu
    Ok, Just for reference I did read the post from Karthik: http://groups.yahoo.com/group/kakadu_jpeg2000/message/4160 And now it makes a lot more sense. So the
    Message 1 of 2 , Aug 1, 2006
    View Source
    • 0 Attachment
      Ok,

      Just for reference I did read the post from Karthik:
      http://groups.yahoo.com/group/kakadu_jpeg2000/message/4160
      And now it makes a lot more sense. So the correct command line was:

      kdu_compress -i agg300-8.rawl\*8@786432 -o foo.jpx -jpx_layers \*
      -jpx_space sLUM Creversible=yes Mcomponents=8 Msigned=no Mprecision=8
      Sprecision=8,9 Ssigned=no,yes Mvector_size:I4=8 Mvector_coeffs:I4=128
      Mstage_inputs:I25=\{0,7\} Mstage_outputs:I25=\{0,7\}
      Mstage_collections:I25=\{8,8\} Mstage_xforms:I25=\{DWT,1,4,3,0\}
      Mnum_stages=1 Mstages=25 Sdims=\{768,1024\}

      and :

      kdu_expand -i foo.jpx -o
      foo1.pgm,foo2.pgm,foo3.pgm,foo4.pgm,foo5.pgm,foo6.pgm,foo7.pgm,foo8.pgm
      -raw_components

      Compression ratio is:
      358270./6291456 = 0.056945482889811196

      If you assume lossless is giving you 2:1 and since I have 8 times the
      same image I should have expected (1/8)/2 = 0.0625

      So I am pretty happy :)
      Thanks
      Mathieu




      --- In kakadu_jpeg2000@yahoogroups.com, "Mathieu" <mathieu@...> wrote:
      >
      > Hello,
      >
      > I was trying to play with kdu_compress and according to some recent
      > post (*) this should work. All the following where done a GNU/Linux
      > debian testing machine using Kakadu 5.2 binaries.
      >
      > 1. First part, create a fake volume by appending the same image 8 times:
      > $ convert /tmp/dup.tiff /tmp/dup.gray
      > $ cat /tmp/dup.gray /tmp/dup.gray /tmp/dup.gray /tmp/dup.gray
      > /tmp/dup.gray /tmp/dup.gray /tmp/dup.gray /tmp/dup.gray > /tmp/dup8.gray
      > $ cp /tmp/dup8.gray /tmp/dup8.rawl
      >
      > One can verify the result using:
      > $ convert -depth 8 -size 1024x768 /tmp/dup8.gray /tmp/dup8.tiff
      >
      > 2. Try to compress this grayscale volume into jpx:
      > Following example (x):
      >
      > ./kdu_compress -i /tmp/dup8.rawl\*8\@786432 -o /tmp/dup8.jpx
      > -jp2_space sLUM -jpx_layers \* Clayers=16 Creversible=yes
      > Sdims=\{1024,768\} Sprecision=8 Ssigned=no Cycc=no
      >
      > Result is:
      > 3207354 /tmp/dup8.jpx
      >
      > Clearly temporal redundancie is not used. So I tried the (Ai) example:
      >
      > ./kdu_compress -i /tmp/dup8.rawl\*8\@786432 -o /tmp/dup8-Ai.jpx
      > -jp2_space sLUM -jpx_layers \* Clayers=16 Creversible=yes
      > Sdims=\{1024,768\} Mcomponents=8 Msigned=no Mprecision=8
      > Sprecision=8,8,8,8,8,9 Ssigned=no,no,no,no,no,yes Mvector_size:I4=8
      > Mvector_coeffs:I4=2048 Mstage_inputs:I25=\{0,7\}
      > Mstage_outputs:I25=\{0,7\} Mstage_collections:I25=\{8,8\}
      > Mstage_xforms:I25=\{DWT,1,4,3,0\} Mnum_stages=1 Mstages=25
      >
      > Result is:
      > 402639 /tmp/dup8-Ai.jpx
      >
      > Clearly much better ! This means output jpx data is 6% of original
      > data. BUT my problem is that I cannot seems to extract anything from it:
      >
      > $ ./kdu_expand -i /tmp/dup8-Ai.jpx -o /tmp/frame.ppm
      >
      >
      > Kakadu Error:
      > Output image files require more image components (or mapped colour
      > channels)
      > than are available!
      >
      >
      > Thanks for suggestions !
      > Mathieu
      >
      > (*)
      > http://groups.yahoo.com/group/kakadu_jpeg2000/message/3889
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.