Mindsensors NXTCam v4 User Manual

NXTCam v4 User Guide
What is NXTCam
NXTCam is a real-time image processing engine. Think of it as a vision sub-system with on-board processor and a protocol interface that is accessible through a standard NXT sensor port. This interface provides high-level, post-processed information of the image NXTCam sees. The processed information contains the bounding box coordinates of the objects of interest in view of NXTCam, in line tracking mode, this information contains coordinates of line segments.
NXTCam does not send the image itself to NXT, however connecting NXTCam to a PC with USB cable, and using a Viewer and Configuration software, you can see the image on the PC.
NXTCam-v4 is compatible with NXTCam-v3 software and libraries.
NXTCam Specs
Track up to 8 different colorful objects at 30 frames/second
Configure the NXTCam using USB interface on Windows XP, Windows Vista.
Supports two tracking modes: Object tracking and Line tracking.
Provide real-time tracked object statistics (number of objects, color of
objects, bounding box coordinates or line coordinates) through a standard NXT sensor port.
Tracked image resolution of 88 x 144 pixels at 30 frames/second
Perform full-resolution (176 x 144) pixels color image dumps to PC via USB
port.
Maximum power consumption (42 mA at 4.7 V)
Uses NXT compatible I2C protocol for communications.
Supports Auto Detecting Parallel Architecture (ADPA) for NXT sensor bus.
This means that NXTCam can coexist with LEGO or third party digital sensor on the same NXT port. ADPA support enables user to employ several sensors on the same port without the need of external sensor multiplexer, reducing the overall size without compromising the functionality.
What you will need before using NXTCam
Connector Cables
mindsensors.com 1/14
For runtime operations (on the robot, in autonomous mode), the NXTCam connects to NXT on a sensor port using a standard connector cable that comes with NXT (the one with jacks similar to phone jacks).
For offline operations (for programming and configurations), NXTCam connects to PC using mini-USB cable. (This is in addition to the cable you would use to connect NXT to your PC). Adjacent picture shows the mini-USB connector you would need on your USB cable, this connector is commonly used for digital cameras. If you need to acquire a cable separately, it should be a ‘5 wire’ cable.
USB Driver installation
In order for NXTCam to work properly, you will need to install USB drivers for your operating system. Currently support exists for:
Windows XP (i386 and AMD processors) Windows Vista (i386 and AMD processors) Mac OS X v10.4.10 (PowerPC G4)
Download the drivers and installation instructions from following location:
http://www.mindsensors.com/NXTCam_Driver_Installation.htm
Viewer and Configuration Software
To see the picture that’s in the field of view of NXTCam, capture that picture for analysis and configure the Colormaps for onboard processing, you will need to install and use Viewer and Configuration software on your PC.
Download Viewer and Configuration software for your operating system from following location:
For MS-Windows XP/Vista: http://nxtcamview.sourceforge.net/ (developed by Paul Tingey)
For Mac (10.5 or order):
http://www.mindsensors.com/index.php? module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id= 53
For Mac 10.6 or newer:
http://www.mindsensors.com/index.php? module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id= 180
For Linux:
https://github.com/jgraef/aNXTCam (developed by Janosch Gräf)
Programming Environment(s)
mindsensors.com 2/14
NXTCam is supported for use in NXT-G using a custom block. Download the block from following URL: http://www.mindsensors.com/NXTCam_NXT-G_Block.htm
This block provides functionality for tracking objects based on the Colormaps downloaded on NXTCam.
Follow the installation instructions provided at this URL to install the block.
Note: While using with NXT-G, ensure to use firmware version 1.05.
LeJOS API’s are available at:
http://lejos.sourceforge.net/p_technologies/nxt/nxj/api/lejos/nxt/NXTCam.html
RobotC API’s are available at:
http://www.mindsensors.com/index.php? module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id= 50
NXC/NBC Library functions are available at:
http://www.mindsensors.com/index.php? module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id= 57
Connecting NXTCam
Wiring for NXTCam
NXTCam may be connected to any of the sensor ports of NXT using standard NXT connector cable. In your program, select the appropriate port number to which NXTCam is connected.
WARNING
Do not connect the NXTCam to any motor port, as the voltage applied by the motor port may damage the electronics of NXTCam.
During offline operations, such as programming and configuration, NXTCam must be connected to PC (using USB cable) as well as NXT (using standard NXT connector cable) while NXT is powered ON.
During runtime (or autonomous) operations on NXT, the USB connection to PC must be removed.
NOTE: While NXTCam is connected to NXT as well as PC, the PC communication takes priority over any other communication.
In other words, while NXTCam is connected to PC as well as NXT, if you run a program on NXT, it will not be able to talk to NXTCam.
Mounting NXTCam on your contraption
The holes on the NXTCam enclosure are designed for tight fit of Technic pins (or axles) with ‘’ cross section. The holes however are not designed for repeated insertions/removals of these pins.
mindsensors.com 3/14
To mount NXTCam v2 on your contraption we suggest that you use two dark gray ‘Technic Axle 3 with Stud’ as shown.
Insert axles from the front (lens side) of the NXTCam and secure with a bushing on the back or mount it on your contraption directly.
Alternately, you may use blue ‘Technic Axle Pin with Friction’, as shown.
While disassembling contraption, leave the axles and/or pins on NXTCam.
LED on NXTCam
The LED on NXTCam blinks initially when NXTCam is booting up (when power is connected through USB port or NXT Sensor port). During the normal operation the LED may blink occasionally.
Configuring NXTCam Colormaps using NXTCamView
What’s a Colormap?
The objects of interest are recognized by NXTCam by matching the stored color values with the captured image. To do that, color values of the objects of interest need to be stored in NXTCam’s memory. These color values are known as Colormaps.
NXTCam can store up to 8 Colormaps and provide processed information of the objects matching those Colormaps.
Default Object Colormap
The NXTCam is shipped with a default Colormap to track a light source (white light). Download a test program or write a test program, and try tracking a light source.
Objects of interest
Below are screen dumps of NXTCamView software, showing objects of interests and their tracking information.
mindsensors.com 4/14
The top left window in the picture below shows the field of view of NXTCam. The objects of interest from this view are the red and blue pens. In the object tracking mode, the bounding box coordinates are returned, as shown:
mindsensors.com 5/14
Loading...
+ 9 hidden pages