Computer Vision

Tonight, I will be working on getting my computer to watch for the mailman. I made huge headway last night in that I was able to access the camera and save an image to the program directory from within Processing. It was far easier than when I was doing it in VB. Bleh. No hunting for an obscure library reliant upon an outdated windows framework or any of that nonsense! Heck, Processing comes with it's own freaking openCV, but I'm not going to use it, though. Imma do my own thing!

*the next day*

Here's what I was able to come up with last night in Processing:


The beginnings of my own computer vision.

Reader: How are the red particles distributed?
 
I took the average of the value of the blue and the green in the pixel and if that number is half the value of the red of or less, I max out the red and zero out the other colors, giving it the full red.
Code:
    float comp = r/((b+g)*.5);
    if (comp>2){r=255;g=0;b=0;}
I'm really just trying to see the red in the circuit board I'm holding in my hand but the dresser in background is a dark brown and that always triggers red. I have an algorithm in mind to ignore those irrelevant outliers.

Comments

Popular posts from this blog

Click Bait Using Logan Paul's Name and Face

Fate of the Furious Ending Scene