loading
 
Defect detecting in weldings
Paul from Mexico  [5 posts]
14 year
Steven,

I have been testing the software, and it looks that covers my needs.

Could you please tell me how to make inspections in a portion of the image (RIO) taken from the webcam?

Here I send you some images of dampers to detect weld missing. The RIO is the area marked inside the squares in images "BAD.jpg" and "GOOD.jpg". The reference image "Reference.jpg" is a good part. Some other bad and good images are "BAD2.jpg" and "GOOD2.jpg".


     
Anonymous 14 year
Paul,

Couple ways of doing this depending on the setup. If you can ensure that the setup does not move much then things get a lot simpler. Plus if you can ensure that the lighting stays about the same that can help too.

However, attached is a robofile that does what you ask with the given images. The assumption is that if we crop the image a little and then see how much the white background extends to the left the bad weld has that point below the 400 X position threshold whilst the good welds go above 400.

The robofile first crops to remove background passed the white paper, then it isolates the white background on the right side of the image, then determines the left most point of that remaining white area. Using its X value we can then print a pass or fail message.

Does this work for other images that you have? Can we assume that the crop will be about right for all images?

Note that the highlights from the above lighting may cause an issue. If they accidentally connect to the rightmost white background they may cause a false negative.

As always, more image testing = better overall solution.

STeven.
program.robo
Paul from Mexico  [5 posts] 14 year
Steven,

The program works great!!!

I've been testing it with a big bunch of images. But in the practice, it will be a webcam taking pictures when the part is not moving at all. The fixture is holding the part always in the same position; and also it will be a special light screen serving as background, so it will be easier to remove it with the software.  

Now I need an external signal to trigger the webcam when the part is in place and not moving. I'm planning to use the parallel port...

I'm almost done with the tests.

Thank you.


Anonymous 14 year
Glad to hear!

You may also want to experiment with the movement module

http://www.roborealm.com/help/Movement.php

that could be used to autodetect when the image is stable (i.e. nothing is moving) in which case the test can be performed. If you have trouble with this post a video of the sequence somewhere and we'll see if that can work.

May be easier than using the parallel port and integrating with some other system. The movement routine would also ensure that the part has actually stopped moving before the test is performed.

Just a thought ..

STeven.
Paul from Mexico  [5 posts] 14 year
Steven,

I'm using the socket based API to control RoboRealm through Visual Basic, and also experimenting with the Movement module to detect when the image is really not moving.

Now I used the parallel port to tell the PLC when the part PASSES or FAILS, and this works fine,  but I'm not using the parallel port to tell when to take the picture becuase this action is gonna be done when the Movement module says. The remaining issue is to take the image commanded from VB... is there some documentation of all the methods that can be called using the RR API, for example something like rr.setCamera ON and then rr.takePicture, and so on ?

Any ideas?...
Anonymous 14 year
Paul,

As the image is always being processed you really only need to wait for the movement module to signal that things are stable and then read the x coordinate variable. So depending on how you are setting up the movement module you may use something like

rr.waitVariable "MOVEMENT_PERCENT", 0, 1000

which will cause your app to wait until the movement precent falls to 0. If this does not actually happen it will return within 1000ms or 1 sec regardless.

To check for a percent below say 10 you would use an If_statement module in the RR pipline and check that variable to be below 10. Then within that if statement you would set another variable to 1. See attached file for what this looks like. Your VB code would then look like

rr.waitVariable "image_ready", 1, 1000

Once that waitVariable has returned you can now just do a getImage or etc to save the current image as that will be a stable image.

STeven.

If you check the Main routine in vb that will show a couple of examples of what you can use. In your case something like

rr.setCamera "on" ' ONLY needed if you've turned off the camera for some reason

rr.waitImage ' ONLY needed when you just sent a new robofile or image to be executed.



program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index