05-10-2007 02:43 PM
05-11-2007 01:54 PM
05-11-2007 02:59 PM
I once had to create a "fill" function for the picture control. To do so, I first converted the picture to a 24-bit 2D array (picture to pixmap) and then determined the area I needed to fill based on the color values in the 2D array. You could find the area of your irregular region by counting the number of elements in the 2D array whose values match the color of the region you're trying to fill.
I know your using an older version of LabVIEW...there are a few examples that you can download from the ni.com website that show you how to convert pictures to pixmaps, etc. Unfortunately, I no longer have 6.1 so I don't have an example I can post for you. There are also several "array" examples that ship with LabVIEW that might help you along.
05-13-2007 12:53 AM
Hi Brian.
I am Bojan.
Mouse draw irregular region on picture.vi.
After then calculats area of that region.
Inputs: mouse down,mouse move,mouse up,clear pictue(on/off button).
Output :area (digital indicator).
Hi Chris.
Make next:
1.On one picture depict region.
2.Then on another picture this region is fill
3.This picture overfulfil in pixmap over Picture to Pixmap.
Pixmap is 8-bit ,256x256.
But now have proble when depict region,in pixmap all elements is zero.
What walk in input of Unflatten Pixmap.vi -> rather on depth ?
Do you 8 or ?
05-14-2007 12:58 PM
05-19-2007 06:14 AM
05-21-2007 01:21 PM
Hi Bojan,
I'm not sure if you have any of our Vision toolkits or addons to LabVIEW (which would make it a lot easier), but check out this thread on how to draw a grid.
Thanks,
Stephanie