Author
Topic: Blackfin camera console (Read 7563 times)

The Java console that ships with the Blackfin camera is obviously aimed at the 'entire' Surveyor robot.

For those of us who only have the 'camera' then it is of limited use. So I have written a new version of it - for us 'camera only' folk. This has been an interesting journey:- I have learned a lot and have also helped to track down some bugs in the blackfin code. So make sure you install a blackfin firmware release that is dated 10 October 2009 or later.

How do you install my application1. Well it runs as a Java application - just like the one from Surveyor does. So you need to make sure you have a copy of Java installed2.- Download my 'zip' file, and unzip it to somewhere, and then run the 'blackfin.bat' batch file (ie Windows support for now!)

Setup:1. - Once running you have to select a COM port and a baud rate2. - By default the Blackfin uses 115,200 baud.

The console allows you to:-1. change between 4 different screen modes2. view the image seen by the camera3. put the mouse somewhere on the image and then see the colour of that pixel (it takes a few seconds as downloading images is slow over a serial link!). So wait a few seconds4. turn on/off various camera gain options5. set the colour range of a colour bin and the code will draw rectangles around any matching 'blobs' on the image

I have used this to help test/debug my Blackfin support in WebbotLib and I am in-debted to Howard at Surveyor for his help, patience, advice, and quick turn around to help make this happen.

Of course if you only want to have your robot track blobs - then you can jump straight to the Blackfin support in WebbotLib - but I still recommend that you use this to 'visualise' what the camera can see.

I hope you find it useful and if you have any suggestions then let me know.

I'm strongly considering entering a competition in Singapore in late January 2010 that'll require the Blackfin. If so, I'll probably make heavy usage of your program right after my New Years vacation. I'll be too busy before then to have time to play with it.

This application is particularly useful for identifying colors and color bin ranges that will be used in blob searches. As seen above, I worked out a color range for the "red" of a spool of wire, and the actual blob outlines are displayed.

A couple of suggestions:

1. blackfin.zip is missing rxtxSerial.dll that is needed by the rxtx comm library on Windows

2. It would be nice to have a selection option for the JPEG quality. It seems that you have set q = 1, and this causes JPEG image sizes to be as much as 4x larger than q=3 or q=4, thus slowing down the frame rate.

I just used a max232 type level shifter so I think the voltages would have been 5v rather than 3.3v. Can you confirm this is ok - I don't want to be responsible for blowing up blackfins around the world!

Not many computers have RS232 interfaces anymore, though I have used max232 devices for 3.3V uart interface from RS232 connection. 5V interface probably won't cause any damage especially if you put a current limiting resistor in series with the connections, but 3.3V interface is best.