照片处理网论坛's Archiver

redcode 发表于 2006-3-8 15:04

[原创]直方图计算公式

<P>资料宝贵,建议大家打开ps跟我去练习体会,并独立思考。<br></P>
<P>本帖中,前三个提问者,我会免费为之解答(进阶区的收费学生不受此限制)。<br></P>
<P><br></P>
<P><br></P><br>
[align=right][color=#000066][此贴子已经被作者于2006-3-8 19:35:32编辑过][/color][/align]

redcode 发表于 2006-3-8 15:05

<P>跟我动手做:<br></P>
<P><FONT style="BACKGROUND-COLOR: #ffff44" size=4>步骤1-6说明:利用辅助线作出精确的色块面积。</FONT></P>
<P><br></P>
<P>1:新建800X600像素画布;<br></P><br>[attach]192318[/attach]<br>
[align=right][color=#000066][此贴子已经被作者于2006-3-8 16:29:56编辑过][/color][/align]

redcode 发表于 2006-3-8 15:08

<P>2:Ctrl+R调出标尺,并如图操作;<BR></P>
[attach]192319[/attach]<BR>

redcode 发表于 2006-3-8 15:08

<P>3:参数如图设置;<BR></P>
[attach]192320[/attach]<BR>

redcode 发表于 2006-3-8 15:11

<P>4:同理操作,但选项和参数有所改变;<BR></P>

<P>[attach]192322[/attach]<BR></P>
<P>5:实例图,作参看设置检查用。<BR></P>
<P><BR> </P>[attach]192324[/attach]<BR>

redcode 发表于 2006-3-8 15:16

<P>6:用矩形选框工具,分别如图作选区,并填充相应颜色。<BR></P>
<P><BR> </P>

<P>[attach]192327[/attach]<BR></P>
<P><BR> </P>
<P>[attach]192328[/attach]<BR></P>
<P><BR> </P>
<P>[attach]192329[/attach]<BR></P>
<P>这是实例图,作参看用。<BR></P>
<P><BR> </P>[attach]192330[/attach]<BR>

redcode 发表于 2006-3-8 15:18

<P>步骤1-6说明:利用辅助线作出精确的色块面积。</P>

用你的眼睛看 发表于 2006-3-8 15:21

这是什么意思?

redcode 发表于 2006-3-8 15:23

<P>进入直方图面板中<BR></P>
[attach]192332[/attach]<BR>

redcode 发表于 2006-3-8 15:32

<P>下面从易到难,我们逐渐说明。<BR></P>
<P>1:色阶;把鼠标如图范围放置,色阶功能会告诉你鼠标所处于的色阶位置。<BR></P>
<P>截图中,色阶告诉我的鼠标位置在163处。<BR></P>
<P>163是怎样的一个数值?(怎样的一个概念)<BR></P>
<P>打比方说:0为最黑,128为中间,255为最亮;那么鼠标在163&gt;128处,说明鼠标在较亮的范围上。<BR></P>

<img src="http://files.photops.com/attachments/dvbbs/2006-3/20063815313512098.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/20063815313512098.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><BR>

用你的眼睛看 发表于 2006-3-8 15:34

<P>调不出你这种标尺</P>

redcode 发表于 2006-3-8 15:35

<P>向右或左拉动鼠标,色阶会告诉我们现在鼠标所选取分析的色阶数值。<br></P>
<P>本例为98-163</P>
<P><img src="http://files.photops.com/attachments/dvbbs/2006-3/2006381535349642.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/2006381535349642.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><br><br></P><br>
[align=right][color=#000066][此贴子已经被作者于2006-3-8 16:31:05编辑过][/color][/align]

longlong7 发表于 2006-3-8 15:38

<P>还有么```</P>[em02][em02][em02]

longlong7 发表于 2006-3-8 15:40

<P>还有么````还有么</P>[em02][em02]

longlong7 发表于 2006-3-8 15:41

还没写完???[em02][em02][em02]

一棵大树 发表于 2006-3-8 15:42

正在学习

乐乐111 发表于 2006-3-8 15:44

<P>输入新参考线数值后图中没有显示,只能用鼠标从边上拉出来,是不是那里要调整</P>

redcode 发表于 2006-3-8 15:58

<P>1:像素;画布是800X600像素,所以直方图的像素即为480000——这是整张图像的大小(像素)<br></P>
<P><img src="http://files.photops.com/attachments/dvbbs/2006-3/2006381557093218.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/2006381557093218.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><br></P>
<P><br></P>
[align=right][color=#000066][此贴子已经被作者于2006-3-8 17:09:06编辑过][/color][/align]

redcode 发表于 2006-3-8 16:02

<P>如果我们用魔术棒选择工具,选取红色,如图像素只是240000——即480000的一半(回忆一下,前面我们是如何作这个红色块面积的)<br></P>
<P><img src="http://files.photops.com/attachments/dvbbs/2006-3/2006381603986229.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/2006381603986229.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><br><br></P>
<P>(说点不相关的知识,利用此功能我们还可以简单一下求不规则图形的面积,这里略过)<br></P><br>

redcode 发表于 2006-3-8 16:19

<P>3:数量;当鼠标放置直方图中,数量功能告诉我们该点或该范围一共有多少个像素点。<BR></P>

<P><img src="http://files.photops.com/attachments/dvbbs/2006-3/20063816155086989.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/20063816155086989.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><BR></P>
<P>假如某个色阶处或范围里面,没有像素,那么数量值即显示为0<BR></P>
<P><BR> </P>
<P><img src="http://files.photops.com/attachments/dvbbs/2006-3/2006381617384885.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/2006381617384885.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><BR></P>
<P><BR>这个范围内没有数量<BR></P>
<P><BR> </P>
<img src="http://files.photops.com/attachments/dvbbs/2006-3/20063816184825475.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/20063816184825475.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><BR>

redcode 发表于 2006-3-8 16:24

<P>在10楼图片</P>
<P>与12楼第一张图片中,似乎存在着一个矛盾:</P>
<P>——像素与数量的矛盾!</P>
<P>全画布的大小是800X600=480000像素</P>
<P>但数量又显示为480000</P>
<P>这如何理解呢?<br></P><br>10图片<br><br><IMG src="http://files.photops.com/attachments/dvbbs/2006-3/2006381557093218.jpg" border=0><br><br><br>12楼图片<br><br><IMG src="http://files.photops.com/attachments/dvbbs/2006-3/20063816155086989.jpg" border=0><br>

redcode 发表于 2006-3-8 16:45

原来,像素=红+绿+蓝通道的数量;<BR><BR>而直方图通道RGB里面的某个色阶处数量即是“红+绿+蓝(某色阶)”的数量。<BR><BR>大家可以进入通道中看看,红、绿、蓝通道的白色部分相加起来,是不是刚好等于一个完整的通道像素,是不是等于三分之一RGB通道?<BR><BR>[attach]192396[/attach]<BR>

redcode 发表于 2006-3-8 16:55

假如上面的说明你不能理解的话,那么我们从另一个角度来说RGB像素=RGB红绿蓝三个通道数量相加。<BR><BR>比方说:现在我们现在进入蓝通道中去,在我们的电脑显示器上,直方图会自动跳到“蓝通道”选项去。<BR>刚才RGB项,鼠标放置在255的数量是480000个,而现在进入蓝通道的255处是120000个。<BR><BR><img src="http://files.photops.com/attachments/dvbbs/2006-3/2006381655111802.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/2006381655111802.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><BR>

redcode 发表于 2006-3-8 16:57

<P>百分位:即是120000/480000=25%</P>

惡魔 发表于 2006-3-8 17:02

强的离谱。。我是菜鸟应该是看不懂的。但感觉强悍。呵呵。问题的话以后有别的要问你的哈,记得欠我问题啊。呵呵

longlong7 发表于 2006-3-8 17:16

<P>刚刚的发言太急噪了```恩``我是刚学不久的```能不能告诉我这些和什么有关`````我算是第一个发贴的吧````你说的哦</P>[em01][em01][em01]

redcode 发表于 2006-3-8 17:19

下面将从易到难来讲解直方图。<br><br>首先进入直方图的亮度中,本例以亮度项来讲解。<br><br>1:<FONT style="BACKGROUND-COLOR: #d7f076" size=4>像素=全画布大小</FONT>(800X600=480000)<br><br>[attach]192406[/attach]<br><br>或者=<FONT size=4><FONT style="BACKGROUND-COLOR: #e0f394">选择区域大小</FONT><br></FONT><br><br>[attach]192408[/attach]<br>

胡超 发表于 2006-3-8 17:25


<P>  还是看不懂.....昏饿...</P>

redcode 发表于 2006-3-8 17:33

色阶就是鼠标在直方图所处于的位置<BR><BR><img src="http://files.photops.com/attachments/dvbbs/2006-3/20063817322452247.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/20063817322452247.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><BR><BR><BR><img src="http://files.photops.com/attachments/dvbbs/2006-3/20063817323344864.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-3/20063817323344864.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /><BR>

redcode 发表于 2006-3-8 17:55

色阶:鼠标所处于直方图的位置;<BR><BR>数量:某个色阶位置中,有多少像素;<BR><BR>百分比:这些像素占全画布像素的百分之几;<BR><BR>下两图可以这样读解:<BR>1:当前鼠标处于的色阶位置是150(或185)中,数量是120000(或0)个,占全画布像素的25%(或0)<BR><BR>[attach]192434[/attach]<BR><BR><BR>[attach]192435[/attach]<BR>

页: [1] 2 3

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.