![]() |
|||||||
| [ Home ] | [ Software ] | [ Curriculum ] | [ Hardware ] | [ Community ] | [ News ] | [ Publications ] | [ Search ] |
|
1.1. PyroImageThis page documents PyroImage, the main image class in Pyro. This class has methods to do standard vision processing: blob detection and tracking, convolution, etc. See pyrobot/vision/__init__.py for many examples.
from pyrobot.vision import * Classes and Methods:
class PyroImage: def loadFromFile(filename): def saveToFile(filename): def shrink(self, xscale=0.5, yscale='unset', mode='average'): def getShrunkenImage(self, xscale=0.5, yscale='unset', mode='average'): def grayScale(self): def getGrayScale(self): def getColorFilter(self, r, g, b): def display(self): def set(self, x, y, val, offset = 0): def setVal(self, x, y, val): def get(self, x, y, offset = 0): def getVal(self, x, y): def reset(self, vector): def resetToColor(self,r,g,b): def incr(self, x, y, offset = 0): def cropPixels(self, l, t='unset', r='unset', b='unset'): def getBitmap(self, cutoff, cutoff2='unset', mode='brightness'): def histogram(self, cols = 20, rows = 20, initvals = 0): def convolve(self, convmask, bit = 0, threshold = 0): def swapPlanes(self, plane1, plane2): class Histogram(PyroImage): def display(self): def compare(self, hist): class Bitmap(PyroImage): def display(self): def avgColor(self, img): class Point: def set(self, x, y): def setx(self, x): def sety(self, y): def clear(self): class Blob: def addpixel(self, pixel): def joinblob(self, other): def width(self): def height(self): def area(self): def density(self): def display(self): class Blobdata: def sort(self, mode="mass"): def display(self): |
| [ Home ] | [ Software ] | [ Curriculum ] | [ Hardware ] | [ Community ] | [ News ] | [ Publications ] | [ Search ] |
View Wiki Source | Edit Wiki Source | Mail Webmaster | |||||||