IMAQ FFT processing

Hi,
Does anyone know if the IMAQ FFT automatically pads images to 2^n
dimensions or if you have to do it yourself?
My manuals do not tell me if it can accept any size of image or not.
Using Labview 7.0 and 7.1.

My VI
Attachments:
Untitled 1.vi ‏35 KB

Similar Messages

  • IMAQ FFT of a color image

     In LABVIEW 2011 Is there a way to do an IMAQ FFT on a color image? The only thing that seems to work is on gray scale images. When I try to use a color RGB(U32) image, the FFT vi errors out with "Invalid ImageType".
    Any suggestions?
     Thanks in advance.
    Solved!
    Go to Solution.
    Attachments:
    Resolution Decrease.vi ‏46 KB

     Thank you for the prompt reply Daniel.
     What we are attempting is a de-resolution of a hi resolution image to simulate what a 1-4 reduction in resolution using a fiber optic taper will look like to a customer without having to built a very expensive actual optical system. If it proves to be an acceptable resolution, then we can move forward. The point is we need a fiberoptic imaging system due to environmental issues prevernting having an actual camera up close to the work being inspected.
     So the idea is to convert the image to an FFT, remove any frequency component above the resolution we would see through the optical magnification, then recreate the image via a reverse FFT. Does that sound feasible or is there a simpler method of simulating a lowering of the resolution of an image? We can work on the gray scale image, as I believe this will prove acceptable for our demonstration. If color is required, we can talk about splitting up the color planes.
     Warm regards,
     Randy

  • IMAQ FFT destination image, help!

    Hello,
    I am new to using LabVIEW so please bear with me!
    I am reading/working my way through the IMAQ user manual for LabVIEW and I am trying to get IMAQ FFT working.  But I have trouble finding the VI that the destination image of IMAQ FFT VI should be connected to. At the second it gives me an error when I try and run the program.
    At the second I am really struggling to find the correct VI
    Also I am little unclear what the destination image is for, does the image need to be saved?
    Many thanks,
    Jack

    Hi,
    For IMAQ FFT Destination Image should be connected and must be complex:
    Andrey.
    PS
    Forum for Vision-related questions here
    Message Edited by Andrey Dmitriev on 01-28-2009 12:52 PM
    Attachments:
    FFT Sample.png ‏24 KB
    FFT Sample.vi ‏41 KB

  • How to use "IMAQ ComplexPlaneToImage"? (Display after "IMAQ FFT")

    Hello,I use two ways to display a image after "IMAQ FFT":
    (1). Input a image->IMAQ FFT->Windraw(display);
    (2). Input a image->IMAQ FFT->IMAQ ComplexPlaneToImage(extracting magnitude) ->Winddraw(display).
    The two results are much different.
    I want to know what the two displayed images(especially in the second way) mean and where
    "IMAQ ComplexPlaneToImage" usually used.
    Thanks for your help!

    Hi Dan
    I am having some questions regarding the FFT Phase of the FFT with IMAQ ComplexPlaneToImage.
    From the posting below you mention that the phase is:
    Phase = Real/Magnitude.
    I am using the function ComplexPlaneToArray to see the value I am getting from ComplexPlaneToImage.
    Usually the phase is the inverse tangent  (Imaginary/Real). If we are using the Real and magnitude it will be the inverse cos(Real/Magnitude)
    I tried the above senario to verify the phase value we are getting from ComplexPlaneToArray.
    However, I get not get the value you are displaying in the phase  (ComplexPlaneToArray).
    How can I verify  ComplexPaneToArray ( phase) with the various
    ComplexPaneToArray(real)
    ComplexPaneToArray(magnitude)
    ComplexPlaneToArray(imaginary)
    I attached a phase fft.vi as an example of my issue.
    Regards,
    Corinne
    Attachments:
    phase fft.vi ‏153 KB

  • How to save output image after IMAQ-FFT to the file

    When I apply IMAQ FFT on monochromatic image and display complex destination image by IMAQ WindDraw, I get picture which I am not able to save to the file. I tried various conversions from complex image to bitmap (array), but result was everytime different from that got by IMAQ WindDraw.
    I thank for any help.

    Hallo Filip,
    you cannot save Complex Image to file to be readable by other programs - see link: http://digital.ni.com/public.nsf/websearch/D557B1A79C30AD5F86256AB1006A678A?OpenDocument
    What you can do is convert Complex Image to 8-bits BMP file format and save it then. This question was answered already - see example at: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3ECED56A4E034080020E74861&p_node=DZ52000_US&p_source=External
    Hope this helps
    Pavel

  • IMAQ FFT Butterwort​h

    Hello
    I am trying to do a Butterworth-Highpass on a FFT of an image with pixel-by-pixel calculation. It works, but it is very very low-speed. Is there a way to do this faster?
    I generate an image which is multiplicated on the original FFT, the slowest part of it is the calculation of the Butterworth arbitrary function...
    best regards

    Hi Thomas K,
    thanks for the screenshot. I actually hoped for a VI Snippet to insert it into LabVIEW if needed :-)
    I cannot directly see the cause why this code takes 1.5 minutes; but let me suggest some steps that will help reading and debugging the code later on
    (1) Clean up the Block diagram. Data should always flow from left to right.
    (2) Use IMAQ Dispose to deallocate memory you allocate using IMAQ Create.
    (3) Do never ever use coercion dots going into a for loop. Why? LabVIEW does coerce statistically. You won't know how often your for loop works if you use this form of coercion! :-)
    I am pretty sure the loss of time is in one or perhaps two VIs. Please use the execution highlighting. I assume you will have 1 - 1.5 minutes wait time on one specific VI. Can you identify a "time thief"?

  • IMAQ FFT multiplication and MATLAB Script Nodes/Compact Rio

    I would like to automatically generate a frequency kernel to multiply with the FFT of my IMAQ image. I was wondering if there was a way for LabVIEW to automatically set up 2D arrays (with a lower bound, a step size and a higher bound) like what is done in MATLAB.
    I was wondering also, if someone could give me some insight as to what restrictions I face, when uploading code from MATLAB script nodes into the Compact RiO (I have a cRiO-9025).

    Hi Bilaln,
    I think you confused about a MATLAB script node and a Mathscript node.
    A MATLAB script nodes uses ActiveX to call into MATLAB, where as a Mathscript node runs in a NI built environment. The MATLAB script node requires both that MATLAB be installed and the host supports ActiveX. Since cRIO does not do either, you should use the MATHSCRIPT RT module.
    Joe Daily
    National Instruments
    Applications Engineer
    may the G be with you ....

  • Multi-camera acq w/IMAQ-Vision processing; how to translate buffers?

    I have a multi-camera system using genlocked cameras and a PCI-1408. I'm developing my application using LabWindows/CVI. I can acquire from each camera in turn using NI-IMAQ low-level functions (ref.: scan 1408 channels.c), but I want to process the images using high-level IMAQ-Vision functions. How do I translate an image captured into a low-level buffer (imgCreateBuffer) into an Image buffer (imaqCreateImage)? Are the buffer structures from imgCreateBuffer the same as imaqCreateImage, so that I can simply cast the void* returned from imgCreateBuffer to an Image* parameter in an imaq_xxx function? If not, how do I move an image from one buffer type to the other?
    Thanks!
    Jesse

    Well, I'm answering my own question!
    Turns out that the image buffer from imgCreateBuffer is an integer array. To get this into an Image structure from imaqCreateImage, use imaqArrayToImage.
    Hope this helps the next person.
    Jesse

  • Problem for linking IMAQ 2D FFT

    Hello,
    I would like to use IMAQ 2D-FFT VI's to make High-pass filtering, but just can't get the conversion VI ("FFT") working.
    It always gives me the same message:
    "IMAQ FFT source and destinations must be different"
    If somebody has just a small source to show me how to make an image file High(or Low) pass filtering using IMAQ features, it would help me to understand how to plug it...
    Thanks in advance for help.
    (I join a file which shows typically what I do not understand: how to plug the VI FFT)
    Jean-Philippe
    Attachments:
    Lect1.vi ‏57 KB

    Hello Jean-Philippe,
    To use this FFT function the Image Dst needs to be a complex image and the Image Source for the FFT-1 needs to be a complex image as well. I have attached a VI that uses this FFT function which should shed some light on the issue. Hope this helps. Have a good one.
    -Dan-
    Attachments:
    Interactive_FFT_Filter_Example.llb ‏98 KB

  • Internal memory error using IMAQ 1394 ver 2.0

    Hi Robert,
    I apologize for the much belated response to your e-mail.
    - When I was receiving the fatal memory error I was using the GRAB vi
    to acquire the data.  The problem seems to go away if I switch to
    the SNAP acquisition method.
    - I am not using the IMAQ vision FFT vi, I am using the FFT Spectrum vi.
    - When the image acquisition code is removed I ran the FFT on simulated
    data generated within the program not loaded from a stored file.
    Thanks,
    Ronen
    -----Original Message-----
    From: [email protected] [mailto:[email protected]]
    Sent: Monday, August 01, 2005 8:20 AM
    To: Feldman, Ronen (Contractor)
    Subject: Re: (Reference#7084698) Phone Support E-Mail
    Hi Ronen,
    My name is Robert and I am one of National Instruments' IMAQ and Vision
    supporters.  Eric has forwarded me your email regarding the error
    you are receiving as it looks like the problem may be related to the
    image acquisition side of things.
    In your last email, you noted that the fatal error does not occur if
    you remove the FFT code or if you remove the IMAQ code.  I was
    hoping you could describe for me a couple of things in greater
    detail.  1) In your typical code configuration, do you acquire
    with a GRAB?
    2) The FFT code that you mention, are you using IMAQ FFT VIs from the Vision Development Module?
    3) You said if you remove the image acquisition code the program runs
    fine. Does this mean that you are running your code on an image loaded
    from file?
    These answers should help us get to the bottom of the situation.
    Additionally, how large is your program?  Are all of the various
    parts subVIs?
    Regarding your other question, data parameters like those that you
    mentioned can be changed during program execution, but those changes
    are not saved to the camera's configuration file.  If you make
    these changes through the Measurement and Automation Explorer the
    camera configuration file will be updated.  This behavior is to
    protect the configuration files from being corrupted by the program you
    run.
    Hope this helps.  Let me know how things go with the IMAQ/FFT code.
    Regards,
    Note:  Your reference number is included in the subject field of
    this message.  It is very important not to remove or modify this
    reference number, or your message may be returned to you.

    Hi Ronen,
    I guess using the forums works for me too! I'm just glad I found it
    To clarify, you are first acquiring with a Grab (does not work) or snap (works fine) and then performing an Image to Array.  After Image to array you use the intensity information within the FFT Spectrum.vi?  When the program errors out, do you know which step you are running? 
    In addition, you should be able to whittle the program down to just these basic steps, and see if the error continues to occur.  If the problem you are having can be consistently reproduced with these three or four steps, I would be interested in seeing if I can reproduce the problem here.
    Regarding one of your other questions, changes made to the camera configuration file from Labview will not be permanent.  This is to avoid the possible hazard of overwriting the file with a non working configuration.
    Hope this helps,
    Robert

  • FFT using16-bi​t precision numbers

    Hi,
    I was recently putting together a data acquisition program to log and process data continuously over a period of a week.
    Hardware: cRIO, 9233 modules
    Signal processing requirements: 50kS/s on 8 channels, performing FFTs on all channels with greater than 1Hz resolution (attempted to use 64k sample block size)
    We had a fair few issues with the hardware hanging or just stopping without obvious explicit errors. The program appeared to run fine using a 32k sample block size. We assumed that it may be a RAM issue, however we haven't confirmed this.
    One consideration was that all the FFT processing is performed on double precision numbers, and it did not appear possible to perform the FFT operation on single or 16-bit precision. The few FFT VIs i had a look at all used "Call library function nodes" that I could not edit.
    Just interested to know if there is an easy way to edit these routines, or if anyone has created some VIs that work on varying precision numbers.
    Again, not 100% sure this was the sole issue with the above program, but interested nonetheless.
    Thanks for your time.
    Cheers,
    Mike

    Hi Mike,
    I've looked at the FFT VIs and it seems you are correct that all of the VIs are designed to operate on double precision numbers.  As you also noted, you cannot re-write these VIs because you are using the Real-Time VIs that use dll calls.  Your best bet for varying the precision of your FFTs would seem to be designing your own, or soliciting other users for what you are looking for (as you have already done here).  You can also do the processing on double precision data, but convert back to 16-bit precision after the FFT to conserve space.  I would also recommend that you submit a product suggestion for this;  I suspect this would be useful to a lot of people!
    You may also want to check out the Real-Time System Manager which is a very useful tool for monitoring your Real-Time system's performance.
    I hope this gives you some helpful information!
    Brian A.
    National Instruments
    Applications Engineer

  • How to compute 8 channels FFT on deltasigma FPGA ?

    Hi gents,
    I have an 9024 Crio, I need to acquire data at 51,2KHz with 2 slots NI 9234 (8 cahnnels) deltasigma and compute simultanous 8 channels FFT then send them to host. for the data I managed to acquire and read data on host, but I failed with FFT data so please have see on my screen shot (attached) of my block diagram and help me with the right procedure I have to follow to succeed :
    I configured the FFT : 1024 length and READ fifo ad IMG fifo with 8192 (1024 * 8 channels) target to host
    On the host I got only vibration data 8 channels with U32dataFIFO but for FFT I got nothing. I'm sure that the problem comes from FPGA VI so please give me the right procedure to follow for computing 8 channels FFT on deltasigma VI .
    Thanks !!!
    Attachments:
    old deltasigma VI working fine without FFT processing.png ‏67 KB
    modified VI with FFT processing.png ‏76 KB

    Hi,
       The first test I would do on the RT system is to make a simple benchmark vi which calculates the power spectrum of an array of your specified size (1024 x 8), 50 times. Use timers to determine how long it takes. Then try two loops, each processing an array which is (1024 x 4) and see if you get any bump from parallelism. I looked up your controller, but couldn't find the exact processor beyond it being PowerPC and 512 MB of RAM. That processor may not do FFT well or the power spectrum vi your using may not compile efficiently on the PowerPC.
    I see one possible issue which may be causing all your trouble, please check... I don't use the reference waveform add on, but it is similar to DAQmx. In DAQmx when you setup for continuous acquisition, the read inside the acquisition loop returns whatever samples are in the buffer. It doesn't wait for the buffer to be full. So if you set the buffer at 1024 and you start reading in a loop that is real fast, you may only get 10, 20, 50 samples. The read might have an input for the number of samples to get, but I don't think it will help much. Instead, if you need to get every single sample, you should concatenate your reads until you have 1024, then put it in the queue. Or you could have an intermediate loop which takes samples from the acquisition queue, packs them to (1024 x 8) and then puts them into a second queue to go to the FFT loop. I could imagine if the power spectrum vi is getting oddly sized arrays (not 2^n), it will slow down. This is easy to check, just put an array size inside the FFT loop. If you don't need to guarantee that every sample is captured, you could use finite samples acquisition and just keep restarting it.
    Also, with 512 MB of RAM you can afford to increase your queue size to 100 which might help if your producer to consumer ratio is fluctuating and hitting overflow intermittently.
    You can do the FFT on the FPGA, get it working on one channel, it will be gratifying!

  • Create an image from float array?

    Dear All,
    I have a float array containing pixel values. From that array I want to create an image (let's say in JPEG format).
    How should I do that?
    thanks

    Hi musti168,
    You're going through your entire image pixel-by-pixel and getting each of their values - why don't you just use the IMAQ ImageToArray function?  
    On this forum post I found an example of IMAQ ArrayToImage: http://forums.ni.com/t5/LabVIEW/IMAQ-arraytoimage-​example/td-p/68418
    You can use some of the IMAQ Image Processing palette to change the image to gray scale - possibly a threshold.
    Julian R.
    Applications Engineer
    National Instruments

  • Having trouble with a audio file. Need help please!

    Hello. 
    This may sound funny and not to related to any of this at first, but if anyone here knows about the game portal, then they know about the ARG that went on during last week and may even still be continuing. None of thats really important but if anyone cares to know, basically VALVe released a new update with 30 new sounds, 26 of them moarse code/sstv pictures. 3 of them called dinosaur_fizzle 1 2 and 3. Infact, each one was named dino_1 dino_2 and so on. 
    The main sound that no ones been able to crack is called Dinosaur_noise. Its obvious there are voices in it and its some sort of major clue, this file is way out of league with the other ones. No ones solved it 100% or cleaned it enough to make basically anything audible.
    Now this started March 1st. Since then i have worked hours on the audio file. I have gotten close, but not close enough.
    Thats why im turning to someone here, that can do a through analysis of the audio that adobe or reaper just cannot do.
    In the attachments is the original file itself with no editing what so ever.
    Heres some collected data. 
    Frequencies of interest
    An analysis was undertaken to find the strongest frequencies acting within "dinosaur_noise". Linear and Logarithmic curves showed sets of dominant figures, with the most being:
    Frequency (Hz)
    Comments
    9092
    Largest spike before silence
    7862
    Very faint
    7812
    Very faint
    7657
    Very faint
    7502
    Largest spike in the 4000-9000Hz band
    3502
    various noise between 3502 and 3510
    360
    Another very visible wave. This was the most pronounced visible wave in the Logarithmic scale
    35
    The most dominant low frequency wave
    There are a few standout segments, not of voice data underneath, but visible clicks or something happening about 5 times. These could be indications of splices or other manipulations going on. The largest noticed broad-spectrum spikes were:
    Time(in samples)
    Comments
    55402
    First broad spike
    422931
    Second broad spike
    751643
    Third broad spike
    1081537
    Fourth broad spike
    1110841
    Fifth broad spike
    Silence in the frequency ranges is located in the band of 10.567 - 15.337 KHz. All frequencies above that are likely to be high frequency poinoning from the FFT process. 
    Heres what i know personally.
    -Noise reduction makes it a lot worse and adds strange harmonics and artifacts.
    -Most filters do the same.
    -Clear voice around 15 that says THATS AMAZING.
    If anyone cares to help I would appreciate it so much.
    Here are some links that might help.
    http://www.snotmonkey.com/work/school/405/methods.html
    http://pastebin.com/r90fEtnd C++ code
    Actual files in attachments 
    Attachments:
    dinonoise.zip ‏2554 KB

    LabVIEW has a sound and vibration toolkit.  Do you have that?  Do you have LabVIEW?
    The forum is made up of volunteers who will help others with their LabVIEW problems.  But you need to have a specific problem and ask clear questions.
    What you are asking for is very unclear.  Why do you even want to do a "thorough analysis of the audio"?  No one is going to do your project for you.

  • Unable to create from an image

    Hi,
    First use of Kuler/Color CC. 'm logged in, but I cannot get the 'Create from image' function to work - I've tried uploading a number of images as a jpg, gif, bmp, png, but on each occasion I get the 'Selected file type is not supported' message. Is there something I've been overlooking? Any advice gratefully received.
    Nick

    Hi musti168,
    You're going through your entire image pixel-by-pixel and getting each of their values - why don't you just use the IMAQ ImageToArray function?  
    On this forum post I found an example of IMAQ ArrayToImage: http://forums.ni.com/t5/LabVIEW/IMAQ-arraytoimage-​example/td-p/68418
    You can use some of the IMAQ Image Processing palette to change the image to gray scale - possibly a threshold.
    Julian R.
    Applications Engineer
    National Instruments

Maybe you are looking for