Skip to Main Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate content levelBeginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
342
|
第八章
代換回原本的式子中:
因為機率永遠是正的,可直接去除絕對值而得到:
這表示隨機變數
s
PDF 1,我們得到了均勻分布,表示在連續隨機變數的情況下,
不管輸入分布為何,以 CDF 作為轉換函數可得到均勻的分布,當然連續隨機變數的結果
不見得可以精確地轉換至離散領域,但至少這表示離散 CDF 也可以將灰階轉換至更均勻
的分布。為了得到更深入的了解,可以畫出從過度曝光的影像直方圖得到的轉換函數。
圖形顯示除了最亮的灰階以外,所有的色階都會轉換為較暗的色階,因此過度曝光的影
像將會變暗,反之,曝光不足的影像可以將之轉換為更亮的影像。[Page-345]
從轉換函數的本質可立即得到明顯的最佳化,便是使用
FoldList
指令計算轉換函數,這
可以將演算法的執行效率從 O(nLevels*nPixels) 改善為 O(nPixels)
ch08.indd 342 2014/4/2 下午 12:23:46
8.3 使用直方圖均衡化(Histogram Equalization)處理影像
|
343
擷取圖形大小
擷取影像數值區間,未提供則使用 [0,1]
計算影像直方圖,以 256 為上限,因為 BinCount 的範圍設定格式為 [min,max]
必要時將影像區間按比例調整為 [0,255] ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull

Publisher Resources

ISBN: 9789863470106