Questions about image.b_and(image[, mask=None])


Is there a way to use mask so that it would be in frame buffer? I am wondering would it be faster way to do mask function?

I did found that if the mask is in flash drive then it works like this:

img2 = sensor.snapshot().b_and(“mask_test.bmp”)

if i have in img sensor snapshot which i have modified so that all it’s bits are black or white
img.set_pixel(x, y, (0, 0, 0))
img.set_pixel(x, y, (255, 255, 255))

i cannot use this img as mask. So is there a way?


See sensor.alloc_extra_fb(). Let’s you create a second frame buffer.