⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ifc.h

📁 JPEG2000实现的源码
💻 H
📖 第 1 页 / 共 5 页
字号:
      to tile in a manner which can vary from subband to subband.  This is
      necessary in order to preserve the relationship between the
      dimensions of different components at all resolution levels so that
      the resolution scalability property can be fully realized.

      To understand how the tile partition is created, we need to introduce
      two concepts: the canvas; and the partitioning reference point.
      All image and subband coordinates are identified relative to a canvas
      which we might interpret as a hypothetical image inside which the
      real image is entirely contained.  In fact, in many cases the canvas
      and the image will be identical.  The lower and right hand boundaries
      of the canvas also coincide with those of the image; however, the
      upper and left hand boundaries of the canvas may be different.  This
      is indicated in the figure below:

          (0,0)--------------------------------------------
            |  Missing  |                                 |
            |---------------------------------------------|
            |           |                                 |
            |           |                                 |
            |           |              Image              |
            |           |                                 |
            |           |                                 |
            |___________|_________________________________|
      Note that the actual image dimensions may be obtained by subtracting
      the dimensions of a hypothetical missing image from those of the
      canvas.  This is important because it provides the connection between
      different components.  The dimensions of all components are identified
      in the global header of the bit-stream in terms of the dimensions of
      the canvas (Ch,Cw) and the missing image (Mh,Mw) on a high resolution
      grid, together with a collection of vertical and horizontal sub-sampling
      factors, (Fh_c,Fw_c).  Then the canvas and missing dimensions of
      component c are obtained as
           Ch_c = ceil(Ch/Fh_c), Cw_c = ceil(Cw/Fw_c)
           Mh_c = ceil(Mh/Fh_c), Mw_c = ceil(Mw/Fw_c)
      and the component's dimensions may then be computed as
           Dh_c = Ch_c - Mh_c  and  Dw_c = Cw_c - Mw_c.
      It may be verified that this policy fully supports resolution
      scalability.  Specifically, if one level of the Wavelet transform is
      dropped then the resolution of all components at the next level may
      be obtained using the above formulas simply by doubling each of
      the sub-sampling factors.  The principle behind resolution reduction
      here is that the Wavelet transform is conceptually applied to the canvas
      (not the image itself) using the LP first convention whereby even
      indexed samples in each resolution level are associated with low-pass
      coefficients and odd indexed samples with high-pass coefficients.
          The second important concept is that of the partitioning reference
      point.  This is a point, (Ph,Pw), which lies on the canvas, but not to
      the right or below the upper left hand corner of the image.  The
      partitioning reference point may be traced into each component through
      the sub-sampling factors according to
           Ph_c = ceil(Ph/Fh_c)  and  Pw_c = ceil(Pw/Pw_c)
          Finally, let (Th,Tw) be the nominal height and width of each tile
      in the high resolution reference grid.  These tile dimensions are not
      required to be divisible by any component's sub-sampling factors so
      that it is not generally possible to identify nominal tile dimensions
      for any individual component.  However, given the location and
      dimensions of any particular tile in the high resolution reference
      grid, it is possible to identify the corresponding coordinates of the
      tile in each image component at each resolution component.  Specifically,
      suppose that (A,B) identify the location on the canvas of the tile's
      upper left hand corner and suppose that (C,D) are such that the
      bottom right hand corner of the tile has coordinates (A+C-1,B+D-1).
      Then the corresponding parameters in resolution level l of component
      c may be found from
         A_{c,l} = ceil(A/(Fh_c*2^{L-l}))
         B_{c,l} = ceil(B/(Fv_c*2^{L-l}))
         C_{c,l} = ceil(C/(Fh_c*2^{L-l}))
         D_{c,l} = ceil(D/(Fv_c*2^{L-l}))
      Tiles span the region from the partitioning reference point to the
      lower and right hand boundaries of the image (also the canvas).  The
      number of tiles down and across the image is ceil(M/T) and ceil(N/U)
      respectively and this is the same in all of the components and at
      all resolution levels, although it is possible that some tiles contain
      no samples in some subbands/components.  Tiles which abut the lower
      or right hand boundaries of the image (also the canvas) may have
      dimensions smaller than the nominal tile dimensions.  The same may
      apply to tiles which abut the upper or left hand boundaries of the
      image if these boundaries do not coincide with the partitioning
      reference point.

      It is helpful here to point out how the canvas and partitioning
      reference points are to be used.  To begin, suppose that the
      partitioning reference point is at the origin of the canvas.  In this
      case, the canvas idea serves only to support cropping of images in
      the compressed domain.  If an image is cropped from the top or the
      right it is sufficient to reduce the canvas dimensions.  If, however,
      it is cropped from the left or the top then we must set the missing
      dimensions (Mh,Mw) to the number of rows and columns which have been
      cropped; otherwise, the entire image must generally be decompressed
      and recompressed in order to implement the cropping operation since
      the alignment of the Wavelet transform over the entire image would
      be changed (remember that the Wavelet transform is not a shift
      invariant operation; it is aligned relative to the canvas).

      The notion of a partitioning reference point other than the canvas
      origin is important if we want to support tiles or other partitioning
      quantities (code-blocks and frames) where the initial samples within
      each partition correspond to high-pass rather than low-pass samples.
      It is known that the single-sample overlap transform can be implemented
      more efficiently during decompression when this alternate convention
      is adopted.  The alternate convention would normally interfere with
      all aspects of the system, including the way in which component
      dimensions must be derived from those of the high resolution grid;
      however, by realizing the convention in terms of a partitioning
      reference point which is displaced from the canvas origin we avoid
      all these problems.  If an image is to be compressed using the high-pass
      first convention then the partitioning reference point and the missing
      image dimensions should all be set to (1,1), i.e. P_h=P_w=M_h=M_w=1.
      Note that this will automatically induce the appropriate corrections in
      the component dimensions through the expression given above for Dh_c
      and Dw_c.

      As a final note, although the policies outlined here are completely
      general and work for arbitrary tile dimensions, there are some
      unpleasant consequences if the tile dimensions for each component are
      not divisible by 2^L where L is the number of resolution levels.
      Specifically, when this constraint is satisfied, the effective tile
      size within one or more lower resolution levels will not be constant
      within the interior of the image.

      Frames
      ------
      The concept of a frame is somewhat more subtle than that of a tile.
      Frames play a related role to tiles in defining rectangular regions
      in the image domain.  Frames must themselves respect tile boundaries;
      however, the frame boundaries are derived from a global partition
      which is defined in the canvas coordinate system.  To be specific,
      let Fh and Fw denote the nominal frame height and width.  These
      are required to be exact powers of 2.  The frame partition is formed
      in each individual image component, rather than the high resolution
      grid as for tiles.  Specifically, we define a global framing reference
      point with coordinates (f_x,f_y).  There are only four legal framing
      reference points, (0,0), (0,1), (1,0) and (1,1).  Within any given
      image component, the upper left hand corner of the first frame is
      anchored at this location and so the global frame partition is formed.
      Each frame in the partition spans the coordinates
         [f_x+nFw,f_x+(n+1)Fw) x [f_y+mFh,f_y+(n+1)Fh)
      for integers, n and m.  Now individual tiles are compressed
      independently.  When computing the frame boundaries for any given
      tile, the tile boundary must be traced from the high resolution
      reference grid to the relevant image component and intersected with
      the glboal frame partition.  Thus, any tile (including those not on
      the image boundaries) may contain partial frames on any or all of its
      boundaries.  By careful choice of tile and frame dimensions, it is
      possible to avoid these partial frames if desired, but this is not
      required and may not always be desirable.
          The coordinates of a frame may be traced from the relevant component
      into each subband by treating it as though it were a tile.  In this way,
      frames induce a rectangular partition in every subband within a given
      tile, with the possibility of partial frames on any or all tile
      boundaries.

      Unlike tiles, frames are not fully independent from one
      another.  The reason for introducing frames is to provide a mechanism
      for specifying a weakly dependent image partition which might be
      useful for reducing the implementation complexity of the compressor
      and/or decompressor in some applications.  The basic idea is that
      the image can be divided into blocks which are compressed largely
      independently, within a compression engine (e.g. an ASIC) which should
      be able to avoid making more than a small number of accesses to
      external memory holding information from other image regions.  We do
      not want to insist that the frames be fully independent, since then
      they would be identical to tiles; the use of even moderately large
      tiles (e.g. 128x128) has been shown to substantially degrade
      image quality at modest bit-rates.

      We finish this discussion by considering the specific weak independence
      requirements for frames.  As mentioned, the frame partition may be
      mapped into the subband domain, by considering the frame as though it
      were a tile.  The requirement that frames be compressible and/or
      decompressible with little interaction will probably, although not
      necessarily, imply that the entropy coding process should be carried
      out independently on each frame.

      The behaviour of the Wavelet transform at frame boundaries may be
      configured to elucidate different types of behaviour.  In one extreme,
      the Wavelet transform is performed exactly as it would be if there
      were no frame partition at all.  At the other extreme, all levels of
      Wavelet decomposition are applied using the so-called Single-Sample
      Overlap Wavelet Transform (SSO-DWT).  The middle ground between these
      two extremes may be of interest, where the SSO-DWT is applied only
      at a selected collection of lowest resolution levels and potentially
      a different number of resolution levels in each direction.

      Code-Blocks
      -----------
      The term "block" is used to refer to the operation of an entropy coder,
      but we will use the term "code-block" to make the distinction as
      clear as possible.  A code-block is a rectangular group of samples, all
      from the same subband, which are coded independently.  It follows that a
      code-block can also be decoded independently, which introduces
      the possibility of manipulating image regions in the compressed
      domain.  For example, it is easy to see how an image may be transposed
      in the compressed domain, simply by transposing the order in which
      code-blocks are decoded and the order in which the Wavelet transform is
      applied (it is separable).  Furthermore, if a compressed image is to
      be cropped, only those code-blocks which are at or near the cropped
      boundaries need be recoded.  Also of interest is the fact that
      code-blocks may be selectively transmitted/decoded, or
      transmitted/decoded with different precisions.  If the code-blocks are
      small compared with the size of the relevant subband then this
      increases the appeal of applications involving interactive navigation
      through a large ima

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -