Please help me implement the equations: Pij = (f(i,j))/(∑_(i=1)^M∑_(j=1)^N〖f(i,j)〗) and H = ─∑_(i=1)^M∑_(j=1)^NPijlog2Pij
Show older comments
Can someone please explain how to implement these equations in MATLAB?
Pij = (f(i,j))/(∑_(i=1)^M∑_(j=1)^N〖f(i,j)〗)
H = ─∑_(i=1)^M∑_(j=1)^NPijlog2Pij
Accepted Answer
More Answers (1)
Image Analyst
on 31 Mar 2013
0 votes
Try to construct a pair of nested for loops over i and j. See the getting started section if you don't know how to program in MATLAB yet. The latter formula is the entropy and there are functions for that, such as entropyfilt() in the Image Processing Toolbox.
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!