03-02-2014 11:07 AM
Hii
I am facing problem with 1D convolution .I am convolving two 1D array of size 1024 but the result I am getting is of size 2047.How to get rid of this or How to delete specific extra samples that convolution is adding.
I have attached the filter which I am using with my VI .
Thank you
Parag
Solved! Go to Solution.
03-02-2014 12:32 PM - edited 03-02-2014 12:50 PM
it is an oversight that the 1D convolution does not have a "output size" input, the 2D versions do. (please vote for my idea to have this corrected. Thanks!)
All you need to do is take the appropriate array subset to trim the output down to the same size.
While you are at it, You should also learn some very basic coding skills. All you need to do is autoindex on the array of names. This eliminates the indexing operation and you no longer should wire to N. N will be determined automatically based on the array size.What if the first iteration of the FOR loop occurs before the "Names" terminal is even written? Other terminals such as "File options" and "Number" belong before the loop, because they hopefully will no change during the execution of the loop. Reading from a local variable is inefficient and can lead to race conditions. ("Names", "Image" and "Path"!) Delete the local variables and just wire across the loop boundary.
03-02-2014 12:50 PM
Thank you
Autoindexing is nice idea,thank you.Where do I have to vote as there is no space for voting in the link that you provided. I used local variables beacuse of entangledment of wires ,this is small portion of my program I have three more frames so in that case these wire makes me confusing.
Can you please tell me where it add extra element in convolution and how to trim it .I tried it ,please see it in my VI is it right ?
Thank you
Parag
03-02-2014 01:09 PM
To vote, you would click the yellow button next to the icon.
Whatever you are doing with the sin stuff now make no sense. Can you explain?
Sorry, I don't have IMAQ, so I cannot run your VI, but here's a quick draft to give you some ideas. most likely you need to tweak things a little bit (e.g. adjust the subset linits).
03-02-2014 01:21 PM
Wow it works..
No words to say thanks,you are awsome . I was wondering from last two days for solution.
Thank you.
Parag