I've not used IMAQ ROI Profile, but if it does give you the coordinates of the pixels on the ROI boundary, you can write code to find the coordinates of all the points in the ROI. It's simple math (though there can be some minor complications). I'm assuming the following (which might not be true, in which case, ignore all of this ...) -- if you choose any pixel anywhere, then if it is inside the ROI, moving left or right to the edge of the screen will intersect multiple pixels (and an even number of them) on the ROI boundary.
- Find the Boundary Pixel with the highest Y value.
- Start at the left edge of the screen at this Y value.
- Move to the right until you hit a ROI Boundary Pixel. Remember it.
- Continue moving right until you hit another Boundary Pixel or hit the right edge of the screen.
- If you hit another Boundary Pixel, you've found a collection of points inside the ROI. Go back to Step 3 and see if there are other ROI Pixels at this Y. Otherwise, you found a "singular" Pixel (think the point at the top of a triangle.
- When you hit the right edge of the screen, move down one Pixel and start another "scan" until you reach the bottom of the Screen or find a Y level that has no points on the ROI Boundary.
Bob Schor