Jump to content

S_1

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by S_1

  1. 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?
  2. hei, I have found a VI that gives me the pointer to the image and with that I can easily manipulate the image. I am posting the code if somebody would maybe need it. cheers out RGB_dll.vi
  3. Hei, The thing is like this. The first time I compile, everything is fine. I run the dll in labwiev I get an error 1097 at Function node that the memory is corrupted. Then if I want to make some changes in dll, then this error pops-out. error LNK1201: check for insufficient disk space, invalid path, or insufficient privilage. What I do, is simple delete file .pdb and compiled it again which is then okay. If I run the Labview again then the vicious cycle returns (error 1097). It feels like I am leaking memory, but If I would the bitmap of my picture is small (220 pixels) and this shouldn't be a problem, right? np, attached the labview code and dll. Okey good to know. Image_Dll.vi
  4. Hei, I am using Microsft Visual studio 2010 for the dll. I have created an image in labview which is then sent to the dll in order to extract the rgb values. I was hoping to get the arrays of red, blue and green with the data representation from 0-255 (U8). But instead, I got a weird problem on the linker. Sometimes it compiles okey, sometimes not. I was wondering that I'm doing something wrong with the image variables (color:purple), because you can handle it like array of pixels or like handles which are in the end structures. So, which method should I use? Till now I used it like array of pixels. Also this I do not understand. Each pixel of the bitmap is big 32 bits or 4bytes: 1 byte for green, 1 for red, 1 for blue and what is porpuse for the other byte? Becuase in my dll I saved every byte in a different variable, in total 4 variables, and then send ti back to labwiew. When the dll functioned, I got only value form zero to one. Thanks for the help and any comments are appreciated
×
×
  • Create New...

Important Information

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