<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:lego_line_tracking_test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:v2:lego_line_tracking_test [2019/01/30 01:59]
pixycam
wiki:v2:lego_line_tracking_test [2019/01/30 02:04]
pixycam
Line 11: Line 11:
 {{wiki:​v2:​image_704.png}} {{wiki:​v2:​image_704.png}}
  
 +
 +===== Detecting and Tracking a Line (Vector) =====
  
 Draw a line on a piece of paper and put it in front of Pixy2. ​ Pencil will work, but black marker is usually better. ​ If you are running PixyMon, you should see something like this: Draw a line on a piece of paper and put it in front of Pixy2. ​ Pencil will work, but black marker is usually better. ​ If you are running PixyMon, you should see something like this:
Line 23: Line 25:
 {{wiki:​v1:​image_726.png}} {{wiki:​v1:​image_726.png}}
  
 +
 +===== The Lamp =====
  
 You can also see what happens when you turn off and on Pixy2'​s lamp by setting it to false or true.  You'll need to stop the program and re-run it for the change to take effect. ​ You can also see what happens when you turn off and on Pixy2'​s lamp by setting it to false or true.  You'll need to stop the program and re-run it for the change to take effect. ​
Line 31: Line 35:
 Note, with the lamp on, Pixy2 will typically reduce the exposure (sampling) time of the image, which reduces motion blur.  In general, motion blur happens because a camera is sampling a subject while the subject is moving. ​ In this case, the subject is a line (or set of lines). ​ If they are blurred due to motion (the motion of your robot), it can make the lines more difficult for Pixy2 to detect and track. ​ Pixy2'​s lamp can help with this.  The upshot is that the lamp makes your robot go faster! Note, with the lamp on, Pixy2 will typically reduce the exposure (sampling) time of the image, which reduces motion blur.  In general, motion blur happens because a camera is sampling a subject while the subject is moving. ​ In this case, the subject is a line (or set of lines). ​ If they are blurred due to motion (the motion of your robot), it can make the lines more difficult for Pixy2 to detect and track. ​ Pixy2'​s lamp can help with this.  The upshot is that the lamp makes your robot go faster!
  
 +
 +===== Make an intersection =====
  
 Make a 4-way intersection by drawing another line through the original line and place it in front of Pixy2. ​ Pixy2 will identify the intersection and quickly choose the default branch of the intersection,​ which is the "​straightest"​ branch of the intersection,​ assuming the Turn Angle input is set to 0 (default). ​ If you run the EV3 program, you should notice that while Pixy2 sees the intersection,​ the EV3 LCD will show "​Intsctn:​ 4", meaning that it sees a 4-way intersection. ​   ​ Make a 4-way intersection by drawing another line through the original line and place it in front of Pixy2. ​ Pixy2 will identify the intersection and quickly choose the default branch of the intersection,​ which is the "​straightest"​ branch of the intersection,​ assuming the Turn Angle input is set to 0 (default). ​ If you run the EV3 program, you should notice that while Pixy2 sees the intersection,​ the EV3 LCD will show "​Intsctn:​ 4", meaning that it sees a 4-way intersection. ​   ​
Line 37: Line 43:
 {{wiki:​v2:​image_372.png}} {{wiki:​v2:​image_372.png}}
  
 +
 +===== Simulate a turn =====
  
 You can stop the program and change turn angle to -90 degrees. You can stop the program and change turn angle to -90 degrees.
Line 54: Line 62:
  
  
- +====Barcodes ​=====
-==== Barcodes ====+
  
 We wanted Pixy2 to be able to receive simple commands or information while it is performing line tracking, so we added the barcode feature. ​ The barcodes are intended to act as "​roadsigns"​. ​ You can add graphics to the barcodes that are human-readable as long as you keep the barcode unobstructed. ​   To test the barcode functionality,​ download the print the [[https://​github.com/​charmedlabs/​pixy2/​raw/​master/​documents/​other/​all_codes.pdf|all_codes.pdf]] document. ​ (Note, other barcode files and images can be found [[https://​pixycam.com/​downloads-pixy2/​|here]].) We wanted Pixy2 to be able to receive simple commands or information while it is performing line tracking, so we added the barcode feature. ​ The barcodes are intended to act as "​roadsigns"​. ​ You can add graphics to the barcodes that are human-readable as long as you keep the barcode unobstructed. ​   To test the barcode functionality,​ download the print the [[https://​github.com/​charmedlabs/​pixy2/​raw/​master/​documents/​other/​all_codes.pdf|all_codes.pdf]] document. ​ (Note, other barcode files and images can be found [[https://​pixycam.com/​downloads-pixy2/​|here]].)
wiki/v2/lego_line_tracking_test.txt · Last modified: 2019/01/31 01:40 by pixycam