Jump to content

Problem with dll for Image processing


Recommended Posts

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:

 

post-53497-0-59705200-1434460689.png

 

post-53497-0-19847500-1434451968.png

Then in the next iteration the values are the same:

 

post-53497-0-17974300-1434460690.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? 

Link to comment

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:

 

attachicon.gifUnbenannt.PNG

 

post-53497-0-19847500-1434451968.png

Then in the next iteration the values are the same:

 

attachicon.gifUnbenannt2.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!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.