cmucam3-hardware (#1) - How do I retrieve the histograms from Polly algorithms (#7) - Message List

How do I retrieve the histograms from Polly algorithms

Hi!

I just received my CMUCAM3! Cool! First time I'm getting around a CMUCAM, so I might ask dumb newbie questions... Sorry about that!

So I've been able to do the basics up to now: seting up the cam, downloading some on the existing codes such a CMUCAM2. Works very well.

I can also grab the frames from the CMUCAM2GUI java interface, as well as the CMUCAM3 framegrabber on windows.

However I'm not sure about what to do for the Polly Algorithm. I of course uploaded it on the cam3. Upload was successful.

But then I can't get any frame from the Cam using the Cam3 framegrabber: I can connect to the cam: it says connected. But if gives me a error window when I want to grab a frame...

In the introduction of the Polly algo you say that you send the histogram of the treated image... So what does this look like? a 1D table ? or an image?

So basically my question is how do I get the binarized image on my computer, in order to control my robot? For sure at the moment, I just want to see it on my screen. then next, i'll implement my serial protocol in C# to get the histogram and do my control laws...

if anyone can help!

Thanks.

By the way, is there a repository of the community where people having developped algorithms for cmucam3 share these developments?

Thanks !

Damien

  • Message #20

    Great to hear that you got your CMUcam3 running. Right now, polly sends the histogram as ASCII text directly over the serial port. If you open a terminal program (115,200 8N1 no hardware handshaking or flow control) you should see something like this:

    Histogram:

    0 12

    1 14

    ...

    87 10

    The first number is the index of the bin and the second number is the histogram value. At one point, we had polly integrated with the CMUcam2 emulation firmware so you could dump an H packet and see it in the GUI. I think I have that code on my computer at work. I can try it and check it into the repository tomorrow or at least make it so that polly has an interactive mode. Eventually we want to do a polly -> spoonBot demo program.

    Another option is you can go into polly.c and uncomment "#define MMC_DEBUG". If you recompile that project and have an MMC card formatted and inserted, then you will see PPM files that show the histograms and edge detected images.

    As for a way to post files, we are working on it. The CMUcam3 is still really new, so we are still working on a bunch of logistical things. This is cleary very important since that is the main point of the new camera. We will have some wiki access soon and will likely open up our subversion repository for public access.

    -Anthony

    • Message #22

      I posted the CMUcam2 Polly code. You can update svn, or download it here: polly. This should let you visualize the histogram output with the CMUcam2 GUI.

      -anthony