S_1 Posted June 16, 2015 Report Share Posted June 16, 2015 Hei everybody, this will be a little tricky to explain everything, but I will give my best. So, I have created a dll that is a RGB threshold function based on flood fill algorithm. The function looks if the pixel in the center has the appropriate value and then fills the object with ones till the border is reached. I have two image variables; original image where I load the image. Mask where I write to the image. This works fine. After that I use IMAQ Particle Analysis to get geometrical properties. This is the part I do not understand. I call the trehsholding dll in a loop using the same mask, but the Imaqe particle analyzer gives me the value only for the first image and it ignores all the rest (the values for all the following images are all the same). Although, on the image display the images are displayed properly. I use the same mask and the same dll. Here is the example, the particle values are displayed in the right corner: Then in the next iteration the values are the same: But if I call the set Image size VI before calling the dll in every iteration then the code is running and the values from the image particle analyzer are correctly changing. Why is this happening? Quote Link to comment
Rolf Kalbermatter Posted June 16, 2015 Report Share Posted June 16, 2015 Hei everybody, this will be a little tricky to explain everything, but I will give my best. So, I have created a dll that is a RGB threshold function based on flood fill algorithm. The function looks if the pixel in the center has the appropriate value and then fills the object with ones till the border is reached. I have two image variables; original image where I load the image. Mask where I write to the image. This works fine. After that I use IMAQ Particle Analysis to get geometrical properties. This is the part I do not understand. I call the trehsholding dll in a loop using the same mask, but the Imaqe particle analyzer gives me the value only for the first image and it ignores all the rest (the values for all the following images are all the same). Although, on the image display the images are displayed properly. I use the same mask and the same dll. Here is the example, the particle values are displayed in the right corner: Unbenannt.PNG Then in the next iteration the values are the same: Unbenannt2.PNG But if I call the set Image size VI before calling the dll in every iteration then the code is running and the values from the image particle analyzer are correctly changing. Why is this happening? You definitely need to show your DLL function prototype and the diagram that calls it, preferably in VI form and not just an image. What you expect us here to do is showing us a picture of your car and asking why its motor doesn't run! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.