DSPRelated.com
Forums

FFTW, Imlib & OpenCV

Started by sunderam June 18, 2005
Hi there,
I am working on an image processing project. I am trying to represent an
image in terms of signal and then calculate contrast using that signal
representation of the image.

I know that inorder to represent an image in terms of signal a FFT has to
be performed. I am using FFTW to calcuate the FFT.

My dilema is that i m using opencv(open computer vision lib)to do other
parts of the project. I found an image image processing lib.
My question is has anyone used both of them. If yes can you tell me which
will be a better option to use.--imlib or opencv

I found some snippets for imlib which uses fftw but i m not sure how to
use
fftw with OpenCV. Has anyone used FFTW with OpenCV and provide me
guidance
in this regard.

Thanks for the help
Sunderam


		
This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
>Hi there, > I am working on an image processing project. I am trying to represent > an image in terms of signal and then calculate contrast using that > signal representation of the image.
Contrast is the ratio of the lightest part of an image to the darkest. (Not exactly. For a more complete definition, look up "gamma".) It is not measured in the frequency domain.
> I know that inorder to represent an image in terms of signal a FFT has > to be performed. I am using FFTW to calcuate the FFT.
The voltage produced from a vidicon is a signal that represents an image and has nothing to do with an FFT. Please review your "facts". ... Jerry -- What you know that's false hurts far more than what you don't know.
Hi Jerry,
Thanks for the prompt reply. 
I am referring to the this
paper(http://diuf.unifr.ch/courses03-04/imaging/simoncelli.pdf). This
paper talks about comparing contrast among other things. 
Following is a paragraph from the paper which refers to what i m talking

"Suppose and are two nonnegative image signals, which have been aligned
with each other (e.g.,spatial patches extracted from each image). If we
consider
one of the signals to have perfect quality, then the similarity
measure can serve as a quantitative measurement of the quality
of the second signal. The system separates the task of similarity
measurement into three comparisons: luminance, contrast and
structure. First, the luminance of each signal is compared. Assuming
discrete signals, this is estimated as the mean intensity"

I am interpreting that "nonnegative image signal" refers to signal
representation of hte image. Is that not correct?

Thanks
Sunderam
		
This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
I agree with Jerry.  You don't know what you're talking about and
should review your "facts".  That paper appears to make absolutely no
reference to the FFT.

Ciao,

Peter K.

i know that it doesnt refer to FFT. How do i obtain the image signal?
i thought image signal can be obtained from FFT of image.
Am i wrong about this.
thanks
Sunderam
>I agree with Jerry. You don't know what you're talking about and >should review your "facts". That paper appears to make absolutely no >reference to the FFT. > >Ciao, > >Peter K. > >
This message was sent using the Comp.DSP web interface on www.DSPRelated.com
Yes, you are wrong about that. One normally talks about a signal as the
time-domain or locational/intensity representation, and its Fourier
transform as the frequency or spatial-frequency domain.

When you write "FFT of image", you have already supposed a signal to
transform..

Jerry

>Yes, you are wrong about that. One normally talks about a signal as the >time-domain or locational/intensity representation, and its Fourier >transform as the frequency or spatial-frequency domain. > >When you write "FFT of image", you have already supposed a signal to >transform.. > >Jerry > >
Thanks for clearing that. Then my question, is there a method to represent an image in terms of signal in frequency domain.? And how can i find contrast for image of any format, not restricted to jpeg formats only. I read a couple of papers for image contrast measurement for jpeg images. 1.Image Enhancement Using a Contrast Measure in the Compressed Domain 2. A New Contrast Measure Based Image Enhancement Algorithm in the DCT Domain* Sunderam This message was sent using the Comp.DSP web interface on www.DSPRelated.com
This is what i found in "Algorithms of image processing and computer
Vision" By J R Parker.

"The fourier transform breaks up an image(or, in one dimension,a signal)
into set of sine and cosine components."

This is a link i found when i googled for "fourier transform of an image"
http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm(first link).

Please comment on my findings.
Thanks
Sunderam

>Yes, you are wrong about that. One normally talks about a signal as the >time-domain or locational/intensity representation, and its Fourier >transform as the frequency or spatial-frequency domain. > >When you write "FFT of image", you have already supposed a signal to >transform.. > >Jerry > >
This message was sent using the Comp.DSP web interface on www.DSPRelated.com
] Then my question, is there a method to represent
] an image in terms of signal in frequency domain.?

Why do you want to?

If you're trying to work out the contrast of an image, and you have the
image pixel values, then you don't need to do much at all.

If you have an image, then the pixel values are usually represented as:

I(x,y,p) = 0 to 255

where "x" is the x position,
"y" is the y position, and
"p" is the plane (e.g. red, green, blue, alpha).

It is this I(x,y,p) that you need to calculate the contrast.

] And how can i find contrast for image of
] any format, not restricted to jpeg formats only.

Why do you think that a contrast calculation depends on the image
format?

All image storage formats need, eventually, to reconstitute the signal
into the I(x,y,p) information.

You appear to be very confused.  Please keep asking questions so we can
sort out your confusion.

Start with the basics: you don't appear to comprehend image formats
yet.  Get that right before moving on to anything else more
complicated... you need to crawl before you can run.

Ciao,

Peter K.

Ok.
Can you please tell me what should i interpret the following paragraph
from "Image quality assessment: From error visibility to structural
similarity," IEEE Transactions on Image Processing, vol. 13, no. 4, pp.
600-612, Apr. 2004.

"Suppose and are two nonnegative image signals, which have been aligned
with each other (e.g.,spatial patches extracted from each image). If we
consider one of the signals to have perfect quality, then the similarity
measure can serve as a quantitative measurement of the quality
of the second signal. The system separates the task of similarity
measurement into three comparisons: luminance, contrast and structure"

My interpretation says representation of the image in signal terms to do
the necessary.

Please comment on this
Thanks
Sunderam


>] Then my question, is there a method to represent >] an image in terms of signal in frequency domain.? > >Why do you want to? > >If you're trying to work out the contrast of an image, and you have the >image pixel values, then you don't need to do much at all. > >If you have an image, then the pixel values are usually represented as: > >I(x,y,p) = 0 to 255 > >where "x" is the x position, >"y" is the y position, and >"p" is the plane (e.g. red, green, blue, alpha). > >It is this I(x,y,p) that you need to calculate the contrast. > >] And how can i find contrast for image of >] any format, not restricted to jpeg formats only. > >Why do you think that a contrast calculation depends on the image >format? > >All image storage formats need, eventually, to reconstitute the signal >into the I(x,y,p) information. > >You appear to be very confused. Please keep asking questions so we can >sort out your confusion. > >Start with the basics: you don't appear to comprehend image formats >yet. Get that right before moving on to anything else more >complicated... you need to crawl before you can run. > >Ciao, > >Peter K. > >
This message was sent using the Comp.DSP web interface on www.DSPRelated.com