Author Topic: Blackfin camera console  (Read 6827 times)

0 Members and 1 Guest are viewing this topic.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,166
  • Helpful? 111
Blackfin camera console
« on: October 13, 2009, 07:16:32 PM »
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.

Download the latest firmware and then see http://www.surveyor.com/blackfin/SRV_setup_bf.html#setup3 on how to install it.

How do you install my application
1. 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 installed
2.- 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 rate
2. - By default the Blackfin uses 115,200 baud.

The console allows you to:-
1. change between 4 different screen modes
2. view the image seen by the camera
3. 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 seconds
4. turn on/off various camera gain options
5. 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.
« Last Edit: October 13, 2009, 08:22:18 PM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,666
  • Helpful? 169
    • Society of Robots
Re: Blackfin camera console
« Reply #1 on: October 13, 2009, 09:47:50 PM »
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.

Offline hgordon

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 373
  • Helpful? 7
Re: Blackfin camera console
« Reply #2 on: October 14, 2009, 10:00:15 AM »
This is great.  I just captured a couple of screen shots -





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.

Other than that, I didn't discover any issues.
Surveyor Corporation
  www.surveyor.com

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,166
  • Helpful? 111
Re: Blackfin camera console
« Reply #3 on: October 14, 2009, 01:31:46 PM »
Have added the missing DLL to the package and have also added a scrollbar to help set image quality.
New version attached.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline pchan

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: Blackfin camera console
« Reply #4 on: November 26, 2009, 11:07:23 AM »
cant seem to find link to download this java console?

can this console be used without the an avr micro, directly connected to a uart-rs232 on a PC.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,166
  • Helpful? 111
Re: Blackfin camera console
« Reply #5 on: November 26, 2009, 11:25:53 AM »
Click on the blackfin.zip link in my previous posting.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline hgordon

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 373
  • Helpful? 7
Re: Blackfin camera console
« Reply #6 on: November 27, 2009, 09:52:08 AM »
cant seem to find link to download this java console?

can this console be used without the an avr micro, directly connected to a uart-rs232 on a PC.
You can connect direct from your PC, but take care that UART voltage levels are 3.3V, not RS232 +/-12V
Surveyor Corporation
  www.surveyor.com

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,166
  • Helpful? 111
Re: Blackfin camera console
« Reply #7 on: November 28, 2009, 09:19:40 AM »
I have now posted the application here:

http://www.webbot.org.uk/blackfin/blackfin.jnlp

Note that you need Java version 1.6 installed. Using this link will ensure that you are always using the latest version.

... but take care that UART voltage levels are 3.3V, not RS232 +/-12V


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!

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline hgordon

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 373
  • Helpful? 7
Re: Blackfin camera console
« Reply #8 on: November 28, 2009, 11:46:47 AM »
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.

This is the ideal type of USB serial interface to use to interface the Blackfin camera to a PC host -
    http://www.pololu.com/catalog/product/391


Surveyor Corporation
  www.surveyor.com

 


Get Your Ad Here