% Distribution code Version 1.0 -- 03/03/2016 by Qiegen Liu
% The code and the algorithm are for non-comercial use only.
% Copyright 2017, Department of Electronic Information Engineering, Nanchang University.
% The current version is not optimized.
% The Code is created based on the method described in the following paper
% [1] "Parametrically ratio-based method for efficient contrast-preserving decolorization",
% by Jiaojiao Xiong, Hongyang Lu, Qiegen Liu and Xiaoling Xu
% Multimedia Tools and Applications, 2017, pp. 1-25.
% https://link.springer.com/article/10.1007/s11042-017-5143-6
clear all;close all;
%input image
Im = im2double(imread('15.png'));
%process image
gIm1 = rgb2gray(Im);
mu = 50; order = 2; Lpp = .015;maxIter = 50;
gIm2 = PrDecolor(Im,mu,Lpp,order,maxIter);
%display image
figure(2000), imshow([Im,repmat([gIm1,gIm2],[1,1,3])]);
Cite As
Qiegen Liu (2025). PrDecolor_matlabdemo (https://se.mathworks.com/matlabcentral/fileexchange/65498-prdecolor_matlabdemo), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > Images > Display Image >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
PrDecolor_matlabdemo_v1/
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
