Jump to content

infinitenothing

Members
  • Posts

    372
  • Joined

  • Last visited

  • Days Won

    16

Posts posted by infinitenothing

  1.     Thanks for the reply!  I have a couple different ROIs set up and I am measuring the amount of space inside the box that the "white stuff" occupies.  (see the image below)  I was a little vague about how I am actually doing the thresholding.  In short, I am not just using the threshold vi and hoping for the best.  I am trying to use an algorithm (using the Gaussian mixture model) that dynamically changes but like you said, with the lighting/contrast/brightness of the image always changing it does not always perform that well, whereas the edge detection seems to always find the correct edges.  

     

    I suppose I was hoping I could use the edge detection as the base for some kind of mask or something...

     

     

     

    What happens when you threshold your "edges" image? Can you just use particle analysis to "fill holes" on that img?

     

    Alt path: It looks like a regular threshold should work on your ROIs if you manually select the threshold right?  Maybe do an erosion to get rid of the small particles? If that's the case maybe you can find some safe areas where you know there won't be any white? The corners maybe? Use that to set your threshold.

  2. Can you tell us a bit more about what your desired measurement is? Are you just trying to get the area of the white stuff? Usually, you want to make this work as easy as possible for the software (crap in crap out principle) so you want to control the lighting and have a fixed ROI. Secondly you might want to use an auto threshold method so that it dynamically changes if the lighting control isn't perfect. Third, you'll notice the top of your image is much darker than the bottom. Your eyes are really good at subtracting shadows. Here's an example illusion based on that effect. You'll need have a different threshold for different parts of the image (preferably a gradient) to compensate for this.

  3. Yes, I agree with the above. You need to unflatten to singles.

     

    I am getting something of this sort from the UDP Read function in labview when I wired an indicator to it: ƒª’?

     

    If you're still having trouble, can you switch that indicator to show you hex (right click, select hex display) and paste a few lines of that here? Even better if we know what the correct values would be (for example, you could send an array of "1.5")

  4. I don't think flushing events would solve this, e.g. how can you be sure that the last element isn't already in the event queue, meaning that flushing will remove the most important element you actually want to handle.

     

    Letting the timeout case handle the last event can be very neat, and I use this very often in small UIs. Another option is to use a size limited queue used with the lossy enqueue primitive. This can be handled in the timeout case, or in a separate consumer loop depending on the requirements.

     

    /J

    You can tell the flush event queue to flush all but the last one. It also outputs the number of events that were flushed so you can use that to detect you're at the end

    ykKlxS1.png

  5. I've made some things like this. Usually I've used a tab control with the common controls floating over and the custom controls on their designated pages. The tab change event would sometimes hide or re-caption certain common controls. If you want another function, I'd make another tab page fill out the captions and visible flags.

     

    You need to send that over TCPIP? no prob, just send the function and a flattened cluster of the page contents or even send each individual control on value change. Not infinitely expandable or perfectly decoupled but it got the job done.

  6. It's really a risk calculation. You have to anticipate what are the odds that down the road you'll want some feature (programmatic access? in place editing?) that globals can't easily provide. If you think you have a 10% chance you'll need that and it would take your 40 hours to pull out all your global and put in a better data type, you'd need to save 4 hours of development time to justify using a global. Maybe you should put in a fudge factor for unknown unknowns. So you'll want to save 40 hours of dev time to justify their use.

×
×
  • Create New...

Important Information

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