LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Full : stopped at Initialize array

I think my math was wrong, it should be 8bytesx256x270 = 563,200kB.  I dont see anyway that the memory could be full after creating an array that small.  You said that the resolution you use is 256X256, meaning that the value on that wire should be (256^2 + 256^2)^0.5 = 362, so we should see: 8bytesx362x270 = 781,920kB.  I'm not sure why you are getting that error.  Do you think you could put an indicator on that wire for the second dimension so that we can verify that it is what I think it is?
Message Edited by jmcbee on 03-18-2009 04:59 PM
0 Kudos
Message 11 of 27
(1,595 Views)
When i put an indicator ffor the forst diemsnion it says NaN. Why wud that come? i take the X anf Y resotlution from teh origianl image and do the calculation mentioned above.
Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 12 of 27
(1,595 Views)

Your are really spoonfeeding us information, one little bit at a time.

Why don't you attach all your code? 

 

NaN means "Not a Number", most likely you are trying to take the square root of a negative number, for example.

0 Kudos
Message 13 of 27
(1,590 Views)

Sorry for the inconvinence... here is the VI

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 14 of 27
(1,586 Views)
WE are still missing the subVIs. What are the values for "x resolution" and "y resolution"?
0 Kudos
Message 15 of 27
(1,578 Views)
Do you think you could include the Unflatten Pixmap3.vi, as this is where any possible negative numbers would originate from. Even better, could you try running the program again and probing the two Resolution outputs of the flatten pixmap VI?
0 Kudos
Message 16 of 27
(1,577 Views)
Do you think you could include the Unflatten Pixmap3.vi, as this is where any possible negative numbers would originate from. Even better, could you try running the program again and probing the two Resolution outputs of the flatten pixmap VI?
0 Kudos
Message 17 of 27
(1,578 Views)

The problem is your blue integer wires coming out of the missing subVI aren't big enough.  The blue integers are I16 and per the context help can handle values (-37628 to 37627).  If a value is 256 and you square it (not sure why you didn't use the X^2 primitive) that value is 65536.  Too big for the I16 coming out.  Add that to a similar number.  Still too big for an I16.  By the time its all done, you probably have things truncated down to a value that is a negative integer which causes you to get a Nan when you try to take the square root of a negative number.

 

If you are going to do math on such large numbers use at least I32 or I64, or double represenation.  You may need to typecast the numbers before sending them to the square functions.

0 Kudos
Message 18 of 27
(1,578 Views)

Unflatten pixmap, the sub vi which i  made is same as unflatten pixmap from original functions. I just took the X and Y resolution as output from it. See actthment.

The x and Y values are the sizes of the inputed image. I attach an exapmle image also...336X362

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
Download All
0 Kudos
Message 19 of 27
(1,556 Views)

Hi I think you are feeding a negative number to the square root function. This will give a NaN output, and the Initialize Array Function will fail. Can find any other explanations. By the way. Have you familiarized your self with the debugging futures in Labview. They are your best friend I cases like this. If you keep it between us. Long time ago then I was new to Labview. Debugging was the last thing I learned to master. I trusted my own skills better, so debugging was not a topicSmiley Very Happy

But If you replace the dimension size control with a constant you will not get an error. Perhaps this is a small programming flaw

 

Message Edited by t06afre on 03-19-2009 10:52 AM


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 20 of 27
(1,547 Views)