LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

remove zero's in a certain area

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

Download All
0 Kudos
Message 1 of 25
(3,274 Views)

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.

0 Kudos
Message 2 of 25
(3,267 Views)

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?

0 Kudos
Message 3 of 25
(3,261 Views)

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

0 Kudos
Message 4 of 25
(3,260 Views)

normaly in the code there's an array, in that array i want all the 1's who are connected to become 0

0 Kudos
Message 5 of 25
(3,257 Views)
  • Define "objects".
  • Define "connected".
  • Are all array points either 0 or 1 and never anything else... why are they DBL then??
  • And why it the thread title "remove zeroes" if you want to replace ones by zeroes?
0 Kudos
Message 6 of 25
(3,254 Views)

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

0 Kudos
Message 7 of 25
(3,249 Views)

Can you attach a typical picture for illustration? Thanks.

0 Kudos
Message 8 of 25
(3,246 Views)

the picture doenst really matter, the array is more important,

in this document i show you an example

0 Kudos
Message 9 of 25
(3,242 Views)

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.

0 Kudos
Message 10 of 25
(3,229 Views)