LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with logic

Hello guys 

 

I am facing problem with how to apply logic with my program.

I simulated  an image where I have ten ellipse in one image. I have to change intensity value of any one ellipse from o to 180 at each one step increment. 

Can you guys please help in solving this problem. I am sharing my code with you 

 

I will really appriciate your help 

0 Kudos
Message 1 of 5
(2,437 Views)

Posting from mobile. Can you post a screen shot?. And also post the image if possible

0 Kudos
Message 2 of 5
(2,387 Views)

Thank you for your reply. I got the solution

0 Kudos
Message 3 of 5
(2,372 Views)

Can you share what you did?

0 Kudos
Message 4 of 5
(2,362 Views)

Your program is many of orders of magnitude too convoluted and takes way too long to complete. Something simple like that should complete in milliseconds.

 

All you need to do is iterate over each pixel exactly once and add the values of all ellipses that are within range. Seems trivial. (there is no need to stack four FOR loops!).  Also, the outer FOR loop does not seem to do anything useful. Why is it there?

 

You also have serious race conditions, for example there is no way to guarantee that the B^2 or A^2 local variables are being read after the control has been updated. Since there is no data dependency, the order is not predictable.

Message 5 of 5
(2,353 Views)