def handler(clientsock, addr):
	data = clientsock.recv(BUFF)
	print repr(addr) + ' recv:' + repr(data)
	input_data = str.split(data);
	filename = input_data[0]
	waveform_filename = input_data[1]
	freq = eulerian_magnification(filename, image_processing='laplacian', pyramid_levels=4, freq_min=2, freq_max=10, amplification=15, wf_file=waveform_filename)
	clientsock.send(freq)
	print repr(addr) + ' sent:' + repr(freq)
	clientsock.close()
	print addr, "- closed connection" #log on console
Пример #2
0
from eulerian_magnify import eulerian_magnification


#eulerian_magnification('media/bryce.avi', gauss_level=3, freq_min=1.1, freq_max=1.3, amplification=50)
#eulerian_magnification('media/bryce3.MOV', gauss_level=3, freq_min=1.1, freq_max=1.3, amplification=75)
#eulerian_magnification('media/babysleeping_source.wmv', gauss_level=4, freq_min=0.4, freq_max=0.55, amplification=75)
eulerian_magnification('media/face.mp4', gauss_level=3, freq_min=50.0/60.0, freq_max=1.0, amplification=50)

#show_frequencies('media/skin.avi',bounds=[340,340+134,300,600])
#show_frequencies('media/skin.avi')
#eulerian_magnification('media/skin.avi', gauss_level=3, freq_min=1.0, freq_max=1.2, amplification=85)
#eulerian_magnification('media/oldspice_fabio.avi', gauss_level=3, freq_min=1.0, freq_max=1.2, amplification=85)
Пример #3
0
def butter_bandpass(lowcut, highcut, fs, order=5):
    nyq = 0.5 * fs
    low = lowcut / nyq
    high = highcut / nyq
    b, a = scipy.signal.butter(order, [low, high], btype='band')
    return b, a


def butter_bandpass_filter(data, lowcut, highcut, fs, order=5):
    b, a = butter_bandpass(lowcut, highcut, fs, order=order)
    y = scipy.signal.lfilter(b, a, data, axis=0)
    return y


########NEW FILE########
__FILENAME__ = examples
from eulerian_magnify import eulerian_magnification, show_frequencies

show_frequencies('media/face.mp4')
eulerian_magnification('media/face.mp4',
                       image_processing='gaussian',
                       pyramid_levels=3,
                       freq_min=50.0 / 60.0,
                       freq_max=1.0,
                       amplification=50)

#show_frequencies('media/baby.mp4')
#eulerian_magnification('media/baby.mp4', image_processing='laplacian', pyramid_levels=5, freq_min=0.45, freq_max=1, amplification=50)

########NEW FILE########
Пример #4
0
def get_frame_dimensions(frame):
    """Get the dimensions of a single frame"""
    height, width = frame.shape[:2]
    return width, height


def butter_bandpass(lowcut, highcut, fs, order=5):
    nyq = 0.5 * fs
    low = lowcut / nyq
    high = highcut / nyq
    b, a = scipy.signal.butter(order, [low, high], btype='band')
    return b, a


def butter_bandpass_filter(data, lowcut, highcut, fs, order=5):
    b, a = butter_bandpass(lowcut, highcut, fs, order=order)
    y = scipy.signal.lfilter(b, a, data, axis=0)
    return y
########NEW FILE########
__FILENAME__ = examples
from eulerian_magnify import eulerian_magnification, show_frequencies


show_frequencies('media/face.mp4')
eulerian_magnification('media/face.mp4', image_processing='gaussian', pyramid_levels=3, freq_min=50.0 / 60.0, freq_max=1.0, amplification=50)

#show_frequencies('media/baby.mp4')
#eulerian_magnification('media/baby.mp4', image_processing='laplacian', pyramid_levels=5, freq_min=0.45, freq_max=1, amplification=50)

########NEW FILE########
Пример #5
0
from eulerian_magnify import eulerian_magnification, show_frequencies


#print show_frequencies('p')
print eulerian_magnification('p', image_processing='gaussian', pyramid_levels=3, freq_min=50.0 / 60.0, freq_max=1.0, amplification=50)

#show_frequencies('media/baby.mp4')
#eulerian_magnification('media/baby.mp4', image_processing='laplacian', pyramid_levels=5, freq_min=0.45, freq_max=1, amplification=50)
Пример #6
0
from eulerian_magnify import eulerian_magnification, show_frequencies

#print show_frequencies('p')
print eulerian_magnification('p',
                             image_processing='gaussian',
                             pyramid_levels=3,
                             freq_min=50.0 / 60.0,
                             freq_max=1.0,
                             amplification=50)

#show_frequencies('media/baby.mp4')
#eulerian_magnification('media/baby.mp4', image_processing='laplacian', pyramid_levels=5, freq_min=0.45, freq_max=1, amplification=50)