Skip to main content
Teacher Portal

Teacher Toolbox icon Teacher Toolbox - The Purpose of this Activity

This activity has students apply what they learned on the previous page in order to complete a data set from an example snapshot. They will fill in missing values, calculate center X and Y values, and interpret what the data can tell us about the object's position relative to the robot's center point. This will prepare them for success on the Vision Data Challenge that follows.

VEXcode IQ Take snapshot block set to REDBOX with an arrow pointing down to show the snapshot taken of a hand holding a red cube with the cube identified as REDBOX and the x, y, width, and height data shown.

Add the missing values below in your engineering notebook.

Here are the provided data from the snapshot:

  • X = 50
  • Y = 36
  • W = 152
  • H = 150

Vision Sensor blocks shown to the left with incomplete data reported to the right based on the snapshot above. Object exists reports as True, object count and object center x have ?, object center y reads 11, object width is ?, and object height reads 150.

  • Is the REDBOX to the left or to the right of the robot's center point?
  • Is the REDBOX higher or lower than the robot's center point?

Teacher Tips icon Teacher Tips

Draw the students' attention to the fact that the detection frame does not fully cover the REDBOX. That is okay. It still recognizes the REDBOX. Tuning the Vision Sensor is unlikely to perfect the detection frame and that is okay. The Vision Sensor does recognize the majority of the REDBOX.

Teacher Toolbox icon Teacher Toolbox - Answers

Students' answers can be discussed as a class and/or you can review their engineering notebooks to ensure that they completed the activity.

There is only one object (object count = 1) in the snapshot and the width is provided by the program (object width = 152). The center X value is 152/2 + 50 = 126.

Completed sensor data aligned with the VEXcode blocks. The data reads, in order, Object exists = True; Object count = 1; object center x = 126; object center y = 111; object width = 152; and object height = 150.

  • The REDBOX is to the left of the robot's center point (a bit left of center). The REDBOX is 31.5 pixels (center 157.5 - 126) left of the robot's center point.
  • The REDBOX is lower than the robot's center point (slightly lower than center). The REDBOX is 5.5 pixels (111 - center 105.5) below the robot's center point.