Ask Your Question

foska's profile - activity

2016-11-20 09:37:47 -0500 answered a question Cant open SimpleCV after installing

Figured out. Install pygame manually with: sudo apt-get install python-pygame also I had to install svgwrite:sudo pip install svgwrite

2016-11-20 09:37:47 -0500 commented question Cant open SimpleCV after installing

I have the same problem. It's because i haven't installed the pygame module. Bytheway installed SCV with pip from github, raspbian lite

2016-11-20 09:37:47 -0500 answered a question Detecting colour under different lighting conditions

I'm also struggling with a similar problem.So far i figured out to put a piece of colored paper in front of the camera, get the color of the pixel and use it as a reference for brightness/color calibration.This is my code:

from SimpleCV import *
cam = Camera()
bright = 1
while True:
    img = cam.getImage() #grab a frame
    img = img*bright                # multiply the image by the brightness variable

    pixel=img[0,0]                  # reference color
    if r < 128 :                    # change the brightness var until its 128
        bright=bright + 0.1         # 0.1 - the speed of change/cycle
    elif r > 128 :
        bright=bright - 0.1    

In your case i guess that img.binarize could also work. Hope this helps.I'm new to simplecv and python so sorry if this isn't an elegant solution.

2016-07-02 08:25:00 -0500 received badge  Supporter (source)