This may end up boiling down to an algebra/geometry problem but, here it goes anyway.
I have a foil lid that is being applied to a plastic tub. I want to inspect the seal edge of the foil to see if any product has been squeezed out during the sealing process.
I am using "IMAQ Find Straight Edges 3" to find both the tub edge and the foil lid edge. (No problems here...)
Next I want to pull the a few lines of pixels that are on the tub side of the foil... This is where I think I am trying to over think it...
I can calculate the line equation based on the results from the "IMAQ Find Straight Edges 3" vi. It also give me an angle (which I will verify in the morning). So to get the lines I need I need to move 1 pixel at a time away from the foil edge... This is where I belive I am over thinking it...
Could I simply define a ROI box based that one edge is the line indicated by the "IMAQ Find Straight Edges 3" for the foil edge and the defind the width of the box as say 5 pixels... hmmm back to the geometry calculation again...
Ok, I am going to post this to see if anyone has any ideas or know of some function or vi that would make this simpler. Tomorrow I will start working the math to calculate where the end points need to be and then see what I get when I pull that from an image.
A few things that I have to keep in mind with this. From image acqusition to posting the pass/fail to the IO I have about 600 ms. I want to inspect the full parimiter of my foil lid so that will give me 4 sides + 3 curved corners and 1 sharp corner. Right now the "IMAQ Find Straight Edges 3" is very fast and processing the segments should be faster then how I was doing it before so I should be good on time but if I try to get to fancy with the math I could slow things down to much. And just to make things intresting I need to process 10 images (yes I am planning on doing this in parallel on a multi-core windows system) in each 600 ms window.
Thank you for looking at this with me. I will post my final solution once I have it figured out.
Ryan