MATLAB Practice Program (Sepia tone Filter)

Source: Internet
Author: User
Tags sepia tone

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.