Designing miniature computational cameras for photography, microscopy, and artificial intelligence