LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create 2D array

Hi

 

I am pretty new to labview. I need to make 250x250 array filled with value 300, so I can substract this array from an array derived from an image (for background substraction). How can I do this? 

 

thanks.

0 Kudos
Message 1 of 6
(4,506 Views)
nm, i got it.
0 Kudos
Message 2 of 6
(4,497 Views)

Well, you don't tell us how you are doing it, so here's the correct way.

 

You pose the question wrong, because you don't need to create a 2D array at all, you can just subtract a scalar from the 2D array and LabVIEW does the rest. Is that what you got?

 

 

Message Edited by altenbach on 08-18-2008 04:45 PM
Message 3 of 6
(4,492 Views)

reallly?

 

when i subtract it, it just doesnt let me put in constant. it asks me to put a 2d array. the thing is that I have a imaq vision (yes that $3200) and it had subtract operator... but I'd love to know how you did this though.

0 Kudos
Message 4 of 6
(4,489 Views)

Sorry, I don't have the vision stuff, but if you use the plain subtract primitive from the numeric palette, subtracting a scalar from a 2D array should work without problem.

 

Maybe you are trying to use a more complicated tool designed to subtract two images from each other?


sl2obel2ts wrote:

when i subtract it, it just doesnt let me put in constant. it asks me to put a 2d array.


How doesn't it "let you"? How does it "ask"? Do you simply get a broken wire?

Can you explain?

Message Edited by altenbach on 08-18-2008 05:25 PM
Message 5 of 6
(4,485 Views)
If you wire the array to the subtract first and then right click to create a constant to the other input it will default to an array.  For the constant input, create the constant first and then wire it.
Jim

LV 2020
Message 6 of 6
(4,476 Views)