Skip to content

[pixkit image] multitoning: Image multitoning

Yunfu Liu (Tristan) edited this page Dec 14, 2016 · 4 revisions

iCLUDMS2016

Stochastic, clustered dot multitone screening method. The screens used in paper are stored in data/iCLUDMS2016/data_iCLUDMS2016.xml.

[Abbr] inter-iterative CLU-DMS.

[Reference] Y. F. Liu and J. M. Guo, "Clustered-dot screen design for digital multitoning," IEEE Trans. Image Processing, vol. 25, no. 7, July 2016.

[Developer] Yun-Fu Liu (yunfuliu@gmail.com)

C++: bool iCLUDMS2016_genDitherArray(std::vectorcv::Mat &vec_DA1b, int daSize, int nTones,float sd_init,float sd_update)
C++: bool iCLUDMS2016(const cv::Mat &src1b, const std::vectorcv::Mat &vec_DA1b,cv::Mat &dst1b)

Parameters:

  • vec_DA1b - The generated screen (dither array, DA). They can be generated by iCLUDMS2016_genDitherArray(). They can be written and read by pixkit::write_vecMat and pixkit::read_vecMat, respectively.
  • daSize - Size of the screen (dither array).
  • nTones - Number of tones for representing a multitone image.
  • sd_init - Standard deviation of the initial filter.
  • sd_update - Standard deviation of the update filter.
  • src1b - The source image.
  • dst1b - The destination image.

Example:

    // write screen
    vector<Mat>	vec_DA1b;
    pixkit::multitoning::ordereddithering::iCLUDMS2016_genDitherArray(vec_DA1b,128,4,1.5,1.8); // setting to the `lion fish` shown in paper.
    pixkit::write_vecMat("vecmat.xml",vec_DA1b);
    // read screen
    pixkit::read_vecMat("vecmat.xml",vec_DA1b); // or pixkit::read_vecMat("data/iCLUDMS2016/data_iCLUDMS2016.xml",vec_DA1b) for the pretrained screens.
    pixkit::multitoning::ordereddithering::iCLUDMS2016(src,vec_DA1b,dst);

ChanduStanichWuTrager2014

Stochastic, clustered dot multitone screening method.

[Reference] K. Chandu, M. Stanich, C. W. Wu, and B. Trager, "Hybrid halftoning using direct multi-bit search (DMS) screen algorithm," in Proc. SPIE-IS&T, 2014.

[Developer] Yun-Fu Liu (yunfuliu@gmail.com)

C++: bool ordereddithering::ChanduStanichWuTrager2014_genDitherArray(std::vectorcv::Mat &vec_DA1b, int daSize, int nColors,float D_min)
C++: bool ordereddithering::ChanduStanichWuTrager2014(const cv::Mat &src1b, const std::vectorcv::Mat &vec_DA1b,cv::Mat &dst1b)

Parameters:

  • vec_DA1b - The generated dither arrays (DA). They can be generated by DMS2012_genDitherArray(). They can be written and read by pixkit::write_vecMat and pixkit::read_vecMat, respectively.
  • daSize - Size of the screen (dither array).
  • nColors - Number of colors for presenting a multitone image.
  • D_min - A user defined parameter, to control the density of clustered dots.
  • src1b - The source image.
  • dst1b - The destination image.

Example:

    vector<Mat>	vec_DA1b;
    ordereddithering::ChanduStanichWuTrager2014_genDitherArray(vec_DA1b,128,4,4);
    pixkit::write_vecMat("vecmat.xml",vec_DA1b);
    pixkit::read_vecMat("vecmat.xml",vec_DA1b);
    ordereddithering::ChanduStanichWuTrager2014(src,vec_da,dst);

DMS2012

Stochastic, dispersed dot multitone screening method.

[Abbr] Direct multi-bit search (DMS)

[Reference] K. Chandu, M. Stanich, C. W. Wu, and B. Trager, "Direct multi-bit search (DMS) screen algorithm," in Proc. IEEE ICIP, pp. 817-820, 2012.

[Developer] Yun-Fu Liu (yunfuliu@gmail.com)

C++: bool ordereddithering::DMS2012_genDitherArray(std::vectorcv::Mat &vec_DA1b, int daSize, int nColors)
C++: bool ordereddithering::DMS2012(const cv::Mat &src1b, const std::vectorcv::Mat &vec_DA1b,cv::Mat &dst1b)

Parameters:

  • vec_DA1b - The generated dither arrays (DA). They can be generated by DMS2012_genDitherArray(). They can be written and read by pixkit::write_vecMat and pixkit::read_vecMat, respectively.
  • daSize - Size of the generated DAs (width and height).
  • nColors - Number of colors used to present an image.
  • src1b - The source image.
  • dst1b - The destination image.

Example:

    vector<Mat>	vec_DA1b;
    ordereddithering::DMS2012_genDitherArray(vec_DA1b,128,4);
    pixkit::write_vecMat("vecmat.xml",vec_DA1b);
    pixkit::read_vecMat("vecmat.xml",vec_DA1b);
    ordereddithering::DMS2012(src,vec_DA1b,dst);

Clone this wiki locally