<commit_before>import SimpleCV as scv
from SimpleCV import Image
import cv2
import time
from start_camera import start_camera
import threading

# camera_thread = threading.Thread(target=start_camera)
# camera_thread.start()
# from get_images_from_pi import get_image, valid_image
# time.sleep(2)
# count = 0
# while (count < 50):
#   get_image(count)
#   count += 1

# exit()

image = Image('images/stop')

image.show()
image.show()
time.sleep(2)

reds = image.hueDistance(color=scv.Color.RED)
reds.show()
reds.show()
time.sleep(2)

stretch = reds.stretch(20,21)
stretch.show()
stretch.show()
time.sleep(3)


# blobs = image.findBlobs()
# if blobs:
#   for blob in blobs:
#     print "got a blob"
#     blob.draw(color=(0, 128, 0))
# image.show()
# image.show()
# time.sleep(4)





<commit_msg>Add simple logic to driver code test for easy testing<commit_after>import SimpleCV as scv
from SimpleCV import Image
import cv2
import time
from start_camera import start_camera
import threading

def take_50_pictures():
  camera_thread = threading.Thread(target=start_camera)
  camera_thread.start()
  from get_images_from_pi import get_image, valid_image
  time.sleep(2)
  count = 0
  while (count < 50):
    get_image(count)
    count += 1

def detect_stop_sign(image):
  reds = image.hueDistance(color=scv.Color.RED)
  stretch = reds.stretch(20,21)
  invert = stretch.invert()
  blobs = invert.findBlobs(minsize=2000)
  if blobs:
    for blob in blobs:
      print blob.area()
      blob.draw(color=(0, 128, 0))
  invert.show()
  invert.show()
  time.sleep(3)

image = Image('images/0.jpg')
x = 0
while (x < 40):
  image = Image('images/'+ str(x) + '.jpg')
  detect_stop_sign(image)
  print x
  x +=1

exit()





{'fraction_non_alphanumeric': 0.12682641729982466, 'fraction_numerical': 0.026884862653419054, 'mean_word_length': 4.1878787878787875, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2181487', 'n_tokens_mistral': 667, 'n_tokens_neox': 629, 'n_words': 156}