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"?

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 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

  • 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 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 ....

  • 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

  • Fourier transform of non-square image

    Hello,
    I'm trying to compute the FFT of a greyscale image (1920x1200 pixels) but I cannot find a way to do this do an image that isn't perfectly square.
    Any help would be much appreciated thanks.
    Regards
    DJC

    I don't see any limitation with that respect when I do an image FFT.
    The IMAQ FFT function works fine with my image (2272x1704).  You do need a complex image type though.
    In addition the FFT function is orthogonal so if you wanted to, you can convert the image to an array and perform an FFT on each row of the image and then one on each column and get the 2D answer you are looking for.
    Message Edited by rpursley8 on 02-08-2008 10:30 AM
    Randall Pursley

  • Meaningful LabView versions speed benchmarks - anybody?

    Did anybody try to come up with meaningful speed benchmarks for different (5, 6, 6.1, 7) LabView versions?
    Meaningful means time of most important LabView subunits would be compared. Most important subunits are, for example, time to execute a .dll based native VI, time to perform build array operation, time to call a global, FFT, DFFT, IMAQ FFT, etc.
    NI provided "comparison" between 6.0, 6.1 and C for some applications. This comparison is not convincing and outdated.
    The suggested benchmarking is a simple and easy task to accomplish, given all versions of LabView are installed on the same machine. Wonder why there is no info on that anywhere.
    Micahel

    I wouldn't agree that the benchmarks for file i/o, array manipulation, fft speed aren't relevant becasue they certainly are to what I do. Are they complete? Of course not. Should NI add more? Yes. Should you be responsible for a set of your own benchmarks? Probably, because NI will never be able to satisfy all of its users and the infinite number of applications that are possible.
    As far as the end user license, for you information the 6.1 agreement says:
    "Upgrades. If the SOFTWARE is an Upgrade, you may only use the SOFTWARE if you have (at the time you receive the Upgrade) a valid license to use the pre-existing SOFTWARE. Further, the license agreement accompanying the Upgrade applies to your use
    of the Upgrade. While you may continue to use the pre-existing SOFTWARE, you may only use it on the same machine upon which the Upgrade is used and the license that accompanied the pre-existing SOFTWARE will continue to apply to your use of the pre-existing SOFTWARE. "
    I would interpret the statement "you may continue to use the pre-existing SOFTWARE" to mean just that and have always left the older version on my system until I've converted all older programs (which have sometimes taken a great deal of time).

  • Image math

    Hi,
    I need to work out some image math problems. I have a program in which
    I use the fft and inverse fft imaq vi's. Now I tried to test these
    vi's for my own gratification to insure they really do what they are
    supposed to but I had no luck. Heres what I did.
    I loaded an image and showed it in a window then I took it's fft then I
    took the inverse fft of the result and finally I showed it in a new
    window. But I couldn't seem to get the program to work. I got an error
    that claims imaq fft incompatible size [gil]. I tried just about every
    combination of sizes possible and nothing seems to work.
    Does any one have any ideas?
    Jeremy
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    How are you creating your image?
    Have you looked at the BufferedImage class?
    You should probably check out the BufferedImage APIYeas, this was the way togo. Thanks.
    I was using Component.createImage(width, height);
    But now I do this:
      BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB_PRE);
      Graphics2D g = bi.createGraphics();
      g.setColor(Color.yellow);
      g.drawOval(topLeftX, topLeftY, xDiameter, yDiameter);
      Image partImage = tgj.createImage(bi.getSource());And it works great. Thanks for the pointer.

  • LabVIEW and Vision (8.2) 2D FFT - Some differences noted

    Hello:
    I am attaching a small llb showing the 2d FFT results obtained using both the LabVIEW and Vision (8.2) functions.  Some differences in results are seen.  The Vision results seem to have more components (move the scroll bars to get to approximate vision container center) while the LabVIEW results show only one pixel at near the center that is not zero. I wanted to know if someone can explain the differences seen. 
    Given that I might trust the Vision results more, I need to display them either in a vision container of the size shown that autoscales X and Y and does not show scrollbars (i.e. behavior like intensity graph), or I need to be able to convert the vision container results so as to be able to display in intensity graph.  I don't know how to get the vision container to do the fomer and since the results for the vision container are in complex format, it is not clear to me how to do the latter conversion. 
    Any thoughts are appreciated.
    Sincerely,
    Don
    Attachments:
    2D FFT Comparison.llb ‏2184 KB

    Hi Gavin:
    The end of my post above proposes to do exactly what you state: converting vision container to array using IMAQ image to array.  But how do you do it?  Remember, the vision container is of type complex - you do not have the option to specifiy complex when using that function. Run the attached and see the error one gets.
    It is not clear to me from the references you site why we should get different answers between the two functions.  Does this mean when I go to another function library such as from visual basic or c++ I would get 2 more different answers?  There is some subtle difference between the functions that only the R&D dept. can probably tell us.  On something gross like the 2d fft example (C:\Program Files\National Instruments\LabVIEW 8.2\examples\analysis\dspxmpl.llb\2D FFT of a Pulse.vi) included with LabVIEW, the results are substantially the same.
    Sincerely,
    Don
    Attachments:
    2D FFT Comparison.llb ‏2192 KB

  • FFT doesn't work

    Hi,
    I am trying to get out the frequencies of a signal I have measured before! THerefore I am using the Spectral Measurement VI, but it doesn't work...
    There must be a problem with the dynamic data... I have build a waveform with my array of y-values, to and dt ! The graph only shows the time in the x-axis and not ferquency, like in the FFT-demo on the NI-webpage!
    Can anybody help me please...
    I have attached a screenshot to show it again...
    Attachments:
    Dok1.doc ‏82 KB

    The Spectral Measurements VI seems to be working fine given the data you are feeding to it. The data as shown in "array" ranges from about 110 to about 135. It never crosses zero and has very little obvious periodicity. So the spectrum shows a large peak at the zero frequency bin. If you subtract the mean from the array data, the new data ranges from +16 to -8 and shows two non-zero spectral peaks. The frequencies depend on the value sent to dt. The VI you posted did not preserve that data (no indicator). If I set frame rate to 100 frames per second, the spectral peaks are at about 1.3 and 12.
    The x-axis label defaults to time unless you change it via the properties dialog or a property node. The values will be based on the df value in the dynamic data output regardless of what the axis label says.
    Many people on the Forum do not have IMAQ or Vision. In this case a simplified VI without those parts (which are irrelevant to your question) would make it likely that a larger pool of potential responders would look at your VI.
    I have attached the VI I used to look at the spectrum.
    Also, it is generally considered good practice to keep diagrams to the size of one screen so that you do not need to scroll around to see things. The sequence structures do not seem to be necessary, dataflow will take care of ordering things. I do not understand the use of the tab control. Is the tab selected before the program is run? Or is this inside a loop in a larger program?
    Lynn
    Attachments:
    ROI Spectrum.vi ‏64 KB

  • IMAQ processing help

    Hi. I am working with IMAQ perocessing image. I Need obtain the FFT (Fast Fourier Transform) of image, and after to obtain  the magnitude of this FFT. I make a VI for obtain this, but I believe that no is well, the graphs  I thinh tath no is well... please see my VI and give me your concept
    PD: The band pass filter of IMAQ... exist?, is a sub vi?
    Attachments:
    dddd.vi ‏41 KB

    Hi Martyn
    In order ot modify the acquisition window parameters, you can make use of the IMAQ Set Camera Attribute function. This function has input parameters that allow you to select what parameter you want to change and what value you want to set it to. If you view the context help for this function, it will give you instructions on how to use it. The list of what attributes can be modified in this way can be found in the .txt file that should have been installed on the PC that has your camera attached to it.
    When you modify the camera attributes using SetCameraAttribute, you are only able to modify the attributes that are listed in the .txt file in the following directory:
    C:\Program Files\National Instruments\NI-IMAQ\Camera Info
    Modifying the top, left, width, and height parameters (or some variation thereof) should change the dimensions of the image that is acquired. However, there is still a maximum size that is allowed. That size is determined by the resolution of the camera itself.
    Take a look at that function and the text file that lists the settable attributes for your camera. Let me know if you have any additional questions on this issue.
    Regards
    YatinM
    NIUK
    Applications Engineer

Maybe you are looking for

  • Images no longer in LR after last import - Yikes!

    I have been using LR for about 6 months now and have a considerable number of images. Today I went to bring up some images in the Library module, but the only images showing are from my most recent import! In the Library panel, under All Images, the

  • Corrupted Numbers file, revisited

    Hi, I've got a rogue Numbers (iWork 08) document that "could not be opened". And it turns out copies on my 2 backups are also hosed. It will be a PITA to recreate, so any guidance on ability and instruction on how to recover would be greatly apprecia

  • How can I find out why update reader11.07 will not load on mavericks?

    Is there an Adobe tech out there who can tell me why? or another user having the same issue?

  • FOR LOOP LIMITATION

    Hi again.. I´d like to know if any of you know why the code below returns this error: ORA-01426: numeric overflow. It seems that the FOR-LOOP variable which in this case is represented by I doesn´t hold as much data as a NUMBER variable. How much dat

  • Elements (Editor) has stopped working...

    Hello all, I installed Adobe Photoshop Elements 6.0 on my Windows Vista Dell Inspiron 1525 laptop last month and everything worked fine. Then suddenly, when I tried to open it today, the following error shows up: Adobe Photoshop Elements 6.0 (Editor)