Good info or project about blob detection, line following or similar using camera and microcontroller

YES! Black is black!!!

Hey all,

Making progress here, this might sound stupid but for me after many many hours of struggling I’m very happy that at least my black is BLACK now! It seems one of the 174 registers I use (borrowed from the internet) and controls the RGB565 mode has another nice  feature. ITs called data format - output full range enable.

My register setting was 00 for the 2 involved bits. This means the range is limited from 0x10 to 0xF0. I now changed it so that the range is 0x00 to 0xFF again. And now if I cover the lens: ALL 0’S!

One thing is for sure I will never buy those cheap camera’s with the 100% sort-it-out-yourself level again.

Clipboard01.jpg

Good find there!Strange that

Good find there!

Strange that the output range was limited by default, I guess the 0x10 to 0xF0 range is a better fit for some other image format.

Tnx!

Tnx! The default is C0 but these register settings are from the internet and are somewhat messy. During my search I also encountered several double register-settings. First the set it to a value and later on the same register to different values. I guess everybody is struggling for a long time with these settings and so you get some messy files on the internet. Who traces back his steps and cleans up :wink:

I think its a strange setting though, especially that you can use it with RGB565, this has already the limit of 5 bits for R, 6 for G and 5 for B so limit it more is not so useful.

I still got 1 to tackle: white is not white yet. Its far from that. But now I’ve seen that I can fix this with registersettings I’ll keep going. Got a nice calibration method where a white spot is drawn on the TFT where the specific pixel is I measure (I only take 1 pixel of the sensor and “point” it to a color, the data I compare with an RGB565 color picker)

But soon… I will be ready to go do something with the camera instead of debugging

Thank you all

Thank you all for coming up with ideas about where to find image processing info. Via your links I ended up on this site:

http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/blob_detection/

So I did not directly find my lead to go on but there was so many good info that I found a good site that explains a simple/intermediate image processing task.

While I write this I am looking with a big smile at my STM32 TFT screen. On it is a moving image of my camera, it is tracking (for now, for demo purpose) a bright light source where R,G and B are > decimal 245. All pixels that have R,G and B components > 245 are white on my TFT, the rest is black. And right in the middle of those pixels (the blob) is a nice red cross. I CAN DETECT A COLOR BLOB AND ITS CENTER, whahoe! Now my future robots will get much more interesting.

Next will be that 2 servo motors for pan and tilt are mounted, they will move the camera or my robot to have the blob right in the middle of the camera view. Ultimately the blob will be a red ball or something, not a bright light. Makes it a little more challenging. I still got many questions like for example how to track multiple blobs. But thats for later.

If I have this blob following working up and running its time for a little article about it, maybe I can help others on the forum to do some basic image processing stuff!

sorry for my mess on the forum

…I got no clue how to reply correctly to a post so the order of my replies is chaos :frowning:

Your replies seem to follow a logical order to me.

Are you maybe seeing newer posts first? There is the option to show newer posts first vs older first. I can’t stand the newest first. It makes following things difficult. :slight_smile:

For reference the comment layout options are between your original post and the forum responses. They are labeled comment viewing options.

That was it

I had indeed selected view NEW comment first.

But what I tried to do is give a general reply, to my own and first post, not as a reply to a sub-post. On my PC my newest comment is now between the first post and the one about black=black, I wanted it after all the problems were solved / as last post since I started

Seems more difficult now that image processing!!