04-16-2012 01:00 PM
hi i'am trying to remove the numbers 1 in a certain area and i have already wrote a little program, but it doesn't work like it should.
The goal of this program is to replace al the numbers 1 in a certain area
attachments: program
04-16-2012 01:09 PM - edited 04-16-2012 01:12 PM
Your VI is incomprehensible with all these recursive calls and probably buggier than an ant farm. Why are row and column controls DBL instead of integers?
This can probably be done with code the size of a postage stamp. Can you explain the problem in detail with words instead of code?
How do you define a "certain area" from the two controls (Rij, Kolom)? Maybe show us a picture!
You probably could take an array subset, autoidex over two FOR loops, and replace it back into the original array. You could also do the entire thing "in place" with a little more code.
04-16-2012 01:11 PM
Do you want to remove 1's like your message says or remove zeroes like your title says? Please be clear in your requests.
You said it doesn't work as it should. How "should" it work? What is it actually doing that is wrong?
04-16-2012 01:12 PM
i have to count objects in a picture, so i'am trying to locate groups of 1's who are connected to eachother so i can replace them with a 0, so i can count how many times i have done this work
04-16-2012 01:13 PM
normaly in the code there's an array, in that array i want all the 1's who are connected to become 0
04-16-2012 01:14 PM - edited 04-16-2012 01:16 PM
04-16-2012 01:16 PM
the numbers can ideed only be 0 and zero, i have converted this image to binary, so only black and white pixels
i want to count for instance the number of cirkels i can see on a picture
04-16-2012 01:17 PM
Can you attach a typical picture for illustration? Thanks.
04-16-2012 01:20 PM
the picture doenst really matter, the array is more important,
in this document i show you an example
04-16-2012 01:25 PM
Why did you attach a .zip file an call it a docx extension?
So you have an array of 0's and 1's and you want to convert all the 1's to 0's. That means you're left with an array full of zeroes. You can do that just by initializing an array of whatever size full of zeroes.
I doubt that is what you really want even though that seems to be what you are asking for.