loading
 
Combine 2 different pipeline
Nurul Fuad from Australia  [13 posts]
9 year
Hi,

I have 2 different pipeline for different detection characteristics which is:

1. Based on color tracking (RGB filter)
2. Based on edge detection (Canny module)

I need to combine both of the pipeline since both objects need to be detected simultaneously.

Problem: I have tried to combine both in the same pipeline and it only manage to detect one object.

Thanks.

Steven Gentner from United States  [1446 posts] 9 year
Can you include that robofile here so we can see what perhaps the issue might be?

I'm assuming you are familiar with the Marker module which can be used to restore the image to the source image in order to reprocess the same image for different objects.

STeven.
Nurul Fuad from Australia  [13 posts] 9 year
I attached the robofile and images that needed to be tracked. I need to detect both live and dead at the same time as it flow inside a channel. I did do the tracking on different set of pipeline.

How can I combine these two pipeline so that when the both embryo pass through it will detect both of them with different identification.

If possible, can I count them?

Thanks.

  

program.robo
Steven Gentner from United States  [1446 posts] 9 year
Nurul,

Attached is a single robofile that will detect the embryo in both images. The trick is to normalize the lighter image and size them correctly. Then the two images can be processed using a similar technique.

Note, the crop module removes the graphic text from the images which prevents the normalize module from realizing the actual image range versus that of the black and white text.

See if this does the trick. Many more images are needed to test an actual technique.

STeven.


  

program.robo
Nurul Fuad from Australia  [13 posts] 9 year
Hi Steven,

Thanks for the suggestion. I did test with the new robo program that you have attached. It did work tracking both embryos (LIVE and DEAD).

I need to differentiate both images. What I did before is using 2 different types of tracking. For dead ones, I used based on colour tracking and for the LIVE ones I used based on canny module. For the LIVE ones it is tracked base on the development shape of the embryos inside the chorion.

These embryos will flow together and being tracked by RR. Then, I need the servomotor to move certain angle so that both embryos could go to separate channel.
Steven Gentner from United States  [1446 posts] 9 year
Nurul,

I would use the found circle to test the intensity of the resulting detected cell (perhaps using Color Stats module) and based on that one would chose a value that if below or above the cell could be classified as alive or dead. This would happen just after the embryo has been detected since you only want to get the Mean_Intensity of the embryo.

Fill the circle to a full white color and use that to mask the original image out ... then run the stat calculations on that.

STeven.
Nurul Fuad from Australia  [13 posts] 9 year
Hi Steven,

Thank you for the suggestion of suing the stats calculation based on the intensity of the detected cell.

Can I trace them with difference shapes? Which module should I use?

Thanks.
Steven Gentner from United States  [1446 posts] 9 year
Nurul,

