Difference between revisions of "Visual Systems for Robots"

From RoboWiki
Jump to: navigation, search
(Part 1: Training on input image mainpulation)
Line 1: Line 1:
 
by ''RNDr. Andrej Lúčny, PhD.'' (MicroStep-MIS, Ltd., Slovakia) presented at the Robotic Summer School 2010
 
by ''RNDr. Andrej Lúčny, PhD.'' (MicroStep-MIS, Ltd., Slovakia) presented at the Robotic Summer School 2010
  
* download accompanying workfiles [[Media:visual.zip]]  
+
* download accompanying workfiles [[Media:visual.zip]]
 +
* unzip (to <TT>C:\Work</TT> recommended)
  
 
== Part 1: Training on input image mainpulation ==
 
== Part 1: Training on input image mainpulation ==
Line 25: Line 26:
 
* ''open'' pic1.jpg
 
* ''open'' pic1.jpg
 
* ''turn it grayscale:'' Image / Type / 8bit
 
* ''turn it grayscale:'' Image / Type / 8bit
* ''descrease noise by threshold:'' Image / Adjust / Threshold
+
* ''descrease noise by threshold:'' Image / Adjust / Threshold<BR>
**  ''select'' Black & White ''from menu and move with low and high end of range to emphasize the seen objects. Then'' Apply ''and close the threshold window''
+
''select'' Black & White ''from menu and move with low and high end of range to emphasize the seen objects. Then'' Apply ''and close the threshold window''
 
* ''make the image binary:'' Process / Binary / Make binary
 
* ''make the image binary:'' Process / Binary / Make binary
 
* ''if the picture contains now black object on white background, change it to white object on black background:'' Image / Lookup Tables / Invert LUT
 
* ''if the picture contains now black object on white background, change it to white object on black background:'' Image / Lookup Tables / Invert LUT

Revision as of 07:05, 6 July 2010

by RNDr. Andrej Lúčny, PhD. (MicroStep-MIS, Ltd., Slovakia) presented at the Robotic Summer School 2010

  • download accompanying workfiles Media:visual.zip
  • unzip (to C:\Work recommended)

Part 1: Training on input image mainpulation

  • start ImageJ
  • open pic1.jpg
  • Image / Color / RGB Split Split Channels
  • apply Image / Lookup Tables / Red to pic1.jpg (red)
  • apply Image / Lookup Tables / Green to pic1.jpg (green)
  • apply Image / Lookup Tables / Blue to pic1.jpg (blue)
  • close everything
  • open pic1.jpg
  • apply Image / Type / 8bit to get gray image
  • apply Process / Binary / Make Binary to get binary image
  • start Octave or Matlab
  • change directory to directory with this training using the cd 'C:\Work\part1'
  • launch tr1

Part 2: Training on 2D processing

  • start ImageJ
  • open pic1.jpg
  • turn it grayscale: Image / Type / 8bit
  • descrease noise by threshold: Image / Adjust / Threshold

select Black & White from menu and move with low and high end of range to emphasize the seen objects. Then Apply and close the threshold window

  • make the image binary: Process / Binary / Make binary
  • if the picture contains now black object on white background, change it to white object on black background: Image / Lookup Tables / Invert LUT
  • try to eliminate holes in object by Process / Binary / Dilate and Process / Binary / Erode
  • try Process / Binary / Skeletonize
  • restart ImageJ
  • open pic1.jpg
  • start segmentation to 2 colors by Plugins / Segmentation / k-means clustering (select two colors)
  • return to the opened pic1.jpg and three times apply Process /Smooth

then again parform the same segmentation

  • compare the two segmented images and select better

restart ImageJ open pic2.jpg apply Process / Filters / Gaussian Blur / 1.0 apply Process / Find edges apply Process / Binary / Make Binary apply thinning by Process / Binary / Skeletonize

start Octave or Matlab change directory to directory with this training by cd launch tr2