iRVision 2D - detect empty box

  • Hi guys. Need some help with iRVision.


    Robot cell will process 16 different parts, but only one type at a time. Operator is taking parts out of the box and aligning them on a conveyor. Empty box than goes into robot cell.
    I want to detect if box is empty, before filling it with finished parts. It could happen that operator forgets one or more parts in the box. I know which part type to expect but part can be in the box on any side at any angle.


    I don't think GPM Locator is a good approach.


    I was thinking of using Blob locator with black on white settings. Empty box is all white, anything inside is black (when looking binary image). I tried teaching empty box (only white) but I get an error.
    This was only idea I had.


    Camera is Sony XC-56 on R-30iB. Boxes are grey, plastic.


    Any ideas? :help:

  • There are a couple different ways to handle this;
    If you have a locator for the part, use reverse logic to manage the empty box. In other words if the vision fails to find the object the vision is successful and the box can be processed. If it finds a part the box is rejected. Set the score fairly low. I use this type to determine if a conveyor is empty.


    Or use a histogram. If the box is white and the parts are dark, the histogram can be set to reject boxes that are darker than a specific threshold. I use this type to make sure a load area is clear.
    You could use both.
    I use both types with great success

  • A photo eye would have been the best solution but basically I set a threshold "100" if the load area is not clear the histogram mean will be lower than that.
    The parts are covered with a dusty film. After sometime an outline of the part will build up on the load area and vision will "find" a part there. The histogram determines if it is actually a part or not.

  • I was reading about histogram tool in manual and it seemed like a good approach but you must append histogram tool to another like GPM or Blob.


    My idea was to teach small (for example 3x3 px) black rectangle with GPM which would be found on any part in the box or to teach empty box with Blob tool.
    BUT: both tools need "features". I can't teach only dark part with GPM or only white empty box with blob.


    I put small black square into box and taught GPM with mask (attachment gpm.png). I set score threshold to 20%, orientation -180 - 180° and scale 25 - 250%.
    I did test with various items in box and I got more matches on all of them.


    I did similar with Blob tool: teaching small black box and setting area 10 - 500 px.


    I get more results with GPM than with Blob so I will stick with GPM for now.


    I can keep both tools in vision process and use "Find best" option to increase odds of detecting empty box.


    --


    I don't really understand how histogram tool attached to GMP help as I first have to locate something with GPM to have histogram working. Or am I missing something?
    Can you explain how to use histogram tool in my situation in detail?


    Thanks guys

  • This was great frustration for me on a previous project. Newer versions (not sure which one) of Handling Tool allow use of Histogram without a parent locator, but as far as I know (Fanuc support concurred on this), before that update, histogram tool has to have a parent with 2D vision process.


    Can you use GPM on your outer box features as parent for histogram? This seems like best way anyway to make sure your histogram search area is properly located.


    Another alternative if you can't see outer box features is to use single view inspection visprocess instead of 2D vision process. Limitation I had with that is that it can't export values -- only pass/fail result.

  • I can't teach bottom of empty box (only white) with GPM as i get CVIS-031 There are not enough features in the training window.


    I can teach whole box, with sides being a bit grey. I added histogram tool with measurement area = bottom of the box and ROI 200 - 255.
    When box is empty Out of range is < 4% and when there is something in box Out of range is > 8%.
    In both cases GPM still finds the box. I would need to check histogram's out of range and reject box if value <4%. But how to do it?


    --


    I got problem with my previous approach (using Blob and GPM) when box has a lot of parts inside. I get error CVIS-038 Too many candidates to process. This would not be a problem if robot could continue. But I don't have Auto Error Recovery option.
    There can be around 7 part in the box. Vision process than finds 39 matches.
    Maybe this won't be such a big problem. If operator forgets 1 or 2 parts in box by mistake (which we one to prevent in the first place), robot will continue but if operator sends full box, robot cell will stop with an error and manual operation will be needed ...

Advertising from our partners