I'm not 100% sure what you mean by "trace them with different shapes". I'm going to assume that you mean you want to use a different symbol when one type is detected over the other. There are a couple ways to do this. What I would do is use the center coordinates in one of the display_square or display_point modules to draw a different symbol for each result. This requires a bit more work to create an array for each type (assuming more than one embryo is visible at a time) and feed those arrays into the respective display modules. If only one embryo is visible at a time then just create two variables alive_x, alive_y and dead_x, dead_y which are then used in two display modules. When one is active, set the other set to -1000 so that nothing is displayed. (i.e. if you don't clear dead_x and just set alive_x then the display module will still show the previous result). Hope this makes sense.

Note you can also just use the display_rect and change the color instead of the shape.

STeven.
Nurul Fuad from Australia  [13 posts] 9 year
Hi Steven,

Thanks again for the suggestions.

Yup. I want to trace them with different symbols to differentiate them. I am sorry because I quite new to RR and I did not know how to create an array for that purpose.

I try to use display module and it doesn't change the shape.

Nurul Fuad from Australia  [13 posts] 9 year
Hi Steven,

I also tried using mean_intensity in color_statistics. However, I did not see any much difference between either LIVE or DEAD embryos. It will be quite hard for me to give command to servos after that.

Is it possible for me to use the previous tracking that I have done which is:

1. RGB color filter - detecting DEAD ones
2. Canny module - detecting LIVE ones (because it is transparent)

I also did try the Marker module so that these 2 pipelines can be done simultaneously. However, it just detected the DEAD ones. But, not the LIVE ones. I will attach the robofile for your reference.

Really appreciate your help with this. If you have other suggestions it would be great.

Thanks for your time.

  

program.robo
Steven Gentner from United States  [1446 posts] 9 year
Nurul,

Attached is the mean intensity example. 133 versus 112 seems to be significant enough to determine dead versus alive.

Yes, it is possible to use the RGB filter and the canny module ... there are many ways to accomplish the same thing.

Note, we've improved the ellipse module to better detect larger ellipses so you will have to download the latest version (which does a better job on isolating the cells).

STeven.

  

program.robo
Nurul Fuad from Australia  [13 posts] 8 year
Hi Steven,

Thanks a lot for the improved ellipse version robo program to detect the cells. I have tried ran the cells with the program and it did not work.

The problems are:

1. The screen became totally black (it did not have the ellipse shape as shown before)

2. I try to adjust the min and max value of radius in order to have only one blob detected. However, I keep on getting more than 1 blob. So, it will be hard the program to detect the single cell and hence gives the value of mean intensity.

Can the problem be solved for this intensity program? And can you please advice me on doing program to combine both RGB filter and canny module together?

I want to learn both method if possible. Thanks again for your generous help.
Steven Gentner from United States  [273 posts] 8 year
Nurul,

Can you verify that you downloaded the latest version and also loaded in the original images that you posted?

You can click on each module to determine what the processing looks like till and including that module. Where does it go blank?

STeven.
Nurul Fuad from Australia  [13 posts] 8 year
Hi Steven,

Yes. I have downloaded the latest version of Roborealm software. And it does work on based on the original image.

It went blank when I started using other images (the same type of cell). And when I did try to adjust some of the modules, it detected several blob. Therefore, single blob detection was difficult to achieve.

Can you help me also on combining both RGB filter and canny module? I tried to use marker, but it only detect based on one module (either RGB filter or canny module)

Your help are very much appreciated.

Steven Gentner from United States  [273 posts] 8 year
Nurul,

As I mentioned before "Many more images are needed to test an actual technique."

What works for 2 images does NOT mean it will work for any more.

I don't see how your original RGB filter and canny can work ... so I'm not sure how to combine them. They are already combined in a single pipeline but if the detection doesn't work then there isn't much we can do about it other than recommend a different technique.

BEFORE even testing a single technique, its best to generate a database of images (at least 100) that you can use as a testbed for any technique. You should first collect that and test just one of the solutions on it before worrying about combining multiple techniques. As you have discovered any solution can quickly break down without sufficient testing.

Sorry, but there is no quick way to do this. Its what we do for companies as our full time job and its still very difficult. Even after spending 100's of hours testing hundred's of images, things can quickly go very wrong. I realize its very frustrating and if you have any budget that you can put towards this have a team/company/etc. look into this for you. Its the experience that one gains over time that helps create a more stable solution.

Certainly, you can get lucky ... but that only rarely happens. :-)

STeven.
Nurul Fuad from Australia  [13 posts] 8 year
Hi Steven,

Yes I understand that. I know its not an easy job. But, you guys has been very helpful to users. I am a newbie in Roborealm and still in the learning process.I just want to ask you if combining is possible from your experience.

I will try to test with a lot of images and hopefully it will work then. And if I have any problem, will get back to you :)

Thank you for your advice. Really appreciate it.
Nurul Fuad from Australia  [13 posts] 8 year
Hi Steven,

Currently, I have problem in connecting AX 12 Dynamixel servo. The servo is being recognized by RR however, when I did some programming to turn servo into certain angle, it did not work.

I use VBS script function.

This is my program that I have made and use the mean intensity value to move the servo.

___________________________________________________________________

'Get servo variables

meanIntensity = GetVariable ("MEAN_INTENSITY")
SetVariable "CENTRE", 512

'Servo rotate according to mean intensity value

if meanIntensity < 126 then

Position_New= CENTRE + 100

end if

SetVariable "Position_New", Position_New

__________________________________________________________________

Questions:

1. What are the possible reasons for the servo is not moving?
2. Do I have to everytime check on the Robotis Dynamixel function before doing any programming coding in VBS script?

Your help are highly appreciated.

Thanks
Steven Gentner from United States  [1446 posts] 8 year
Nurul,

The first step is to check that the servo moves by using the GUI interface of the Dynamixel module to see if the servos will move. It that doesn't work then the programming will not matter.

If that doesn't work, check the power and connects to the PC. You may also have the wrong port selected or baud selected.

The only change to the Dynamixel module would be to select the right variable in the right dropdown box. I.e. you have to tell the module which variable contains the right value to set the servo too.

STeven.

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