|
Re: TrackTwoColors execution time
The image structure is complicated, and I don't think it is publicly described. It has the ability to hold onto pixel data of various formats + analysis results + ROI + geometric metadata if it is a template. So yes, it has internal allocations and isn't a simple block of memory. For each call to imaqCreate, you should call imaqDispose to match. I'm less sure of the usage of frcCreate and Dispose, but I think that you need to call an frcDispose for each, or use the comma delimited form to dispose of each.
The mask is really a monochrome image, and can in fact hold several mask results, each in a different plane. The LV example shows this with the green and pink in one mask. If you want to do your own pixel manipulations, use the image to array call. Otherwise, you might try making your images static to avoid allocating and destroying them each time.
I can't comment on why frcThreshold doesn't like putting the results into a different image. Can you step inside it? My guess is the image type is incompatible. The error code should indicate why. If you are wanting to pipeline the image processing you may feel the need to skip past the frc layer, use it for inspiration, and go straight to using the imaq layer. It will be a little more difficult, but you will have a bit more control as well.
Greg McKaskle
|