From: Tarun on
The question i have in hand with me is as follows
Using the image data given in bmp and matrix form in the attached files, you are
required to produce a software program implementing the Radix-2 representation
method for median filtering. The dimensions of the matrix/image are 256x256. You
should consider neighbourhoods of size 3x3, 5x5 and 7x7. You are required to
submit:
a) The software code in MATLAB;
b) A brief report (no longer than three pages), describing the workings of the
algorithm, and its effect on noise removal. Comment on the effect of
varying neighbourhood sizes;
c) The resulting image data in matrix form;
d) Display the original and resulting images using e.g., the mat2gray/imshow
MATLAB commands (Image Processing Toolbox).

and description for the radix 2 filter which is similar to medial filter is
RADIX-2 REPRESENTATION ALGORITHM
Step 1: Select L (number of bits to represent gray level values), and N (number of pixels in neighbourhood).
Step 2: For iteration k=1, select bit index mk=0 and set threshold tk=ceiling(N/2).
Step 3: For k=1 to L
Do {
Calculate members set Π[2mk+1]k.
Calculate cardinality a(mk,k).
If a(mk,k)≥tk then bit median is μk=1 and set tk+1=tk
If a(mk,k)<tk then bit median is &#956;k=0 and set tk+1=tk-a(mk,k)
mk+1=2mk+&#956;k
}
Step 4: Neighbourhood median is given by {&#956;1, &#956;2, &#8230;, &#956;k}
i need to submit this coursework by tommorow evening and i havent even started yet...IM in trouble because my exam are starting next week and i have to study for them....please some one help me with the matlab codes

ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <78649ee1-549e-4f4d-bd3c-8fdc9711a568(a)i9g2000yqi.googlegroups.com>...
> On May 5, 10:47 am, Walter Roberson <rober...(a)hushmail.com> wrote:
> > ImageAnalyst wrote:
> > > I never heard of a radix 2 representation of an image.
> >
> > "radix 2" would be equivalent to "binary".
>
> -------------------------------------------------------
> Yes but a binary image is not the same as, say, representing a pixel
> with gray level of 169 as 10101001 which is the binary representation
> of 169. All images are ultimately binary in that sense because
> they're numerical representations in a digital computer. And if you
> say
> binaryImage = grayImage > 42;
> you can't say that binary image is a radix 2 representation of gray
> image because it's not - it's derived from grayImage but it is not a
> representation of grayImage. So I'm still unclear as to what Tarun
> means. I guess we'll see if Tarun returns......
From: Mark Shore on
"Tarun " <tarunjacob(a)gmail.com> wrote in message <hrrcr2$6fk$1(a)fred.mathworks.com>...
> Please some one can help me with my Image Processing coursework its radix 2 representation of a 256x256 image in matlab ..i have to sumbit the coursework by this friday and i have exams next week...i am not that good in matlab and im having lot of trouble..if some one can help i please mail me on tarunjacob(a)gmail.com and i will send the details....i will be very thankfull...please help...
....
> The question i have in hand with me is as follows
> Using the image data given in bmp and matrix form in the attached files, you are
> required to produce a software program implementing the Radix-2 representation
> method for median filtering. The dimensions of the matrix/image are 256x256. You
> should consider neighbourhoods of size 3x3, 5x5 and 7x7. You are required to
> submit:
> a) The software code in MATLAB;
> b) A brief report (no longer than three pages), describing the workings of the
> algorithm, and its effect on noise removal. Comment on the effect of
> varying neighbourhood sizes;
> c) The resulting image data in matrix form;
> d) Display the original and resulting images using e.g., the mat2gray/imshow
> MATLAB commands (Image Processing Toolbox).
>
> and description for the radix 2 filter which is similar to medial filter is
> RADIX-2 REPRESENTATION ALGORITHM
> Step 1: Select L (number of bits to represent gray level values), and N (number of pixels in neighbourhood).
> Step 2: For iteration k=1, select bit index mk=0 and set threshold tk=ceiling(N/2).
> Step 3: For k=1 to L
> Do {
> Calculate members set &#928;[2mk+1]k.
> Calculate cardinality a(mk,k).
> If a(mk,k)&#8805;tk then bit median is &#956;k=1 and set tk+1=tk
> If a(mk,k)<tk then bit median is &#956;k=0 and set tk+1=tk-a(mk,k)
> mk+1=2mk+&#956;k
> }
> Step 4: Neighbourhood median is given by {&#956;1, &#956;2, &#8230;, &#956;k}
> i need to submit this coursework by tommorow evening and i havent even started yet...IM in trouble because my exam are starting next week and i have to study for them....please some one help me with the matlab codes
>

Well, maybe you get a few points for being direct, but as a quick look through CSSM will show, nobody will do your homework and assignments for you (let alone write your exams). On the bright side, failure CAN be a learning experience.
From: Tarun on
Hi,
My friend and me have been working on a program today and it seems to be stuck with errors....we are currently running out of time...please someone help us with debugging it...we have used a 256 by 256 image and a 3 by 3 mask(window)
the pgm code is given below and the question as well...i have also attache the theory for radix 2...

a=imread('lena.bmp');
[r c]=size(a);
win_size=3;
for i=1:r-2,
for j=1:c-2,
cnt=1;
for k=i:i+(win_size-1),
for l=j:j+(win_size-1),
b=dec2bin(a(k,l),8);
for lp=1:8,
arr(cnt,lp)=b(lp);
end
cnt=cnt+1;
end
end
m=0; t=5;
for kn=1:8 %steps 1-8
p=(2*m)+1;
cn=0;
for x=1:9
for y=1:kn
xy(x,y)=arr(x,y);
end
end
xy_d=bin2dec(xy);
for d=1:9
if (xy_d(d)==p)
cn=cn+1;
end
end
if (cn>=t)
U(kn)=1;
m=(2*m)+1;
else
if (cn<t)
U(kn)=0;
m=(2*m)+0;
t=t-cn;
end
end
end
u(i,j)=U(1)*2^7+U(2)*2^6+U(3)*2^5+U(4)*2^4+U(5)*2^3+U(6)*2^2+U(7)*2^1+U(8)*2^0;
end
end






"Mark Shore" <mshore(a)magmageosciences.ca> wrote in message <hrs3av$k2q$1(a)fred.mathworks.com>...
> "Tarun " <tarunjacob(a)gmail.com> wrote in message <hrrcr2$6fk$1(a)fred.mathworks.com>...
> > Please some one can help me with my Image Processing coursework its radix 2 representation of a 256x256 image in matlab ..i have to sumbit the coursework by this friday and i have exams next week...i am not that good in matlab and im having lot of trouble..if some one can help i please mail me on tarunjacob(a)gmail.com and i will send the details....i will be very thankfull...please help...
> ...
> > The question i have in hand with me is as follows
> > Using the image data given in bmp and matrix form in the attached files, you are
> > required to produce a software program implementing the Radix-2 representation
> > method for median filtering. The dimensions of the matrix/image are 256x256. You
> > should consider neighbourhoods of size 3x3, 5x5 and 7x7. You are required to
> > submit:
> > a) The software code in MATLAB;
> > b) A brief report (no longer than three pages), describing the workings of the
> > algorithm, and its effect on noise removal. Comment on the effect of
> > varying neighbourhood sizes;
> > c) The resulting image data in matrix form;
> > d) Display the original and resulting images using e.g., the mat2gray/imshow
> > MATLAB commands (Image Processing Toolbox).
> >
> > and description for the radix 2 filter which is similar to medial filter is
> > RADIX-2 REPRESENTATION ALGORITHM
> > Step 1: Select L (number of bits to represent gray level values), and N (number of pixels in neighbourhood).
> > Step 2: For iteration k=1, select bit index mk=0 and set threshold tk=ceiling(N/2).
> > Step 3: For k=1 to L
> > Do {
> > Calculate members set &#928;[2mk+1]k.
> > Calculate cardinality a(mk,k).
> > If a(mk,k)&#8805;tk then bit median is &#956;k=1 and set tk+1=tk
> > If a(mk,k)<tk then bit median is &#956;k=0 and set tk+1=tk-a(mk,k)
> > mk+1=2mk+&#956;k
> > }
> > Step 4: Neighbourhood median is given by {&#956;1, &#956;2, &#8230;, &#956;k}
> > i need to submit this coursework by tommorow evening and i havent even started yet...IM in trouble because my exam are starting next week and i have to study for them....please some one help me with the matlab codes
> >
>
> Well, maybe you get a few points for being direct, but as a quick look through CSSM will show, nobody will do your homework and assignments for you (let alone write your exams). On the bright side, failure CAN be a learning experience.