--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import bob.ip.base
import bob.io.video
import numpy
input = bob.io.video.reader('./video.mp4')
vin = input.load()nFrames = vin.shape[0]grayFrames = numpy.zeros(shape=(nFrames,vin.shape[2],vin.shape[3]))
for i in range(nFrames): grayFrames[i] = bob.ip.color.rgb_to_gray(vin[i,:,:,:]) lbp_xy = bob.ip.base.LBP(8,1)lbp_xt = bob.ip.base.LBP(8,1)lbp_yt = bob.ip.base.LBP(8,1)lbptop = bob.ip.base.LBPTop(lbp_xy, lbp_xt, lbp_yt)
t = int(max(lbp_xt.radius, lbp_yt.radius))w = int(grayFrames.shape[1] - lbp_xy.radii[0]*2)h = int(grayFrames.shape[2] - lbp_xy.radii[1]*2)output_xy = numpy.zeros((t,w,h),dtype='uint16')output_xt = numpy.zeros((t,w,h),dtype='uint16')output_yt = numpy.zeros((t,w,h),dtype='uint16')
lbptop(grayFrames,output_xy, output_xt, output_yt)print(output_xy)print(output_xt)print(output_yt)
import bob.ip.base
import bob.io.video
import bob.ip.color
import numpy
#input = bob.io.video.reader('./video.mp4')
#vin = input.load()
vin = numpy.random.rand(100, 3, 320, 480)
nFrames = vin.shape[0]
grayFrames = numpy.zeros(shape=(nFrames, vin.shape[2], vin.shape[3]))
for i in range(nFrames):
grayFrames[i] = bob.ip.color.rgb_to_gray(vin[i, :, :, :])
lbp_xy = bob.ip.base.LBP(8, 1)
lbp_xt = bob.ip.base.LBP(8, 1)
lbp_yt = bob.ip.base.LBP(8, 1)
lbptop = bob.ip.base.LBPTop(lbp_xy, lbp_xt, lbp_yt)
t = nFrames - 2*int(max(lbp_xt.radius, lbp_yt.radius))
w = int(grayFrames.shape[1] - lbp_xy.radii[0] * 2)
h = int(grayFrames.shape[2] - lbp_xy.radii[1] * 2)
output_xy = numpy.zeros((t, w, h), dtype='uint16')
output_xt = numpy.zeros((t, w, h), dtype='uint16')
output_yt = numpy.zeros((t, w, h), dtype='uint16')
lbptop(grayFrames, output_xy, output_xt, output_yt)
print(output_xy)
print(output_xt)
print(output_yt)
```
--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "bob-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bob-devel/P8RpbRKAySg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bob-devel+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.