DSPRelated.com
Forums

how to estimate the max frequency component of an image efficiently?

Started by walala August 19, 2003
Dear all,

I am facing with the following problem:

In a 8x8 image block, I can do DCT to get 64 frequency coefficients...

But I want just the highest frequency coefficient value, and its position in
terms of row and column index (i, j)...

Do I also need to compute DCT to get all 64 frequency coefficients? Or is
there any faster algorithm? The problem is that I don't know the position of
this highest frequency coefficient... so I cannot just compute, say, the
coefficient at (8, 8)... maybe (6, 4) is the highest...

Can anybody give me any hint on this?

Thanks a lot,

-Walala


Dear all,

I am facing with the following problem:

In a 8x8 image block, I can do DCT to get 64 frequency coefficients...

But I want just the highest frequency coefficient value, and its position in
terms of row and column index (i, j)...

Do I also need to compute DCT to get all 64 frequency coefficients? Or is
there any faster algorithm? The problem is that I don't know the position of
this highest frequency coefficient... so I cannot just compute, say, the
coefficient at (8, 8)... maybe (6, 4) is the highest...

Can anybody give me any hint on this?

Thanks a lot,

-Walala


walala wrote:
> Dear Mike, > > I did as you advised... I ploted all basis and saw the pattern, but I don't > think I can read off the highest frequency position from the pixel values of > the image... > > Can you elaborate further about your idea? > > Thanks a lot,
The basic idea is pattern matching. If you know which particular set of indecies you expect, then you can multiply each set by your raw data and sum all the points to get a measure of the match. If you do the full 2D DFT you get all the indecies and can just look for the max value, but that takes a lot more work. The problem with the fixed match effort is that you will have rotations and offsets. If there are too many to compare, you might as well do the DFT anyway. Look at the image and the patterns from a pure index. Look at a lot of paintings. In a while, you'll see some basic patterns. Rembrandt is a good one to start with :-) Patience, persistence, truth, Dr. mike -- Mike Rosing www.beastrider.com BeastRider, LLC SHARC debug tools
Dear Mike,

I did as you advised... I ploted all basis and saw the pattern, but I don't
think I can read off the highest frequency position from the pixel values of
the image...

Can you elaborate further about your idea?

Thanks a lot,

-Walala

"Mike Rosing" <rosing@neurophys.wisc.edu> wrote in message
news:3F41C572.5090600@neurophys.wisc.edu...
> walala wrote: > > Dear all, > > > > I am facing with the following problem: > > > > In a 8x8 image block, I can do DCT to get 64 frequency coefficients... > > > > But I want just the highest frequency coefficient value, and its
position in
> > terms of row and column index (i, j)... > > > > Do I also need to compute DCT to get all 64 frequency coefficients? Or
is
> > there any faster algorithm? The problem is that I don't know the
position of
> > this highest frequency coefficient... so I cannot just compute, say, the > > coefficient at (8, 8)... maybe (6, 4) is the highest... > > > > Can anybody give me any hint on this? > > Just look at it and do it in your head. If you already know the answer, > there's no reason to do any computations to find it. > > Think about what each bin (or coefficent) means. (0,0) tells you if
there's
> a DC offset and (8,0) tells you if there's a 3.5 cycle per side wave form
in
> the first dimension that has a DC offset in the other. > > To really see it, you should set 1 coefficient to 1.0 and all the others
to
> 0.0 and do an inverse DCT, then plot the result. You will be able to see > pretty quickly what the spatial frequencies are and what they mean so that > you really can just look at any image and pick out the highest bin without > doing any computation. > > Which should give you an idea of how to make a computer do that :-) > > Patience, persistence, truth, > Dr. mike > > -- > Mike Rosing > www.beastrider.com BeastRider, LLC > SHARC debug tools >