Skip to Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
8.4 使用直方圖規格化(Histogram Specification)處理影像
|
347
1. 以訣竅 8.3 的方式,將輸入影像轉換為均勻分布。
2. 將目標影像均衡化轉換的反轉換,作用於步驟 1 的輸出。
這個做法的關鍵在於找出反轉換,因為在離散數學的領域進行數學運算,也許無法找出
精確的反轉換,但可以下列方式取得近似反轉換:將
targetMap
的索引址與元素進行翻
轉互換,取最小的獨特元素值作為索引址,若有缺漏值則使用下一個最接近的數值。
以下的
inverseEqualizationMap
函數可從輸入的影像建立反轉換,但如果你仔細檢查
histogramSpecification
的程式碼,會發現為了效率考量,並未建立反轉換,而是直接
從輸入與目標影像的均衡化轉換,使用規格化映射函數
specificationMap
計算反轉換。
350]
使用
histogramSpecificationPlot
指令可繪出輸入及目標均衡化轉換、目標均衡化反轉
換及最終的直方圖規格化轉換,藉此獲得更進一步的理解,這些圖形顯示輸入灰階影像
如何映射至輸出。如果你還沒有被說服
specificationMap
即為所需轉換,試著將上圖的
specMap
的圖形取代為
inverseMap[#]&/@inputMap
,仍可輸出完全相同的圖形。
計算目標影像的直方圖映射
計算輸入影像的直方圖映射
計算
targetMap的 反映射
mathemaca 6 以前的版本才需載入此套件
ch08.indd 347 2014/4/7 下午 12:29:39 ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mathematica Cookbook

Mathematica Cookbook

Sal Mangano
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9789863470106