C # According to the paper Pixel Difference algorithm "personal experiment or relatively good"

Source: Internet
Author: User

Paper Address: http://www.docin.com/p-1081596986.html

Specific code:

I turned to YUV, and then passed the above paper in a way closer.

Yvu Introduction: 50503764

It doesn't matter if you don't turn.

DoubleRus (System.Drawing.Color Color, System.Drawing.Color color2) {DoubleY1, U1, V1, Y2, U2, V2; Y1=0.299* Color. R +0.587* Color. G +0.114*color.            B U1= -0.14713* Color. R +0.28886* Color. B +0.436*color.            B V1=0.615* Color. R + color. G0.51498+0.10001*color.            G Y2=0.299* Color2. R +0.587* Color2. G +0.114*Color2.            B U2= -0.14713* Color2. R +0.28886* Color2. B +0.436*Color2.            B V2=0.615* Color2. R + Color2. G0.51498+0.10001*Color2.            G returnMath.sqrt ((y1-y2) * (y1-y2) + (U1-U2) * (U1-U2) + (V1-V2) * (V1-v2)); }

An integer is returned, and the larger the number, the greater the difference.

C # According to the paper Pixel Difference algorithm "personal experiment or relatively good"

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.