How can i perform histogram equalization transformation in 3 by 3 neighborhood of a pixel and repeat the process?

4 views (last 30 days)
Say for example
X=[2 1 0; 0 1 3; 4 1 4];
%zero padding
A=padarray(X,[1,1]);
Now for each pixel of X a 3 by 3 neighborhood matrix can be generated from A.
e.g.
A(1:3,1:3); A(1:3,2:4);
For each window, i want to use histogram equalization transformation for the central pixel and repeat the process up to
length(x(:)).
The steps of my algorithm are summarized here
  1. Find the central pixel and its neighborhood.
  2. Use histogram equalization transformation for each neighborhood to transform the central pixel.
  3. Move from pixel to pixel and repeat the process.

Answers (1)

Image Analyst
Image Analyst on 2 Jan 2014
You need to use adapthisteq(). It will do that, though for such a small window your output image is likely to look list noise.
  4 Comments
Tuhin  Sheikh
Tuhin Sheikh on 4 Jan 2014
Dear sir,
i was trying the program with small matrix first.
Definitely what you said is true.
say this is my image and i would apply the transformation function on 8 by 8 matrix
x=imread('tire.tif');
adapthisteq(x) % it has distributional specification for Rayleigh, exponential and uniform
my question was is it possible to match with normal distribution in this function?
Image Analyst
Image Analyst on 4 Jan 2014
It doesn't look like it. Why do you want it? What do you think the resulting image will look like and why do you expect it would be preferable to those distributions? If you really need it for some reason, you may have to program it up yourself.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!