ÔÚͼÏñ´¦ÀíÖУ¬¿ÖÅ´ó¼Ò×îÊìϤµÄ¾ÍÊǶÔÓÚͼÏñµÄÁÁ¶ÈºÍ¶Ô±È¶Èµ÷ÕûÁË¡£
Ç°ÃæÒ»¶¨Ò²ÓкܶàÈËд¹ýÕâÑùµÄÎÄÕÂÁË£¬µ«ÊÇÏë°ÑÎÒµÄÕâ¸öϵÁÐ×÷Ò»¸öÍêÕûµÄС½á£¬ÎÒ¾ÍÔÙÂÞàÂÒ»·¬ÁË¡£
»¹ÊÇÒÔ24λɫͼÏñΪÀý×Ó£¬Ã¿ÖÖÉ«²Ê¶¼¿ÉÒÔÓÃ0-255£¬Ò»¹²256ÖÖÉî¶ÈÀ´±íʾ¡£Èç¹ûÎÒÃÇ°ÑËü»ÔÚÒ»¸ö¶þά×ø±êÉÏ£¬ÕýºÃÊÇÒ»ÌõÖ±Ïß¡£±ÈÈçÎÒÃǽ«ÏñËصÄÉ«Éî×÷Ϊºá×ø±ê£¬Êä³öÉ«Éî×÷Ϊ×Ý×ø±êµÄ»£¬ÕýºÃÊÇÒ»Ìõ¾¹ýԵ㣨0£¬0£©µÄ45¶ÈбÏß¡£
ÄÇôºÜÈÝÒ׾ͿÉÒÔд³öËüµÄÖ±Ïß·½³Ì£ºOut = In * 1 £¬ÏµÊý1¾ÍÊǶԱȶȵĸÅÄî.Èç¹û°ÑÌõÖ±Ïß¼ÓÉÏÒ»¸öÆ«ÒÆÁ¿±ä³ÉB£¬ÄÇôËüµÄÖ±Ïß·½³Ì¾Í³ÉΪ£º
Ç°ÃæÒ»¶¨Ò²ÓкܶàÈËд¹ýÕâÑùµÄÎÄÕÂÁË£¬µ«ÊÇÏë°ÑÎÒµÄÕâ¸öϵÁÐ×÷Ò»¸öÍêÕûµÄС½á£¬ÎÒ¾ÍÔÙÂÞàÂÒ»·¬ÁË¡£
»¹ÊÇÒÔ24λɫͼÏñΪÀý×Ó£¬Ã¿ÖÖÉ«²Ê¶¼¿ÉÒÔÓÃ0-255£¬Ò»¹²256ÖÖÉî¶ÈÀ´±íʾ¡£Èç¹ûÎÒÃÇ°ÑËü»ÔÚÒ»¸ö¶þά×ø±êÉÏ£¬ÕýºÃÊÇÒ»ÌõÖ±Ïß¡£±ÈÈçÎÒÃǽ«ÏñËصÄÉ«Éî×÷Ϊºá×ø±ê£¬Êä³öÉ«Éî×÷Ϊ×Ý×ø±êµÄ»£¬ÕýºÃÊÇÒ»Ìõ¾¹ýԵ㣨0£¬0£©µÄ45¶ÈбÏß¡£
ÄÇôºÜÈÝÒ׾ͿÉÒÔд³öËüµÄÖ±Ïß·½³Ì£ºOut = In * 1 £¬ÏµÊý1¾ÍÊǶԱȶȵĸÅÄî.Èç¹û°ÑÌõÖ±Ïß¼ÓÉÏÒ»¸öÆ«ÒÆÁ¿±ä³ÉB£¬ÄÇôËüµÄÖ±Ïß·½³Ì¾Í³ÉΪ£º
Out = In* 1 + (ab)
Æ«ÒÆÁ¿(ab)¾ÍÊÇÁÁ¶ÈµÄÔöÁ¿¡£
Ö»ÒªÓгõÖеĴúÊý֪ʶ¾ÍºÜÈÝÒ׿´³öËüÂú×ãÒ»ÌõÖ±Ïß·½³Ì£ºY= A * X + B¡£µ«ÊÇ£¬ÎÒÃÇÕâÀïÒª´¦ÀíµÄÇé¿öÉÔ΢ÓÐЩ²»Í¬£¬ÔÚͼÏñ´¦ÀíÖУ¬¶Ô±È¶ÈºÍÁÁ¶ÈÒª·Ö±ð¶Ô´ý¡£²»ÄÜÒòΪ¸Ä±ä¶ø¸Ä±äÁÁ¶È£¬ÒòΪÎÒÃÇÏ°¹ßÉÏ°Ñ»ÒÉ«£¨127£¬127£©ÕâÒ»µã×÷ΪÖÐÐĵ㡣
Ö»ÒªÓгõÖеĴúÊý֪ʶ¾ÍºÜÈÝÒ׿´³öËüÂú×ãÒ»ÌõÖ±Ïß·½³Ì£ºY= A * X + B¡£µ«ÊÇ£¬ÎÒÃÇÕâÀïÒª´¦ÀíµÄÇé¿öÉÔ΢ÓÐЩ²»Í¬£¬ÔÚͼÏñ´¦ÀíÖУ¬¶Ô±È¶ÈºÍÁÁ¶ÈÒª·Ö±ð¶Ô´ý¡£²»ÄÜÒòΪ¸Ä±ä¶ø¸Ä±äÁÁ¶È£¬ÒòΪÎÒÃÇÏ°¹ßÉÏ°Ñ»ÒÉ«£¨127£¬127£©ÕâÒ»µã×÷ΪÖÐÐĵ㡣
±ÈÈ磬ÎÒÃǼӴóÁ˶Աȶȣ¬ÔÀ´µÄÖ±ÏßA¾Í±ä³ÉÈçÖ±ÏßDËù±íʾµÄ£¬ÔڸıäÁ˶ԱȶȵÄͬʱ£¬Ò²Ôö¼ÓÁËÁÁ¶È(ab)£¬¶øÎÒÃÇÐÄÄ¿Öеı仯Ӧ¸ÃÊÇÈëÖ±ÏßCÄÇÑù¡£Ò²¾ÍÊÇ˵£¬ÎÒÃÇ°Ñ(127,127)ÕâÒ»µãÓ³Éä³ÉÁË×ø±êϵµÄԵ㡣
ÄÇôÎÒÃǾÍÒª°ÑÔÀ´µÄÖ±Ïß¹«Ê½Ð޸ijɣºY=( X - 127 ) *A + B¡£A±íʾ¶Ô±È¶È£¬B±íʾÁÁ¶ÈÔöÁ¿¡£ÎÒÃÇÑé֤һϣºÖ»ÒªÁÁ¶ÈÔöÁ¿ B£½0£¬ÎÞÂÛÔõô¸Ä±ä¶Ô±È¶È A£¬¸ÃÖ±ÏßʼÖÕͨ¹ýÖÐÐĵã(127,127),Ò²¾ÍÊÇ˵¸Ä±ä¶Ô±È¶ÈµÄͬʱ£¬ÁÁ¶ÈûÓиı䡣
ÓÉ´Ë£¬ÎÒÃǾͿÉÒÔÍƵ¼³öÑÕÉ«µÄ¶Ô±È¶ÈÁÁ¶È¼ÆË㹫ʽÁË£º
ÄÇôÎÒÃǾÍÒª°ÑÔÀ´µÄÖ±Ïß¹«Ê½Ð޸ijɣºY=( X - 127 ) *A + B¡£A±íʾ¶Ô±È¶È£¬B±íʾÁÁ¶ÈÔöÁ¿¡£ÎÒÃÇÑé֤һϣºÖ»ÒªÁÁ¶ÈÔöÁ¿ B£½0£¬ÎÞÂÛÔõô¸Ä±ä¶Ô±È¶È A£¬¸ÃÖ±ÏßʼÖÕͨ¹ýÖÐÐĵã(127,127),Ò²¾ÍÊÇ˵¸Ä±ä¶Ô±È¶ÈµÄͬʱ£¬ÁÁ¶ÈûÓиı䡣
ÓÉ´Ë£¬ÎÒÃǾͿÉÒÔÍƵ¼³öÑÕÉ«µÄ¶Ô±È¶ÈÁÁ¶È¼ÆË㹫ʽÁË£º
NewRed= (OldRed -127 ) * A + 127£« B
NewGreen = (OldGreen -127 ) * A + 127£«B
NewBlue = (OldBlue -127 ) * A + 127£«B
NewGreen = (OldGreen -127 ) * A + 127£«B
NewBlue = (OldBlue -127 ) * A + 127£«B