コード例 #1
0
ファイル: testsuite.py プロジェクト: rclim-11/pyvision
def test():
    '''Run the face test suite.'''
    pv.disableCommercialUseWarnings()

    normalize_suite = unittest.TestLoader().loadTestsFromTestCase(
        _TestNormalize)
    surf_suite = unittest.TestLoader().loadTestsFromTestCase(_TestSURF)
    dist_suite = unittest.TestLoader().loadTestsFromTestCase(_TestDistance)

    test_suites = [normalize_suite, surf_suite, dist_suite]

    pyvision_suite = unittest.TestSuite(test_suites)

    unittest.TextTestRunner(verbosity=2).run(pyvision_suite)
コード例 #2
0
ファイル: testsuite.py プロジェクト: wolfram2012/MOSSE
def test():
    '''Run the face test suite.'''
    pv.disableCommercialUseWarnings()

    fel_suite = unittest.TestLoader().loadTestsFromTestCase(
        TestFilterEyeLocator)

    test_suites = [
        fel_suite,
    ]

    pyvision_suite = unittest.TestSuite(test_suites)

    unittest.TextTestRunner(verbosity=2).run(pyvision_suite)
コード例 #3
0
ファイル: testsuite.py プロジェクト: bolme/pyvision
def test():
    '''Run the face test suite.'''
    pv.disableCommercialUseWarnings()
    
    fel_suite = unittest.TestLoader().loadTestsFromTestCase(TestFilterEyeLocator)
    
    
    
    test_suites = [
                   fel_suite,
                   ]
    
    pyvision_suite = unittest.TestSuite(test_suites)
    
    unittest.TextTestRunner(verbosity=2).run(pyvision_suite)
コード例 #4
0
ファイル: testsuite.py プロジェクト: Dfred/concept-robot
def test():
    '''Run the face test suite.'''
    pv.disableCommercialUseWarnings()
    
    normalize_suite = unittest.TestLoader().loadTestsFromTestCase(TestNormalize)
    
    
    
    test_suites = [
                   normalize_suite,
                   ]
    
    pyvision_suite = unittest.TestSuite(test_suites)
    
    unittest.TextTestRunner(verbosity=2).run(pyvision_suite)
コード例 #5
0
ファイル: __init__.py プロジェクト: Dfred/concept-robot
import sys, threading, math, time
import cv
import numpy
import config

import pyvision as pv
pv.disableCommercialUseWarnings()
from pyvision.face.CascadeDetector import CascadeDetector,AVE_LEFT_EYE,AVE_RIGHT_EYE
from pyvision.types.Video import Webcam
from pyvision.edge.canny import canny

import config

edge_threshold1 = 50
edge_threshold2 = 90
edge_threshold3 = 11
edge_threshold4 = 0
        
        
class CaptureVideo(threading.Thread):
    """ captures video stream from camera and performs various detections (face, edge, circle)
    """
    
    def __init__(self, videoDevice_index, comm = None):
        """ initiate variables"""
        
        threading.Thread.__init__(self)
        self.comm = comm
        self.current_colour = None

        self.face_detector = CascadeDetector(cascade_name=config.haar_casc,min_size=(50,50), image_scale=0.5)
コード例 #6
0
ファイル: TutFaceEyes.py プロジェクト: sadlifealone/pyvision
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
This is some sample code that shows how to use the face detector
and eye locator.
"""

import os.path
import pyvision as pv

# The ASEF eye locator has patent complications.  This next line
# disables those warnings.
pv.disableCommercialUseWarnings()

from pyvision.face.CascadeDetector import CascadeDetector
from pyvision.face.FilterEyeLocator import FilterEyeLocator

if __name__ == "__main__":
    ilog = pv.ImageLog()

    # Load the face image file
    fname = os.path.join(pv.__path__[0], 'data', 'misc', 'FaceSample.jpg')

    # Create the annotation image in black and white so that color
    # annotations show up better.
    im = pv.Image(fname, bw_annotate=True)

    ilog(pv.Image(fname), "Original")