0.1
Angelo ([email protected])
Robert ([email protected])
- Description: Structure to store the blocks or arrows
- Member:
commandUse to determine whether this is arrow or blockCOMMAND_RETURN_BLOCKIt is a blockCOMMAND_RETURN_ARROWIt is an arrow
- For a block:
xCenterX Center of BlockyCenterY Center of BlockwidthWidth of BlockheightHeight of BlockIDID of Block, see ID Meaning below
- For an arrow:
xOriginX Origin of ArrowyOriginY Origin of ArrowxTargetX Target of ArrowyTargetY Target of ArrowIDID of Arrow, see ID Meaning below
- Example:
void printResult(HUSKYLENSResult result){
if (result.command == COMMAND_RETURN_BLOCK){
Serial.println(String() + F("Block:xCenter=") + result.xCenter + F(",yCenter=") + result.yCenter + F(",width=") + result.width + F(",height=") + result.height + F(",ID=") + result.ID);
}
else if (result.command == COMMAND_RETURN_ARROW){
Serial.println(String() + F("Arrow:xOrigin=") + result.xOrigin + F(",yOrigin=") + result.yOrigin + F(",xTarget=") + result.xTarget + F(",yTarget=") + result.yTarget + F(",ID=") + result.ID);
}
else{
Serial.println("Object unknown!");
}
}
| ID | Means |
|---|---|
| 1 | The first learned item is detected |
| 2 | The second learned item is detected |
| XXX | The XXXth learned item is detected |
| 0 | Item is detected but not learned, like unlearned faces block in grey color. |
- Description: The enum of the algorithm. Needed when switch to the target algorithm.
- Member:
ALGORITHM_FACE_RECOGNITIONFACE RECOGNITIONALGORITHM_OBJECT_TRACKINGOBJECT TRACKINGALGORITHM_OBJECT_RECOGNITIONOBJECT RECOGNITIONALGORITHM_LINE_TRACKINGLINE TRACKINGALGORITHM_COLOR_RECOGNITIONCOLOR RECOGNITIONALGORITHM_TAG_RECOGNITIONTAG RECOGNITIONALGORITHM_OBJECT_CLASSIFICATIONOBJECT CLASSIFICATION
- Description: Setup procedure of HUSKYLENS with Wire(I2C). It will try connect to HUSKYLENS and return whether HUSKYLENS is connected.
- Arguments:
streamInput: It could be Serial, Wire, SoftwareSerial, or other port based on Stream class.
- Returns: Whether successful connect and contact with HUSKYLENS.
- Description: Setup procedure of HUSKYLENS. It will try connect to HUSKYLENS and return whether HUSKYLENS is connected.
- Arguments:
streamInput: It could be Serial, Wire, SoftwareSerial, or other port based on Stream class.
- Returns: Whether successful connect and contact with HUSKYLENS.
- Description: Use to set the time out duration on the transmit between request and received from HUSKYLENS to avoid waiting the feedback from HUSKYLENS for a long time. Default value is 100ms.
- Arguments:
timeOutDurationInput: Time out duration on ms.
- Description: Request all blocks and arrows from HUSKYLENS. This is the place where all the transmit happens.
- Arguments: None
- Returns: Whether successfully get the result.
- Description: Request only blocks and arrows tagged with
IDfrom HUSKYLENS. - Arguments:
IDThe target ID of blocks and arrows
- Returns: Whether successfully get the result.
- Description: Request all blocks from HUSKYLENS
- Returns: Whether successfully get the result.
- Description: Request only blocks tagged with
IDfrom HUSKYLENS - Arguments:
IDThe target ID of blocks
- Returns: Whether successfully get the result..
- Description: Request all arrows from HUSKYLENS
- Arguments:
algorithmTypeThe algorithm you need. See protocolAlgorithm for details.
- Returns: Whether successfully get the result.
- Description: Request only arrows tagged with
IDfrom HUSKYLENS - Arguments:
IDThe target ID of arrows
- Returns: Whether successfully get the result.
-
Description: Request all learned blocks and arrows (ID >=1) from HUSKYLENS.
-
Returns: Whether successfully get the result.
-
Description: Request all learned blocks (ID >=1) from HUSKYLENS.
-
Returns: Whether successfully get the result.
-
Description: Request all learned arrows (ID >=1) from HUSKYLENS.
-
Returns: Whether successfully get the result.
-
Description: Return the count of blocks and arrows available to read. (Works like Serial or Wire)
-
Arguments: None
-
Returns: The count of blocks and arrows left in the buffer.
-
Description: Read blocks or arrows.(Works like Serial or Wire)
-
Returns: blocks or arrows in struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Get whether HUSKYLENS have learn something.
-
Returns: Whether HUSKYLENS have learn something.
-
Description: Get whether HUSKYLENS have learn something tagged with
ID. -
Arguments:
IDThe target ID. See ID Meaning above for details.
-
Returns: Whether HUSKYLENS have learn something tagged with
ID.
-
Description: Get the number of frame HUSKYLENS have processed. Once HUSKYLENS process one frame, this number will increase by one.
-
Returns: The number of frame HUSKYLENS have processed.
-
Description: Get the count of (faces, colors, objects or lines) you have learned on HUSKYLENS. This value will depend on how many times you learn something on HUSKYLENS.
-
Returns: The count of (faces, colors, objects or lines) you have learned on HUSKYLENS.
-
Description: Get count of all blocks and arrows.
-
Returns: The count of all blocks and arrows.
-
Description: Get count of all blocks and arrows tagged with
ID. -
Arguments:
IDThe target ID. See ID Meaning above for details.
-
Returns: The count of all blocks and arrows tagged with
ID.
-
Description: Get count of all blocks.
-
Returns: The count of all blocks.
-
Description: Get count of all blocks tagged with
ID. -
Arguments:
IDThe target ID. See ID Meaning above for details.
-
Returns: The count of all blocks tagged with
ID.
-
Description: Get count of all arrows.
-
Returns: The count of all blocks and arrows.
-
Description: Get count of all arrows tagged with
ID. -
Arguments:
IDThe target ID. See ID Meaning above for details.
-
Returns: The count of all arrows tagged with
ID.
-
Description: Get count of all learned blocks and arrows (ID >=1)
-
Returns: The count of all learned blocks and arrows (ID >=1)
-
Description: Get count of all learned blocks (ID >=1)
-
Returns: The count of all learned blocks (ID >=1)
-
Description: Get count of all learned arrows (ID >=1)
-
Returns: The count of all learned arrows (ID >=1)
-
Description: Get one of the blocks and arrows.
-
Arguments:
indexThe index of blocks and arrows, which is ordered by the received sequence. It should less thancount()
-
Returns: block or arrow in struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Get one of the blocks and arrows tagged with
ID -
Arguments:
IDThe target ID. See ID Meaning above for details.indexThe index of blocks and arrows, which is ordered by the received sequence. It should less thancount(ID)
-
Returns: block or arrow tagged with
IDin struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Get one of the blocks.
-
Arguments:
indexThe index of blocks, which is ordered by the received sequence. It should less thancountBlocks()
-
Returns: block in struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Get one of the blocks tagged with
ID -
Arguments:
IDThe target ID. See ID Meaning above for details.indexThe index of blocks, which is ordered by the received sequence. It should less thancountBlocks(ID)
-
Returns: block tagged with
IDin struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Get one of the arrows.
-
Arguments:
indexThe index of arrows, which is ordered by the received sequence. It should less thancountArrows()
-
Returns: arrow in struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Get one of the arrows tagged with
ID -
Arguments:
IDThe target ID. See ID Meaning above for details.indexThe index of arrow, which is ordered by the received sequence. It should less thancountArrows(ID)
-
Returns: arrow tagged with
IDin struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Get one of the learned blocks and arrows (ID >=1)
-
Arguments:
indexThe index of blocks and arrows, which is ordered by the received sequence. It should less thancountLearned()
-
Returns: block or arrow in struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Get one of the learned blocks (ID >=1)
-
Arguments:
indexThe index of blocks, which is ordered by the received sequence. It should less thancountBlocksLearned()
-
Returns: block in struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Get one of the learned arrows (ID >=1)
-
Arguments:
indexThe index of arrows, which is ordered by the received sequence. It should less thancountArrowsLearned()
-
Returns: arrow in struct HUSKYLENSResult. See HUSKYLENSResult above for details.
-
Description: Let HUSKYLENS switch to the target algorithm you need.
-
Arguments:
algorithmTypeThe target algorithm. See protocolAlgorithm for details.
-
Returns: Whether success.
-
Description: Let HUSKYLENS learn with
ID. (It only works in Object Classification) -
Arguments:
IDThe target ID. See ID Meaning above for details.
-
Returns: Whether success.
-
Description: Let HUSKYLENS forget all. (It only works in Object Classification)
-
Returns: Whether success.
-
Description: Set a custom name for a learned object with a specified ID. For example, if you have learned your face with an ID of 1, you can use setCustomName("Robert",1) to rename the learned face to "Robert".
-
Arguments:
nameThe specified custom nameidThe ID of the object you want to set the custom name for
-
Returns: Whether success.
- Description: Save a photo from the HuskyLens camera onto the SD Card.
- Returns: Whether success. If there is no SD Card inserted or an SD Card Error, there will be a UI popup on the HuskyLens outlining the issue.
- Description: Save a screenshot of the HuskyLens UI onto the SD Card.
- Returns: Whether success.
- Description: Save the current algorithms model file (its learned object data) to the SD Card. The file will be the in the format "AlgorithimName_Backup_FileNum.conf"
- Arguments:
fileNumThe specified file number to be used in the name for the file
- Returns: Whether success. If there is no SD Card inserted or an SD Card Error, there will be a UI popup on the HuskyLens outlining the issue.
- Description: Load a model file from the SD Card to the current algorithm and refresh the algorithm. The loaded file will be the following format "AlgorithimName_Backup_FileNum.conf"
- Arguments:
fileNumThe specified file number to be used in the name for the file
- Returns: Whether success. If there is no SD Card inserted or an SD Card Error, there will be a UI popup on the HuskyLens outlining the issue.
- Description: Place a string of text (less than 20 characters) on top of the HuskyLens UI. The position of the texts (X,Y) coordinate is the top left of the text box.
- You can have at most 10 custom texts on the UI at once, and if you continue adding texts you will replace previous texts in a circular fashion. For example, if you enter 10 texts you will fill the text buffer. If you then insert a new text object, you will overwrite the first text position (textBuffer[0]). Inserting another new text object will overwrite the second text position (textBuffer[1]).
- Each text is uniquely identified by its (X,Y) coordinate, so you can replace the text string at a (X,Y) coordinate instead of adding a new text object. For example, if you insert "TEST_1" at (120,120) and then later submit "TEST_2" at (120,120), you will replace the string "TEST_1" with "TEST_2" and maintain an overall text count of 1.
- Arguments:
textThe specified text you wish to enter on the screenxThe X coordinate for the UI Object (0-320)yThe Y coordinate for the UI Object (0-240)
- Returns: Whether success.
- Description: Clear and delete all custom UI texts from the screen.
- Returns: Whether success.
- Description: Detect whether the HuskyLens is a Pro or Standard Model
- Returns: True is Pro Model, False if Standard
- Description: Check if the onboard firmware is out of date. If it is an old firmware, there will be a UI message that pops up on the screen
- Returns: Whether success.