[pixkit image] comp: Image compression - yunfuliu/pixkit GitHub Wiki

CDDBTC2015

A color image compression technique.

[Reference] J. M. Guo, H. Prasetyo, and N. J. Wang, “Effective image retrieval system using dot-diffused block truncation coding features,” IEEE Trans. Multimedia, DOI: 10.1109/TMM.2015.2449234, 2015.

[Developer] Yu Cheng ([email protected])

C++: bool CDDBTC2015(const cv::Mat &src3b,cv::Mat &dst3b,const int BlockSize)

Parameters:

  • src3b - The source image. It should be in CV_8UC3.
  • dst3b - The destination image. It will be the same type of src3b.
  • BlockSize - Block size. It should be 4, 8, or 16.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

comp::ColorBTC::CDDBTC2015(src,dst,8);

FS_BMO2014

A color image compression technique.

[Reference] Y. C. Hu, I. C. Chang, K. Y. Liu, and C. L. Hung, "Improved color image coding schemes based on single bit map block truncation coding," Optical Engineering, vol. 53, no. 9, pp. 093104-093104, Sept. 2014.

[Developer] Yu Cheng ([email protected])

C++: bool FS_BMO2014(const cv::Mat &src3b,cv::Mat &dst3b,const int BlockSize,int MoreCompressFlag=1,int THBO=15)

Parameters:

  • src3b - The source image. It should be in CV_8UC3.
  • dst3b - The destination image. It will be the same type of src3b.
  • BlockSize - Block size.
  • MoreCompressFlag - A great deal of storage cost can be saved with a slight image degradation if MoreCompressFlag = 1 and an adequate threshold THBO is used.
  • THBO - Threshold.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

comp::ColorBTC::FS_BMO2014(src,dst,8);

IBTC_KQ2014

A color image compression technique.

[Reference] J. Mathews, M. S. Nair, and L. Jo, "A novel color image coding technique using improved BTC with k-means quad clustering," Advances in Signal Processing and Intelligent Recognition Systems, vol. 264, pp. 347-357, 2014.

[Developer] Yu Cheng ([email protected])

C++: bool IBTC_KQ2014(const cv::Mat &src3b,cv::Mat &dst3b,const int BlockSize)

Parameters:

  • src3b - The source image. It should be in CV_8UC3.
  • dst3b - The destination image. It will be the same type of src3b.
  • BlockSize - Block size.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

comp::ColorBTC::IBTC_KQ2014(src,dst,8);

DDBTC2014

Compress image by block truncation coding (BTC) method.

[nickname] Dot-diffused block truncation coding (DDBTC)

[Reference] J. M. Guo and Y. F. Liu "Improved Block Truncation Coding Using Optimized Dot Diffusion", IEEE Trans. Image Process., vol. 23, no. 3, pp.1269-1275, 2014.

C++: bool DDBTC2014(const cv::Mat &src,cv::Mat &dst,int blockSize);

Parameters:

  • src - Input data.
  • dst - Output data.
  • blockSize - Block size. Only even is available.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

DDBTC2014(src,dst,8);

DBSBTC2011

Compress image by block truncation coding (BTC) method.

[nickname] Direct binary search block truncation coding (DBSBTC)

[Reference] J. M. Guo and C. C. Su, "Improved Block Truncation Coding Using Extreme Mean Value Scaling and Block-Based High Speed Direct Binary Search", IEEE Signal Processing Letters, vol. 18, no. 11, pp.694-697, Nov. 2011.

C++: bool DBSBTC2011(const cv::Mat &src,cv::Mat &dst,int blockSize=8);

Parameters:

  • src - Input data.
  • dst - Output data.
  • blockSize - Block size. Only size of 8 or 16 is available.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

DBSBTC2014(src,dst,8);

CEBTC2010

A color image compression technique.

[Reference] J. Wang, K. Y. Min, J. W. Chong, “Cost effective block truncation coding for color image compression,” AISS, vol. 2, no. 3, pp. 91-98, Sept. 2010.

[Developer] Yu Cheng ([email protected])

C++: bool CEBTC2010(const cv::Mat &src3b,cv::Mat &dst3b,const int BlockSize)

Parameters:

  • src3b - The source image. It should be in CV_8UC3.
  • dst3b - The destination image. It will be the same type of src3b.
  • BlockSize - Block size.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

comp::ColorBTC::CEBTC2010(src,dst,8);

