<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:python

Differences

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

Link to this comparison view

Next revision Both sides next revision
wiki:v2:python [2021/12/03 19:04]
kees 2021-12-03: created
wiki:v2:python [2021/12/04 15:20]
kees 211204 - Edited tables (escaped underscores in text)
Line 109: Line 109:
 Object ''​Pixy2''​ contains the following methods: Object ''​Pixy2''​ contains the following methods:
  
-^ get_version() ​                                                             ^^+%%get_version()%%                                                          ​^^
 | **Description:​** ​                                                          ^^ | **Description:​** ​                                                          ^^
 | Get the firmware and hardware version of Pixy2. ​                           ^^ | Get the firmware and hardware version of Pixy2. ​                           ^^
Line 173: Line 173:
 </​code> ​                                                                     ^^ </​code> ​                                                                     ^^
  
-^ set_mode(mode) ​                                                            ​^^+%%set_mode(mode)%%                                                         ^^
 | **Description:​** ​                                                          ^^ | **Description:​** ​                                                          ^^
 | Set mode for Pixy2 (for linetracking) ​                                     ^^ | Set mode for Pixy2 (for linetracking) ​                                     ^^
 | **Parameters:​** ​                                                           ^^ | **Parameters:​** ​                                                           ^^
 | mode | Desired mode:                                                        | | mode | Desired mode:                                                        |
-| :::  | Pixy2Mode.LINE_MODE_DEFAULT ​                                         +| :::  | %%Pixy2Mode.LINE_MODE_DEFAULT%%                                      ​
-| :::  | Pixy2Mode.LINE_MODE_TURN_DELAYED ​                                    ​+| :::  | %%Pixy2Mode.LINE_MODE_TURN_DELAYED%%                                 
-| :::  | Pixy2Mode.LINE_MODE_MANUAL_SELECT_VECTOR ​                            ​+| :::  | %%Pixy2Mode.LINE_MODE_MANUAL_SELECT_VECTOR%%                         
-| :::  | Pixy2Mode.LINE_MODE_WHITE_LINE ​                                      ​|+| :::  | %%Pixy2Mode.LINE_MODE_WHITE_LINE%%                                   |
 | **Returns:​** ​                                                              ^^ | **Returns:​** ​                                                              ^^
 | None                                                                       ^^ | None                                                                       ^^
Line 194: Line 194:
 </​code> ​                                                                     ^^ </​code> ​                                                                     ^^
  
-^ get_blocks(mode) ​                                                          ​^^+%%get_blocks(mode)%%                                                       ^^
 | **Description:​** ​                                                          ^^ | **Description:​** ​                                                          ^^
 | Gets all detected blocks in the most recent frame. ​                        ^^ | Gets all detected blocks in the most recent frame. ​                        ^^
Line 202: Line 202:
 | ::: | signature 1, then sigmap=1. If you are interested inbock data from    | | ::: | signature 1, then sigmap=1. If you are interested inbock data from    |
 | ::: | signatures 1 and 2, then sigmap=3 (1+2). ​                             | | ::: | signatures 1 and 2, then sigmap=3 (1+2). ​                             |
-| max_blocks | The maximum number of blocks you wish to receive. ​             |+%%max_blocks%% | The maximum number of blocks you wish to receive. ​         |
 | **Returns:​** ​                                                              ^^ | **Returns:​** ​                                                              ^^
-| nr_blocks | Number of detected blocks ​                                      ​+%%nr_blocks%%  ​| Number of detected blocks ​                                 
-| blocks ​   | List of Block objects (length = nr_blocks): ​                   ^^+| blocks ​        ​| List of Block objects (length = %%nr_blocks%%):            |
 | sig            | Signature or color code number ​                            | | sig            | Signature or color code number ​                            |
-| x_center ​      ​| X location of the center of the block                      | +%%x_center%%   | X location of the center of the block                      | 
-| y_center ​      ​| Y location of the center of the block                      |+%%y_center%%   | Y location of the center of the block                      |
 | width          | Width of the block                                         | | width          | Width of the block                                         |
 | height ​        | Height of the block                                        | | height ​        | Height of the block                                        |
 | angle          | Angle of color code in degrees ​                            | | angle          | Angle of color code in degrees ​                            |
-| tracking_index | Tracking index of the block                                |+%%tracking_index%% | Tracking index of the block                            |
 | age            | The number of frames the block has been tracked ​           | | age            | The number of frames the block has been tracked ​           |
 | **Example:​** ​                                                              ^^ | **Example:​** ​                                                              ^^
Line 233: Line 233:
  
  
-^ get_line_tracking_data() ​                                                  ​^^+%%get_line_tracking_data()%%                                               ^^
 | **Description:​** ​                                                          ^^ | **Description:​** ​                                                          ^^
 | Get linetracking data (MainFeatures) in the most recent frame. ​            ^^ | Get linetracking data (MainFeatures) in the most recent frame. ​            ^^
Line 272: Line 272:
 | index          | Index in array                                             | | index          | Index in array                                             |
 | angle          | Angle of branch ​                                           | | angle          | Angle of branch ​                                           |
-| angle_byte1 ​   | Byte1 of angle                                             ​+%%angle_byte1%% | Byte1 of angle                                            
-| angle_byte2 ​   | Byte2 of angle                                             ​|+%%angle_byte2%% | Byte2 of angle                                            |
 | **Example:​** ​                                                              ^^ | **Example:​** ​                                                              ^^
 | <​code>​ | <​code>​
wiki/v2/python.txt · Last modified: 2021/12/30 14:48 by kees