I have a software on my phone to implement a lot of image filters, very interesting, I intend to try.
This filter is mainly for old photo effects.
The code is short, and I won't go into it in detail.
Original:
Post-processing effects:
The MATLAB code is as follows:
Clear All;close all;clc;img=imread ('lena_rgb.jpg'); [H W K]=size (IMG); Imshow (IMG); R=double (IMG (:,:,1)); G=double (IMG (:,:,2)); B=double (IMG (:,:,3) ); RR=r*0.393+g*0.769+b*0.198; RG=r*0.349+g*0.686+b*0.168; RB=r*0.272+g*0.534+b*0.131; RandR=rand () *0.5+0.5; RANDG=rand () *0.5+0.5; Randb=rand () *0.5+0.5; IMGN=zeros (h,w,k); IMGN (:,:,1) =randr*rr+ (1-RANDR) *R;IMGN (:,:,2) =randg*rg+ (1-RANDG) *G;IMGN (:,:,3) =randb*rb+ (1-RANDB) *b;figure;imshow (Uint8 (IMGN));
Reference: http://blog.csdn.net/jia20003/article/details/9142111
MATLAB Practice Program (Sepia tone Filter)