ODBTC

Compress image by block truncation coding (BTC) method.

[nickname] Ordered-dither block truncation coding (ODBTC)

[Reference] J. M. Guo and M. F. Wu "Improved block truncation coding based on the void-and-cluster ditheringapproach", IEEE Trans. Image Process., vol. 18, no. 1, pp.211-213, 2009.

C++: bool ODBTC(const cv::Mat &src,cv::Mat &dst,int blockSize,ODBTC_TYPE type);

Parameters:

  • src - Input data.
  • dst - Output data.
  • blockSize - Block size. Only even is available.
  • type - There are three types can be selected: 1. ODBTC_TYPE_ClusteredDot and 2. ODBTC_TYPE_DispersedDot, to change the dither array.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

ODBTC(src,dst,8,ODBTC_TYPE_ClusteredDot);

EDBTC

Compress image by block truncation coding (BTC) method.

[nickname] Error-diffused block truncation coding (EDBTC)

[Reference] J. M. Guo "Improved block truncation coding using modified error diffusion," Electronics Letters, 44(7), pp. 462-464, Mar. 2008.

C++: bool EDBTC(const cv::Mat &src,cv::Mat &dst,int blockSize,EDBTC_TYPE type);

Parameters:

  • src - Input data.
  • dst - Output data.
  • blockSize - Block size. Only even is available.
  • type - There are three types can be selected: 1. EDBTC_TYPE_Floyd, 2. EDBTC_TYPE_Jarvis, and 3. EDBTC_TYPE_Stucki, to change the utilized error kernel.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

EDBTC(src,dst,8,EDBTC_TYPE_Floyd);

YangTsai1998

A color image compression technique.

[Reference] C.-K. Yang and W.-H. Tsai, "Color image compression using quantization, thresholding, and edge detection techniques all based on the moment-preserving principle," Pattern Recognition Letters, vol. 19, pp. 205-215, 1998.

[Developer] Hong-Xuan Hung ([email protected])

C++: bool YangTsai1998(const cv::Mat &src3b,cv::Mat &dst3b,const int K=256)

Parameters:

  • src3b - The source image. It should be in CV_8UC3.
  • dst3b - The destination image. It will be the same type of src3b.
  • K - The number of color used to represent entire image. For instance, if K=1, entire image will be represented only one color.

Example:

comp::ColorBTC::YangTsai1998(src,dst);

CCC1986

A color image compression technique.

[Reference] G. Campbell, T. A. DeFanti, J. Frederiksen, S. A. Joyce, L. A. Leske, J. A. Lindberg, and D. J. Sandin, "Two bit/pixel full color encoding," ACM SIGGRAPH Computer Graphics, vol. 20, no. 4, pp. 215-223, Aug. 1986.

[Developer] Yu Cheng ([email protected])

C++: bool CCC1986(const cv::Mat &src3b,cv::Mat &dst3b,const int BlockSize)

Parameters:

  • src3b - The source image. It should be in CV_8UC3.
  • dst3b - The destination image. It will be the same type of src3b.
  • BlockSize - Block size.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

comp::ColorBTC::CCC1986(src,dst,8);

CAMBTC1984

A color image compression technique.

[Reference] M. Lema and O. R. Mitchell, “Absolute moment block truncation coding and its application to color images,” IEEE Trans. Communications, vol. 32, no. 10, pp. 1148-1157, Oct. 1984.

[Developer] Yu Cheng ([email protected])

C++: bool CAMBTC1984(const cv::Mat &src3b,cv::Mat &dst3b,const int BlockSize)

Parameters:

  • src3b - The source image. It should be in CV_8UC3.
  • dst3b - The destination image. It will be the same type of src3b.
  • BlockSize - Block size.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

comp::ColorBTC::CAMBTC1984(src,dst,8);

BTC

Compress image by block truncation coding (BTC) method.

[nickname] Block truncation coding (BTC)

[Reference] E. J. Delp and O. R. Mitchell, "Image compression using block truncation coding," IEEE Trans. Commun., vol. COM-27, pp. 1335-1342, Sept. 1979.

C++: bool BTC(const cv::Mat &src,cv::Mat &dst,int blockSize);

Parameters:

  • src - Input data.
  • dst - Output data.
  • blockSize - Block size. Only even is available.

Return Value:

  • bool - If the function is complete correctly, it will return true.

Example:

BTC(src,dst,8);