ImageAnalyst <
imagea...@mailinator.com> wrote in message <
a384766e-4c26-4a7b...@ek5g2000vbb.googlegroups.com>...
THANKS FOR YOUR REPLY.
I DID WHAT YOU QUOTED. BUT ONE PROBLEM ARRIVES:
The O/P result is:
backgroundPixelsValues =
0
0
1
0
1
1
2
2
1
1
1
0
0
1
0
0
0
foregroundPixelsValues =
4
5
5
3
4
4
5
3
4
3
4
4
4
3
4
3
5
4
3
Histogram {hist} of this backgroundPixelsValues gives range from 1-3 & also same for foregroundPixelsValues!!
I used this program:
A = backgroundPixelsValues(:);
H= hist(A,2);
bar(H,'BarWidth',1)
& SAME FOR foregroundPixelsValues.
NOW WHEN I DID HISTOGRAM EQUALIZATION:
histeq(backgroundPixelsValues); it gives wrong result as compared to theoretical calculation!
===================================
As theoretical histogram-equalization calculation gives:
backgroundPixelsValues:
for 0 --> 0.9412 quantized to 1.
for 1 --> 1.7648 quantized to 2.
for 2 --> quantized to 2.
===================================
but the above MATLAB program gives:
for 0 --> 0.4762 quantized to 1.
for 1 --> quantized to 1.
for 2 --> quantized to 1. !!
& same problem for foregroundPixelsValues.