background image

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

Summary of Contents for NXTCam v4

Page 1: ...econd 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...

Page 2: ...nd 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 Co...

Page 3: ...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...

Page 4: ...nk 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 objec...

Page 5: ... 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 ...

Page 6: ...nsure the NXTCam is plugged into one of your PCs USB ports 4 In NXTCamView setup communications to the NXTCam via Tools Options Often only the COMPort needs to be set 5 Connect to your NXTCam 6 Capture an image or two to check the focus and lighting conditions 7 Select some colors to track by clicking on the image you captured Colors are shown as ranges of red green and blue min max values of each...

Page 7: ...is designed to be tight to prevent accidental rotation and loss of focus To refocus the lens gently turn the lens from the holder capture images and see if the new focus is satisfactory Do not apply excessive force as it may damage the lens For better grip while turning lens you may wrap a rubber band around the exposed threads of the lens To check the focus you can use Viewer software and perform...

Page 8: ...s com index php module documents JAS_DocumentManager_op viewDocument JAS_Document_id 52 Troubleshooting NXTCam communication Troubleshooting NXTCam communication with your PC To ensure USB drivers are installed properly follow these steps 1 Ensure to install the USB drivers as mentioned in this document 2 Connect the NXTcam using a USB cable to your computer 3 From Start menu Right click on Comput...

Page 9: ... the configuration say mynxtcam 6 In the next dialog box specify Connect Using NXTCam COM Port the port you noted from Ports Com and LPT entry in Device Manager 7 Click OK 8 In next window Specify Bits per second 115200 Data bits 8 Parity None Stop bits 1 Flow Control None 9 Click OK 10 In the main terminal window just press enter You should get a response from NXTCam as NCK 11 In the same window ...

Page 10: ...he block and examine the bottom left corner of NXT G window where block control panel is located 7 You should see NXTCam version number shown in the bottom left corner as shown in the adjacent picture 8 If the NXTCam is not connected correctly to your NXT this status will indicate No Device If that happens ensure the port and Address in your program match to what s on NXTCam Reference Information ...

Page 11: ...ored in NVRAM P 0x50 Ping NXTCam Engine R 0x52 Reset NXTCam Engine S 0x53 Send the color map to NXTCam Engine T 0x54 Illumination Off U 0x55 Sort tracked objects by color V 0x56 Get NXTCam Engine firmware version No Read resulting string at 0x42 12 bytes X 0x58 Do not Sort tracked objects While programming in NXC you can use the API function NXTCam_SendCommand to send the command to NXTCam While u...

Page 12: ...45 1st object Y upper left Upper left Y coordinate of first object 0x46 1st object X lower right Lower right X coordinate of first object 0x472 1st object Y lower right Lower right Y coordinate of first object 0x48 2nd object color 0x49 0x4C 2nd object co ordinates 0x4D 3rd object color 0x4E 0x51 3rd object co ordinates 0x52 4th object color 0x53 0x56 4th object co ordinates 0x57 5th object color ...

Page 13: ...gister Data 0x804 Color map data Red 0 Color map data Red 0 0x80 0xAF These registers are used for Colormap data reading and writing 0x80 Color map data Red 0 Color map data Red 0 3 If you need to read image sensor register 0x00 i e 1 register then follow this Write 0x01 to register 0x6B Write 0x00 to register 0x6C Run command H Results will be stored in register 0x6D If you need to write to image...

Page 14: ...x86 Color map data Red 6 Color map data Red 6 0x87 Color map data Red 7 Color map data Red 7 0x8F Color map data Red 15 Color map data Red 15 0x90 Color map data Green 0 Color map data Green 0 0x91 Color map data Green 1 Color map data Green 1 0x9F Color map data Green 15 Color map data Green 15 0xA0 Color map data Blue 0 Color map data Blue 0 0xA1 Color map data Blue 1 Color map data Blue 1 0xAF ...

Reviews: